Ignore:
Timestamp:
2008-08-21T11:16:35+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/wirk2/installer/build.xml

    r16917 r16931  
    66<project name="Installation">
    77
    8     <!-- this is required to pick up the properties generated during the install pages -->
    9     <property file="${basedir}/ant.install.properties"/>
    10 
    11     <path id="project.classpath">
    12         <pathelement path="${antinstaller.jar}"/>
    13     </path>
     8    <!-- classpath -->
     9    <path id="project.classpath"><pathelement path="${antinstaller.jar}"/></path>
    1410
    1511    <!-- custom tasks -->
    1612    <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
    17     <typedef name="rsr" classname="GetFreePath" classpathref="project.classpath"/>
     13    <typedef name="getfreepath" classname="GetFreePath" classpathref="project.classpath"/>
    1814    <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
    1915    <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
    2016
    21     <condition property="bundled.java.exists">
    22         <available file="../@java.extracted@/bin/java"/>
    23     </condition>
     17    <!-- pick up the properties generated during the install pages -->
     18    <property file="${basedir}/ant.install.properties"/>
     19   
     20    <!-- determine if there is an existing installation in the installDir-->
     21    <available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
    2422
    2523    <!-- load windows properties -->
    2624    <winprops/>
     25   
     26    <!-- create a local installDir String -->
     27    <path id="installDir.path"><pathelement location="${installDir}"/></path>
     28    <property name="installDir.local" refid="installDir.path"/>
     29   
     30    <target name="load-previous-props" if="is.overinstall">
     31        <property file="${installDir}\etc\installation.properties"/>
     32    </target>
    2733
    28     <target name="install-core-components" depends="">
     34    <target name="install-core-components" depends="load-previous-props">
    2935
    3036        <echo>basedir: ${basedir}</echo>
     
    3541        <echo message="Creating Installation directory"/>
    3642        <mkdir dir="${installDir}"/>
    37        
    3843       
    3944        <!-- install files -->
     
    7176        <delete file="${installDir}/resources/*.png"/>
    7277
    73         <echo message="Setting GSDLHOME in setup.bat"/>
     78        <echo message="Setting GSDLHOME in config files"/>
    7479        <rsr
    7580            file="${installDir}/setup.bat"
     
    7782            replacement="${installDir}"/>
    7883        <rsr
    79             file="${installDir}/cgi-bin/gsdlsite.bat"
     84            file="${installDir}/cgi-bin/gsdlsite.cfg"
    8085            pattern="\*\*GSDLHOME\*\*"
    8186            replacement="${installDir}"/>
     
    103108    <target name="install-start-menu-shortcuts">
    104109
    105         <!-- figure out the start menu path -->
     110        <!-- figure out the start menu path (if not already set from previous installation) -->
    106111        <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
    107112       
     
    144149            file="${startmenu.path}\Documentation\READMEru.lnk"
    145150            execute="${installDir}\READMEru.txt" />
     151       
     152        <rsr file="${installDir}\etc\installation.properties" pattern="@startmenu.path@" replacement="${startmenu.path}" winPath="true"/>
     153               
    146154    </target>
    147155
Note: See TracChangeset for help on using the changeset viewer.