Absolute/Relative path problems - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Absolute/Relative path problems

Hi,

I am experiencing some problems with the relative path settings which suggest to me either I don't understand this setting or that there is an issue!

I develop installs locally and then move them to a build machine. I am not in control of the directory structure on the build machine. Typically on my local machine AI projects are in a location similar to "D:\Advanced Installer Projects\AppName\AppName.aip". On the build machine folder structure is similar to "c:\Builds\Project\sub-project\Install\AppName.aip". In both cases script files are contained in a scripts sub-folder below the aip project folder.

I have selected the option "Paths are relative to the project root path except when outside of project root or on a different drive", however when using the Custom Action Screen to specify an attached script, the path appears as absolute. I would have expected this to be relative.

Similarly, If I specify a File Name in the package section of the Media Screen, then on saving and re-opening the project and absolute path is used in the Folder field - despite me not specifying a folder.

The result of this is that I have to edit the AI project on the build machine in order to get it to run which is less than ideal. Am I being stupid here? If so please explain where I am going wrong!

Regards,

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

Re: Absolute/Relative path problems

Hello,
have selected the option "Paths are relative to the project root path except when outside of project root or on a different drive", however when using the Custom Action Screen to specify an attached script, the path appears as absolute. I would have expected this to be relative.

Similarly, If I specify a File Name in the package section of the Media Screen, then on saving and re-opening the project and absolute path is used in the Folder field - despite me not specifying a folder.
Please note that in both cases the paths are relative to the .aip project file even if they appear as absolute paths in Advanced Installer. In order to ensure that your .aip project also builds on the build machine, create on your local machine the same directory structure as on the build machine.

For example, if on your build machine the structure is as follows:

Code: Select all

On the build machine:
============================
- C
    Builds
      Project
        sub-project
          Install
            AppName.aip
        scripts
          myscript.vbs
        Output
          AppName.msi
        misc
          <some other files>
          
The relative path to myscript.vbs is ..\..\scripts\myscript.vbs
The relative path to AppName.msi is  ..\..\Output\AppName.msi 

The relative paths are saved in the .aip project, not the absolute ones
The following structure would have to be created on your local machine:       
          
On your local machine:
============================================
- C
  <PROJECTFOLDER>
    sub-project
      Install
        AppName.aip
    scripts
      myscript.vbs
    Output
      AppName.msi
   
You can move the PROJECTFOLDER directory wherever you like on your machine, provided it conserves the structure that is displayed above.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Absolute/Relative path problems

I don't really want to change the structure on my development box.
I've looked further into this and what seems to happen is that if you have previously selected the option to use absolute paths then it does not appear possible to revert to relative paths.

1. I create a simple project using relative paths (Paths are relative to the project root path except when outside of project root or on a different drive) . I can see that the sourcepath to the script file is relative (or at least not absolute!).
2. I change the option to absolute - the sourcepath becomes absolute
3. I revert to the first choice - sourcepath does not change.
4. I change to the other relative path option (except when on a different drive) then a full relative path is used.
5. I revert to the first choice - sourcepath is absolute.

Clearly there is a problem when I cannot revert to an earlier setting.
I have attached a zip file with five aip files that demonstrate this problem, the files are named dummy1.aip through dummy5.aip corresponding to the 5 steps above.

Phil
Attachments
project files.zip
(8.53 KiB) Downloaded 429 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Absolute/Relative path problems

Hi,

Unfortunately the path options are not very intuitive. We will try to improve them in a future version of Advanced Installer.

Basically, the paths can be relative only if they represent files or folders placed in the project folder or in sub-folders of the project folder. Files and folders placed in the root or parent of the project folder, for example, will always have an absolute path. This also applies to other sub-folders of the project parent folder (folders on the same tree level as the project folder).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PhilB
Posts: 95
Joined: Fri Jul 06, 2007 4:13 pm

Re: Absolute/Relative path problems

But in the examples I sent you the aip file is in "New Folder" and the test.vbs file is in "New Folder"/scripts folder. Surely this is a sub-folder of the project folder?

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

Re: Absolute/Relative path problems

Hi Phil,

This indeed seems to be a bug in Advanced Installer. We have added a fix on our TODO list. It will be available in a future version of Advanced Installer.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”