Ignore:
Timestamp:
2008-08-21T11:15:58+12:00 (16 years ago)
Author:
oranfry
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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>
Note: See TracChangeset for help on using the changeset viewer.