Deploying hierarchical file structure

S

sasa555

Hello,

I must deploy hierarchical file structure to the target, and have
created component for this purpose.
Now, as far as I can tell, if you use Files tab under the component in
Component Manager, then you must have flattened structure in the
repository.

Let's say the structure I must deploy looks like:
F1
a
F2
b

Where F1 and F2 are folders, and a and b are files. If I understand
correctly, to deploy this with one component, I must have files a and
b in the repository in the "flat" form i.e. they must reside directly
in the repository folder. Is this right?

Assuming, this is the case, what is the best practice for deploying
hierarchy? Currently I'm using self-extracting archives for this - I
pack entire hierarchy into one sfx exe and deploy only the exe.

Regards,
Sasa
 
S

Sean Liming \(eMVP\)

For the repository, the files have to be in a flat directory. The component
can define where the files will be in the final image. In the destination
for each file settings, you would set the root path:

For file a - %24%\F1
For file b - %24%\F1\F2

When TD builds the image it looks at what was defined in the component and
copies the files from the flat repository to the specified directories.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit
 
S

sasa555

Hello,

I suspected this, which is why I asked the question.
What if I want to deploy some setup which has lot of files organized
in hierarchy (i.e. not in a single folder)?
I could either do this manually, which is very tedious and error
prone, or archive such file in a CAB, SFX, or something else.
What is suggested as the best practice?

Regards,
Sasa
 
S

Sean Liming \(eMVP\)

This is what I do:
1. On your local hard driove, copy the files to the location where they will
be in the image. (if posible)
2. In Component Designer, do a ADD "Files In Folder"
3. Delete teh copy of the files from your development machine.

You may want to open the SLD in notepad and replace c:\ with %24%\. This is
just for dual boot compatibility.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit
 
K

KM

Just wanted to add that I do the big imports (many files in lots of directories) the same way:
I create the right directory structure on my dev machine - the same as it'd be on the target device - and place it anywhere
on the disk (e.g., C:\MyDir),
and then use the TD "Files in Folders" import feature to get all the files in one SLD.

Then it is easy to open SLD in notepad and replace the known pattern (C:\MyDir) with whatever I need it to be on the target device,
certainly using SetupAPI variables (%24% and such) as much as possible.

Another step we should mention here is copy all the files in one flat directory - Repository. The downside of the approach above is
that if you happened to have files with the same name in different directories you will have to manually tweak your SLD to resolve
those conflicts (change the source name of those files to make them unique).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top