diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-09-13 11:13:55 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-09-13 11:13:55 -0400 |
commit | be5f210e72a12eb31152c8d8c7f28c5d8930ba45 (patch) | |
tree | addb071b5bb5cffd4eb1115c102fa5a6e33c8151 /indra/newview/viewer_manifest.py | |
parent | b02249546edeab57bef45cc72400973aa673d866 (diff) |
SL-19242: Don't exclude the prepared .nsi file from Windows-app.
Since we need to run NSIS in a separate job step, allow the Windows-app build
artifact to include the temporary .nsi file prepared by filling in our
template.
Also tweak the logic that finds and runs NSIS.
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rwxr-xr-x | indra/newview/viewer_manifest.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b994b304eb..3f07eefbec 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -522,8 +522,7 @@ class WindowsManifest(ViewerManifest): 'secondlife-bin.*', '*_Setup.exe', '*.bat', - '*.tar.bz2', - '*.nsi'))) + '*.tar.bz2'))) with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list @@ -831,14 +830,20 @@ class WindowsManifest(ViewerManifest): # Check two paths, one for Program Files, and one for Program Files (x86). # Yay 64bit windows. nsis_path = "makensis.exe" - for program_files in '${programfiles}', '${programfiles(x86)}': - for nesis_path in 'NSIS', 'NSIS\\Unicode': - possible_path = os.path.expandvars(f"{program_files}\\{nesis_path}\\makensis.exe") - if os.path.exists(possible_path): - nsis_path = possible_path - break - - self.run_command([possible_path, '/V2', self.dst_path_of(tempfile)]) + try: + for program_files in os.getenv('programfiles'), os.getenv('programfiles(x86)'): + if program_files: + for subpath in 'NSIS', r'NSIS\Unicode': + possible_path = os.path.join(program_files, subpath, nsis_path) + if os.path.isfile(possible_path): + nsis_path = possible_path + # don't just break: we need to exit multiple + # levels of 'for' loop + raise StopIteration() + except StopIteration: + pass + + self.run_command([nsis_path, '/V2', self.dst_path_of(tempfile)]) self.sign(installer_file) self.created_path(self.dst_path_of(installer_file)) |