Changeset 16930

Show
Ignore:
Timestamp:
21.08.2008 11:15:58 (11 years ago)
Author:
oranfry
Message:

dont overwrite startmenu shortcuts for repeat installs unless they are over-installs

Location:
release-kits/wirk3
Files:
3 modified

Legend:

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

    r16776 r16930  
    1717            <fileset dir="${wirk3.home}/greenstone3/installer-classes"/> 
    1818            <fileset dir="${wirk3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 
     19            <fileset dir="${wirk3.home}/ant-scripts/tasks/orans" includes="GetFreePath.class" /> 
    1920        </copy> 
    2021    </target> 
  • release-kits/wirk3/installer/build.xml

    r16749 r16930  
    1515    <!-- custom tasks --> 
    1616    <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/> 
     17    <typedef name="getfreepath" classname="GetFreePath" classpathref="project.classpath"/> 
    1718    <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>  
    1819    <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>  
     
    2627    <!-- load windows properties --> 
    2728    <winprops/> 
     29 
     30    <!-- determine if there is an existing installation in the installDir--> 
     31    <available file="${installDir}\installation.properties" property="is.overinstall"/> 
     32 
     33    <target name="load-previous-props" if="is.overinstall"> 
     34        <property file="${installDir}\installation.properties"/> 
     35    </target> 
    2836     
    29      
    30     <target name="install-core-components"> 
     37    <target name="install-core-components" depends="load-previous-props"> 
    3138 
    3239        <!-- create the installation directory --> 
     
    5360                <include name="greenstone3-build.xml"/> 
    5461                <include name="build.properties"/> 
     62                <include name="installation.properties"/> 
    5563                <include name="gs3-server.bat"/> 
    5664                <include name="gs3-setup.bat"/> 
     
    133141    <target name="install-start-menu-shortcuts"> 
    134142 
    135         <mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@\Documentation"/> 
     143        <!-- figure out the start menu path (if not already set from previous installation) --> 
     144        <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/> 
     145         
     146        <mkdir dir="${startmenu.path}\Documentation"/> 
    136147         
    137148        <shortcut 
    138             file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone3 Server.lnk" 
     149            file="${startmenu.path}\Greenstone3 Server.lnk" 
    139150            execute="${installDir}\gs3-server.bat" 
    140151            workingDirectory="${installDir}" 
     
    143154 
    144155        <shortcut 
    145             file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Librarian Interface (GLI).lnk" 
     156            file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk" 
    146157            execute="${installDir}\gli\gli.bat" 
    147158            workingDirectory="${installDir}\gli" 
     
    150161             
    151162        <shortcut 
    152             file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Editor for Metadata Sets (GEMS).lnk" 
     163            file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk" 
    153164            execute="${installDir}\gli\gems4gs3.bat" 
    154165            workingDirectory="${installDir}\gli" 
    155166            iconFile="${installDir}\resources\images\gs3.ico" 
    156167            iconIndex="0" /> 
    157  
     168         
    158169        <shortcut 
    159             file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\README.lnk" 
     170            file="${startmenu.path}\Documentation\README.lnk" 
    160171            execute="${installDir}\README.txt" /> 
    161  
     172         
    162173        <shortcut 
    163             file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\Greenstone3 Users' Guide.lnk" 
     174            file="${startmenu.path}\Documentation\Greenstone3 Users' Guide.lnk" 
    164175            execute="${installDir}\documentation\manual\manual.pdf" /> 
    165  
     176         
    166177        <shortcut 
    167             file="${win32.personal.programs_menu}\Greenstone-@version@\Documentation\Greenstone2 Users' Guide.lnk" 
     178            file="${startmenu.path}\Documentation\Greenstone2 Users' Guide.lnk" 
    168179            execute="${installDir}\documentation\manual\gs2_user_en.pdf" /> 
    169  
     180         
     181        <rsr file="${installDir}\installation.properties" pattern="@startmenu.path@" replacement="${startmenu.path}" winPath="true"/> 
    170182             
    171183    </target> 
  • release-kits/wirk3/src/wirk3.cpp

    r16775 r16930  
    4444    //pass on the arguments 
    4545    string a; 
     46    bool simMode = false; 
    4647    for ( int i=0; i < argc; i++ ) { 
    4748        a = argv[i]; 
     
    5051            //show_help(); 
    5152            return 0; 
    52          
    5353        } else if ( a.compare("-cp") == 0) { 
    5454            cout << classpath; 
    5555            return 0; 
    56  
     56        } else if ( a.compare("-sim") == 0) { 
     57            command = command + " " + a; 
     58            simMode = true; 
    5759        } else { 
    5860            command = command + " " + a; 
    5961        } 
    6062 
     63    } 
     64 
     65    //create directories 
     66    if ( !simMode ) { 
     67        system( "IF NOT EXIST installer\\classes MKDIR installer\\classes" ); 
    6168    } 
    6269