Changeset 15691

Show
Ignore:
Timestamp:
23.05.2008 17:10:14 (11 years ago)
Author:
oranfry
Message:

changes to the ant scripts to accompany the changes in the wrapper and jar installer

Location:
release-kits/wirk3
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • release-kits/wirk3/ant-scripts/create-installer.xml

    r15357 r15691  
    1414        <addressedcall target="setup-for-installer-creation"/> 
    1515        <addressedcall target="compile-installer"/> 
    16         <addressedcall target="clean-up-after-installer-creation"/> 
     16        <!--<addressedcall target="clean-up-after-installer-creation"/>--> 
    1717    </target> 
    1818 
     
    2020        <if><bool><istrue value="${execute}"/></bool> 
    2121             
    22             <echo>Project Path: ${project.path}</echo> 
    2322            <mkdir dir="${basedir}/installer"/> 
    2423            <copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/> 
     
    5655                    extractType="NonExtractor" 
    5756                    installConfig="${basedir}/installer/antinstall-config.xml" 
    58                     buildFile="${project.installer.path}/build.xml" 
    59                     antInstallLib="${ant.installer.home}/lib" 
    60                     antLib="${ant.installer.home}/antlib" 
     57                    buildFile="${basedir}/installer/build.xml" 
     58                    antInstallLib="${wirk3.home}/bin/ant-installer/lib" 
     59                    antLib="${wirk3.home}/bin/ant-installer/antlib" 
    6160                    validateConfig="true" 
    6261                    icons="bluecurve"> 
    6362 
    64                 <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/> 
     63                <zipfileset dir="${basedir}/installer/cp" includes="**"/> 
     64                <zipfileset dir="${wirk3.home}/installer/cp-extra" includes="**"/> 
    6565                <zipfileset dir="${wirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset> 
    6666 
    67                 <zipfileset dir="${project.path}" includes="*"/> 
    68                 <zipfileset dir="${project.path}/bin" prefix="bin"><include name="**/*"/></zipfileset> 
    69                 <zipfileset dir="${project.path}/docs" prefix="docs"><include name="**/*"/></zipfileset> 
    70                 <zipfileset dir="${project.path}/gli" prefix="gli"><include name="**/*"/></zipfileset> 
    71                 <zipfileset dir="${project.path}/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset> 
    72                 <zipfileset dir="${project.path}/lib" prefix="lib"><include name="**/*"/></zipfileset> 
    73                 <zipfileset dir="${project.path}/web" prefix="web"><include name="**/*"/></zipfileset> 
    74                 <zipfileset dir="${project.path}/packages" prefix="packages"><include name="**/*"/></zipfileset> 
    75                 <zipfileset dir="${project.path}/resources" prefix="resources"><include name="**/*"/></zipfileset> 
    76                 <zipfileset dir="${project.path}/winutil" prefix="winutil"><include name="**/*"/></zipfileset> 
    77                 <zipfileset dir="${project.path}/src" prefix="src"><include name="**/*"/></zipfileset> 
     67                <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/> 
     68                <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset> 
     69                <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset> 
     70                <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset> 
     71                <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset> 
     72                <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset> 
     73                <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset> 
     74                <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset> 
     75                <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset> 
     76                <zipfileset dir="${basedir}/distribution/greenstone3/winutil" prefix="winutil"><include name="**/*"/></zipfileset> 
     77                <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset> 
    7878 
    7979            </installer> 
  • release-kits/wirk3/ant-scripts/init.xml

    r15357 r15691  
    1919            <include name="*.jar"/> 
    2020        </fileset> 
    21          
    2221        <pathelement path="${wirk3.home}/ant-scripts/tasks/orans"/> 
    23  
    2422        <!-- antinstaller --> 
    2523        <pathelement path="${wirk3.home}/bin/ant-installer/lib/ant-installer-ext.jar"/> 
    2624        <pathelement path="${wirk3.home}/bin/ant-installer/lib/ant-installer.jar"/> 
    27          
    2825    </path> 
    2926     
     
    4542    <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/> 
    4643    <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>  
    47  
     44     
    4845    <!-- load in static properties from build.properties --> 
    4946    <property file="build.properties" /> 
     
    5350    <property name="bundled.version.tomcat" value="5.5.25"/> 
    5451    <property name="bundled.version.ant" value="1.6.5"/> 
    55  
    56     <!-- project details (for ant-installer) --> 
    57     <property name="project.name"                   value="Greenstone3"/> 
    58     <property name="project.short.name"         value="greenstone3"/> 
    59     <property name="project.path"                   value="${basedir}/distribution/greenstone3"/> 
    60     <property name="project.installer.path" value="${wirk3.home}/installer"/> 
    61     <property name="project.version"                value="${version}"/> 
    62     <property name="ant.installer.home"         value="${wirk3.home}/bin/ant-installer"/> 
    6352 
    6453    <!-- somewhere to store temporary text --> 
  • release-kits/wirk3/ant-scripts/wrap.xml

    r15095 r15691  
    1515 
    1616    <target name="wrap"> 
    17         <addressedcall target="setup-for-wrapping"/> 
     17        <addressedcall target="copy-files-for-wrapping"/> 
     18        <addressedcall target="tweak-files-for-wrapping"/> 
     19        <addressedcall target="compile-resources"/> 
    1820        <addressedcall target="compile-wrapper"/> 
    19         <addressedcall target="clean-up-after-wrapping"/> 
     21        <addressedcall target="link-wrapper-no-java"/> 
     22        <addressedcall target="link-wrapper-with-java"/> 
     23        <!--<addressedcall target="clean-up-after-wrapping"/>--> 
    2024    </target> 
    2125 
    2226 
    23     <target name="setup-for-wrapping"> 
     27    <target name="copy-files-for-wrapping"> 
    2428        <if><bool><istrue value="${execute}"/></bool> 
    25  
     29             
    2630            <!--create a directory to build the wrapped installer in --> 
    2731            <mkdir dir="${basedir}/wrapped-installer/build"/> 
     32 
     33            <!-- copy source files --> 
    2834            <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.cpp"/> 
     35            <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/search4j/libsearch4j.h"/> 
    2936            <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.rc"/> 
    30             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper-with-jre.rc"/> 
    31  
    32             <!-- copy resources to bundle --> 
    33             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/icon/gs3.ico"/> 
    34             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/${java.installer}"/> 
    35             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/search4j/search4j.exe"/> 
    36             <copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/greenstone-${version}-win32.jar"/> 
     37         
     38        </if> 
     39    </target> 
     40     
     41    <target name="tweak-files-for-wrapping"> 
     42        <if><bool><istrue value="${execute}"/></bool> 
    3743             
    38  
    3944            <!-- substitute the real java installer filename and min version into various files --> 
     45            <echo>Substitute concrete values of things into source files</echo> 
    4046            <rsr file="${basedir}/wrapped-installer/build/wrapper.rc" pattern="@java.installer@" replacement="${java.installer}"/> 
    41             <rsr file="${basedir}/wrapped-installer/build/wrapper-with-jre.rc" pattern="@java.installer@" replacement="${java.installer}"/> 
    4247            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${java.installer}"/> 
    4348            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     49            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/> 
     50             
     51        </if> 
     52    </target> 
    4453 
     54    <target name="compile-resources"> 
     55        <if><bool><istrue value="${execute}"/></bool> 
     56             
     57            <if> 
     58                <bool> 
     59                    <not> 
     60                        <uptodate targetfile="${basedir}/wrapped-installer/build/wrapper.RES"> 
     61                            <srcfiles dir="${wirk3.home}/icon" includes="gs3.ico"/> 
     62                            <srcfiles dir="${wirk3.home}/wrapper" includes="${java.installer}"/> 
     63                            <srcfiles dir="${wirk3.home}/wrapper" includes="*.bmp"/> 
     64                            <srcfiles dir="${wirk3.home}/wrapper" includes="*.rc"/> 
     65                            <srcfiles dir="${basedir}/installer" includes="greenstone3.jar"/> 
     66                        </uptodate> 
     67                    </not> 
     68                </bool> 
     69                 
     70                <echo>Compiling resources</echo> 
     71 
     72                <echo>copying the resource files into place</echo> 
     73                <copy todir="${basedir}/wrapped-installer/build"> 
     74                    <fileset dir="${wirk3.home}/wrapper" includes="*.bmp,${java.installer}"/> 
     75                    <fileset dir="${wirk3.home}/icon" includes="gs3.ico"/> 
     76                </copy> 
     77                <copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/greenstone-${version}-win32.jar"/> 
     78 
     79                <echo>splitting the big resources into chunks</echo> 
     80                <property name="resource.chunk.size" value="8388608" /><!-- 8Mib --> 
     81                <delete><fileset dir="${basedir}/wrapped-installer/build" includes="greenstone3.jar.*"/></delete> 
     82                <exec executable="split.exe" dir="${basedir}/wrapped-installer/build"> 
     83                    <arg value="${basedir}/wrapped-installer/build/greenstone3.jar" /> 
     84                    <arg value="${resource.chunk.size}" /> 
     85                </exec> 
     86                <delete><fileset dir="${basedir}/wrapped-installer/build" includes="${java.installer}.*"/></delete> 
     87                <exec executable="split.exe" dir="${basedir}/wrapped-installer/build"> 
     88                    <arg value="${basedir}/wrapped-installer/build/${java.installer}" /> 
     89                    <arg value="${resource.chunk.size}" /> 
     90                </exec> 
     91                 
     92                <echo>adding the chunks to the resource scripts</echo> 
     93                 
     94                <!-- compile the resources with bundled java--> 
     95                <exec executable="rc" dir="${basedir}/wrapped-installer/build"> 
     96                    <arg line="wrapper.rc"/> 
     97                </exec> 
     98                <move file="${basedir}/wrapped-installer/build/wrapper.RES" tofile="${basedir}/wrapped-installer/build/wrapper-with-jre.RES"/> 
     99 
     100                <!-- compile the resources without bundled java --> 
     101                <rsr file="${basedir}/wrapped-installer/build/wrapper.rc" pattern="^.*//bundled java only$" replacement=""/> 
     102                <exec executable="rc" dir="${basedir}/wrapped-installer/build"> 
     103                    <arg line="wrapper.rc"/> 
     104                </exec> 
     105                 
     106                <else> 
     107                    <echo>Resourses are up-to-date, will not compile</echo> 
     108                </else> 
     109            </if> 
     110             
    45111             
    46112        </if> 
     
    50116        <if><bool><istrue value="${execute}"/></bool> 
    51117 
    52             <echo>Compiling the resources</echo> 
    53             <exec executable="rc" dir="${basedir}/wrapped-installer/build"> 
    54                 <arg line="wrapper.rc"/> 
    55             </exec> 
    56             <exec executable="rc" dir="${basedir}/wrapped-installer/build"> 
    57                 <arg line="wrapper-with-jre.rc"/> 
    58             </exec> 
    59  
    60              
    61             <echo>Compiling the wrapper</echo> 
    62118            <exec executable="cl" dir="${basedir}/wrapped-installer/build"> 
    63                 <arg line="/c -GX wrapper.cpp /out:wrapper.obj"/> 
     119                <arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/> 
    64120            </exec> 
    65121             
    66             <echo>Linking</echo> 
     122        </if> 
     123    </target> 
     124     
     125    <target name="link-wrapper-no-java"> 
     126        <if><bool><istrue value="${execute}"/></bool> 
    67127            <exec executable="link" dir="${basedir}/wrapped-installer/build"> 
    68                 <arg line="/OUT:..\greenstone-${version}-win32.exe wrapper.obj wrapper.res"/> 
     128                <arg line="/OUT:..\greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib wrapper.obj wrapper.res"/> 
    69129            </exec> 
     130        </if> 
     131    </target> 
     132 
     133    <target name="link-wrapper-with-java"> 
     134        <if><bool><istrue value="${execute}"/></bool> 
    70135            <exec executable="link" dir="${basedir}/wrapped-installer/build"> 
    71                 <arg line="/OUT:..\greenstone-${version}-win32-with-java.exe wrapper.obj wrapper-with-jre.res"/> 
     136                <arg line="/OUT:..\greenstone-${version}-win32-with-java.exe gdi32.lib advapi32.lib shell32.lib user32.lib wrapper.obj wrapper-with-jre.res"/> 
    72137            </exec> 
    73138        </if> 
  • release-kits/wirk3/installer/build.xml

    r15381 r15691  
    152152    <target name="install-start-menu-shortcuts"> 
    153153 
    154         <mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@"/> 
     154        <mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@\documentation"/> 
     155         
    155156         
    156157        <shortcut 
    157158            file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone3 Server.lnk" 
    158             execute="${installDir}/gs3-server.bat" 
     159            execute="${installDir}\gs3-server.bat" 
    159160            workingDirectory="${installDir}" 
    160             iconFile="${installDir}/gli/gli.ico" 
     161            iconFile="${installDir}\resources\images\gs3.ico" 
    161162            iconIndex="0" /> 
     163 
     164        <shortcut 
     165            file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Librarian Interface (GLI).lnk" 
     166            execute="${installDir}\gli\gli4gs3.bat" 
     167            workingDirectory="${installDir}\gli" 
     168            iconFile="${installDir}\resources\images\gs3.ico" 
     169            iconIndex="0" /> 
     170             
     171        <shortcut 
     172            file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Editor for Metadata Sets (GEMS).lnk" 
     173            execute="${installDir}\gli\gems4gs3.bat" 
     174            workingDirectory="${installDir}\gli" 
     175            iconFile="${installDir}\resources\images\gs3.ico" 
     176            iconIndex="0" /> 
     177 
     178        <shortcut 
     179            file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\README.lnk" 
     180            execute="${installDir}\README.txt" /> 
     181 
     182        <shortcut 
     183            file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone3 Users' Guide.lnk" 
     184            execute="${installDir}\documentation\manual\manual.pdf" /> 
     185 
     186        <shortcut 
     187            file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone2 Users' Guide.lnk" 
     188            execute="${installDir}\documentation\manual\gs2_user_en.pdf" /> 
     189 
    162190             
    163191    </target> 
  • release-kits/wirk3/src/wirk3.cpp

    r15356 r15691  
    3737     
    3838    //set the classpath 
     39    //WIRK3_HOME + "\\ant-scripts\\tasks\\orangevolt\\roxes-win32forjava-1.1.1.jar;" + WIRK3_HOME + "\\ant-scripts\\tasks\\orangevolt\\orangevolt-ant-tasks-1.3.8.jar;" +  
    3940    classpath = pwd + "\\installer\\cp;" + JAVA_HOME + "\\lib\\tools.jar;" + WIRK3_HOME + "\\lib\\serializer.jar;" + WIRK3_HOME + "\\lib\\xalan.jar;" + WIRK3_HOME + "\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-antlr.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-bcel.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-bsf.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-log4j.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-oro.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-regexp.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-resolver.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-commons-logging.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-commons-net.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-icontract.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jai.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-javamail.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jdepend.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jmf.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jsch.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-junit.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-launcher.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-netrexx.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-nodeps.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-starteam.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-stylebook.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-swing.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-trax.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-vaj.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-weblogic.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-xalan1.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-xslp.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-amaranth.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-bluecurve.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-crystalsvg.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-eclipse.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-krystaline.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ant-installer-ext.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ant-installer.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\jgoodies-edited-1_2_2.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\classes"; 
    4041    putenv( ("CLASSPATH=" + classpath).c_str() );