I have been doing this with InstallAnywhere Enterprise. Here is my target:


  <!-- ===================================================================
-->
  <!-- Create Setup program
-->
  <!-- ===================================================================
-->
  <target name="setup" depends="jars" if="do-setup" description="creates
setup programs">
    <!-- client stuff first -->
    <delete dir="${build}/client/bin}" quiet="true"
includeEmptyDirs="true"/>
    <delete dir="${jar}/cachedir" quiet="true" includeEmptyDirs="true"/>

    <!-- these sets of files are overly simplistic! -->
    <mkdir dir="${build}/client/bin" />
    <copy todir="${build}/client/jar">
      <fileset dir="${jar}" />
    </copy>

    <copy todir="${build}/client/bin">
      <fileset dir="${bin}" />
    </copy>

    <!-- run install anywhere -->
    <echo message="InstallAnywhere creating client setup" />
    <!-- This should be failonerror, but need to fix build machine first -->
    <java classname="InstallAnywhere" fork="yes">
     <arg line="-b ${DS_HOME}/${tools}/install/tahoe.iap"/> 
     <classpath>
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\IAClasses.zip" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\swingall.jar" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\compiler.zip" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\support3.zip" />
     </classpath>
    </java>

    <!-- create server -->
    <delete dir="${build}/server/bin}" quiet="true"
includeEmptyDirs="true"/>
    <mkdir dir="${build}/server/bin" />

    <!-- run install anywhere -->
    <echo message="InstallAnywhere creating server setup" />
    <!-- This should be failonerror, but need to fix build machine first -->
    <java classname="InstallAnywhere" fork="yes">
     <arg line="-b ${DS_HOME}/${tools}/install/DSpaceServer.iap"/> 
     <classpath>
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\IAClasses.zip" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\swingall.jar" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\compiler.zip" />
        <pathelement location="C:\Program Files\InstallAnywhere 3.5
Enterprise\resource\support3.zip" />
     </classpath>
    </java>

    <echo file="buildsummary.log" append="true">InstallAnywhere completed
successfully.
    </echo>
    <echo file="SetupOK.log">InstallAnywhere completed successfully.</echo>

  </target>


There are a few things I need to fix with it, but not critical right now,
like paramaterize the location of the installanywhere jars. I also wrote to
the list a while back, and have attached the thread generated.

-----Original Message-----
From: Jon Baer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 9:34 AM
To: [EMAIL PROTECTED]
Subject: Ant + ZeroG Install Anywhere?


Has anyone had any success on using Ant to do a final packaging build with
any
installer products like ZeroG's InstallAnywhere NOW! 4.0 stuff?  (or any
installer for that matter).

- Jon



Hi Steve,

Steve Donie wrote:
> 
> I have started using InstallAnywhere enterprise (just the evaluation
version
> so far). I have some issues with it so far - I haven't been able to figure
> out (in the day or so that I've used it) how to get it to use relative
> pathnames (I hate to hard code paths!). But otherwise, it seems to be
> working fine. Here is a snippet of my build.xml that does the work:

Regrettably, InstallAnywhere 3.5 doesn't support relative paths.  When you
save a project in the IDE, it creates a file with the same name but with
the suffix "Backup.iap."  In your case, that would be "tahoeBackup.iap." 
This is a Java source file version of the project.  You could then replace
whatever values you need and then use this modified project file for the
build.  Better yet, you could write an Ant task to do this on the fly :) .

> I also currently have the path to the InstallAnywhere classes/jars/zips
> hardcoded, which I also don't like. Works for now.

For this, just specify a property like:
  <property name="ia.home" value="C:\Program Files\InstallAnywhere 3.5
Enterprise" />

then use ${ia.home} everywhere it's required.

-Bill

>   <!-- ===================================================================
> -->
>   <!-- Create Setup program
> -->
>   <!-- ===================================================================
> -->
>   <target name="setup" depends="jars" description="creates setup
programs">
>     <!-- run install anywhere -->
>     <echo message="Running InstallAnywhere to create client setup" />
>     <!-- This should be failonerror, but need to fix build machine first
> (doesn't currently have JRE to add to setups that need a VM)-->
>     <java classname="InstallAnywhere" fork="yes">
>      <arg line="-b ${DS_HOME}/${tools}/install/tahoe.iap"/>
>      <classpath>
>         <pathelement location="C:\Program Files\InstallAnywhere 3.5
> Enterprise\IAClasses.zip" />
>         <pathelement location="C:\Program Files\InstallAnywhere 3.5
> Enterprise\resource" />
>         <pathelement location="C:\Program Files\InstallAnywhere 3.5
> Enterprise\resource\swingall.jar" />
>         <pathelement location="C:\Program Files\InstallAnywhere 3.5
> Enterprise\resource\compiler.zip" />
>         <pathelement location="C:\Program Files\InstallAnywhere 3.5
> Enterprise\resource\support3.zip" />
>      </classpath>
>     </java>
>   </target>


Reply via email to