View Full Version : Adding files to project
crewsr
08-16-2007, 02:12 PM
When our software is built (nightly build), all the compiled files are placed in a general 'Build' area who's directory structure is unlike the structure where the files are installed to on a target system. When adding new files to my project, SUFWI automagically assumes the file destinations to be a mirror of where the files come from in the build area, so virtually every file destination is incorrect when they are imported. Even worse is that this also has a tendency to trash the folder structure that I have created for the project by adding bunches of incorrect folder entries that I have to manually remove every single time. Is there anyway around this? Instead of having the SUFWI assume (incorrectly) where the file is supposed to go, is there any way I can import groups of file and specify which folder they are supposed to go before the actual import?
Brett
08-21-2007, 09:39 AM
crewsr,
Sorry for taking so long to respond to this one. I saw it a few days ago but then got distracted and forgot about it. Let me make a few comments now.
OK, first let me explain how the "magic" behind the folder assignment works. In SUFWI there is something internally (inside out source code) called the "base folder" of a project. This is the folder on your system that defines where [INSTALLDIR] will be in the destinations by default when files are added.
So, for example, if base folder is "C:\Files" then files you add from "C:\Files" will go to [INSTALLDIR] (usually defined as "[ProgramFilesFolder]Your Product Name" by default.) Then if you add files from "C:\Files\Abc", the destination will be set to a new folder called "Abc" under [INSTALLDIR], so something like "ProgramFilesFolder]Your Product Name\Abc". Now, if you add files from say "C:\Other Folder\Abc" since it does not match the base folder they will go to [INSTALLDIR] as well. Got it?
Now, knowing that you are a smart person, you are now asking:
1. How is "base folder" defined?
2. How can I change it?
Answers:
1. Base folder is defined when you add one or more files to an empty file list. That is the first file that is added to an empty SUFWI project defines base folder. If you start by adding a tree of folders it will use the highest-level parent folder that a file is added from. If you remove all of the files from a project it resets base folder to "" and then will be re-defined when you add files again.
2. Right now, the only way to change base folder through the SUFWI UI is to remove all of the files from your project and then add them again. The way to do it from outside of SUFWI's UI is to edit your project file directly in a text or XML editor program. Look for the tag "<BaseDirectory>" in the file. That is the value to change. You will have to save the file and then re-open it in SUFWI for the change to take effect.
I know that (2) above is rather inconvenient. I plan to add some features to SUFWI that will expose this value through the UI. One idea that I am mulling over right now is an "Advanced Add Files" dialog. This dialog would allow you to specify a folder on your system as well as include and exclude filters as well as the base folder. Probably will even let you save the settings so that you can re-use your queries between projects and sessions. If anyone has ideas of what they would like to see in such an "Advanced Add Files" feature, let me know. We will still keep the methods of adding files that are there now, but I can see how it would be nice to have finer control over the adding files to project process.
crewsr
08-23-2007, 09:31 AM
Hi Brett,
Thanks for your response. An 'Advanced Add' option would be pretty sweet. I'm still in the process of learning your software (and .msi in general), so I've got my work cut out for me.
At any rate, if I understand you correctly, if I add a 'Dummy File' from my system who's source folder conforms to the (likely) folder structure of my target, SUFWI will set that source as the [INSTALLDIR]. Then, when I add files from a COMPLETELY DIFFERENT filesystem, those new files will also be assigned with that [INSTALLDIR] property.
Example: I start a new project and add 1 file called 'dummy.txt' from a directory called 'C:\Program Files\Barr\Spooler', which sets the [INSTALLDIR] value to 'C:\Program Files\Barr\Spooler'. I can then start adding files from V:\SpoonNT\NightlyBuild\preimage\whatever module\i386, but since that filesystem doesn't share the common 'Base' folder from my dummy, then the destination property of anything I add will be [INSTALLDIR].
This is a better situation, I'll still have to go into each set of files I import and adjust the destination properties, but at least it won't change the folder structure I've set up for the project.
Brett
08-23-2007, 11:17 AM
Hi Brett,
Example: I start a new project and add 1 file called 'dummy.txt' from a directory called 'C:\Program Files\Barr\Spooler', which sets the [INSTALLDIR] value to 'C:\Program Files\Barr\Spooler'. I can then start adding files from V:\SpoonNT\NightlyBuild\preimage\whatever module\i386, but since that filesystem doesn't share the common 'Base' folder from my dummy, then the destination property of anything I add will be [INSTALLDIR].
That is correct.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.