summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-03-27 10:55:15 (GMT)
committerTobias Markmann <tm@ayena.de>2015-03-27 10:55:15 (GMT)
commit82763b68366ffac782e82e68e792d873b8bc9a88 (patch)
treecfd08024d2dcfbefaeb08a876daffa37f18847c0 /BuildTools
parent85e53159321ab3e013dd2fc0a16748ed6755b119 (diff)
downloadswift-82763b68366ffac782e82e68e792d873b8bc9a88.zip
swift-82763b68366ffac782e82e68e792d873b8bc9a88.tar.bz2
Improve Windows MSI installer upgrade experience
Previously every time WiX heat.exe ran it generated new GUIDs for all the file components that MSI was going to install. Windows installer deletes components if there is no software/component left that is referencing it. This patch uses the -ag flag instead of the -gg flag for heat.exe so it will generate deterministic GUIDs based on the filename and other things instead of completely random new one on each run. In addition we schedule the upgrade to run after the new version has been installed. This way old files are first replaced with the new ones, shortcuts remain and are not deleted, pinned shortcuts remain usable. Afterwards MSI uninstalls the old version, specifically the components that are not reference anymore. Test-Information: Tested (a) two version upgrade with this patch and (b) an upgrade from a version without this patch to a version with this patch. a) The upgrade works as expected. MSI installs the new version and then uninstalls the old version. The pinned shortcut stays alive and works. b) In this case during the deinstallation files of the new installation are deleted, since there are two components with different GUIDs which however use the same filenames. Running a repair on this installation, or first deinstalling the old version and then the new one manually fixes this. Change-Id: I842a288d837962e77efaa15b17d3877e923c7e49
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/Tools/wix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BuildTools/SCons/Tools/wix.py b/BuildTools/SCons/Tools/wix.py
index 7b62508..705d249 100644
--- a/BuildTools/SCons/Tools/wix.py
+++ b/BuildTools/SCons/Tools/wix.py
@@ -7,7 +7,7 @@ def generate(env) :
if len(wixPath) > 0 and wixPath[-1] != "\\":
wixPath += "\\"
env['WIX_HEAT'] = wixPath + 'heat.exe'
- env['WIX_HEAT_OPTIONS'] = '-nologo -gg -sfrag -suid -template fragment -dr ProgramFilesFolder'
+ env['WIX_HEAT_OPTIONS'] = '-nologo -ag -sfrag -suid -template fragment -dr ProgramFilesFolder'
env['WIX_CANDLE'] = wixPath + 'candle.exe'
env['WIX_CANDLE_OPTIONS'] = '-nologo'
env['WIX_LIGHT'] = wixPath + 'light.exe'