0 Replies Latest reply: Oct 26, 2012 9:19 AM by 970916 RSS

    MSI Package Upgrade

    970916
      I am working on creating an MSI installer and am having problems with how upgrades are handled.

      From my understanding of WiX the UpgradeCode should be the same across all installer versions but the product ID should be different. I am using a GUID for my application ID and letting the deploy task generate a random Product ID each time. However, when I install my v1.1 MSI it overwrites the application but there are entries in the Uninstall programs list for both v1.0 and v1.1.

      Below is my ant code:
      <target name="msi" depends="compile">
          <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"  
                      uri="javafx:com.sun.javafx.tools.ant"    
                      classpath="${javafx.tools.ant.jar}"/> 
            <mkdir dir="${dist.dir}"/>              
            <mkdir dir="${dist.dir}/lib"/>
            <copy todir="${dist.dir}/lib">
              <fileset dir="${lib.dir}"
                       includes="**"/>
            </copy>
            
            <fx:application id="2BD6AE60-1F5F-11E2-81C1-0800200C9A66" version="1.1"  
                        mainClass="Frame" name="MsiTest" toolkit="swing"/> 
            
            <fx:jar destfile="${dist.dir}/msitest.jar">
              <fx:application refid="2BD6AE60-1F5F-11E2-81C1-0800200C9A66" /> 
              <manifest>
                <attribute name="Main-Class" value="Frame" /> 
                <attribute name="Class-Path" value="lib/swingx-all-1.6.3.jar conf/" />
              </manifest>
              <fileset dir="${build.obj.dir}"
                       includes="**"
              />
            </fx:jar>
            
            <fx:deploy nativeBundles="msi"  
                         width="100" height="100" 
                         outdir="${dist.dir}" outfile="MsiTest" verbose="true">  
                  <info title="Sample project" vendor="Me"  
                           description="Test built from Java executable jar"/>  
                  <fx:application refid="2BD6AE60-1F5F-11E2-81C1-0800200C9A66" /> 
                  <fx:resources>  
                     <fx:fileset dir="${dist.dir}">  
                        <include name="msitest.jar"/>  
                        <include name="lib/swingx-all-1.6.3.jar"/>  
                     </fx:fileset>  
                  </fx:resources> 
            </fx:deploy>
        </target>
        
      How do you handle upgrades for MSI installers?