mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix broken 32 bit msi caused by name change. Also update version of wix used in the 32 bit build to 3.6
This commit is contained in:
parent
583b5820c8
commit
f7212f46cf
@ -29,9 +29,8 @@
|
|||||||
Language="1033"
|
Language="1033"
|
||||||
Property="NEWPRODUCTFOUND"/>
|
Property="NEWPRODUCTFOUND"/>
|
||||||
</Upgrade>
|
</Upgrade>
|
||||||
<CustomAction Id="PreventDowngrading" Error="Newer version already installed."/>
|
<CustomAction Id="PreventDowngrading" Error="Newer version of {app} already installed. If you want to downgrade you must uninstall {app} first."/>
|
||||||
|
|
||||||
<Property Id="ApplicationFolderName" Value="{appfolder}" />
|
|
||||||
<Property Id="APPLICATIONFOLDER">
|
<Property Id="APPLICATIONFOLDER">
|
||||||
<RegistrySearch Id='calibreInstDir' Type='raw'
|
<RegistrySearch Id='calibreInstDir' Type='raw'
|
||||||
Root='HKLM' Key="Software\{app}{x64}\Installer" Name="InstallPath" />
|
Root='HKLM' Key="Software\{app}{x64}\Installer" Name="InstallPath" />
|
||||||
@ -39,6 +38,11 @@
|
|||||||
|
|
||||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||||
<Directory Id='{ProgramFilesFolder}' Name='PFiles'>
|
<Directory Id='{ProgramFilesFolder}' Name='PFiles'>
|
||||||
|
<!-- The name must be calibre on 32 bit to ensure
|
||||||
|
that the component guids dont change compared
|
||||||
|
to previous msis. However, on 64 bit it must
|
||||||
|
be Calibre2 otherwise by default it will
|
||||||
|
install to C:\Program Files\calibre -->
|
||||||
<Directory Id='APPLICATIONFOLDER' Name="{appfolder}" />
|
<Directory Id='APPLICATIONFOLDER' Name="{appfolder}" />
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory Id="ProgramMenuFolder">
|
<Directory Id="ProgramMenuFolder">
|
||||||
@ -171,6 +175,7 @@
|
|||||||
(i.e. per user installs should work) but left this way as I
|
(i.e. per user installs should work) but left this way as I
|
||||||
dont want to deal with the complications
|
dont want to deal with the complications
|
||||||
-->
|
-->
|
||||||
|
<Property Id="ApplicationFolderName" Value="Calibre2" />
|
||||||
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
|
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
|
||||||
<Property Id="ALLUSERS" Value="1" />
|
<Property Id="ALLUSERS" Value="1" />
|
||||||
<WixVariable Id="WixUISupportPerUser" Value="0" />
|
<WixVariable Id="WixUISupportPerUser" Value="0" />
|
||||||
|
@ -16,7 +16,7 @@ if is64bit:
|
|||||||
UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA'
|
UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA'
|
||||||
MINVERHUMAN = 'Windows Vista'
|
MINVERHUMAN = 'Windows Vista'
|
||||||
else:
|
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'
|
UPGRADE_CODE = 'BEB2A80D-E902-4DAD-ADF9-8BD2DA42CFE1'
|
||||||
MINVERHUMAN = 'Windows XP SP3'
|
MINVERHUMAN = 'Windows XP SP3'
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class WixMixIn:
|
|||||||
components = self.get_components_from_files()
|
components = self.get_components_from_files()
|
||||||
wxs = template.format(
|
wxs = template.format(
|
||||||
app = __appname__,
|
app = __appname__,
|
||||||
appfolder = 'Calibre2',
|
appfolder = 'Calibre2' if is64bit else __appname__,
|
||||||
version = __version__,
|
version = __version__,
|
||||||
upgrade_code = UPGRADE_CODE,
|
upgrade_code = UPGRADE_CODE,
|
||||||
ProgramFilesFolder = 'ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder',
|
ProgramFilesFolder = 'ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder',
|
||||||
@ -66,7 +66,7 @@ class WixMixIn:
|
|||||||
arch = 'x64' if is64bit else 'x86'
|
arch = 'x64' if is64bit else 'x86'
|
||||||
cmd = [CANDLE, '-nologo', '-arch', arch, '-ext', 'WiXUtilExtension', '-o', wixobj, wxsf]
|
cmd = [CANDLE, '-nologo', '-arch', arch, '-ext', 'WiXUtilExtension', '-o', wixobj, wxsf]
|
||||||
self.info(*cmd)
|
self.info(*cmd)
|
||||||
subprocess.check_call(cmd)
|
self.run_wix(cmd)
|
||||||
self.installer = self.j(self.src_root, 'dist')
|
self.installer = self.j(self.src_root, 'dist')
|
||||||
if not os.path.exists(self.installer):
|
if not os.path.exists(self.installer):
|
||||||
os.makedirs(self.installer)
|
os.makedirs(self.installer)
|
||||||
@ -82,13 +82,27 @@ class WixMixIn:
|
|||||||
'-dWixUILicenseRtf='+license,
|
'-dWixUILicenseRtf='+license,
|
||||||
'-dWixUIBannerBmp='+banner,
|
'-dWixUIBannerBmp='+banner,
|
||||||
'-dWixUIDialogBmp='+dialog]
|
'-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:
|
if self.opts.no_ice:
|
||||||
cmd.append('-sval')
|
cmd.append('-sval')
|
||||||
if self.opts.verbose:
|
if self.opts.verbose:
|
||||||
cmd.append('-v')
|
cmd.append('-v')
|
||||||
self.info(*cmd)
|
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):
|
def get_components_from_files(self):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user