mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More WiX porting
This commit is contained in:
parent
6fe8e094f5
commit
036f7ba5e4
@ -575,7 +575,7 @@ def main():
|
|||||||
run_tests(os.path.join(env.base, 'calibre-debug.exe'), env.base)
|
run_tests(os.path.join(env.base, 'calibre-debug.exe'), env.base)
|
||||||
if args.sign_installers:
|
if args.sign_installers:
|
||||||
sign_executables(env)
|
sign_executables(env)
|
||||||
create_installer(env)
|
create_installer(env, args.compression_level)
|
||||||
build_portable(env)
|
build_portable(env)
|
||||||
build_portable_installer(env)
|
build_portable_installer(env)
|
||||||
if args.sign_installers:
|
if args.sign_installers:
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">
|
||||||
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
<String Id="AdvancedWelcomeEulaDlgDescriptionPerUser" Value="Click Advanced to change installation settings." />
|
||||||
<String Id="AdvancedWelcomeEulaDlgDescriptionPerUser">Click Advanced to change installation settings.</String>
|
<String Id="ProgressTextFileCost" Value="Computing space requirements, this may take up to five minutes..." />
|
||||||
<String Id="ProgressTextFileCost">Computing space requirements, this may take up to five minutes...</String>
|
<String Id="ProgressTextCostInitialize" Value="Computing space requirements, this may take up to five minutes..." />
|
||||||
<String Id="ProgressTextCostInitialize">Computing space requirements, this may take up to five minutes...</String>
|
<String Id="ProgressTextCostFinalize" Value="Computing space requirements, this may take up to five minutes..." />
|
||||||
<String Id="ProgressTextCostFinalize">Computing space requirements, this may take up to five minutes...</String>
|
<String Id="WaitForCostingDlgText" Value="Please wait while the installer finishes determining your disk space requirements, this may take up to five minutes..." />
|
||||||
<String Id="WaitForCostingDlgText">Please wait while the installer finishes determining your disk space requirements, this may take up to five minutes...</String>
|
|
||||||
</WixLocalization>
|
</WixLocalization>
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import shutil
|
|||||||
from bypy.constants import is64bit
|
from bypy.constants import is64bit
|
||||||
from bypy.utils import run
|
from bypy.utils import run
|
||||||
|
|
||||||
# TODO: Migrate to Wix 4 see https://wixtoolset.org/docs/fourthree/
|
|
||||||
WIX = os.path.expanduser('~/.dotnet/tools/wix.exe')
|
WIX = os.path.expanduser('~/.dotnet/tools/wix.exe')
|
||||||
if is64bit:
|
if is64bit:
|
||||||
UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA'
|
UPGRADE_CODE = '5DD881FF-756B-4097-9D82-8C0F11D521EA'
|
||||||
@ -20,7 +19,12 @@ calibre_constants = globals()['calibre_constants']
|
|||||||
j, d, a, b = os.path.join, os.path.dirname, os.path.abspath, os.path.basename
|
j, d, a, b = os.path.join, os.path.dirname, os.path.abspath, os.path.basename
|
||||||
|
|
||||||
|
|
||||||
def create_installer(env):
|
def create_installer(env, compression_level='9'):
|
||||||
|
cl = int(compression_level)
|
||||||
|
if cl > 4:
|
||||||
|
dcl = 'high'
|
||||||
|
else:
|
||||||
|
dcl = {1: 'none', 2: 'low', 3: 'medium', 4: 'mszip'}[cl]
|
||||||
if os.path.exists(env.installer_dir):
|
if os.path.exists(env.installer_dir):
|
||||||
shutil.rmtree(env.installer_dir)
|
shutil.rmtree(env.installer_dir)
|
||||||
os.makedirs(env.installer_dir)
|
os.makedirs(env.installer_dir)
|
||||||
@ -58,8 +62,12 @@ def create_installer(env):
|
|||||||
license = j(env.src_root, 'LICENSE.rtf')
|
license = j(env.src_root, 'LICENSE.rtf')
|
||||||
banner = j(env.src_root, 'icons', 'wix-banner.bmp')
|
banner = j(env.src_root, 'icons', 'wix-banner.bmp')
|
||||||
dialog = j(env.src_root, 'icons', 'wix-dialog.bmp')
|
dialog = j(env.src_root, 'icons', 'wix-dialog.bmp')
|
||||||
cmd = [WIX, 'build', '-arch', arch, '-culture', 'en-us', '-loc', enusf,
|
run(WIX, 'extension', 'add', '-g', 'WixToolset.Util.wixext')
|
||||||
'-d', 'WixUILicenseRtf=' + license, '-d', 'WixUIBannerBmp=' + banner, '-d', 'WixUIDialogBmp=' + dialog, '-o', installer]
|
run(WIX, 'extension', 'add', '-g', 'WixToolset.UI.wixext')
|
||||||
|
cmd = [WIX, 'build', '-arch', arch, '-culture', 'en-us', '-loc', enusf, '-dcl', dcl,
|
||||||
|
'-ext', 'WixToolset.Util.wixext', '-ext', 'WixToolset.UI.wixext',
|
||||||
|
'-d', 'WixUILicenseRtf=' + license, '-d', 'WixUIBannerBmp=' + banner, '-d', 'WixUIDialogBmp=' + dialog,
|
||||||
|
'-o', installer, wxsf]
|
||||||
run(*cmd)
|
run(*cmd)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user