ihsiu1
Posts: 17
Joined: Tue Feb 21, 2006 4:36 pm

change Project Root Path can't replace w/files of other dir?

Hi,

First, thanks for your timely responses to my previous questions. Really appreciated. More are coming though :-)

With the default <Paths Type> of <Project Settings> as <Paths are relative to Project Root Path> -

After I do the following -
1. set <Project Root Path> to C:\advInst\src;
2. include source file C:\advInst\src\test.dat

In the right pane of the <Files & Folders>, the column <Source> of test.dat shows the absolute path, C:\advInst\src\test.dat, not relative path, test.dat. Why?

Moreover, I thought I can use another test.dat of different dir, say C:\newSet\test.dat, by setting <Project Root Path> to C:\newSet.
(I also rename C:\advInst\src to C:\advInst\src2 to be sure.)

The right pane of the <Files & Folders>, the column <Source> of test.dat remains the same. It changes only after I close & reload the aip, then it shows size "???" of C:\advInst\src\test.dat. And surely <Build Project> gets the error "Error opening file: C:\advInst\src\test.dat."

How can I replace source files (thousands in our case) with those of different dir?

Thanks again,
ihsiu
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
In the right pane of the <Files & Folders>, the column <Source> of test.dat shows the absolute path, C:\advInst\src\test.dat, not relative path, test.dat. Why?
Because, regardless how the paths are stored inside the AIP file, in memory the source paths are always stored as absolute paths.
Moreover, I thought I can use another test.dat of different dir, say C:\newSet\test.dat, by setting <Project Root Path> to C:\newSet.
Changing the Project Root Path does not change which files are included in your project, only how the paths are stored inside the AIP file. See the following page for details:
http://www.advancedinstaller.com/user-g ... s-tab.html
How can I replace source files (thousands in our case) with those of different dir?
If the 2 directories have the same structure (files and sub-folders), then this can be achieved using relative paths and duplicating the AIP file. Example:
1. The initial folder may have the following structure, where "p1.aip" contains all the files/folders under "Dir1\source". The Project Settings are set to the default options (Paths Relative to Project Root Path, which is set to the path of the folder containing the AIP file - "Dir1" in this case; therefore, no changes need to be performed in the "Edit Project Settings" dialog after the project is created):

Code: Select all

- Dir1
    - p1.aip
    - source
        - program.exe
        - folder1
             - file1.exe
        - folder2
              - file2.txt
        - folder3
              - file3.dll
2. Assuming that there is another folder "Dir2" with the same structure as "Dir1" containing different files, the file "p2.aip" is obtained by copying "p1.aip" to "Dir2". Because all the paths stored in "p1.aip" are relative to "Dir1", it results that all the paths inside "p2.aip" will be relative to "Dir2".

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”