From f7212f46cfcd935611cf40f4e24fd888e3d78373 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Dec 2012 00:08:34 +0530 Subject: [PATCH] Fix broken 32 bit msi caused by name change. Also update version of wix used in the 32 bit build to 3.6 --- setup/installer/windows/wix-template.xml | 9 +++++++-- setup/installer/windows/wix.py | 24 +++++++++++++++++++----- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/setup/installer/windows/wix-template.xml b/setup/installer/windows/wix-template.xml index ebe59e5bfc..cd4a8c457a 100644 --- a/setup/installer/windows/wix-template.xml +++ b/setup/installer/windows/wix-template.xml @@ -29,9 +29,8 @@ Language="1033" Property="NEWPRODUCTFOUND"/> - + - @@ -39,6 +38,11 @@ + @@ -171,6 +175,7 @@ (i.e. per user installs should work) but left this way as I dont want to deal with the complications --> + diff --git a/setup/installer/windows/wix.py b/setup/installer/windows/wix.py index c7f4ab3933..1920a70b9b 100644 --- a/setup/installer/windows/wix.py +++ b/setup/installer/windows/wix.py @@ -16,7 +16,7 @@ if is64bit: UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA' MINVERHUMAN = 'Windows Vista' else: - WIXP = r'C:\Program Files\Windows Installer XML v3.5' + WIXP = r'C:\Program Files\WiX Toolset v3.6' UPGRADE_CODE = 'BEB2A80D-E902-4DAD-ADF9-8BD2DA42CFE1' MINVERHUMAN = 'Windows XP SP3' @@ -37,7 +37,7 @@ class WixMixIn: components = self.get_components_from_files() wxs = template.format( app = __appname__, - appfolder = 'Calibre2', + appfolder = 'Calibre2' if is64bit else __appname__, version = __version__, upgrade_code = UPGRADE_CODE, ProgramFilesFolder = 'ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder', @@ -66,7 +66,7 @@ class WixMixIn: arch = 'x64' if is64bit else 'x86' cmd = [CANDLE, '-nologo', '-arch', arch, '-ext', 'WiXUtilExtension', '-o', wixobj, wxsf] self.info(*cmd) - subprocess.check_call(cmd) + self.run_wix(cmd) self.installer = self.j(self.src_root, 'dist') if not os.path.exists(self.installer): os.makedirs(self.installer) @@ -82,13 +82,27 @@ class WixMixIn: '-dWixUILicenseRtf='+license, '-dWixUIBannerBmp='+banner, '-dWixUIDialogBmp='+dialog] - cmd.append('-sice:ICE60') # No language in dlls warning + cmd.extend([ + '-sice:ICE60',# No language in dlls warning + '-sice:ICE61',# Allow upgrading with same version number + '-sice:ICE40', # Re-install mode overriden + '-sice:ICE69', # Shortcut components are part of a different feature than the files they point to + ]) if self.opts.no_ice: cmd.append('-sval') if self.opts.verbose: cmd.append('-v') self.info(*cmd) - subprocess.check_call(cmd) + self.run_wix(cmd) + + def run_wix(self, cmd): + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + ret = p.wait() + self.info(p.stdout.read()) + self.info(p.stderr.read()) + if ret != 0: + sys.exit(1) def get_components_from_files(self):