ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Relative path in “Files and Folders”

Hi

I am using Advance Installer 6.3.

While we add files in “Files and Folders”, it is taking absolute path like “C:\Projects\Project A\Sub Folder A\Abc.cs”.
My question is we can not specify relative path like “..\..\Sub Folder\Abc.cs”.

Thanks
Amit
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Relative path in “Files and Folders”

Hello,

Select Project->Options.
In the Project Paths tab, switch your paths type to "relative".

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Relative path in “Files and Folders”

I'm currently using Advanced Installer 7.6.1:
I was looking to do the same thing: not use absolute directory, but relative. I went to Project->Options and choose "Paths are relative to Project Root Path", but when I look at all the files in the "Files and Folders" section, then all "source" are still absolute.
In other words, when I choose "Edit Project Settings" -> "Project Paths" (tab), I choose: "Paths are relative to Project Root Path" and "Except when on a different drive", then the value in "Project Root Path:" is: "D:\Develop\Trunk.New\Backend\Observer\Installers\MsiInstaller\Encoder" - which is where I store my "Encoder.aip" file.
However, all files in "Resources"->"Files and Folders"-> "Application Folder" have absolute directories.
For example, my file
"name": ChannelSettings.dll
"size": 120kb
"type": Application Extension
"Version" 5.5.1.13427
"Source": D:\Develop\Trunk.New\Backend\Observer\bin\x32\Release\ChannelSettings.dll

why is the "source" not something like: "..\..\..\bin\x32\Release\ChannelSettings.dll"?
Meaning: considering that "Project Root Path:" is: "D:\Develop\Trunk.New\Backend\Observer\Installers\MsiInstaller\Encoder".

Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Relative path in “Files and Folders”

Hello,

They may appear to have absolute paths but the project actually holds relative paths internally. The absolute paths to the files are displayed so that the files can be located easily by the user.
You can test this by renaming your project's folder. It should still be able to locate the resources it depends upon.

For example let us asume you have the following project structure:

Code: Select all

c:\myproject\project.aip
c:\myproject\resources\myresource.txt
Simply rename the "myproject" folder. project.aip should still be able to locate myresource.txt and it should still be buildable.
You can also look inside the .aip itself using a text editor to see that the paths really are relative.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Relative path in “Files and Folders”

Yes, I see it, thanks.
Dashut.

Return to “Common Problems”