Sep 22, 2008
11:54 AM
Thought I would pass on this bit of information for anyone using the "Execute Script/Bat fFile" action with Windows. If you exit your bat script with this: exit /b 1 The EXECUTE_EXITCODE will be set to 0. If you really want to capture the exitcode, you need to use: exit 1 Why is this important? I was testing my bat script with "exit /b 1" until I was satisfied with my unit testing. I then pasted my script into the action, but my installer unit testing showed the EXECUTE_EXITCODE was _always_ set to 0. It took me a few iterations to figure out why,. For some reason the /b argument doesn't do what I expected in IA. Hope this is helpful information for you.
... View more
Labels
- Labels:
-
InstallAnywhere 2008
Sep 18, 2008
03:51 PM
As a follow-up... This is a very strange problem. I went through my linux script and inserted a bunch of these: echo $INSTALLER_TEMP_DIR$ The end result was: sometimes it was replaced with: echo /tmp/745049.tmp and sometimes it was left as-is. I spent almost all day on this problem and was unable to get to the root cause. I ended up putting a line like this at the top of the script: my_temp_dir=$INSTALLER_TEMP_DIR$ and used $my_temp_dir throughout the rest of the script. I still don't know the root cause, but at least I'm not going to lose anymore time on it. This was exhausting... 😞
... View more
Sep 18, 2008
12:43 PM
Hi, In the "install" frame, I am dropping files into the "Installer Temp Directory" then executing a script/batch file. (Also under the "install" frame".) I am using $INSTALLER_TEMP_DIR$ in my script to point to the files I put there. For example: #!/bin/sh echo $INSTALLER_TEMP_DIR$ path_to_my_file=$INSTALLER_TEMP_DIR$/my_file The problem is that IA 2008vp1 is not replacing this IA variable with the value. All the other IA variables that _I_ created _are_ getting replaced. Any ideas? Is this a bug?
... View more
Labels
- Labels:
-
InstallAnywhere 2008
Sep 09, 2008
06:54 AM
Mike, I was wondering the same exact thing. I quit wondering, wrote the custom code and moved on... but I have to admit, I keep wondering why have the newline? Here's another funny thing I discovered about this newline business: - assign $myvar$ = $EXECUTE_STDOUT$ - use the Get User Input advanced user panel - and a textfield with: - the default value: $myvar$ - the result value: $myvar$ - print "myvar=$myvar$==" in a scrolling message pane - (or debug output) You'll see the textfield displays the value of myvar _with_ a blank space on the end (where the newline used to be). Because of the re-assignment of $myvar$ (via the result value in the textfield), $myvar$ no longer has a newline, but a space. This isn't a work-around - only an observation.
... View more
Sep 08, 2008
02:50 PM
Mike Sucena, If you're looking for code snippet, I ended up using an Execute Custom Code action with the following code (snippet): public void install( InstallerProxy ip ) throws InstallException { String myString = (String)ip.getVariable( "$EXECUTE_STDOUT$" ); String newline = System.getProperty("line.separator"); myString = myString.replaceAll(newline, ""); // String[] poList = pos.split("\r\n|\r|\n"); ip.setVariable("$EXECUTE_STDOUT$", myString); } Start off by using a custom action template compile the code (don't forget to include the IAClass.zip) Insert this action _after_ your script/bat action Set a variable (single variable) to a variable you want to preserver. You may want to set the "evaluate variables at assignment" toggle. HTH
... View more
Sep 08, 2008
02:39 PM
Robert Dickau, I found both Linux/Windows scripts/bats actions behaved the same. Your sample description is correct, but the missing part is the "newline" in the $EXECUTE_STDOUT$. Try this: - After your Script/Bat action, - add a "scrolling message" panel - have it print: stdout=$EXECUTE_STDOUT$== You would expect the panel to show: stdout=myoutput== Instead, it will show: stdout=myoutput == The bad part about the newline added to the value is if you want to use the $EXECUTE_STDOUT$ in another script/bat action. The linux line: if [ -f $EXECUTE_STDOUT ]; then Becomes: if [ -f myoutput ]; then Linux (and windows) will choke on this. Yuck.
... View more
Sep 08, 2008
02:31 PM
Robert, Thanks, I think it finally sunk into my skull. I did the following: I removed the AG- components (even though you said to keep them, but I did the next steps as well) I set my preferences to assign actions to components I checked the appropriate boxes for actions/components. I saved the project. I opened the project - no AG- Components. - the "assign to:" showed the right comps and checks. I think I'm back on track. Thanks a bunch!
... View more
Sep 08, 2008
02:06 PM
Robert, Thanks for the reply. I understand your answer, but I still don't have a nice warm fuzzy feeling about these auto-generated AG- components. For one thing, I don't know if I can modify them or delete them or should I just leave them alone. Why have them in the first place? Regarding your suggestion about the "Assign to:" features or components, I experimented with this, but unfortunately regardless of what I'm looking at when I save, the IDE _always_ starts up with "Assign to: Features". Still not sure what I should do with the AG- components...
... View more
Sep 08, 2008
09:11 AM
I see a bunch of AG- components in my Organization->Components list. I also read how "This component was automatically created when the developer assigned actions to features." My questions are: - what are these components? - what do they do? - should I keep my hands off them? Any any other advice or insight on how to treat them. Thanks a bunch
... View more
Labels
- Labels:
-
InstallAnywhere 2008
Aug 28, 2008
09:25 AM
I'm using the Execute Script/Batch file action to find a value from an /etc/stuff.conf file and return the value to IA via the $EXECUTE_STDOUT$ variable. This works, except the $EXECUTE_STDOUT$ now contains a newline. This makes using the variable useless because I cannot use the compare variables rule, nor can I use that $variable$ later in another script. Is there a work-around on this issue? Is there a better way to bring variables into IA from an outside source? Thanks
... View more
Labels
- Labels:
-
InstallAnywhere 2008
Aug 28, 2008
08:44 AM
I had the same issue myself (3 rpms) and decided to wrap the rpm install in an execute script action. I would like to have had a single rpm install action for all 3 rpms, but couldn't figure out if it was possible. The nice thing about rpm dependencies is that if you have the 3 rpms, then you can simply: rpm -i a.rpm b.rpm c.rpm The rpm process will figure out the inter-dependencies on its own and leave you out of it. HTH
... View more
Aug 27, 2008
01:30 PM
Vlad, Thanks for the reply. No, I have not added the java bundle(S!) yet and am expecting a huge growth with 1.5. I still have to add our own app as well - hence the "yikes!". You're right. I optimized and the sizes went down from 88Mb to 60, and 29Mb (Linux and Win, respectively). At this point, I'll wait it out to see what my final size(s) look like. Bob
... View more
Aug 27, 2008
08:06 AM
Hi, My project installs postgres, our own internal code and other 3rd party apps. I've just used "Add Files" for the postgres Linux rpms and Windows zip (postgres msi installer) and the installer size is now 88Mb. I still need to add more files and am afraid the installer will grow beyond a manageable size. What is a good/best practice for projects that require many large files (zips, rpms, msi, etc)? Any additional best practice when there are many rpms that are all considered "Linux" yet are actually different (rhel vs sles)? In my case, I find I must include ALL the PostgreSQL rpms (rhel4, rhel5, sles9, sles10 for i386, x84_64, and ia) and Windows installer. I believe ALL of these Added Files are bundled with the installer and extracted at run/install time depending on Platform and architecture rules. I haven't even added our internal application files nor the java zips. Yikes!
... View more
Labels
- Labels:
-
InstallAnywhere 2008
Latest posts by bobdux
Subject | Views | Posted |
---|---|---|
7633 | Sep 22, 2008 11:54 AM | |
587 | Sep 18, 2008 03:51 PM | |
6693 | Sep 18, 2008 12:43 PM | |
2518 | Sep 09, 2008 06:54 AM | |
2518 | Sep 08, 2008 02:50 PM | |
2518 | Sep 08, 2008 02:39 PM | |
1006 | Sep 08, 2008 02:31 PM | |
1006 | Sep 08, 2008 02:06 PM | |
9321 | Sep 08, 2008 09:11 AM | |
19817 | Aug 28, 2008 09:25 AM |
Activity Feed
- Posted Windows bat scripts and EXECUTE_EXITCODE on InstallAnywhere Forum. Sep 22, 2008 11:54 AM
- Posted Re: INSTALLER_TEMP_DIR not available during install on InstallAnywhere Forum. Sep 18, 2008 03:51 PM
- Posted INSTALLER_TEMP_DIR not available during install on InstallAnywhere Forum. Sep 18, 2008 12:43 PM
- Posted Re: New Line on EXECUTE_STDOUT from Execute Script/Batch file on InstallAnywhere Forum. Sep 09, 2008 06:54 AM
- Posted Re: New Line on EXECUTE_STDOUT from Execute Script/Batch file on InstallAnywhere Forum. Sep 08, 2008 02:50 PM
- Posted Re: New Line on EXECUTE_STDOUT from Execute Script/Batch file on InstallAnywhere Forum. Sep 08, 2008 02:39 PM
- Posted Re: What are AG- components? on InstallAnywhere Forum. Sep 08, 2008 02:31 PM
- Posted Re: What are AG- components? on InstallAnywhere Forum. Sep 08, 2008 02:06 PM
- Posted What are AG- components? on InstallAnywhere Forum. Sep 08, 2008 09:11 AM
- Posted New Line on EXECUTE_STDOUT from Execute Script/Batch file on InstallAnywhere Forum. Aug 28, 2008 09:25 AM
- Posted Re: How can IA install a bunch of dependent RPMs? on InstallAnywhere Forum. Aug 28, 2008 08:44 AM
- Posted Re: Reducing the size of an installer (best practice?) on InstallAnywhere Forum. Aug 27, 2008 01:30 PM
- Posted Reducing the size of an installer (best practice?) on InstallAnywhere Forum. Aug 27, 2008 08:06 AM