[15023] | 1 | <?xml version="1.0"?>
|
---|
| 2 | <!--
|
---|
| 3 | This is the build.xml run by AntInstaller for the installer
|
---|
| 4 | -->
|
---|
| 5 |
|
---|
| 6 | <project name="Installation" default="" basedir="${basedir}">
|
---|
| 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"/>
|
---|
[15381] | 17 | <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
|
---|
| 18 | <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
|
---|
[15023] | 19 |
|
---|
[15095] | 20 | <!-- create a local installDir String -->
|
---|
| 21 | <path id="installDir.path">
|
---|
| 22 | <pathelement location="${installDir}"/>
|
---|
| 23 | </path>
|
---|
| 24 | <property name="installDir.local" refid="installDir.path"/>
|
---|
[16631] | 25 |
|
---|
| 26 | <!-- load windows properties -->
|
---|
| 27 | <winprops/>
|
---|
[15095] | 28 |
|
---|
| 29 |
|
---|
[15356] | 30 | <target name="install-core-components">
|
---|
[15023] | 31 |
|
---|
| 32 | <!-- create the installation directory -->
|
---|
| 33 | <echo message="Creating Installation directory"/>
|
---|
| 34 | <echo>basedir: ${basedir}</echo>
|
---|
| 35 | <echo>installDir: ${installDir}</echo>
|
---|
| 36 | <echo>antinstaller.jar: ${antinstaller.jar}</echo>
|
---|
| 37 | <mkdir dir="${installDir}"/>
|
---|
| 38 |
|
---|
[16749] | 39 | <!-- install files -->
|
---|
| 40 | <echo message="Installing Files"/>
|
---|
| 41 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 42 | <patternset>
|
---|
[15023] | 43 |
|
---|
[16749] | 44 | <include name="bin/**/*"/>
|
---|
| 45 | <include name="docs/**/*"/>
|
---|
| 46 | <include name="gli/**/*"/>
|
---|
| 47 | <include name="gs2build/**/*"/>
|
---|
| 48 | <include name="lib/**/*"/>
|
---|
| 49 | <include name="web/**/*"/>
|
---|
| 50 | <include name="resources/**/*"/>
|
---|
| 51 | <include name="winutil/**/*"/>
|
---|
[15023] | 52 |
|
---|
[15812] | 53 | <include name="greenstone3-build.xml"/>
|
---|
[15023] | 54 | <include name="build.properties"/>
|
---|
| 55 | <include name="gs3-server.bat"/>
|
---|
| 56 | <include name="gs3-setup.bat"/>
|
---|
| 57 | <include name="LICENSE.txt"/>
|
---|
| 58 | <include name="README.txt"/>
|
---|
| 59 | <include name="server.jar"/>
|
---|
[16749] | 60 |
|
---|
[15023] | 61 | </patternset>
|
---|
| 62 | </unzip>
|
---|
| 63 | <echo/>
|
---|
[15812] | 64 |
|
---|
| 65 | <!-- rename greenstone3-build.xml back to build.xml -->
|
---|
| 66 | <move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/>
|
---|
| 67 |
|
---|
[15023] | 68 | <!-- change the tomcat ports in build.properties -->
|
---|
| 69 | <echo message="Changing tomcat ports in build.properties"/>
|
---|
| 70 | <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
|
---|
| 71 | <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
|
---|
[15356] | 72 | <echo message="Changing tomcat ports in resources/tomcat/server.xml"/>
|
---|
| 73 | <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir.local}/packages/tomcat/conf/server.xml" overwrite="true"/>
|
---|
[15812] | 74 |
|
---|
| 75 | <!-- set gsdlhome in gs2build setup.bat -->
|
---|
| 76 | <echo message="Setting %GSDLHOME% in gs2build\setup.bat"/>
|
---|
| 77 | <rsr file="${installDir}/gs2build/setup.bat" pattern="@gsdlhome@" replacement="${installDir.local}\gs2build" />
|
---|
[15023] | 78 |
|
---|
[15812] | 79 |
|
---|
[15023] | 80 | <!-- copy the greenstone3.xml file to tomcat -->
|
---|
| 81 | <echo message="Copying greenstone3.xml to tomcat directory"/>
|
---|
| 82 | <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
|
---|
[15095] | 83 | <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" />
|
---|
[15023] | 84 |
|
---|
| 85 | <!-- set up global properties -->
|
---|
| 86 | <echo message="Setting up global properties"/>
|
---|
| 87 | <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
|
---|
[15095] | 88 | <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" />
|
---|
| 89 | <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.server@" replacement="${tomcat.server}" />
|
---|
| 90 | <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.port@" replacement="${tomcat.port}" />
|
---|
[15023] | 91 |
|
---|
| 92 | <!-- set up log4j properties-->
|
---|
| 93 | <echo message="Setting up log4j properties"/>
|
---|
| 94 | <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
|
---|
[15095] | 95 | <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" />
|
---|
[15023] | 96 |
|
---|
| 97 | <!-- delete unneeded files -->
|
---|
| 98 | <delete dir="${installDir}/resources/icons"/>
|
---|
| 99 | <delete file="${installDir}/resources/*.png"/>
|
---|
| 100 |
|
---|
| 101 | </target>
|
---|
| 102 |
|
---|
| 103 | <!-- Source -->
|
---|
[15356] | 104 | <target name="install-source-code">
|
---|
[15023] | 105 | <echo message="Installing Source Code (src)"/>
|
---|
| 106 | <mkdir dir="${installDir}/src"/>
|
---|
| 107 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 108 | <patternset>
|
---|
| 109 | <include name="src/**/*"/>
|
---|
| 110 | </patternset>
|
---|
| 111 | </unzip>
|
---|
| 112 | </target>
|
---|
| 113 |
|
---|
[15356] | 114 | <target name="install-tomcat">
|
---|
| 115 |
|
---|
| 116 | <echo message="Installing Apache Tomcat"/>
|
---|
| 117 | <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/tomcat/**/*"/></patternset></unzip>
|
---|
| 118 |
|
---|
| 119 | <!-- change the tomcat ports in tomcats server.xml -->
|
---|
| 120 | <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@server@" replacement="${tomcat.server}" />
|
---|
| 121 | <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@port@" replacement="${tomcat.port}" />
|
---|
| 122 | <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@shutdown-port@" replacement="${tomcat.shutdown.port}" />
|
---|
| 123 |
|
---|
| 124 | </target>
|
---|
| 125 | <target name="install-ant">
|
---|
| 126 | <echo message="Installing Apache Ant"/>
|
---|
| 127 | <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/ant/**/*"/></patternset></unzip>
|
---|
| 128 | </target>
|
---|
| 129 |
|
---|
[15023] | 130 | <target name="cleanuptarget">
|
---|
| 131 | </target>
|
---|
| 132 |
|
---|
[15381] | 133 | <target name="install-start-menu-shortcuts">
|
---|
[15023] | 134 |
|
---|
[16631] | 135 | <mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@\Documentation"/>
|
---|
[15381] | 136 |
|
---|
| 137 | <shortcut
|
---|
| 138 | file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone3 Server.lnk"
|
---|
[15691] | 139 | execute="${installDir}\gs3-server.bat"
|
---|
[15381] | 140 | workingDirectory="${installDir}"
|
---|
[15691] | 141 | iconFile="${installDir}\resources\images\gs3.ico"
|
---|
[15381] | 142 | iconIndex="0" />
|
---|
[15691] | 143 |
|
---|
| 144 | <shortcut
|
---|
| 145 | file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Librarian Interface (GLI).lnk"
|
---|
[16284] | 146 | execute="${installDir}\gli\gli.bat"
|
---|
[15691] | 147 | workingDirectory="${installDir}\gli"
|
---|
| 148 | iconFile="${installDir}\resources\images\gs3.ico"
|
---|
| 149 | iconIndex="0" />
|
---|
[15381] | 150 |
|
---|
[15691] | 151 | <shortcut
|
---|
| 152 | file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Editor for Metadata Sets (GEMS).lnk"
|
---|
| 153 | execute="${installDir}\gli\gems4gs3.bat"
|
---|
| 154 | workingDirectory="${installDir}\gli"
|
---|
| 155 | iconFile="${installDir}\resources\images\gs3.ico"
|
---|
| 156 | iconIndex="0" />
|
---|
| 157 |
|
---|
| 158 | <shortcut
|
---|
[16631] | 159 | file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\README.lnk"
|
---|
[15691] | 160 | execute="${installDir}\README.txt" />
|
---|
| 161 |
|
---|
| 162 | <shortcut
|
---|
[16631] | 163 | file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\Greenstone3 Users' Guide.lnk"
|
---|
[15691] | 164 | execute="${installDir}\documentation\manual\manual.pdf" />
|
---|
| 165 |
|
---|
| 166 | <shortcut
|
---|
[16631] | 167 | file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\Greenstone2 Users' Guide.lnk"
|
---|
[15691] | 168 | execute="${installDir}\documentation\manual\gs2_user_en.pdf" />
|
---|
| 169 |
|
---|
| 170 |
|
---|
[15381] | 171 | </target>
|
---|
| 172 |
|
---|
[15023] | 173 | </project>
|
---|