cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sandy_2008
Level 7

how IA can access env variable during build time?

I have an environment variable. How will IA access during build time?
I have two scripts, which will be run in post-installation. But depending on the environment variable, the IA should bundle one script.
Labels (1)
0 Kudos
(3) Replies
purcellk24
Level 7

Are you talking about bundling a file into your final installer depending upon the platform the installer was built on? If so, just replace that file in your process before creating your installer.

Why would IA need to access a system environment variable at build time? IA isn't really being executed at build/compile time. If it is a location, then use source paths.
0 Kudos
munsingh
Level 6

sandy_2008 wrote:
I have an environment variable. How will IA access during build time?
I have two scripts, which will be run in post-installation. But depending on the environment variable, the IA should bundle one script.


There is no direct way. This is the information I got from the IA technical support. What you can do is:
1. Have some Variables defined in your project and have logic for bundling the script based on the value of this variable.
2. Before building directly modify the iap.xml file using xslts or grep or some other mechanism to change the value of the variable in the xml file.

This should solve your problem.

Regards,
Manish
0 Kudos
RobertDickau
Flexera Alumni

Please also see the IA help topic "Adding and Removing Source Paths"; as purcellk24 mentions, you can use source paths, and that help topic describes how to set one with an environment variable...
0 Kudos