This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Best way to include platform specific executables?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 26, 2010
02:43 PM
Best way to include platform specific executables?
Hi,
I'm new to InstallAnywhere (and installers in general). I need to develop an installer that will place C-code executables that are specific for various platforms (Solaris, Windows, etc.). I've gone through the tutorials and searched through the help and can't find a good example of how to place these files. Is there a recommended way to include files in the project & have them installed only on the proper OS (like move actions with rules)?
Thanks in advance,
JK
I'm new to InstallAnywhere (and installers in general). I need to develop an installer that will place C-code executables that are specific for various platforms (Solaris, Windows, etc.). I've gone through the tutorials and searched through the help and can't find a good example of how to place these files. Is there a recommended way to include files in the project & have them installed only on the proper OS (like move actions with rules)?
Thanks in advance,
JK
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 26, 2010
04:58 PM
I've been playing around defining components like "Common Files", "Linux Files" and "Windows Files". I've added rules for the Linux & Windows components so that they are only installed on the proper platforms.
Does that seem like the best way to handle this?
Does that seem like the best way to handle this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 26, 2010
11:25 PM
Hi jkehoe,
There are multiple ways by which you can do this. However, I will attempt to describe the simplest of all ways (the rules route, that you already explored)
Let us say you have the following scripts.
[LIST=1]
solaris.sh
linux.sh
allunix.sh
If you want to ship solaris.sh for solaris platform, then add the file to install phase, and then add a Check Platform Rule with Solaris on the perform list and all other platforms on the Do Not Perform list.
Similarly, for linux.sh, put linux alone on the perform list
Similarly, for allunix.sh, put linux, hpux, solaris, macos, macosx on the perform list.
Another Way to do this:
You can also achieve this by using Tags which was introduced in IA 2010. Though I would not recommend Tags for such simple scenarios, I would recommend that you go through Tags. Probably it might help you in some thing else.
Thanks,
There are multiple ways by which you can do this. However, I will attempt to describe the simplest of all ways (the rules route, that you already explored)
Let us say you have the following scripts.
[LIST=1]
If you want to ship solaris.sh for solaris platform, then add the file to install phase, and then add a Check Platform Rule with Solaris on the perform list and all other platforms on the Do Not Perform list.
Similarly, for linux.sh, put linux alone on the perform list
Similarly, for allunix.sh, put linux, hpux, solaris, macos, macosx on the perform list.
Another Way to do this:
You can also achieve this by using Tags which was introduced in IA 2010. Though I would not recommend Tags for such simple scenarios, I would recommend that you go through Tags. Probably it might help you in some thing else.
Thanks,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2010
09:57 AM
Thanks for the response. The rules seem to work really well, but I haven't tried tags yet. I'll look into that.
I'm going to have a LOT of files to install. And some of them will have the same names for Solaris, Linux, etc. So to make the organization a little easier I was thinking about using the component route. Is there a problem with doing that?
I'm going to have a LOT of files to install. And some of them will have the same names for Solaris, Linux, etc. So to make the organization a little easier I was thinking about using the component route. Is there a problem with doing that?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2010
11:14 AM
OK, I'm not having much luck with tags. I've tried defining components and adding tags or just adding tags to specific files in the "Install" tab. No matter what I do I get the following error:
Tags not consistent with either of parents in the "Visual Hierarchy", "Feature", or "Component"
I'm trying to get the installer for each platform to contain only the files for that platform since I'll be placing a LOT of files.
Any help would be greatly appreciated.
Tags not consistent with either of parents in the "Visual Hierarchy", "Feature", or "Component"
I'm trying to get the installer for each platform to contain only the files for that platform since I'll be placing a LOT of files.
Any help would be greatly appreciated.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 29, 2010
01:01 PM
I would suggest placing the files in an action group, then placing the platform rule on the action group.
That way the rule is only specified once and applies to all files in it.
That way the rule is only specified once and applies to all files in it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 29, 2010
01:12 PM
Hi jkehoe & jrokicki,
We need to understand how tags work w.r.t all the visual hierarchy to understand the error.
The hierarchy is as follows for install phase:
For pre /post install and pre/post uninstall, the hierarchy is just very simple.
The tag association error tells you that you have an element that qualifies with much more tags than one in the parent hierarchy. i.e., the element will not execute.
Note for OS host alone, the tag customizer is not directly available. Try adding a dummy jee / db host and then you can see the tag customizer visible for the os host too ( organization > hosts tab) and then you can remove the dummy host...
Please let me know if you have any specific queries related to tags.
Thanks,
Jiju
(PS: if you hold the control key down while launching IA, then the command window opens up and when you change the tag associations, you can actually see some printlines that are printed on console which can pinpoint the association which fails.. not a published feature though)
We need to understand how tags work w.r.t all the visual hierarchy to understand the error.
The hierarchy is as follows for install phase:
OS Host
|__ Feature
|___ Component
|___ (parent actions)
|_____actions
For pre /post install and pre/post uninstall, the hierarchy is just very simple.
The tag association error tells you that you have an element that qualifies with much more tags than one in the parent hierarchy. i.e., the element will not execute.
Note for OS host alone, the tag customizer is not directly available. Try adding a dummy jee / db host and then you can see the tag customizer visible for the os host too ( organization > hosts tab) and then you can remove the dummy host...
Please let me know if you have any specific queries related to tags.
Thanks,
Jiju
(PS: if you hold the control key down while launching IA, then the command window opens up and when you change the tag associations, you can actually see some printlines that are printed on console which can pinpoint the association which fails.. not a published feature though)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2010
02:59 AM
1. what is the difference between rules (check by platform/check by architecture) vs tags
2. when do u use tags and when do u use rules
3. tags weird results:
- lets say i have two files, abc.java (eg 200KB) and def.java (eg 400KB)
- abc.java needs to install on windows 32 and def.java needs to install on windows 64.
- in the install section, i tag abc.java with the tag created as WINDOWS32 and def.java with the tag created as WINDOWS64
- in the build configuration section, i have a win32 build configuration which has the WINDOWS32 tag created and a win64 build configuration which has the WINDOWS64 tag created.
I have selected optimize for platforms and tags checkbox as well.
- when i run the build all, i get two win32setup.exe and win64setup.exe,
- THIS IS THE FUNNY THING: I see that both win32setup.exe and win64setup.exe are 600KB which means both abc.java and def.java are present physically in the both the setups. However when i install the win32setup.exe on win32 i get only abc.java deployed which makes sense as per the tag WINDOWS32.
So my question is shouldnt win32setup.exe be only 200kb with only abc.java and win64setup.exe be only 400kb with only def.java
Please help clarify, I cannot find any reference anywhere on the web/documents or even the 3 day course notes.
2. when do u use tags and when do u use rules
3. tags weird results:
- lets say i have two files, abc.java (eg 200KB) and def.java (eg 400KB)
- abc.java needs to install on windows 32 and def.java needs to install on windows 64.
- in the install section, i tag abc.java with the tag created as WINDOWS32 and def.java with the tag created as WINDOWS64
- in the build configuration section, i have a win32 build configuration which has the WINDOWS32 tag created and a win64 build configuration which has the WINDOWS64 tag created.
I have selected optimize for platforms and tags checkbox as well.
- when i run the build all, i get two win32setup.exe and win64setup.exe,
- THIS IS THE FUNNY THING: I see that both win32setup.exe and win64setup.exe are 600KB which means both abc.java and def.java are present physically in the both the setups. However when i install the win32setup.exe on win32 i get only abc.java deployed which makes sense as per the tag WINDOWS32.
So my question is shouldnt win32setup.exe be only 200kb with only abc.java and win64setup.exe be only 400kb with only def.java
Please help clarify, I cannot find any reference anywhere on the web/documents or even the 3 day course notes.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2010
03:15 AM
1. Check by platform: is it Windows, is it Linux, is it Solaris etc. (Should have been named Check by OS, actually)
Check by architecture: is it x86 or AMD64 (for Intel) or is it SPARC etc etc (so what's the processor architecture).
So you would actually need both in order to test for a combination like:
is it a Win 64 or is it a Solaris on x86?
2. Tags must be a new feature in IA 2010, which I'm yet to use, so I have no experience with it. However, rules existed I think right from the 1st version of IA, I always used rules and they work pretty well. They also got improved, I think, because initially rules were to be evaluated only at run time (thus having installers with components that are not needed for a given combination of platform and architecture, and if they were evaluated at build time, too, such components should not even added in the first place.
3. You know, Windows executables are nothing but a little more elaborated self-extracting archives, so you can peek with an archiving tool (I personally use WinRar) in order to check what's actually bundled inside a setup.exe This way you can be completely sure if both files are bundled or not in the final setup.
Check by architecture: is it x86 or AMD64 (for Intel) or is it SPARC etc etc (so what's the processor architecture).
So you would actually need both in order to test for a combination like:
is it a Win 64 or is it a Solaris on x86?
2. Tags must be a new feature in IA 2010, which I'm yet to use, so I have no experience with it. However, rules existed I think right from the 1st version of IA, I always used rules and they work pretty well. They also got improved, I think, because initially rules were to be evaluated only at run time (thus having installers with components that are not needed for a given combination of platform and architecture, and if they were evaluated at build time, too, such components should not even added in the first place.
3. You know, Windows executables are nothing but a little more elaborated self-extracting archives, so you can peek with an archiving tool (I personally use WinRar) in order to check what's actually bundled inside a setup.exe This way you can be completely sure if both files are bundled or not in the final setup.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2010
10:32 AM
bostonian, I am not sure if this will help. I haven't played with tags yet, but I noticed a checkbox in the build -> Build configurations -> Distribution tab.
It is listed as "Optimize Installer Size by Platform and Tags". It is unchecked by default.
Checking this might fix your problem
It is listed as "Optimize Installer Size by Platform and Tags". It is unchecked by default.
Checking this might fix your problem
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2010
11:48 AM
What you may want to do is to group your files per platform then use SpeedFolders (otherwise it'll be quite complicated to manage the IA project, I guess).