MSI generator fixes
This commit is contained in:
parent
679adc7bf5
commit
4c62dab611
|
@ -124,11 +124,19 @@ class PackageGenerator:
|
||||||
self.final_output = f'meson-{self.version}-64.msi'
|
self.final_output = f'meson-{self.version}-64.msi'
|
||||||
self.staging_dirs = ['dist', 'dist2']
|
self.staging_dirs = ['dist', 'dist2']
|
||||||
self.progfile_dir = 'ProgramFiles64Folder'
|
self.progfile_dir = 'ProgramFiles64Folder'
|
||||||
redist_glob = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Redist\\MSVC\\v*\\MergeModules\\Microsoft_VC142_CRT_x64.msm'
|
redist_globs = ['C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Redist\\MSVC\\v*\\MergeModules\\Microsoft_VC142_CRT_x64.msm',
|
||||||
trials = glob(redist_glob)
|
'C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Redist\\MSVC\\v*\\MergeModules\\Microsoft_VC143_CRT_x64.msm']
|
||||||
if len(trials) != 1:
|
redist_path = None
|
||||||
sys.exit('Could not find unique MSM setup:' + '\n'.join(trials))
|
for g in redist_globs:
|
||||||
self.redist_path = trials[0]
|
trials = glob(g)
|
||||||
|
if len(trials) > 1:
|
||||||
|
sys.exit('MSM glob matched multiple entries:' + '\n'.join(trials))
|
||||||
|
if len(trials) == 1:
|
||||||
|
redist_path = trials[0]
|
||||||
|
break
|
||||||
|
if redist_path is None:
|
||||||
|
sys.exit('No MSMs found.')
|
||||||
|
self.redist_path = redist_path
|
||||||
self.component_num = 0
|
self.component_num = 0
|
||||||
self.feature_properties = {
|
self.feature_properties = {
|
||||||
self.staging_dirs[0]: {
|
self.staging_dirs[0]: {
|
||||||
|
@ -173,8 +181,6 @@ class PackageGenerator:
|
||||||
pyinstaller_tmpdir]
|
pyinstaller_tmpdir]
|
||||||
for m in modules:
|
for m in modules:
|
||||||
pyinst_cmd += ['--hidden-import', m]
|
pyinst_cmd += ['--hidden-import', m]
|
||||||
# https://github.com/pyinstaller/pyinstaller/issues/5693
|
|
||||||
pyinst_cmd += ['--exclude-module', '_bootlocale']
|
|
||||||
pyinst_cmd += ['meson.py']
|
pyinst_cmd += ['meson.py']
|
||||||
subprocess.check_call(pyinst_cmd)
|
subprocess.check_call(pyinst_cmd)
|
||||||
shutil.move(pyinstaller_tmpdir + '/meson', main_stage)
|
shutil.move(pyinstaller_tmpdir + '/meson', main_stage)
|
||||||
|
|
Loading…
Reference in New Issue