Show
Ignore:
Timestamp:
25.05.2009 14:34:16 (11 years ago)
Author:
oranfry
Message:

grouped code for creating cdrom components

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • release-kits/wirk2/ant-scripts/wrap.xml

    r19539 r19586  
    1212    <target name="copy-files-for-wrapping"> 
    1313        <!--create a directory to build the wrapped installer in --> 
    14         <mkdir dir="${basedir}/wrapped-installer/build"/> 
     14        <mkdir dir="${basedir}/wrapped-installer"/> 
    1515         
    1616        <!-- copy source files --> 
    17         <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/> 
    18         <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/core/search4j/libsearch4j.cpp" overwrite="true"/> 
    19         <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/core/search4j/libsearch4j.h" overwrite="true"/> 
     17        <copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/> 
     18        <copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/core/search4j/libsearch4j.cpp" overwrite="true"/> 
     19        <copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/core/search4j/libsearch4j.h" overwrite="true"/> 
    2020 
    2121    </target> 
     
    2323    <target name="tweak-files-for-wrapping"> 
    2424        <echo>Substitute concrete values of things into source files</echo> 
    25         <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp"> 
     25        <rsr file="${basedir}/wrapped-installer/wrapper.cpp"> 
    2626            <job pattern="@java.installer@" replacement="${windows-java.installer}"/> 
    2727            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     
    3636             
    3737            <echo>getting the template resource script</echo> 
    38             <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/> 
     38            <copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/> 
    3939             
    4040            <echo>copying the small resource files into place</echo> 
    41             <copy todir="${basedir}/wrapped-installer/build" overwrite="true"> 
     41            <copy todir="${basedir}/wrapped-installer" overwrite="true"> 
    4242                <fileset dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/> 
    4343                <fileset dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/> 
     
    4545            </copy> 
    4646             
     47            <echo>adding ${windows-java.installer} to the copy as chunks</echo> 
     48            <rsplit 
     49                resource="${wirk2.home}/windows/wrapper/${windows-java.installer}" 
     50                outputDir="${basedir}/wrapped-installer"                     
     51                resourceScript="${basedir}/wrapped-installer/wrapper.rc" 
     52                resourceName="JAVA" 
     53                resourceType="EXE" 
     54                chunkSize="${resources.chunksize}"/> 
     55                 
    4756            <echo>adding greenstone2.jar to the resource script as chunks</echo> 
    4857            <rsplit 
    4958                resource="${basedir}/installer/Greenstone-${version}-win32.jar" 
    50                 outputDir="${basedir}/wrapped-installer/build" 
    51                 resourceScript="${basedir}/wrapped-installer/build/wrapper.rc" 
     59                outputDir="${basedir}/wrapped-installer" 
     60                resourceScript="${basedir}/wrapped-installer/wrapper.rc" 
    5261                resourceName="JAR" 
    5362                resourceType="JAR" 
    5463                chunkSize="${resources.chunksize}" 
    5564                /> 
    56              
    57             <echo>adding ${windows-java.installer} to the copy as chunks</echo> 
    58             <rsplit 
    59                 resource="${wirk2.home}/windows/wrapper/${windows-java.installer}" 
    60                 outputDir="${basedir}/wrapped-installer/build"                   
    61                 resourceScript="${basedir}/wrapped-installer/build/wrapper.rc" 
    62                 resourceName="JAVA" 
    63                 resourceType="EXE" 
    64                 chunkSize="${resources.chunksize}"/> 
    65              
    66             <echo>resource compiling the generated resource script</echo> 
    67             <exec executable="rc" dir="${basedir}/wrapped-installer/build"> 
     65                 
     66            <echo>resource compiling the resource script</echo> 
     67            <exec executable="rc" dir="${basedir}/wrapped-installer"> 
    6868                <arg line="wrapper.rc"/> 
    6969            </exec> 
     
    7272 
    7373    <target name="compile-wrapper"> 
    74         <exec executable="cl" dir="${basedir}/wrapped-installer/build"> 
     74        <exec executable="cl" dir="${basedir}/wrapped-installer"> 
    7575            <arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/> 
    7676        </exec> 
    7777 
    78         <exec executable="cl" dir="${basedir}/wrapped-installer/build"> 
     78        <exec executable="cl" dir="${basedir}/wrapped-installer"> 
    7979            <arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/> 
    8080        </exec> 
     
    8282     
    8383    <target name="link-wrapper"> 
    84         <exec executable="link" dir="${basedir}/wrapped-installer/build"> 
    85             <arg line="/OUT:..\..\products\Greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/> 
     84        <mkdir dir="products"/> 
     85        <exec executable="link" dir="${basedir}/wrapped-installer"> 
     86            <arg line="/OUT:..\products\Greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/> 
    8687        </exec> 
    8788    </target> 
    8889 
    89     <target name="archive-cdrom-components-and-installer"> 
    90         <mkdir dir="products"/> 
    91         <tar destfile="products/cdrom-components-${version}-linux.tar.gz" compression="gzip"> 
    92             <tarfileset dir="components/tmp"><include name="cdrom/**/*"/></tarfileset> 
    93             <tarfileset dir="wrapped-installer"><include name="cdrom-windows.exe"/></tarfileset> 
    94         </tar> 
    95     </target> 
    96  
    9790</project>