1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 | This 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 | <path id="project.classpath">
|
---|
12 | <pathelement path="${antinstaller.jar}"/>
|
---|
13 | </path>
|
---|
14 |
|
---|
15 | <!-- custom tasks -->
|
---|
16 | <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
|
---|
17 | <typedef name="rsr" classname="GetFreePath" classpathref="project.classpath"/>
|
---|
18 | <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
|
---|
19 | <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
|
---|
20 |
|
---|
21 | <condition property="bundled.java.exists">
|
---|
22 | <available file="../@java.extracted@/bin/java"/>
|
---|
23 | </condition>
|
---|
24 |
|
---|
25 | <!-- load windows properties -->
|
---|
26 | <winprops/>
|
---|
27 |
|
---|
28 | <target name="install-core-components" depends="">
|
---|
29 |
|
---|
30 | <echo>basedir: ${basedir}</echo>
|
---|
31 | <echo>installDir: ${installDir}</echo>
|
---|
32 | <echo>antinstaller.jar: ${antinstaller.jar}</echo>
|
---|
33 |
|
---|
34 | <!-- create the installation directory -->
|
---|
35 | <echo message="Creating Installation directory"/>
|
---|
36 | <mkdir dir="${installDir}"/>
|
---|
37 |
|
---|
38 |
|
---|
39 | <!-- install files -->
|
---|
40 | <echo message="Installing Files"/>
|
---|
41 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
42 | <patternset>
|
---|
43 |
|
---|
44 | <include name="gli/**/*"/>
|
---|
45 | <include name="bin/**/*"/>
|
---|
46 | <include name="cgi-bin/**/*"/>
|
---|
47 | <include name="etc/**/*"/>
|
---|
48 | <include name="mappings/**/*"/>
|
---|
49 | <include name="images/**/*"/>
|
---|
50 | <include name="perllib/**/*"/>
|
---|
51 | <include name="indexers/**/*"/>
|
---|
52 | <include name="macros/**/*"/>
|
---|
53 | <include name="collect/**/*"/>
|
---|
54 |
|
---|
55 | <include name="COPYING"/>
|
---|
56 | <include name="READMEar.txt"/>
|
---|
57 | <include name="READMEes.txt"/>
|
---|
58 | <include name="READMEen.txt"/>
|
---|
59 | <include name="READMEfr.txt"/>
|
---|
60 | <include name="READMEru.txt"/>
|
---|
61 | <include name="setup.bat"/>
|
---|
62 | <include name="server.exe"/>
|
---|
63 |
|
---|
64 | </patternset>
|
---|
65 | </unzip>
|
---|
66 | <echo/>
|
---|
67 |
|
---|
68 | <!-- delete unneeded files -->
|
---|
69 | <echo message="Deleting some unneeded files"/>
|
---|
70 | <delete dir="${installDir}/resources/icons"/>
|
---|
71 | <delete file="${installDir}/resources/*.png"/>
|
---|
72 |
|
---|
73 | <echo message="Setting GSDLHOME in setup.bat"/>
|
---|
74 | <rsr
|
---|
75 | file="${installDir}/setup.bat"
|
---|
76 | pattern="\*\*GSDLHOME\*\*"
|
---|
77 | replacement="${installDir}"/>
|
---|
78 | <rsr
|
---|
79 | file="${installDir}/cgi-bin/gsdlsite.bat"
|
---|
80 | pattern="\*\*GSDLHOME\*\*"
|
---|
81 | replacement="${installDir}"/>
|
---|
82 |
|
---|
83 | <echo message="Finished"/>
|
---|
84 |
|
---|
85 | </target>
|
---|
86 |
|
---|
87 | <!-- Source -->
|
---|
88 | <target name="install-source-code" depends="">
|
---|
89 |
|
---|
90 | <echo message="Installing Source Code"/>
|
---|
91 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
92 | <patternset>
|
---|
93 | <include name="common-src/**/*"/>
|
---|
94 | <include name="runtime-src/**/*"/>
|
---|
95 | <include name="build-src/**/*"/>
|
---|
96 | <include name="packages/**/*"/>
|
---|
97 | </patternset>
|
---|
98 | </unzip>
|
---|
99 |
|
---|
100 | </target>
|
---|
101 |
|
---|
102 | <!-- Start menu shortcuts -->
|
---|
103 | <target name="install-start-menu-shortcuts">
|
---|
104 |
|
---|
105 | <!-- figure out the start menu path -->
|
---|
106 | <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
|
---|
107 |
|
---|
108 | <mkdir dir="${startmenu.path}\Documentation"/>
|
---|
109 |
|
---|
110 | <shortcut
|
---|
111 | file="${startmenu.path}\Greenstone2 Server.lnk"
|
---|
112 | execute="${installDir}\server.exe"
|
---|
113 | workingDirectory="${installDir}"
|
---|
114 | iconFile="${installDir}\images\icon.ico"
|
---|
115 | iconIndex="0" />
|
---|
116 |
|
---|
117 | <shortcut
|
---|
118 | file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
|
---|
119 | execute="${installDir}\gli\gli.bat"
|
---|
120 | workingDirectory="${installDir}\gli"
|
---|
121 | iconFile="${installDir}\images\icon.ico"
|
---|
122 | iconIndex="0" />
|
---|
123 |
|
---|
124 | <shortcut
|
---|
125 | file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
|
---|
126 | execute="${installDir}\gli\gems4gs3.bat"
|
---|
127 | workingDirectory="${installDir}\gli"
|
---|
128 | iconFile="${installDir}\images\icon.ico"
|
---|
129 | iconIndex="0" />
|
---|
130 |
|
---|
131 | <shortcut
|
---|
132 | file="${startmenu.path}\Documentation\READMEen.lnk"
|
---|
133 | execute="${installDir}\READMEen.txt" />
|
---|
134 | <shortcut
|
---|
135 | file="${startmenu.path}\Documentation\READMEes.lnk"
|
---|
136 | execute="${installDir}\READMEes.txt" />
|
---|
137 | <shortcut
|
---|
138 | file="${startmenu.path}\Documentation\READMEar.lnk"
|
---|
139 | execute="${installDir}\READMEar.txt" />
|
---|
140 | <shortcut
|
---|
141 | file="${startmenu.path}\Documentation\READMEfr.lnk"
|
---|
142 | execute="${installDir}\READMEfr.txt" />
|
---|
143 | <shortcut
|
---|
144 | file="${startmenu.path}\Documentation\READMEru.lnk"
|
---|
145 | execute="${installDir}\READMEru.txt" />
|
---|
146 | </target>
|
---|
147 |
|
---|
148 |
|
---|
149 | <target name="cleanuptarget"></target>
|
---|
150 |
|
---|
151 |
|
---|
152 | </project>
|
---|