Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use Source Paths to allow sharing the same project file on different machines

How to use Source Paths to allow sharing the same project file on different machines


This articles goes over how to use Source Paths to allow sharing project files in different environments


You can use source paths to reference file resources using variable paths instead of absolute paths. If you move your project and source files to a different location, InstallAnywhere can find all of the files by simply updating these source paths. This allows you to share a project file with other team members, even when the file resources are located at different paths on their development systems. Using source paths also enables you to use the same project file on different types of operating systems, such as UNIX-based and Windows-based systems.


How to Use Source Paths
When migrating a project file (.iap_xml) to another machine, opening the project may cause InstallAnywhere to prompt you to verify the location of referenced files. Manually re-referencing all of your source files can be a very costly task. Utilizing Source Paths will help eliminate this process. For example, say your source files are located under a directory called D:\Sources. If you were to create a Source Path called $SOURCEPATH1$ with a value of D:\Sources, all paths that reference D:\Sources in your project will now use $SOURCEPATH1$ instead. For example, if you have an Install File action that references D:\Sources\sample.xml, the path will get resolved as $SOURCEPATH1$\sample.xml. If you open this project on another machine, the path will retain the usage of $SOURCEPATH1$\sample.xml. You will then simply need to update the $SOURCEPATH1$ variable on the new machine to the folder path that contains the source files on the new machine.

How to Add Source Paths
InstallAnywhere supports two different methods for adding source paths to a machine.

Method 1:
To add source paths using the InstallAnywhere Preferences dialog box:
  1. On the Edit menu, click Preferences. The InstallAnywhere Preferences dialog box opens.
  2. Click the Source Paths tab.
  3. Select Enable Source Paths check box.
  4. Click the Add button. InstallAnywhere adds an empty row to the list of source paths.
  5. In the Access Path Name column, click the empty box and then enter a variable name for the source path. For example: RESOURCE
  6. In the Folder column, click the empty box. The Choose Folder dialog box opens.
  7. Browse to the source path and click the Select button. InstallAnywhere adds the full path to the Folder box.
  8. Click OK.
To refer to this source path elsewhere in your InstallAnywhere project, use the following notation:
For example: $RESOURCE$

Method 2:
To add source paths using system environment variables:
  1. Access the environment variables on the development system:
    • On Windows-based systems, open the System Properties dialog box. On the Advanced tab, click the Environment Variables button.
    • On UNIX-based or OS X?based systems, modify the proper shell configuration file or set the variable directly using the shell.
  2. Add an environment variable for the source path, preceded by the string IA_PATH_. For example, to set the source path SOURCE_PATH, set the environment variable as follows: IA_PATH_SOURCE_PATH

Related KB Articles

Source Path File Location
Use Source Paths With the InstallAnywhere Ant Build Task
How to Deal with the Path Manager: Source Path Incorrect Message when Opening an Existing Project

Additional Information

Source paths will automatically be substituted for the most complete path possible. For example, suppose you have a project with the following defined source paths:
$SOURCEPATH1$ = D:\Sources\SampleApp\3000
$SOURCEPATH2$ = D:\Sources

When you add a file such as D:\Sources\SampleApp\3000\readme.txt to that project, because $SOURCEPATH1$ has the most complete path match available, this file will be referenced by: $SOURCEPATH1$\readme.txt
If a team member opens this project and the source path is not defined, InstallAnywhere shows a dialog box that requests the location for the source path.

InstallAnywhere also provides some predefined variables for source paths that exist in any project. The values of these variables cannot be changed or edited:
$IA_HOME$ = Location on the system where InstallAnywhere is running. A common location is: C:\Program Files\InstallAnywhere
$IA_PROJECT$ = Location on the system where the InstallAnywhere project is located.
$USER_HOME$ = The User Home folder.
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 12, 2018 06:00 PM
Updated by: