mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround wix adding of extensions being utterly broken
This commit is contained in:
parent
a61b62e0f2
commit
788e21fd03
@ -19,6 +19,11 @@ 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 add_wix_extension(name):
|
||||||
|
if not os.path.exists(os.path.expanduser(f'~/.wix/extensions/{name}')):
|
||||||
|
run(WIX, 'extension', 'add', '-g', name)
|
||||||
|
|
||||||
|
|
||||||
def create_installer(env, compression_level='9'):
|
def create_installer(env, compression_level='9'):
|
||||||
cl = int(compression_level)
|
cl = int(compression_level)
|
||||||
if cl > 4:
|
if cl > 4:
|
||||||
@ -62,8 +67,8 @@ def create_installer(env, compression_level='9'):
|
|||||||
arch = 'x64' if is64bit else 'x86'
|
arch = 'x64' if is64bit else 'x86'
|
||||||
installer = j(env.dist, '%s%s-%s.msi' % (
|
installer = j(env.dist, '%s%s-%s.msi' % (
|
||||||
calibre_constants['appname'], ('-64bit' if is64bit else ''), calibre_constants['version']))
|
calibre_constants['appname'], ('-64bit' if is64bit else ''), calibre_constants['version']))
|
||||||
run(WIX, 'extension', 'add', '-g', 'WixToolset.Util.wixext')
|
add_wix_extension('WixToolset.Util.wixext')
|
||||||
run(WIX, 'extension', 'add', '-g', 'WixToolset.UI.wixext')
|
add_wix_extension( 'WixToolset.UI.wixext')
|
||||||
cmd = [WIX, 'build', '-arch', arch, '-culture', 'en-us', '-loc', enusf, '-dcl', dcl,
|
cmd = [WIX, 'build', '-arch', arch, '-culture', 'en-us', '-loc', enusf, '-dcl', dcl,
|
||||||
'-ext', 'WixToolset.Util.wixext', '-ext', 'WixToolset.UI.wixext', '-o', installer, wxsf]
|
'-ext', 'WixToolset.Util.wixext', '-ext', 'WixToolset.UI.wixext', '-o', installer, wxsf]
|
||||||
run(*cmd)
|
run(*cmd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user