Reputation: 4708
How can I add a file to an InstallShield component specifying a relative path to the InstallShield project in order to make it easy compiling the project on different machines?
Upvotes: 29
Views: 35104
Reputation: 7303
You can use <path variables>
(see documentation - resurrected from Wayback, Aug 2018) to point all your files relatively to them.
Also see this blog post.
Upvotes: 17
Reputation: 3392
With the free VS Limited Edition of InstallShield, setting custom paths doesn't look possible. So hacking the ISL file may be necessary having only a few predefined path options available.
Here are the predefined path variables I found in the 2013 Express docs: (Verify in case of typos)
Predefined Path Variable Value InstallScript Path Variable
--------------------------------------------------------------------------------------------------------------
<ProgramFilesFolder> C:\Program Files\ <PROGRAMFILES>
<CommonFilesFolder> C:\Program Files\Common Files\ <COMMONFILES>
<WindowsFolder> C:\Windows\ <WINDIR>
<SystemFolder> C:\Windows\System32\ <WINSYSDIR>
<ISProjectFolder> C:\InstallShield 2013 Projects\
<ISProjectDataFolder> <ISProjectFolder>\ProjectName <ISPROJECTDIR>
<ISProductFolder> C:\Program Files\InstallShield\2013
<ISRedistPlatformDependentFolder> C:\Program Files\InstallShield\2013\
.\Redist\Language Independent\i386
<ISRedistPlatformDependentExpressFolder> C:\Program Files\InstallShield\2013\
.\Redist\Language Independent\
.\i386 Express
My VS solution includes both an Outlook AddIn and an InstallShield LE setup project. Although InstallShield was including the AddIn generated output and related assemblies, neither the manifest nor vsto files were included. So I needed to specify these separately. This worked for one workstation; however, another workstation sharing the solution had a different source directory structure giving unresolved sources.
The manifest and vsto files were added by InstallShield with absolute paths. A symlink common to all the workstations could have solved the issue, but I decided to hack the ISL files to see if it's possible to use relative paths realizing the ISL file might require maintenance hacking in the future.
In order to get the common parent directory (i.e., the solution directory in my case,) I specified the following two parent selectors (..\..) in the ISL for special artifacts listed in <table name="File">.
...<td><ISPROJECTDIR>..\..\MyProject\bin\Release\...
where HTML entities are used for the surrounding less-than/greater-than symbols of the <ISPROJECTDIR> variable.
I ran a second test (which should have been the first) using the <ISPROJECTFOLDER> variable instead of <ISPROJECTDIR>. In this test, only one parent selector was necessary:
...<td><ISPROJECTFOLDER>..\MyProject\bin\Release\...
So far things seem to be resolving correctly but your relativity may vary.
Upvotes: 32
Reputation: 11
Here is my solution if your "source files"'s disk partion were not same as <ISProjectFolder>:
Upvotes: 1
Reputation: 184
Go back into your project and make sure all your files you want copied have properties: Build Action=Content and Copy to output directory=Copy Always
Upvotes: 4
Reputation: 9857
<ISProjectFolder>
is the macro for the directory containing the Install Shield project.
(Much easier to have the answer on this page...)
Upvotes: 13
Reputation: 1864
When you add the file, you should try to have it be relative to the installshield project file. If you keep the .ism file in your source tree, then any executables you add should had a path relative to that file.
Upvotes: 1