TheM
Posts: 19
Joined: Wed Mar 02, 2016 12:46 am

Absolute/relative paths

Hi,

I have inherited a build project that uses relative paths. This is necessary as AIP edits and builds do not happen in the same part of the directory tree: edits are done in a fixed location while build system creates a new directory for every build.

Now I need to add a few prerequisites and these are taken from several fixed directories on the same drive but each of these currently ends up with a relative path which is wrong -- they need to have absolute paths. I don't see a way to do this in Advanced installer. Moving prerequisites to a different drive is not an option, project root is not fixed and path variables are useless to me since they are relative.

I either need a way to specify absolute paths for prerequisites regardless of the Objects->Projects Paths setting (things external to a project are usually kept if fixed locations, they don't move around often) or I can add this as ordinary files if needed (I was hoping for an option in Properties->File to force absolute path for individual item but found nothing). What do I do?

Regards,
Harvey
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Absolute/relative paths

Hi Harvey and welcome to Advanced Installer forums,
I either need a way to specify absolute paths for prerequisites regardless of the Objects->Projects Paths setting (things external to a project are usually kept if fixed locations, they don't move around often) or I can add this as ordinary files if needed (I was hoping for an option in Properties->File to force absolute path for individual item but found nothing). What do I do?
Please note that you can edit the source path field from the File Properties tab. Click on the [ ... ] button to change it. You will have absolute path for the related file while for the other files you will have relative paths.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheM
Posts: 19
Joined: Wed Mar 02, 2016 12:46 am

Re: Absolute/relative paths

Hi Dan,
Dan wrote:
(I was hoping for an option in Properties->File to force absolute path for individual item but found nothing)
Please note that you can edit the source path field from the File Properties tab. Click on the [ ... ] button to change it. You will have absolute path for the related file while for the other files you will have relative paths.
That's the first thing I tried and just tried it again. New path entered in "Source path:" is saved as a relative path, not absolute path.

Cheers,
Harvey
TheM
Posts: 19
Joined: Wed Mar 02, 2016 12:46 am

Re: Absolute/relative paths

So this can't be done?
TheM
Posts: 19
Joined: Wed Mar 02, 2016 12:46 am

Re: Absolute/relative paths

Dan wrote:Please let me know if that helped.
No, it did not help. Does not work.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Absolute/relative paths

Hi,

Paths are stored (in AIP) by default as *relative* to the project file (AIP), if they reside on the same logical drive as the AIP. Otherwise, they are stored in absolute form.

Check available options here:
http://www.advancedinstaller.com/user-g ... s-tab.html

Also, be aware, that if you use project app paths (symbolic variable paths), they may be subject to environment changes (dependent on the machine where you open the project) - this being the intended behavior.

http://www.advancedinstaller.com/user-g ... ables.html
http://www.advancedinstaller.com/user-g ... h-var.html

Project resource files policy:
http://www.advancedinstaller.com/user-g ... ables.html

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheM
Posts: 19
Joined: Wed Mar 02, 2016 12:46 am

Re: Absolute/relative paths

TheM wrote:path variables are useless to me since they are relative.
I examined the links you've provided; I was already familiar with them all (or so I thought) but somehow got the impression that the path variables contain relative paths.
I see now that this is not the case:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PathVariables Application="Advanced Installer" Version="12.7.1">
  <Var Name="TEST_DIR" Path="C:\Temp" Type="2" ContentType="0"/>
</PathVariables>
Path variables should do what I want.

Thanks,
Harvey

Return to “Common Problems”