ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Installer using Ant
Date Mon, 29 Mar 2004 09:07:09 GMT

--- Pritesh saharey <pritesh@sqatester.com> wrote:
> I wanted know that can i create an Install Shield
> using Ant, suppose to install an application you get
> setup.exe file for windows rpm files for Linux,

In theory you can do this with os condition like I
wrote below. You can do it like this:
<target name="prepareDist" depends="prepareDistLinux,
prepareDistWindows" description="Build a install
package">
...Do common steps here
</target>

<target name="prepareDistLinux" if="isLinux"
decsription="Build a install package for linux">
    <exec executable="rpmbuild" arg="...."/>
<!--Or you can use the optional ant task <rpm>-->
</target>

<target name="prepareDistWindows" if="isWindows"
description="Build a install package for windows">
    <exec excutable="InstallShield_executable"
args="..."/>
</target>
You should see how InstallShield packages your stuff
exactly.

 
> so i want to create an install shield wizard for my
java application
> in which i had to check that whether the user got
> the desired jre which the application requried,
> conditions are like this
> 1)Check whether the m/c got jre if not then  i have
> to install the jre
> 2)Check whether the m/c got jre but of lower version
> then i have to install the jre on which my
> aplication runs, but the older version shouldt be
> effected.
> and so on

Well i do not know how perform it with InstallShield

Greetings Ivan
> 
> Pritesh Saharey
> BE(Mech)
> Software Engineer
> 
> 
> 
> --- Ivan Ivanov <rambiusparkisanius@yahoo.com>
> wrote:
> Pritesh,
> 
> Can you explain what exactly you want to install? I
> have made some successfull attempts to use Ant as an
> installer of web applications. I did roughly the
> following:
> 1) Install a database (MySQL in most cases)
> 2) Start it as a service(on Win), as a daemon (on
> Linux)
> 3) Using <sql> task, initialize the database of your
> application
> 4) Install Tomcat (easy if you use a zip archive)
> using unzip task abd start it as a service(on Win),
> as
> a daemon (on Linux)
> 5) Copy the war of your web in tomcat's webapp dir
> and
> wait to be deployed.
> 
> I usually control the folders where the pieces of
> sofware will be installed by using properties file.
> There is also an <input> task that can read user
> input, but I have never used it.
> 
> As for platform independence (or how to reach the
> unreachable :)) ), I have never succeded in it 100%.
> Let's take as an example Tomcat. Under Linux it is
> easy to unzip it somewhere, then prepare some sh
> file
> and copy them in /etc/rc.d so that the tomcat is
> started as a daemon. But I have never found a way
> how
> to install it easy as a service under Windows. (I
> know
> there is jakarta installer of tomcat that do this
> but
> in this way I have to use different tomcat bundles -
> jakarta-tomcat.zip for linux and jakarta-tomcat.exe
> for Windows). 
> So my rule is: try hard to perform as many
> installation steps from ant (which means platform
> independence), for the rest steps do the manually or
> write some platform dependent files say bat or sh.
> 
> Hope this helps
> Ivan Ivanov
> 
> P.S. Well, I lied a little bit, since there is a
> condition in ant called os, with which one can guess
> the platform on which the installation is running.
> After finding it one can invoke different targets.
> For
> example:
> 
> <condition property="isLinux">
>     <os family="linux"/>
> </condition>
> 
> <condition property="isWindows">
>     <os family="windows"/>
> </condition>
> 
> <target name="install" depends="lin-install,
> win-install">
>     ...Do your common install steps here
> </target>
> 
> <target name="win-install" if="isWindows">
>     ...Do your windows specific install steps here
> </target>
> 
> <target name="lin-install" if="isLinux">
>     ...Do your linux specific install steps here
> </target>
> But is this platform independence we all looking
> for?
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message