Summary
This articles goes over how to use Source Paths to allow sharing project files in different environments.
Synopsis
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.
Discussion
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: Using the InstallAnywhere Preferences Dialog Box
To add source paths using the InstallAnywhere Preferences dialog box:
- On the Edit menu, click Preferences. The InstallAnywhere Preferences dialog box opens.
- Click the Source Paths tab.
- Select Enable Source Paths check box.
- Click the Add button. InstallAnywhere adds an empty row to the list of source paths.
- In the Access Path Name column, click the empty box and then enter a variable name for the source path. For example: RESOURCE
- In the Folder column, click the empty box. The Choose Folder dialog box opens.
- Browse to the source path and click the Select button. InstallAnywhere adds the full path to the Folder box.
- Click OK.
To refer to this source path elsewhere in your InstallAnywhere project, use the following notation:
$<access_path_name>$
For example: $RESOURCE$
Method 2:
To add source paths using system environment variables:
- 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.
- 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
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.
Related Articles
Use Source Paths With the InstallAnywhere Ant Build Task 6Number of Views Source Path File Location 3Number of Views How Components Created by Dynamically Linked Files Are Shared by Different Projects 6Number of Views Basic MSI Project: Launch Executable .exe File If the .exe File Is Found Using a System Search and Force a Reboot 8Number of Views Adoption not working with 'The system cannot find the file specified' error is the beacon and target adoption machine are … 16Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago