source: other-projects/expeditee-release-kits/trunk/kits/rke/installer/build.xml@ 38010

Last change on this file since 38010 was 38010, checked in by anupama, 9 months ago

jdk.name property should not have an extension

File size: 6.7 KB
Line 
1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
6<project name="Installation">
7
8 <!-- this is required to pick up the properties generated during the install pages -->
9 <property file="${basedir}/ant.install.properties"/>
10
11 <!-- Set the JDK tarball name (same as its extracted folder name) that's to be bundled.
12 This name includes vendor and version information, but the name will be replaced
13 by generic extracted folder name "jdk".
14 Note that for Expeditee we need a Zulu JDK 8 with Javafx, so select the JDK FX option
15 when downloading from https://www.azul.com/downloads/?package=jdk-fx#zulu
16 in the dropdown labelled: Java Packages.
17 -->
18 <!-- if windows --><property name="jdk.name" value="zulu8.72.0.17-ca-fx-jdk8.0.382-win_i686"/><!-- /if -->
19 <!-- if linux --><property name="jdk.name" value="zulu8.72.0.17-ca-fx-jdk8.0.382-linux_x64"/><!-- /if -->
20 <!-- if mac --><property name="jdk.name" value="zulu8.72.0.17-ca-fx-jdk8.0.382-macosx_x64"/><!-- /if -->
21
22 <!-- set some properties to keep track of the OS -->
23 <!-- if windows -->
24 <property name="rk.os" value="windows"/>
25 <property name="shell.name" value="windows"/>
26 <!-- /if -->
27 <!-- if linux -->
28 <property name="rk.os" value="linux"/>
29 <property name="shell.name" value="linux"/>
30 <!-- /if -->
31 <!-- if mac -->
32 <property name="rk.os" value="mac"/>
33 <property name="shell.name" value="darwin"/>
34 <!-- /if -->
35
36 <!-- classpath -->
37 <path id="project.classpath">
38 <pathelement path="${antinstaller.jar}"/>
39 </path>
40
41 <!-- custom tasks -->
42 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
43 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
44 <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
45 <!-- if windows -->
46 <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
47 <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
48 <typedef name="getfreepath" classname="org.greenstone.anttasks.GetFreePath" classpathref="project.classpath"/>
49 <!-- /if -->
50 <!-- if linux|mac -->
51 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
52 <!-- /if -->
53
54 <!-- determine if a bundled java exists -->
55 <condition property="bundled.java.exists">
56 <or>
57 <available file="../@java.extracted@/bin/java"/>
58 <available file="../@java.extracted@/bin/java.exe"/>
59 </or>
60 </condition>
61
62 <!-- determine if there is an existing installation in the installDir-->
63 <available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
64
65 <!-- create a local installDir String -->
66 <path id="installDir.path"><pathelement location="${installDir}"/></path>
67 <property name="installDir.local" refid="installDir.path"/>
68
69 <!-- if windows -->
70 <!-- load windows properties -->
71 <winprops/>
72 <!-- /if -->
73
74 <!-- load the properties of the previous installation if this is an overinstall -->
75 <target name="Looking For Previous Installation" if="is.overinstall">
76 <property file="${installDir}\etc\installation.properties"/>
77 <delete dir="${installed.startmenu.path}" failonerror="false"/>
78 </target>
79
80
81 <!-- core system -->
82 <target name="Installing Core System">
83
84 <!-- if windows -->
85 <!-- figure out the start menu path -->
86 <getfreepath path="${win32.personal.programs_menu}\@projectname@" property="startmenu.path"/>
87 <path id="startmenu.path.path" path="${startmenu.path}"/>
88 <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
89
90 <!-- extract 7za tool -->
91 <unzip src="${antinstaller.jar}" dest="${basedir}">
92 <patternset><include name="7za.exe"/></patternset>
93 </unzip>
94 <!-- /if -->
95
96 <!-- start web -->
97 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
98 <!-- if linux|mac --><sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/><!-- /if -->
99 <!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec><!-- /if -->
100 <delete file="core.lzma"/>
101 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
102 <delete file="core.comp"/>
103 <!-- end web -->
104
105 <echo>Setting Binaries to Executable</echo>
106 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
107 <chmod dir="${installDir}/bin" includes="*" perm="755"/>
108
109 </target>
110
111 <!-- <target name="Initialising" if="bundled.java.exists"> -->
112 <!-- Java Runtime now changed to JDK -->
113 <target name="Installing Java">
114 <echo>Installing the Java Development Kit</echo>
115 <!--
116 <echo>Installing the Java Runtime</echo>
117 <mkdir dir="${installDir}/packages"/>
118 <copy todir="${installDir}/packages/jre" failonerror="false">
119 <fileset dir="../@java.extracted@"/>
120 </copy>
121 <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>
122 -->
123
124 <!-- if linux|mac -->
125 <untar src="${installDir}/packages/${jdk.name}.tar.gz" dest="${installDir}/packages/" compression="gzip"/>
126 <delete file="${installDir}/packages/${jdk.name}.tar.gz"/>
127 <move file="${installDir}/packages/${jdk.name}" tofile="${installDir}/packages/jdk"/>
128 <!-- Give user execute permissions for all the bins in the jdk and its jre -->
129 <chmod dir="${installDir}/packages/jdk/bin" includes="*" perm="775"/>
130 <!-- /if -->
131 <!-- if windows -->
132 <unzip src="${installDir}/packages/${jdk.name}.zip" dest="${installDir}/packages/"/>
133 <delete file="${installDir}/packages/${jdk.name}.zip"/>
134 <move file="${installDir}/packages/${jdk.name}" tofile="${installDir}/packages/jdk"/>
135 <!-- /if -->
136
137 <echo>Moving the Java Runtime back into the JDK</echo>
138 <!-- if linux|windows -->
139 <copy todir="${installDir}/packages/jdk/jre" failonerror="false">
140 <fileset dir="../@java.extracted@"/>
141 </copy>
142 <chmod dir="${installDir}/packages/jdk/jre/bin" includes="*" perm="775"/>
143 <!-- /if -->
144 <!-- if mac -->
145 <copy todir="${installDir}/packages/jdk/zulu-8.jdk/Contents/Home/jre" failonerror="false">
146 <fileset dir="../@java.extracted@"/>
147 </copy>
148 <chmod dir="${installDir}/packages/jdk/zulu-8.jdk/Contents/Home/jre/bin" includes="*" perm="775"/>
149 <!-- /if -->
150
151 </target>
152
153 <!-- Start menu shortcuts -->
154 <target name="Installing Start Menu Shortcuts">
155
156 <!-- Expeditee shortcut -->
157 <property name="expediteeicon" value="${installDir}\resources\icon.ico"/>
158
159 <shortcut
160 file="${startmenu.path}\Expeditee.lnk"
161 execute="${installDir}\run.bat"
162 workingDirectory="${installDir}"
163 iconFile="${expediteeicon}"
164 iconIndex="0" />
165
166 </target>
167</project>
Note: See TracBrowser for help on using the repository browser.