Changeset 16078 for release-kits/wirk3

Show
Ignore:
Timestamp:
20.06.2008 09:58:58 (12 years ago)
Author:
oranfry
Message:

corrections to the splitting and joining scheme, and a few fixes to make use of shared stuff

Location:
release-kits/wirk3
Files:
4 modified

Legend:

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

    r15691 r16078  
    1414        <addressedcall target="setup-for-installer-creation"/> 
    1515        <addressedcall target="compile-installer"/> 
    16         <!--<addressedcall target="clean-up-after-installer-creation"/>--> 
    1716    </target> 
    1817 
     
    2322            <copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/> 
    2423            <copy todir="${basedir}/installer" file="${wirk3.home}/installer/build.xml"/> 
    25             <copy todir="${basedir}/installer/cp"><fileset dir="${wirk3.home}/installer/cp"/></copy> 
     24            <copy todir="${basedir}/installer/resources"> 
     25                <fileset dir="${wirk3.home}/installer/resources-windows"/> 
     26                <fileset dir="${wirk3.home}/installer/resources-greenstone3"/> 
     27            </copy> 
    2628             
    2729            <!-- put the concrete values of things in the config --> 
     
    3133            <!-- put the concrete values of things in the text --> 
    3234            <!-- default --> 
    33             <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
    34             <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    35             <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/> 
    36             <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    37             <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     35            <rsr file="${basedir}/installer/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
     36            <rsr file="${basedir}/installer/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     37            <rsr file="${basedir}/installer/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/> 
     38            <rsr file="${basedir}/installer/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     39            <rsr file="${basedir}/installer/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    3840             
    3941            <!-- chinese --> 
    40             <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 
    41             <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    42             <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/> 
    43             <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    44             <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     42            <rsr file="${basedir}/installer/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 
     43            <rsr file="${basedir}/installer/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     44            <rsr file="${basedir}/installer/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/> 
     45            <rsr file="${basedir}/installer/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     46            <rsr file="${basedir}/installer/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    4547             
    4648             
     
    6163                    icons="bluecurve"> 
    6264 
    63                 <zipfileset dir="${basedir}/installer/cp" includes="**"/> 
    64                 <zipfileset dir="${wirk3.home}/installer/cp-extra" includes="**"/> 
     65                <zipfileset dir="${basedir}/installer/resources" prefix="resources"><include name="**/*"/></zipfileset> 
    6566                <zipfileset dir="${wirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset> 
    6667 
     
    8283        </if> 
    8384    </target> 
    84  
    85     <target name="clean-up-after-installer-creation"> 
    86         <if><bool><istrue value="${execute}"/></bool> 
    87             <delete file="${basedir}/installer/antinstall-config.xml"/> 
    88         </if> 
    89     </target> 
    90  
    9185     
    9286</project> 
  • release-kits/wirk3/installer/antinstall-config.xml

    r15381 r16078  
    88            lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel" 
    99            name="Greenstone3 @version@ Installer" 
    10             windowIcon="/resources/gs3-small.png" 
    11             defaultImageResource="/resources/makewavesdawn.png" 
     10            windowIcon="/resources/icon.png" 
     11            defaultImageResource="/resources/header.png" 
    1212            minJavaVersion="1.4"> 
    1313 
  • release-kits/wirk3/src/wirk3.cpp

    r15691 r16078  
    3838    //set the classpath 
    3939    //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;" +  
    40     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"; 
     40    classpath = pwd + "\\installer;" + 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"; 
    4141    putenv( ("CLASSPATH=" + classpath).c_str() ); 
    4242 
  • release-kits/wirk3/wrapper/wrapper.cpp

    r15813 r16078  
    1414//globals 
    1515HBITMAP g_splash = NULL; //the main splash bitmap 
     16HFONT g_hfFont = NULL; //the main splash bitmap 
    1617char step[10] = "TMP"; //the current step 
    1718char progress[4] = "0"; //progress in the current step 
     
    4546 
    4647//extracts a resource in chunks 
    47 int extractResource( const char * basename, const char * type, char * file, int no_chunks ) { 
     48int extractResource( const char * basename, const char * type, char * file ) { 
    4849 
    4950    HMODULE hModule = GetModuleHandle(NULL); 
    5051    set_splash_progress( 0 ); 
    5152 
     53    int no_chunks; 
     54    bool chunk_available = true; 
     55    for ( no_chunks = 0; chunk_available; no_chunks++ ) { 
     56 
     57        //construct the chunk name 
     58        char chunkname[127] = {0}; 
     59        strcpy( chunkname, basename ); 
     60        strcat( chunkname, "_" ); 
     61        char chunknum[5] = {0}; 
     62        itoa( no_chunks+1, chunknum, 10 ); 
     63        strcat( chunkname, chunknum ); 
     64         
     65        if ( FindResource(hModule, chunkname, type) == NULL ) { 
     66            chunk_available = false; 
     67        } 
     68    } 
     69     
    5270    for ( int i=0; i<no_chunks; i++ ) { 
    53  
     71     
    5472        //construct the chunk name 
    5573        char chunkname[127] = {0}; 
     
    6078        strcat( chunkname, chunknum ); 
    6179         
    62         //MessageBox(NULL, chunkname, "chunk name", MB_OK); 
    63          
    64         //try to find it 
     80        //find it 
    6581        HRSRC hRsrc = FindResource(hModule, chunkname, type); 
    66         if (hRsrc == NULL ) return -1; //couldn't find the chunk 
     82        if (hRsrc == NULL ) return 1; //couldn't find the chunk 
    6783         
    6884        //load it 
    6985        HGLOBAL hGlobal = LoadResource(hModule, hRsrc); 
    7086        if (hGlobal == NULL) return 1; //couldn't lock 
     87         
     88        //lock it 
    7189        BYTE* pBytes = (BYTE*) LockResource(hGlobal); 
    7290        if (pBytes == NULL) return 1; //couldn't lock 
     
    98116            //load in the reusable resources 
    99117            g_splash = LoadBitmap(GetModuleHandle(NULL),"SPLASH"); 
     118            g_hfFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); 
    100119            if(g_splash == NULL) { 
    101120                MessageBox(hwnd, "Could not load splash bitmap!", "Error", MB_OK | MB_ICONEXCLAMATION); 
     
    146165            SelectObject(hdcMem, g_step); 
    147166            BitBlt(hdc, 0, 276, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCPAINT); 
     167             
     168            //print the step with text 
     169            RECT rcClient; 
     170            GetClientRect(hwnd, &rcClient); 
     171            //DrawText(hdc, "This is the step", -1, &rcClient, DT_SINGLELINE | DT_CENTER | DT_VCENTER); 
    148172             
    149173            //restore the hdc 
     
    294318        //is this an installer with the bundled JRE? 
    295319        set_splash_step( "XJAVA" ); 
    296         int extract_result = extractResource( "JAVA", "EXE", "@java.installer@", 2 ); 
     320        int extract_result = extractResource( "JAVA", "EXE", "@java.installer@" ); 
    297321 
    298322        if ( extract_result == 0 ) { 
     
    327351         
    328352        set_splash_step( "XJAR" ); 
    329         extractResource( "JAR", "JAR", (char*) jarLocation.c_str(), 12 ); 
     353        extractResource( "JAR", "JAR", (char*) jarLocation.c_str() ); 
    330354 
    331355        //launch the jar