#23 Complete Upgrade Path Distributed with Wix

open
nobody
None
5
2012-09-15
2010-11-19
vo1stv
No

This example is based around a fictitious company which releases a software product in stages from version 0.0.0.1 to version 1.0.0.0.
Each example is effectively a test case.
I will stumble through the examples as best as I can... please feel free to advise, correct or elaborate where needed.
I'm not sure if all the test cases below are examples of good use of version numbers.

The company releases the products in the following order:
Version 0.0.0.1: Installs the product: WixWiz which consists of an uninstall shortcut on the Start Menu and no files
Version 0.0.0.2: Updates the same product as version 0.0.0.1, but has a few customizations to the installer dialog.
Version 0.0.1.0: Upgrades version 0.0.0.x to include two components imported from merge modules: the first is installed to a custom folder using ConfigurationData, the other is installed to a custom folder using public properties.
Version 0.1.0.0: Upgrades earlier versions with modified versions of the components installed in 0.0.1.0.
Version 0.1.0.1: A patch to 0.0.1.0 that makes it equivalent to 0.1.0.0
Version 1.0.0.0: A more complete installation that can requires obsolescence of all earlier versions.
Version 1.1.0.0: A slightly different flavour of 1.0.0.0 that can cohabit with 1.0.

Discussion

  • vo1stv
    vo1stv
    2010-11-19

    PART 1:

    Step 1: Create a directory structure
    WixWiz -> 0.0.0.1

    Step2: copy InstallWixWiz_0_0_0_1.wxs into WixWiz\0.0.0.1

    Step 3: Use WixEdit to open InstallWixWiz_0_0_0_1.wxs, build and install

     
  • vo1stv
    vo1stv
    2010-11-19

    PART 2:

    Step 1: Uninstall WixWiz version 0.0.0.1

    Step 2: Create a directory structure
    WixWiz -> 0.0.0.2

    Step 3: copy required files:
    Step 3a: copy WixWizBanner.bmp into WixWiz
    Step 3b: copy WixWizBackground.bmp into WixWiz
    Step 3c: copy InstallWixWiz_0_0_0_2.wxs into WixWiz\0.0.0.2

    Step 4: Use WixEdit to open InstallWixWiz_0_0_0_2.wxs, build and install

     
  • vo1stv
    vo1stv
    2010-11-19

    PART 3:

    Step 1 Create directory structure
    WixWiz -> CommunityChest
    WixWiz -> 0.0.1.0

    Step 2: copy required files
    Step 2a: copy pch.h into WixWiz\CommunityChest
    Step 2b: copy helloFromWixWix.c into WixWiz\CommunityChest
    Step 2c: copy WixWIzPrerequisites.xml into WixWiz\CommunityChest
    Step 2d: copy WixWIzHelloSource.xml into WixWiz\CommunityChest
    Step 2e: copy InstallWixWiz_0_0_1_0.wxs into WixWiz\0.0.1.0

    Step 3: Use WixEdit to open WixWIzPrerequisites.xml and build merge module

    Step 4: Use WixEdit to open WixWIzHelloSource.xml and build merge module

    Step 5: Use WixEdit to open InstallWixWiz_0_0_1_0.wxs, Build, paying attention to any warnings. If you've done everything right, there will be no messages about "possible missing dependencies".

    SOME IMPORTANT NOTES:

    If earlier versions of WixWiz are detected, this version will prompt to see if you want them uninstalled. Even if the installer forced you to uninstall earlier versions, there is nothing preventing a user from running the version 0.0.0.x installers to reinstall the earlier version.

    To allow the option of uninstalling, a new ProductCode is issued, and at least one of the first three fields of the product version number have to change in some manner. The GUID for the UpgradeCode was left the same.

    Because this version can cohabit with older versions, a new component (GUID) has to be generated for the uninstall shortcut. To make it easier to differentiate between the two uninstall shortcuts, the new uninstall shortcut includes the product version number.

     
  • vo1stv
    vo1stv
    2010-11-22

    Files required for parts 1 to 3

     
    Attachments
  • vo1stv
    vo1stv
    2010-11-22

    PART 4:

    When we start replacing files as part of the update process, the safest thing to do is detect if higher versions of ourselves are installed, and prevent the installation. This capability is added to version 0.0.1.1. After that, upgrading specific components is left to the XML merge modules of the CommunityChest. The WXS file gets final say over which merge modules it uses.

    The risk of not checking for higher versions is obvious if you run the version 0.0.1.0 installer after running version 0.1.0.0. The version 0.0.1.0 files downgrade the files: the only way to recover is to run a repair on version 0.1.0.0.

    Some of these quirks seem contrary to the documentation about the MSI version numbering system... if I'm doing something wrong, please let me know.

    Step 1:Step 1 Create directory structure
    WixWiz -> 0.0.1.x
    WixWiz -> 0.1.0,x

    Step 2: copy required files
    Step 2a: copy pchv0_1.h into WixWiz\CommunityChest
    Step 2b: copy helloFromWixWixv0_1.c into WixWiz\CommunityChest
    Step 2c: copy WixWIzPrerequisitesv0_1.xml into WixWiz\CommunityChest
    Step 2d: copy WixWIzHelloSourcev0_1.xml into WixWiz\CommunityChest
    Step 2e: copy InstallWixWiz_0_0_1_1.wxs into WixWiz\0.0.1.x
    Step 2f: copy InstallWixWiz_0_1_0_0.wxs into WixWiz\0.1.0.x

    Step 3: Use WixEdit to open WixWIzPrerequisitesv0_1.xml and build merge
    module

    Step 4: Use WixEdit to open WixWIzHelloSourcev0_1.xml and build merge module

    Step 5: Use WixEdit to open InstallWixWiz_0_1_0_0.wxs, Build, paying
    attention to any warnings. If you've done everything right, there will be
    no messages about "possible missing dependencies".

    Step 6: Repeat Part 3, but try installing InstallWixWiz_0_0_1_1.wxs, Compare this behaviour to InstallWixWiz_0_0_1_0.wxs,

    Step 7: Assuming you installed InstallWixWiz_0_0_1_0.wxs, examine the contents of pch.h and helloFromWixWiz.c. Now uninstall WixWiz_0_0_1 and then repair WixWiz_0_1. This seems to be required to restore the files to version 0.1 status.

     
  • vo1stv
    vo1stv
    2010-11-22

    Required files for part 4

     
    Attachments
  • vo1stv
    vo1stv
    2010-11-22

    PART 5:

    This is the final installment.
    I've deviated from the original plan... version 1.0.0.0 is a major upgrade that optionally removes earlier versions. Also, instead of offering version 1.1.0.0, I've declared a UPGRADECODE for addons.

    This time the files are provided without a stepwise procedure. Feel free to send a note if you have questions.

     
  • vo1stv
    vo1stv
    2010-11-22

    Final installment

     
    Attachments