Changeset 17370

Show
Ignore:
Timestamp:
25.09.2008 10:39:25 (11 years ago)
Author:
oranfry
Message:

new logic for installing components as they are now individually compressed

Location:
release-kits/wirk3/installer
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • release-kits/wirk3/installer/antinstall-config.xml

    r17339 r17370  
    4646            displayText=""/>         
    4747 
    48         <!-- start bundled java only --> 
     48        <!-- start full --> 
    4949        <target 
    5050            target="install-jre" 
     
    5252            defaultValue="true" 
    5353            displayText=""/> 
    54         <!-- end bundled java only --> 
    55  
     54         
    5655        <target 
    5756            target="install-tomcat" 
     
    6766 
    6867        <target 
     68            target="install-imagemagick" 
     69            diskRequirement="@component.size.imagemagick@" 
     70            defaultValue="true" 
     71            displayText=""/> 
     72             
     73        <target 
     74            target="install-ghostscript" 
     75            diskRequirement="@component.size.ghostscript@" 
     76            defaultValue="true" 
     77            displayText=""/> 
     78        <!-- end full --> 
     79             
     80        <target 
    6981            target="install-source-code" 
    7082            diskRequirement="@component.size.sourcecode@" 
     
    7486    </page> 
    7587 
     88    <!-- start full --> 
    7689    <page type="input" name="tomcat-config" ifProperty="(${install-tomcat}==true)" displayText=""> 
    7790 
     
    8194 
    8295    </page> 
     96    <!-- end full --> 
    8397 
    8498    <page type="progress" name="progress" showTargets="false" target="cleanuptarget" displayText=""> 
  • release-kits/wirk3/installer/build.xml

    r17339 r17370  
    1818    <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/> 
    1919    <typedef name="getfreepath" classname="org.greenstone.anttasks.GetFreePath" classpathref="project.classpath"/> 
     20    <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/> 
    2021 
    2122    <!-- create a local installDir String --> 
     
    2425    </path> 
    2526    <property name="installDir.local" refid="installDir.path"/> 
     27    <pathconvert targetos="unix" property="installDir.unix" refid="installDir.path"/> 
     28     
    2629 
    2730    <!-- load windows properties --> 
     
    4851        <echo message="Creating Installation directory"/> 
    4952        <mkdir dir="${installDir}"/> 
     53 
     54        <!-- extract 7za tool --> 
     55        <unzip src="${antinstaller.jar}" dest="${basedir}"> 
     56            <patternset><include name="7za.exe"/></patternset> 
     57        </unzip> 
    5058         
    5159        <!-- install files --> 
    52         <echo message="Installing Files"/> 
    53         <unzip src="${antinstaller.jar}" dest="${installDir}"> 
    54             <patternset> 
    55  
    56                 <include name="bin/**/*"/> 
    57                 <include name="docs/**/*"/> 
    58                 <include name="gli/**/*"/> 
    59                 <include name="gs2build/**/*"/> 
    60                 <exclude name="gs2build/common-src/**/*"/> 
    61                 <exclude name="gs2build/build-src/**/*"/> 
    62                 <exclude name="gs2build/runtime-src/**/*"/> 
    63                 <include name="lib/**/*"/> 
    64                 <include name="web/**/*"/> 
    65                 <include name="resources/**/*"/> 
    66                 <include name="winutil/**/*"/> 
    67  
    68                 <include name="greenstone3-build.xml"/> 
    69                 <include name="build.properties"/> 
    70                 <include name="gs3-server.bat"/> 
    71                 <include name="gs3-setup.bat"/> 
    72                 <include name="LICENSE.txt"/> 
    73                 <include name="README.txt"/> 
    74                 <include name="server.jar"/> 
    75                 <include name="Uninstall.jar"/> 
    76             </patternset> 
    77         </unzip> 
    78         <echo/> 
    79  
     60        <echo message="Installing Core Component"/> 
     61        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip> 
     62        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec> 
     63        <delete file="core.lzma"/> 
     64        <unzip src="${basedir}/core.comp" dest="${installDir}"/> 
     65        <delete file="core.comp"/> 
     66         
    8067        <!-- rename greenstone3-build.xml back to build.xml --> 
    8168        <move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/> 
     
    9077        <!-- set gsdlhome in gs2build setup.bat --> 
    9178        <echo message="Setting %GSDLHOME% in gs2build\setup.bat"/> 
    92         <rsr file="${installDir}/gs2build/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}\gs2build" winPath="true"/> 
     79        <rsr file="${installDir}/gs2build/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}\gs2build" /> 
    9380        <!-- copy the greenstone3.xml file to tomcat --> 
    9481        <echo message="Copying greenstone3.xml to tomcat directory"/> 
    9582        <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/> 
    96         <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" winPath="true" /> 
     83        <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" /> 
    9784 
    9885        <!-- set up global properties --> 
    9986        <echo message="Setting up global properties"/> 
    10087        <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/> 
    101         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" winPath="true" /> 
    102         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.server@" replacement="${tomcat.server}" /> 
    103         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.port@" replacement="${tomcat.port}" /> 
     88        <rsr file="${installDir}/web/WEB-INF/classes/global.properties"> 
     89            <job pattern="@gsdl3home@" replacement="${installDir.unix}/web" /> 
     90            <job pattern="@tomcat.server@" replacement="${tomcat.server}" /> 
     91            <job pattern="@tomcat.port@" replacement="${tomcat.port}" /> 
     92        </rsr> 
    10493 
    10594        <!-- set up log4j properties--> 
    10695        <echo message="Setting up log4j properties"/> 
    10796        <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/> 
    108         <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" winPath="true" /> 
     97        <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.unix}/web"/> 
    10998 
    11099        <!-- delete unneeded files -->       
     
    120109    <target name="install-source-code"> 
    121110        <echo message="Installing Source Code (src)"/> 
    122         <mkdir dir="${installDir}/src"/> 
    123         <unzip src="${antinstaller.jar}" dest="${installDir}"> 
    124             <patternset> 
    125                 <include name="src/**/*"/> 
    126                 <include name="gs2build/common-src/**/*"/> 
    127                 <include name="gs2build/build-src/**/*"/> 
    128                 <include name="gs2build/runtime-src/**/*"/> 
    129             </patternset> 
    130         </unzip> 
     111        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip> 
     112        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x sourcecode.lzma"/></exec> 
     113        <delete file="sourcecode.lzma"/> 
     114        <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/> 
     115        <delete file="sourcecode.comp"/> 
    131116    </target> 
    132117 
     
    134119         
    135120        <echo message="Installing Apache Tomcat"/> 
    136         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/tomcat/**/*"/></patternset></unzip> 
    137  
     121        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="tomcat.lzma"/></patternset></unzip> 
     122        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x tomcat.lzma"/></exec> 
     123        <delete file="tomcat.lzma"/> 
     124        <unzip src="${basedir}/tomcat.comp" dest="${installDir}/packages"/> 
     125        <delete file="tomcat.comp"/> 
     126         
    138127        <!-- change the tomcat ports in tomcats server.xml --> 
    139128        <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@server@" replacement="${tomcat.server}" /> 
     
    142131 
    143132    </target> 
     133 
    144134    <target name="install-ant"> 
    145135        <echo message="Installing Apache Ant"/> 
    146         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/ant/**/*"/></patternset></unzip> 
     136        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ant.lzma"/></patternset></unzip> 
     137        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ant.lzma"/></exec> 
     138        <delete file="ant.lzma"/> 
     139        <unzip src="${basedir}/ant.comp" dest="${installDir}/packages"/> 
     140        <delete file="ant.comp"/> 
     141    </target> 
     142 
     143    <target name="install-imagemagick"> 
     144        <echo message="Installing ImageMagick"/> 
     145        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip> 
     146        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec> 
     147        <delete file="imagemagick.lzma"/> 
     148        <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/gs2build/bin/windows"/> 
     149        <delete file="imagemagick.comp"/> 
     150    </target> 
     151 
     152    <target name="install-ghostscript"> 
     153        <echo message="Installing GhostScript"/> 
     154        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip> 
     155        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec> 
     156        <delete file="ghostscript.lzma"/> 
     157        <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/gs2build/bin/windows"/> 
     158        <delete file="ghostscript.comp"/> 
    147159    </target> 
    148160