From b09f61f6bfe8fdaaff2693180af8b7b26d3a9176 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Tue, 13 Dec 2022 13:48:14 -0800 Subject: SL-18679: Find newer NSIS installation path --- .../installers/windows/installer_template.nsi | 1 - indra/newview/viewer_manifest.py | 30 +++++++--------------- 2 files changed, 9 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 60e26274cb..5fb42ce2fd 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -26,7 +26,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Unicode true SetOverwrite on # Overwrite files SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 89481add29..c312c1d248 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -790,27 +790,15 @@ class WindowsManifest(ViewerManifest): # Check two paths, one for Program Files, and one for Program Files (x86). # Yay 64bit windows. - for ProgramFiles in 'ProgramFiles', 'ProgramFiles(x86)': - NSIS_path = os.path.expandvars(r'${%s}\NSIS\makensis.exe' % ProgramFiles) - if os.path.exists(NSIS_path): - break - installer_created=False - nsis_attempts=3 - nsis_retry_wait=15 - for attempt in range(nsis_attempts): - try: - self.run_command([NSIS_path, '/V2', self.dst_path_of(tempfile)]) - except ManifestError as err: - if attempt+1 < nsis_attempts: - print("nsis failed, waiting %d seconds before retrying" % nsis_retry_wait, file=sys.stderr) - time.sleep(nsis_retry_wait) - nsis_retry_wait*=2 - else: - # NSIS worked! Done! - break - else: - print("Maximum nsis attempts exceeded; giving up", file=sys.stderr) - raise + 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)]) self.sign(installer_file) self.created_path(self.dst_path_of(installer_file)) -- cgit v1.2.3 From 6926368ff8fda01db062314801ce2b71d86ad02c Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Fri, 31 Mar 2023 13:09:57 -0700 Subject: SL-18839: Add basic Github build --- indra/cmake/00-Common.cmake | 2 +- indra/cmake/Python.cmake | 8 ++++++-- indra/newview/installers/windows/installer_template.nsi | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 9535e62e8f..58a64a8755 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -61,7 +61,7 @@ if (WINDOWS) # CP changed to only append the flag for 32bit builds - on 64bit builds, # locally at least, the build output is spammed with 1000s of 'D9002' # warnings about this switch being ignored. - if( ADDRESS_SIZE EQUAL 32 ) + if(ADDRESS_SIZE EQUAL 32 AND DEFINED ENV{"TEAMCITY_PROJECT_NAME"}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") endif() # zlib has assembly-language object files incompatible with SAFESEH diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index dbf5033ce5..f9259f6c2b 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -2,7 +2,11 @@ set(PYTHONINTERP_FOUND) -if (WINDOWS) +if (DEFINED ENV{PYTHON}) + # Allow python executable to be explicitly set + set(python "$ENV{PYTHON}") + set(PYTHONINTERP_FOUND ON) +elseif (WINDOWS) # On Windows, explicitly avoid Cygwin Python. # if the user has their own version of Python installed, prefer that @@ -43,7 +47,7 @@ else() if (python) set(PYTHONINTERP_FOUND ON) endif (python) -endif (WINDOWS) +endif (DEFINED ENV{PYTHON}) if (NOT python) message(FATAL_ERROR "No Python interpreter found") diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 5fb42ce2fd..778d32e66c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -26,6 +26,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Unicode true SetOverwrite on # Overwrite files SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block @@ -523,6 +524,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Make sure the user can uninstall ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +/* Unused Function un.CheckIfAdministrator DetailPrint $(CheckAdministratorUnInstDP) UserInfo::GetAccountType @@ -534,6 +536,7 @@ lbl_is_admin: Return FunctionEnd +*/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Function CheckWillUninstallV2 -- cgit v1.2.3