From 198046e21d08f7af67287c0ea7260163c424fe0d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 27 Jan 2015 15:34:43 -0500 Subject: Include MSVCP120.DLL and MSVCR120.DLL in Windows viewer package. Generalize Copy3rdPartyLibs.cmake to eliminate some clone-and-tweak redundancy. --- indra/cmake/Copy3rdPartyLibs.cmake | 116 +++++++++++-------------------------- indra/newview/viewer_manifest.py | 8 +-- 2 files changed, 39 insertions(+), 85 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 28202f85d6..84947adaae 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -66,126 +66,80 @@ if(WINDOWS) set(release_files ${release_files} fmodex.dll) endif (FMODEX) -#******************************* -# Copy MS C runtime dlls, required for packaging. -# *TODO - Adapt this to support VC9 -if (MSVC80) - FIND_PATH(debug_msvc8_redist_path msvcr80d.dll - PATHS - ${MSVC_DEBUG_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT - NO_DEFAULT_PATH - NO_DEFAULT_PATH - ) - - if(EXISTS ${debug_msvc8_redist_path}) - set(debug_msvc8_files - msvcr80d.dll - msvcp80d.dll - Microsoft.VC80.DebugCRT.manifest - ) - - copy_if_different( - ${debug_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR_DEBUG}" - out_targets - ${debug_msvc8_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - endif (EXISTS ${debug_msvc8_redist_path}) - - FIND_PATH(release_msvc8_redist_path msvcr80.dll - PATHS - ${MSVC_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT - NO_DEFAULT_PATH - NO_DEFAULT_PATH - ) - - if(EXISTS ${release_msvc8_redist_path}) - set(release_msvc8_files - msvcr80.dll - msvcp80.dll - Microsoft.VC80.CRT.manifest - ) - - copy_if_different( - ${release_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${release_msvc8_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - copy_if_different( - ${release_msvc8_redist_path} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets - ${release_msvc8_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - endif (EXISTS ${release_msvc8_redist_path}) -elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 - FIND_PATH(debug_msvc10_redist_path msvcr100d.dll + #******************************* + # Copy MS C runtime dlls, required for packaging. + # *TODO - Adapt this to support VC9 + if (MSVC80) + set(MSVC_VER 80) + set(MSVC_VERDOT 8.0) + elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 + set(MSVC_VER 100) + set(MSVC_VERDOT 10.0) + elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 + set(MSVC_VER 120) + set(MSVC_VERDOT 12.0) + else (MSVC80) + MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") + endif (MSVC80) + + FIND_PATH(debug_msvc_redist_path msvcr${MSVC_VER}d.dll PATHS ${MSVC_DEBUG_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) - if(EXISTS ${debug_msvc10_redist_path}) - set(debug_msvc10_files - msvcr100d.dll - msvcp100d.dll + if(EXISTS ${debug_msvc_redist_path}) + set(debug_msvc_files + msvcr${MSVC_VER}d.dll + msvcp${MSVC_VER}d.dll ) copy_if_different( - ${debug_msvc10_redist_path} + ${debug_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_DEBUG}" out_targets - ${debug_msvc10_files} + ${debug_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) endif () - FIND_PATH(release_msvc10_redist_path msvcr100.dll + FIND_PATH(release_msvc_redist_path msvcr${MSVC_VER}.dll PATHS ${MSVC_REDIST_PATH} - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_VER}.CRT [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) - if(EXISTS ${release_msvc10_redist_path}) - set(release_msvc10_files - msvcr100.dll - msvcp100.dll + if(EXISTS ${release_msvc_redist_path}) + set(release_msvc_files + msvcr${MSVC_VER}.dll + msvcp${MSVC_VER}.dll ) copy_if_different( - ${release_msvc10_redist_path} + ${release_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_RELEASE}" out_targets - ${release_msvc10_files} + ${release_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) copy_if_different( - ${release_msvc10_redist_path} + ${release_msvc_redist_path} "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" out_targets - ${release_msvc10_files} + ${release_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) endif () -endif (MSVC80) + elseif(DARWIN) set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 176f257005..a20ca8802a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -385,11 +385,11 @@ class Windows_i686_Manifest(ViewerManifest): # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx if self.args['configuration'].lower() == 'debug': - self.path("msvcr100d.dll") - self.path("msvcp100d.dll") + self.path("msvcr120d.dll") + self.path("msvcp120d.dll") else: - self.path("msvcr100.dll") - self.path("msvcp100.dll") + self.path("msvcr120.dll") + self.path("msvcp120.dll") # Vivox runtimes self.path("SLVoice.exe") -- cgit v1.2.3 From ae6440eecc4d6c018a3634c2c06052757bde962f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jan 2015 15:55:18 -0500 Subject: MAINT-4744: Eliminate viewer dependency on (old) GNU libstdc++. To be more accurate, this changeset doesn't actually eliminate the dependency: it eliminates the use cases for the llifstream / llofstream feature that requires it. Currently you can construct an llifstream or llofstream from an open LLFILE* file handle (or, except on Windows, an int file descriptor). But rather than containing a streambuf implementation based on FILE*, llfile.h relies on the fact that the Windows std::filebuf happens to support that as a nonstandard extension; also on a nonstandard GNU extension __gnu_cxx::stdio_filebuf. To move from GNU libstdc++ to clang's libc++ (the direction on Mac), we could code a streambuf that supports FILE*. But before doing that, it's worth asking whether anyone actually uses this questionable feature. In fact there were only two methods: LLWearable::exportFile() and importFile() -- and only one call to either, in LLViewerWearable::saveNewAsset(). The code in saveNewAsset() opened the LLFILE* immediately before calling exportFile(), meaning we could reasonably push the open operation down into exportFile(). That logic was complex anyway due to the need for the caller to close the LLFILE* regardless of the success of the exportFile(). Change LLWearable::exportFile() and importFile() to accept a std::string filename rather than an open LLFILE*. Change LLViewerWearable::saveNewAsset() to simply call exportFile(filename) rather than horsing around with an LLFILE* handle. (This improves the code in another way too: it encapsulates the need to open the relevant file in binary mode. Previously, each caller had to remember to do that.) To prevent inadvertent reintroduction of ll[io]fstream(LLFILE*) code, add llstream_LLFILE preprocessor macro (default 0) to control access to the relevant constructors. Also suppress rdbuf() override, the only method whose signature references llstdio_filebuf. --- indra/llappearance/llwearable.cpp | 13 +++++++------ indra/llappearance/llwearable.h | 4 ++-- indra/llcommon/llfile.cpp | 4 ++++ indra/llcommon/llfile.h | 14 ++++++++++++++ indra/newview/llviewerwearable.cpp | 13 +------------ 5 files changed, 28 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 4bce3f99ed..41c06f4368 100755 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -86,10 +86,10 @@ LLAssetType::EType LLWearable::getAssetType() const return LLWearableType::getAssetType(mType); } -BOOL LLWearable::exportFile(LLFILE* fp) const +BOOL LLWearable::exportFile(const std::string& filename) const { - llofstream ofs(fp); - return exportStream(ofs); + llofstream ofs(filename, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary); + return ofs.is_open() && exportStream(ofs); } // virtual @@ -201,10 +201,11 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp) } } -LLWearable::EImportResult LLWearable::importFile(LLFILE* fp, LLAvatarAppearance* avatarp ) +LLWearable::EImportResult LLWearable::importFile(const std::string& filename, + LLAvatarAppearance* avatarp ) { - llifstream ifs(fp); - return importStream(ifs, avatarp); + llifstream ifs(filename, std::ios_base::in | std::ios_base::binary); + return (! ifs.is_open())? FAILURE : importStream(ifs, avatarp); } // virtual diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h index 630eb1e3a5..875c2932f1 100755 --- a/indra/llappearance/llwearable.h +++ b/indra/llappearance/llwearable.h @@ -81,8 +81,8 @@ public: SUCCESS, BAD_HEADER }; - BOOL exportFile(LLFILE* file) const; - EImportResult importFile(LLFILE* file, LLAvatarAppearance* avatarp ); + BOOL exportFile(const std::string& filename) const; + EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp ); virtual BOOL exportStream( std::ostream& output_stream ) const; virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp ); diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index aabc195ba8..304d702979 100755 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -919,6 +919,7 @@ llifstream::llifstream(const char* _Filename, #endif +#if llstream_LLFILE // explicit llifstream::llifstream(_Filet *_File, ios_base::openmode _Mode, size_t _Size) : @@ -942,6 +943,7 @@ llifstream::llifstream(int __fd, this->init(&_M_filebuf); } #endif +#endif // llstream_LLFILE bool llifstream::is_open() const { // test if C stream has been opened @@ -1039,6 +1041,7 @@ llofstream::llofstream(const char* _Filename, } #endif +#if llstream_LLFILE // explicit llofstream::llofstream(_Filet *_File, ios_base::openmode _Mode, size_t _Size) : @@ -1062,6 +1065,7 @@ llofstream::llofstream(int __fd, this->init(&_M_filebuf); } #endif +#endif // llstream_LLFILE bool llofstream::is_open() const { // test if C stream has been opened diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 0612071d67..44a1e42fa5 100755 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -86,6 +86,12 @@ public: static const char * tmpdir(); }; +// Remove ll[io]fstream support for [LL]FILE*, preparing to remove dependency +// on GNU's standard library. +#if ! defined(llstream_LLFILE) +#define llstream_LLFILE 0 +#endif + /** * @brief Provides a layer of compatibility for C/POSIX. * @@ -228,6 +234,7 @@ public: explicit llifstream(const char* _Filename, ios_base::openmode _Mode = ios_base::in); +#if llstream_LLFILE /** * @brief Create a stream using an open c file stream. * @param File An open @c FILE*. @@ -253,6 +260,7 @@ public: //size_t _Size = static_cast(BUFSIZ)); size_t _Size = static_cast(1)); #endif +#endif // llstream_LLFILE /** * @brief The destructor does nothing. @@ -263,6 +271,7 @@ public: virtual ~llifstream() {} // Members: +#if llstream_LLFILE /** * @brief Accessing the underlying buffer. * @return The current basic_filebuf buffer. @@ -271,6 +280,7 @@ public: */ llstdio_filebuf* rdbuf() const { return const_cast(&_M_filebuf); } +#endif // llstream_LLFILE /** * @brief Wrapper to test for an open file. @@ -340,6 +350,7 @@ public: explicit llofstream(const char* _Filename, ios_base::openmode _Mode = ios_base::out|ios_base::trunc); +#if llstream_LLFILE /** * @brief Create a stream using an open c file stream. * @param File An open @c FILE*. @@ -365,6 +376,7 @@ public: //size_t _Size = static_cast(BUFSIZ)); size_t _Size = static_cast(1)); #endif +#endif // llstream_LLFILE /** * @brief The destructor does nothing. @@ -375,6 +387,7 @@ public: virtual ~llofstream() {} // Members: +#if llstream_LLFILE /** * @brief Accessing the underlying buffer. * @return The current basic_filebuf buffer. @@ -383,6 +396,7 @@ public: */ llstdio_filebuf* rdbuf() const { return const_cast(&_M_filebuf); } +#endif // llstream_LLFILE /** * @brief Wrapper to test for an open file. diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index 7de82a4710..0f73515b5d 100755 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -509,18 +509,7 @@ void LLViewerWearable::saveNewAsset() const //LL_INFOS() << *this << LL_ENDL; const std::string filename = asset_id_to_filename(mAssetID); - LLFILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */ - BOOL successful_save = FALSE; - if(fp && exportFile(fp)) - { - successful_save = TRUE; - } - if(fp) - { - fclose(fp); - fp = NULL; - } - if(!successful_save) + if(! exportFile(filename)) { std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str()); LL_WARNS() << buffer << LL_ENDL; -- cgit v1.2.3 From b362f247ce452c534f4b0868cbba06b9215c1c8f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 9 Feb 2015 14:29:09 -0500 Subject: included libopenal in linux package --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a20ca8802a..32cf9d3df6 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1090,7 +1090,7 @@ class Linux_i686_Manifest(LinuxManifest): self.path("libdirect-1.4.so.5*") self.path("libhunspell-1.3.so*") self.path("libalut.so*") - self.path("libopenal.so", "libopenal.so.1") + self.path("libopenal.so*") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs # libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1 -- cgit v1.2.3 From 4673020c6395bf0542017c6a118d797fa19285dc Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 10 Feb 2015 16:41:23 -0800 Subject: Update Windows Installer script to block Vista with SP1 and lower. --- .../installers/windows/installer_template.nsi | 41 +++++---------------- indra/newview/installers/windows/lang_da.nsi | Bin 8026 -> 8032 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9346 -> 9352 bytes indra/newview/installers/windows/lang_en-us.nsi | Bin 8120 -> 8126 bytes indra/newview/installers/windows/lang_es.nsi | Bin 8764 -> 8770 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 9030 -> 9036 bytes indra/newview/installers/windows/lang_it.nsi | Bin 8372 -> 8378 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7288 -> 7294 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8426 -> 8432 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 8788 -> 8794 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 8144 -> 8150 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 8266 -> 8272 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6798 -> 6804 bytes 13 files changed, 9 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 65581a6781..c07ba560a7 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -27,12 +27,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -SetOverwrite on ; overwrite files -SetCompress auto ; compress iff saves space -SetCompressor /solid lzma ; compress whole installer as one block -SetDatablockOptimize off ; only saves us 0.1%, not worth it -XPStyle on ; add an XP manifest to the installer -RequestExecutionLevel admin ; on Vista we must be admin because we write to Program Files +SetOverwrite on ; Overwrite files +SetCompress auto ; Compress if saves space +SetCompressor /solid lzma ; Compress whole installer as one block +SetDatablockOptimize off ; Only saves us 0.1%, not worth it +XPStyle on ; Add an XP manifest to the installer +RequestExecutionLevel admin ; For when we write to Program Files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Project flags @@ -118,7 +118,6 @@ Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation !insertmacro GetParameters !insertmacro GetOptions !include WinVer.nsh ; For OS and SP detection -!include x64.nsh ; For 64bit OS detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; After install completes, launch app @@ -145,26 +144,18 @@ FunctionEnd ; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsVersion - ${If} ${AtMostWin2000} + ${If} ${AtMostWin2003} MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} - ${If} ${IsWinXP} - ${AndIfNot} ${RunningX64} - ${AndIfNot} ${IsServicePack} 3 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} - - ${If} ${IsWinXP} - ${AndIf} ${RunningX64} + ${If} ${IsWinVista} ${AndIfNot} ${IsServicePack} 2 MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} - ${If} ${IsWin2003} + ${If} ${IsWin2008} ${AndIfNot} ${IsServicePack} 2 MessageBox MB_OK $(CheckWindowsVersionMB) Quit @@ -175,20 +166,6 @@ FunctionEnd ;Recommend Upgrading Service Pack ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsServPack - ${If} ${IsWinVista} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} - - ${If} ${IsWin2008} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} - ${If} ${IsWin7} ${AndIfNot} ${IsServicePack} 1 MessageBox MB_OK $(CheckWindowsServPackMB) diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 2352649b4b..1080fd2e3d 100755 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 397262afe1..fd59bf8f71 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index df0d55d9e0..4cf605e398 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 32967a0dfa..bfc1bf7248 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index 7c75e25360..c2ee17fbd4 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index ce66b61f9f..cb97335488 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index e68830123a..3fbf434b6a 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 7883819190..1564c25293 100755 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index eb3fb2386c..8e858c8742 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 3b0042fbf5..8b98ed5032 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index b9be1eab08..7c41811b30 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 3c6f6fd289..e89a1e7e51 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 14acb2fd0f3bb08fe5f524e887c5c3c6dee1113f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 14:26:54 -0800 Subject: Comments formatting changes, no behavior changes --- .../installers/windows/installer_template.nsi | 447 ++++++++++----------- 1 file changed, 221 insertions(+), 226 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c07ba560a7..7e3cfe04d2 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; secondlife setup.nsi -;; Copyright 2004-2011, Linden Research, Inc. +;; Copyright 2004-2015, Linden Research, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -18,7 +18,7 @@ ;; ;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA ;; -;; NSIS Unicode 2.38.1 or higher required +;; NSIS Unicode 2.46.5 or higher required ;; http://www.scratchpaper.com/ ;; ;; Author: James Cook, Don Kjer, Callum Prentice @@ -27,15 +27,15 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -SetOverwrite on ; Overwrite files -SetCompress auto ; Compress if saves space -SetCompressor /solid lzma ; Compress whole installer as one block -SetDatablockOptimize off ; Only saves us 0.1%, not worth it -XPStyle on ; Add an XP manifest to the installer -RequestExecutionLevel admin ; For when we write to Program Files +SetOverwrite on # Overwrite files +SetCompress auto # Compress if saves space +SetCompressor /solid lzma # Compress whole installer as one block +SetDatablockOptimize off # Only saves us 0.1%, not worth it +XPStyle on # Add an XP manifest to the installer +RequestExecutionLevel admin # For when we write to Program Files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Project flags +;; Project flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %%VERSION%% @@ -72,23 +72,23 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru" LangString LanguageCode ${LANG_TURKISH} "tr" LangString LanguageCode ${LANG_TRADCHINESE} "zh" -;; this placeholder is replaced by viewer_manifest.py +# this placeholder is replaced by viewer_manifest.py %%INST_VARS%% Name ${INSTNAME} -SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text +SubCaption 0 $(LicenseSubTitleSetup) # Override "license agreement" text -BrandingText " " ; bottom of window text +BrandingText " " # Bottom of window text Icon %%SOURCE%%\installers\windows\install_icon.ico UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon.ico -WindowIcon on ; show our icon in left corner -BGGradient off ; no big background window -CRCCheck on ; make sure CRC is OK -InstProgressFlags smooth colored ; new colored smooth look -ShowInstDetails nevershow ; no details, no "show" button -SetOverwrite on ; stomp files by default -AutoCloseWindow true ; after all files install, close window +WindowIcon on # Show our icon in left corner +BGGradient off # No big background window +CRCCheck on # Make sure CRC is OK +InstProgressFlags smooth colored # New colored smooth look +ShowInstDetails nevershow # No details, no "show" button +SetOverwrite on # Overwrite files by default +AutoCloseWindow true # After all files install, close window InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" @@ -97,51 +97,53 @@ Page directory dirPre Page instfiles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Variables +;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Var INSTPROG Var INSTEXE Var INSTSHORTCUT -Var COMMANDLINE ; command line passed to this installer, set in .onInit -Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer -Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall - ; GUI and the defaults. -Var SKIP_AUTORUN ; skip automatic launch of viewer after install -Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation that will be uninstalled. - -;;; Function definitions should go before file includes, because calls to -;;; DLLs like LangDLL trigger an implicit file include, so if that call is at -;;; the end of this script NSIS has to decompress the whole installer before -;;; it can call the DLL function. JC - -!include "FileFunc.nsh" ; For GetParameters, GetOptions +Var COMMANDLINE # Command line passed to this installer, set in .onInit +Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer +Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall + # GUI and the defaults. +Var SKIP_AUTORUN # Skip automatic launch of viewer after install +Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. + +# Function definitions should go before file includes, because calls to +# DLLs like LangDLL trigger an implicit file include, so if that call is at +# the end of this script NSIS has to decompress the whole installer before +# it can call the DLL function. JC + +!include "FileFunc.nsh" # For GetParameters, GetOptions !insertmacro GetParameters !insertmacro GetOptions -!include WinVer.nsh ; For OS and SP detection +!include WinVer.nsh # For OS and SP detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; After install completes, launch app +;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess -Call CheckWindowsServPack ; Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused +Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $R0 # Option value, unused StrCmp $SKIP_AUTORUN "true" +2; - # Assumes SetOutPath $INSTDIR +# Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' Pop $R0 + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Pre-directory page callback +;; Pre-directory page callback ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function dirPre StrCmp $SKIP_DIALOGS "true" 0 +2 Abort + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure this computer meets the minimum system requirements. -; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 +;; Make sure this computer meets the minimum system requirements. +;; Currently: Windows Vista SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsVersion ${If} ${AtMostWin2003} @@ -160,10 +162,11 @@ Function CheckWindowsVersion MessageBox MB_OK $(CheckWindowsVersionMB) Quit ${EndIf} + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;Recommend Upgrading Service Pack +;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsServPack ${If} ${IsWin7} @@ -179,10 +182,11 @@ Function CheckWindowsServPack DetailPrint $(UseLatestServPackDP) Return ${EndIf} + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure the user can install/uninstall +;; Make sure the user can install ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckIfAdministrator DetailPrint $(CheckAdministratorInstDP) @@ -193,10 +197,11 @@ Function CheckIfAdministrator Quit lbl_is_admin: Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +;; Make sure the user can uninstall ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.CheckIfAdministrator DetailPrint $(CheckAdministratorUnInstDP) @@ -207,11 +212,12 @@ Function un.CheckIfAdministrator Quit lbl_is_admin: Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Checks to see if the current version has already been installed (according to the registry). -; If it has, allow user to bail out of install process. +;; Checks to see if the current version has already been installed (according to the registry). +;; If it has, allow user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckIfAlreadyCurrent Push $0 @@ -223,10 +229,11 @@ Function CheckIfAlreadyCurrent continue_install: Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Checks for CPU valid (must have SSE2 support) +;; Checks for CPU valid (must have SSE2 support) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckCPUFlags Push $1 @@ -238,11 +245,12 @@ Function CheckCPUFlags OK_SSE2: Pop $1 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Close the program, if running. Modifies no variables. -; Allows user to bail out of install process. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CloseSecondLife Push $0 @@ -268,50 +276,51 @@ Function CloseSecondLife DONE: Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Test our connection to secondlife.com -; Also allows us to count attempted installs by examining web logs. -; *TODO: Return current SL version info and have installer check -; if it is up to date. +;; Test our connection to secondlife.com +;; Also allows us to count attempted installs by examining web logs. +;; *TODO: Return current SL version info and have installer check +;; if it is up to date. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckNetworkConnection Push $0 Push $1 Push $2 # Option value for GetOptions DetailPrint $(CheckNetworkConnectionDP) - ; Look for a tag value from the stub installer, used for statistics - ; to correlate installs. Default to "" if not found on command line. +# Look for a tag value from the stub installer, used for statistics to correlate installs. +# Default to "" if not found on command line. StrCpy $2 "" ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 GetTempFileName $0 - !define HTTP_TIMEOUT 5000 ; milliseconds - ; Don't show secondary progress bar, this will be quick. + !define HTTP_TIMEOUT 5000 # milliseconds +# Don't show secondary progress bar, this will be quick. NSISdl::download_quiet \ /TIMEOUT=${HTTP_TIMEOUT} \ "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ $0 - Pop $1 ; Return value, either "success", "cancel" or an error message + Pop $1 # Return value, either "success", "cancel" or an error message ; MessageBox MB_OK "Download result: $1" ; Result ignored for now ; StrCmp $1 "success" +2 ; DetailPrint "Connection failed: $1" - Delete $0 ; temporary file + Delete $0 # temporary file Pop $2 Pop $1 Pop $0 Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Function CheckOldExeName -; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -; If that name is found in the install folder, delete it to invalidate any -; old shortcuts to it that may be in non-standard locations, so that the user -; does not end up running the old version (potentially getting caught in an -; infinite update loop). See MAINT-3575 -; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckOldExeName +;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' +;; If that name is found in the install folder, delete it to invalidate any +;; old shortcuts to it that may be in non-standard locations. This is to prevent +;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckOldExeName IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE @@ -319,23 +328,22 @@ Function CheckOldExeName CHECKOLDEXE_FOUND: Delete "$INSTDIR\SecondLife.exe" CHECKOLDEXE_DONE: -FunctionEnd +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Function CheckWillUninstallV2 -; -; If we are being called through auto-update, we need to uninstall any -; existing V2 installation. Otherwise, we wind up with -; SecondLifeViewer2 and SecondLifeViewer installations existing side -; by side no indication which to use. -; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckWillUninstallV2 +;; +;; If called through auto-update, need to uninstall any existing V2 installation. +;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations +;; existing side by side with no indication on which to use. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWillUninstallV2 StrCpy $DO_UNINSTALL_V2 "" StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE - StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE ; don't uninstall our own install dir. + StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE CHECKV2_FOUND: @@ -346,7 +354,7 @@ CHECKV2_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Save user files to temp location +;; Save user files to temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function PreserveUserFiles @@ -354,18 +362,18 @@ Push $0 Push $1 Push $2 - RMDir /r "$TEMP\SecondLifeSettingsBackup" + RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there CreateDirectory "$TEMP\SecondLifeSettingsBackup" - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE ; no more users + StrCmp $1 "" DONE # no more users ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" @@ -380,7 +388,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy files in Documents and Settings\All Users\SecondLife Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 @@ -391,7 +399,7 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Restore user files from temp location +;; Restore user files from temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RestoreUserFiles @@ -399,16 +407,16 @@ Push $0 Push $1 Push $2 - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE ; no more users + StrCmp $1 "" DONE # no more users ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 CreateDirectory "$2\Application Data\SecondLife\" @@ -423,7 +431,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy files in Documents and Settings\All Users\SecondLife Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 @@ -434,7 +442,7 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Remove temp dirs +;; Remove temp directories ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveTempUserFiles @@ -442,16 +450,16 @@ Push $0 Push $1 Push $2 - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE ; no more users + StrCmp $1 "" DONE # no more users ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" @@ -465,7 +473,7 @@ Pop $2 Pop $1 Pop $0 -; Copy files in Documents and Settings\All Users\SecondLife +# Copy files in Documents and Settings\All Users\SecondLife Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 @@ -474,10 +482,9 @@ Pop $0 FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Clobber user files - TEST ONLY -; This is here for testing, generally not desirable to call it. +;; Clobber user files - TEST ONLY +;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Function ClobberUserFilesTESTONLY @@ -485,16 +492,16 @@ FunctionEnd ;Push $1 ;Push $2 ; -; StrCpy $0 0 ; Index number used to iterate via EnumRegKey +; StrCpy $0 0 # Index number used to iterate via EnumRegKey ; ; LOOP: ; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 -; StrCmp $1 "" DONE ; no more users +; StrCmp $1 "" DONE # no more users ; ; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" -; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing +; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing ; -; ; Required since ProfileImagePath is of type REG_EXPAND_SZ +;# Required since ProfileImagePath is of type REG_EXPAND_SZ ; ExpandEnvStrings $2 $2 ; ; RMDir /r "$2\Application Data\SecondLife\" @@ -508,7 +515,7 @@ FunctionEnd ;Pop $1 ;Pop $0 ; -;; Copy files in Documents and Settings\All Users\SecondLife +;# Copy files in Documents and Settings\All Users\SecondLife ;Push $0 ; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" ; StrCmp $0 "" +2 @@ -518,10 +525,10 @@ FunctionEnd ;FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed shader files -;;; Since shaders are in active development, we'll likely need to shuffle them -;;; around a bit from build to build. This ensures that shaders that we move -;;; or rename in the dev tree don't get left behind in the install. +;; Delete the installed shader files +;; Since shaders are in active development, we'll likely need to shuffle them +;; around a bit from build to build. This ensures that shaders that were removed +;; or renamed don't get left behind in the install directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldShaders @@ -531,14 +538,13 @@ RMDir /r "$INSTDIR\app_settings\shaders\*" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed XUI files -;;; We've changed the directory hierarchy for skins, putting all XUI and texture -;;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;;; to skins/xui/en-us. Need to clean up the old path when upgrading +;; Delete the installed XUI files +;; We've changed the directory hierarchy for skins, putting all XUI and texture +;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed +;; to skins/xui/en-us. Need to clean up the old path when upgrading. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldXUI -;; remove old XUI and texture files RmDir /r "$INSTDIR\skins\html" RmDir /r "$INSTDIR\skins\xui" RmDir /r "$INSTDIR\skins\textures" @@ -547,47 +553,41 @@ Delete "$INSTDIR\skins\*.txt" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Remove any releasenotes files. -;;; We are no longer including release notes with the viewer. This will delete -;;; any that were left behind by an older installer. Delete will not fail if -;;; the files do not exist +;; Remove any release notes files. +;; We are no longer including release notes with the viewer, so remove them. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveOldReleaseNotes -;; remove releasenotes.txt file from application directory, and the shortcut -;; from the start menu. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Delete files in Documents and Settings\\SecondLife -; Delete files in Documents and Settings\All Users\SecondLife +;; Delete files in \Users\\AppData\Roaming\SecondLife ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.DocumentsAndSettingsFolder -; Delete files in Documents and Settings\\SecondLife +# Delete files in \Users\\AppData\Roaming\SecondLife Push $0 Push $1 Push $2 - DetailPrint "Deleting files in Documents and Settings folder" + DetailPrint "Deleting Second Life files" - StrCpy $0 0 ; Index number used to iterate via EnumRegKey + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE ; no more users + StrCmp $1 "" DONE # no more users ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ; Required since ProfileImagePath is of type REG_EXPAND_SZ +# Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 - ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs +# Remove all settings files but leave any other .txt files to preserve the chat logs ; RMDir /r "$2\Application Data\SecondLife\logs" RMDir /r "$2\Application Data\SecondLife\browser_profile" RMDir /r "$2\Application Data\SecondLife\user_settings" @@ -606,23 +606,23 @@ Pop $2 Pop $1 Pop $0 -; Delete files in Documents and Settings\All Users\SecondLife +# Delete files in Program Data folder Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 RMDir /r "$0\SecondLife" Pop $0 -; Delete files in C:\Windows\Application Data\SecondLife -; If the user is running on a pre-NT system, Application Data lives here instead of -; in Documents and Settings. +# Delete files in C:\Windows\Application Data\SecondLife +# If the user is running on a pre-NT system, Application Data lives here instead of +# in Documents and Settings. RMDir /r "$WINDIR\Application Data\SecondLife" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Close the program, if running. Modifies no variables. -; Allows user to bail out of uninstall process. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of uninstall process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.CloseSecondLife Push $0 @@ -646,14 +646,13 @@ Function un.CloseSecondLife DONE: Pop $0 Return -FunctionEnd +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; -; Delete the stored password for the current Windows user -; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled -; +;; Delete the stored password for the current Windows user +;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.RemovePassword DetailPrint "Removing Second Life password" @@ -665,23 +664,21 @@ SetShellVarContext all FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Delete the installed files -;;; This deletes the uninstall executable, but it works -;;; because it is copied to temp directory before running -;;; -;;; Note: You must list all files here, because we only -;;; want to delete our files, not things users left in the -;;; application directories. +;; Delete the installed files +;; This deletes the uninstall executable, but it works because it is copied to temp directory before running +;; +;; Note: You must list all files here, because we only want to delete our files, +;; not things users left in the application directories. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.ProgramFiles -;; Remove mozilla file first so recursive directory deletion doesn't get hung up +# Remove mozilla file first so recursive directory deletion doesn't get hung up Delete "$INSTDIR\app_settings\mozilla\components" -;; This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py +# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py %%DELETE_FILES%% -;; Optional/obsolete files. Delete won't fail if they don't exist. +# Optional/obsolete files. Delete won't fail if they don't exist. Delete "$INSTDIR\dronesettings.ini" Delete "$INSTDIR\message_template.msg" Delete "$INSTDIR\newview.pdb" @@ -694,9 +691,11 @@ Delete "$INSTDIR\motions\*.lla" Delete "$INSTDIR\trial\*.html" Delete "$INSTDIR\newview.exe" Delete "$INSTDIR\SecondLife.exe" -;; MAINT-3099 workaround - prevent these log files, if present, from causing a user alert + +# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert Delete "$INSTDIR\VivoxVoiceService-*.log" -;; Remove entire help directory + +# Remove entire help directory Delete "$INSTDIR\help\Advanced\*" RMDir "$INSTDIR\help\Advanced" Delete "$INSTDIR\help\basics\*" @@ -714,7 +713,7 @@ RMDir "$INSTDIR" IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER FOLDERFOUND: - ; Silent uninstall always removes all files (/SD IDYES) +# Silent uninstall always removes all files (/SD IDYES) MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER RMDir /r "$INSTDIR" @@ -723,33 +722,35 @@ NOFOLDER: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Uninstall settings +;; Uninstall settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; UninstallText $(UninstallTextMsg) ShowUninstDetails show ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Uninstall section +;; Uninstall Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Section Uninstall -; Start with some default values. +# Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call un.CheckIfAdministrator ; Make sure the user can install/uninstall -; uninstall for all users (if you change this, change it in the install as well) +# Make sure the user can install/uninstall +Call un.CheckIfAdministrator + +# uninstall for all users (if you change this, change it in the install as well) SetShellVarContext all -; Make sure we're not running +# Make sure we're not running Call un.CloseSecondLife -; Clean up registry keys and subkeys (these should all be !defines somewhere) +# Clean up registry keys and subkeys (these should all be !defines somewhere) DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" -; Clean up shortcuts +# Clean up shortcuts Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" RMDir "$SMPROGRAMS\$INSTSHORTCUT" @@ -757,81 +758,85 @@ Delete "$DESKTOP\$INSTSHORTCUT.lnk" Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -; Clean up cache and log files. -; Leave them in-place for non AGNI installs. +# Clean up cache and log files, but leave them in-place for non AGNI installs. !ifdef UNINSTALL_SETTINGS Call un.DocumentsAndSettingsFolder !endif -; remove stored password on uninstall +# Remove stored password on uninstall Call un.RemovePassword Call un.ProgramFiles -SectionEnd ; end of uninstall section +# End of uninstall section + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Note: to add new languages, add a language file include to the list -;; at the top of this file, add an entry to the menu and then add an -;; entry to the language ID selector below +;; Prep Installer Section +;; +;; Note: to add new languages, add a language file include to the list +;; at the top of this file, add an entry to the menu and then add an +;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit -Call CheckWindowsVersion ; Don't install On unsupported systems +Call CheckWindowsVersion # Don't install On unsupported systems Push $0 - ${GetParameters} $COMMANDLINE ; get our command line + ${GetParameters} $COMMANDLINE # Get our command line ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 - IfErrors +2 0 ; If error jump past setting SKIP_DIALOGS + IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 - IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN + IfErrors +2 0 # If error jump past setting SKIP_AUTORUN StrCpy $SKIP_AUTORUN "true" - ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English - ; If no language (error), then proceed +# If no language (error), then proceed IfErrors lbl_configure_default_lang - ; No error means we got a language, so use it +# No error means we got a language, so use it StrCpy $LANGUAGE $0 Goto lbl_return lbl_configure_default_lang: - ; If we currently have a version of SL installed, default to the language of that install - ; Otherwise don't change $LANGUAGE and it will default to the OS UI language. +# If we currently have a version of SL installed, default to the language of that install +# Otherwise don't change $LANGUAGE and it will default to the OS UI language. ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors +2 0 ; If error skip the copy instruction + IfErrors +2 0 # If error skip the copy instruction StrCpy $LANGUAGE $0 - ; For silent installs, no language prompt, use default +# For silent installs, no language prompt, use default IfSilent lbl_return StrCmp $SKIP_DIALOGS "true" lbl_return lbl_build_menu: Push "" - # Use separate file so labels can be UTF-16 but we can still merge changes - # into this ASCII file. JC +# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC !include "%%SOURCE%%\installers\windows\language_menu.nsi" - Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain + Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) Pop $0 StrCmp $0 "cancel" 0 +2 Abort StrCpy $LANGUAGE $0 - ; save language in registry +# save language in registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE lbl_return: Pop $0 Return + FunctionEnd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit - ; read language from registry and set for uninstaller - ; Key will be removed on successful uninstall +# Read language from registry and set for uninstaller. Key will be removed on successful uninstall ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" IfErrors lbl_end StrCpy $LANGUAGE $0 @@ -840,56 +845,50 @@ lbl_end: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; MAIN SECTION +;; Default Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" ; (default section) +Section "" # (default section) -SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well) +SetShellVarContext all # install for all users (if you change this, change it in the uninstall as well) -; Start with some default values. +# Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call CheckCPUFlags ; Make sure we have SSE2 support -Call CheckIfAdministrator ; Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version -Call CloseSecondLife ; Make sure we're not running -Call CheckNetworkConnection ; ping secondlife.com -Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed. -Call CheckOldExeName ; Clean up a previous version of the exe +Call CheckCPUFlags # Make sure we have SSE2 support +Call CheckIfAdministrator # Make sure the user can install/uninstall +Call CheckIfAlreadyCurrent # Make sure that we haven't already installed this version +Call CloseSecondLife # Make sure we're not running +Call CheckNetworkConnection # ping secondlife.com +Call CheckWillUninstallV2 # See if a V2 install exists and will be removed. +Call CheckOldExeName # Clean up a previous version of the exe -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles PRESERVE_DONE: -;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. -;Call RemoveCacheFiles ; Installing over removes potentially corrupted - ; VFS and cache files. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Need to clean out shader files from previous installs to fix DEV-5663 +# Don't remove cache files during a regular install, +# removing the inventory cache on upgrades results in lots of damage to the servers. +;Call RemoveCacheFiles # Installing over removes potentially corrupted + # VFS and cache files. + +# Need to clean out shader files from previous installs to fix DEV-5663 Call RemoveOldShaders -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Need to clean out old XUI files that predate skinning +# Need to clean out old XUI files that predate skinning Call RemoveOldXUI -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Clear out old releasenotes.txt files. These are now on the public wiki. +# Clear out old releasenotes.txt files. These are now on the public wiki. Call RemoveOldReleaseNotes -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Files -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py +# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% # Pass the installer's language to the client to use as a default StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Shortcuts in start menu +# Shortcuts in start menu CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ @@ -908,8 +907,7 @@ WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Other shortcuts +# Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" @@ -918,9 +916,7 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Write registry +# Write registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" @@ -928,35 +924,34 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Write URL registry info +# Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -;; URL param must be last item passed to viewer, it ignores subsequent params -;; to avoid parameter injection attacks. + +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -;; URL param must be last item passed to viewer, it ignores subsequent params -;; to avoid parameter injection attacks. + +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' -; write out uninstaller +# write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" -; Uninstall existing "Second Life Viewer 2" install if needed. +# Uninstall existing "Second Life Viewer 2" install if needed. StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty. + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. Call RestoreUserFiles Call RemoveTempUserFiles REMOVE_SLV2_DONE: -; end of default section +# end of default section SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 4491a3df9a4ec6897373997bf6c29c50130569ee Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 21:53:02 -0800 Subject: A few more comments changes --- .../newview/installers/windows/installer_template.nsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7e3cfe04d2..a28cf4fca0 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -842,14 +842,15 @@ Function un.onInit StrCpy $LANGUAGE $0 lbl_end: Return + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Default Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" # (default section) +Section "" -SetShellVarContext all # install for all users (if you change this, change it in the uninstall as well) +SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) # Start with some default values. StrCpy $INSTPROG "${INSTNAME}" @@ -858,11 +859,11 @@ StrCpy $INSTSHORTCUT "${SHORTCUT}" Call CheckCPUFlags # Make sure we have SSE2 support Call CheckIfAdministrator # Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent # Make sure that we haven't already installed this version -Call CloseSecondLife # Make sure we're not running -Call CheckNetworkConnection # ping secondlife.com -Call CheckWillUninstallV2 # See if a V2 install exists and will be removed. -Call CheckOldExeName # Clean up a previous version of the exe +Call CheckIfAlreadyCurrent # Make sure this version is not already installed +Call CloseSecondLife # Make sure Second Life not currently running +Call CheckNetworkConnection # Ping secondlife.com +Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckOldExeName # Clean up a previous version of the exeicutable StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles @@ -870,8 +871,7 @@ PRESERVE_DONE: # Don't remove cache files during a regular install, # removing the inventory cache on upgrades results in lots of damage to the servers. -;Call RemoveCacheFiles # Installing over removes potentially corrupted - # VFS and cache files. +;Call RemoveCacheFiles # Installing over removes potentially corrupted VFS and cache files. # Need to clean out shader files from previous installs to fix DEV-5663 Call RemoveOldShaders @@ -951,7 +951,6 @@ StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE Call RemoveTempUserFiles REMOVE_SLV2_DONE: -# end of default section SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From ac368a2384c33004bddba1059938d42e16d996d7 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 22:22:19 -0800 Subject: A little more cleanup --- indra/newview/installers/windows/installer_template.nsi | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a28cf4fca0..8872bef993 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -769,8 +769,6 @@ Call un.RemovePassword Call un.ProgramFiles -# End of uninstall section - SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 4794985d8d210a8e7bc738b620c269222ff25c85 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Wed, 11 Feb 2015 22:25:17 -0800 Subject: Show Details button at install and uninstall Note: Showing details adds a lot of overhead and will slow down the processes, but allows the user the option of seeing what is going on. Usefull for errors that occure. --- indra/newview/installers/windows/installer_template.nsi | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 8872bef993..96ca83bdda 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -86,7 +86,6 @@ WindowIcon on # Show our icon in left corner BGGradient off # No big background window CRCCheck on # Make sure CRC is OK InstProgressFlags smooth colored # New colored smooth look -ShowInstDetails nevershow # No details, no "show" button SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window @@ -725,7 +724,6 @@ FunctionEnd ;; Uninstall settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; UninstallText $(UninstallTextMsg) -ShowUninstDetails show ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Uninstall Section -- cgit v1.2.3 From 68c94399ed36ec66314e672dafc4afefa9116c00 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Thu, 12 Feb 2015 14:33:31 -0800 Subject: Backed out changeset: 24c470cccee0 - added SKIP_AUTORUN command flag... --- indra/newview/installers/windows/installer_template.nsi | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 96ca83bdda..7682d4b9ed 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -105,7 +105,6 @@ Var COMMANDLINE # Command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall # GUI and the defaults. -Var SKIP_AUTORUN # Skip automatic launch of viewer after install Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. # Function definitions should go before file includes, because calls to @@ -124,7 +123,6 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused - StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' Pop $R0 @@ -785,10 +783,6 @@ Call CheckWindowsVersion # Don't install On unsupported systems IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" - ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 - IfErrors +2 0 # If error jump past setting SKIP_AUTORUN - StrCpy $SKIP_AUTORUN "true" - ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English # If no language (error), then proceed -- cgit v1.2.3 From b0d01b0a0ad6e4daffe5663fa56d373ea690ed30 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Thu, 12 Feb 2015 14:34:44 -0800 Subject: Backed out changeset: bd12d1ab1943 - MAINT-3591 Remove "Start Second Life now?" dialogue... --- indra/newview/installers/windows/installer_template.nsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7682d4b9ed..73e5b8cf74 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -123,8 +123,24 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused + + StrCmp $SKIP_DIALOGS "true" label_launch + + ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 + # If parameter was there (no error) just launch + # Otherwise ask + IfErrors label_ask_launch label_launch + +label_ask_launch: + # Don't launch by default when silent + IfSilent label_no_launch + MessageBox MB_YESNO $(InstSuccesssQuestion) \ + IDYES label_launch IDNO label_no_launch + +label_launch: # Assumes SetOutPath $INSTDIR Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' +label_no_launch: Pop $R0 FunctionEnd -- cgit v1.2.3 From 0a14115c94a98546be1c2528b9ccc32ce2a61e5a Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 00:15:35 -0800 Subject: Rearrange the order of sections to better follow un/installation procedure --- .../installers/windows/installer_template.nsi | 1208 ++++++++++---------- 1 file changed, 602 insertions(+), 606 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 73e5b8cf74..36a8d7216b 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,6 +91,7 @@ AutoCloseWindow true # After all files install, close window InstallDir "$PROGRAMFILES\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" +UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) Page directory dirPre Page instfiles @@ -117,34 +118,6 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !insertmacro GetOptions !include WinVer.nsh # For OS and SP detection -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; After install completes, launch app -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function .onInstSuccess -Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused - - StrCmp $SKIP_DIALOGS "true" label_launch - - ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 - # If parameter was there (no error) just launch - # Otherwise ask - IfErrors label_ask_launch label_launch - -label_ask_launch: - # Don't launch by default when silent - IfSilent label_no_launch - MessageBox MB_YESNO $(InstSuccesssQuestion) \ - IDYES label_launch IDNO label_no_launch - -label_launch: -# Assumes SetOutPath $INSTDIR - Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' -label_no_launch: - Pop $R0 - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Pre-directory page callback ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -155,96 +128,74 @@ Function dirPre FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure this computer meets the minimum system requirements. -;; Currently: Windows Vista SP2 +;; Prep Installer Section +;; +;; Note: to add new languages, add a language file include to the list +;; at the top of this file, add an entry to the menu and then add an +;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWindowsVersion - ${If} ${AtMostWin2003} - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} - - ${If} ${IsWinVista} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} +Function .onInit +Call CheckCPUFlags # Make sure we have SSE2 support +Call CheckWindowsVersion # Don't install On unsupported systems + Push $0 + ${GetParameters} $COMMANDLINE # Get our command line - ${If} ${IsWin2008} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit - ${EndIf} + ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 + IfErrors +2 0 # If error jump past setting SKIP_DIALOGS + StrCpy $SKIP_DIALOGS "true" -FunctionEnd + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWindowsServPack - ${If} ${IsWin7} - ${AndIfNot} ${IsServicePack} 1 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} +# If no language (error), then proceed + IfErrors lbl_configure_default_lang +# No error means we got a language, so use it + StrCpy $LANGUAGE $0 + Goto lbl_return - ${If} ${IsWin2008R2} - ${AndIfNot} ${IsServicePack} 1 - MessageBox MB_OK $(CheckWindowsServPackMB) - DetailPrint $(UseLatestServPackDP) - Return - ${EndIf} +lbl_configure_default_lang: +# If we currently have a version of SL installed, default to the language of that install +# Otherwise don't change $LANGUAGE and it will default to the OS UI language. + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + IfErrors +2 0 # If error skip the copy instruction + StrCpy $LANGUAGE $0 -FunctionEnd +# For silent installs, no language prompt, use default + IfSilent lbl_return + StrCmp $SKIP_DIALOGS "true" lbl_return + +lbl_build_menu: + Push "" +# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC + !include "%%SOURCE%%\installers\windows\language_menu.nsi" + + Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain + LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) + Pop $0 + StrCmp $0 "cancel" 0 +2 + Abort + StrCpy $LANGUAGE $0 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can install -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckIfAdministrator - DetailPrint $(CheckAdministratorInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorInstMB) - Quit -lbl_is_admin: +# save language in registry + WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE +lbl_return: + Pop $0 Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can uninstall +;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CheckIfAdministrator - DetailPrint $(CheckAdministratorUnInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorUnInstMB) - Quit -lbl_is_admin: +Function un.onInit +# Read language from registry and set for uninstaller. Key will be removed on successful uninstall + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + IfErrors lbl_end + StrCpy $LANGUAGE $0 +lbl_end: Return FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Checks to see if the current version has already been installed (according to the registry). -;; If it has, allow user to bail out of install process. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckIfAlreadyCurrent - Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" - StrCmp $0 ${VERSION_LONG} 0 continue_install - StrCmp $SKIP_DIALOGS "true" continue_install - MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install - Quit -continue_install: - Pop $0 - Return - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Checks for CPU valid (must have SSE2 support) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -262,333 +213,356 @@ Function CheckCPUFlags FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Close the program, if running. Modifies no variables. -;; Allows user to bail out of install process. +;; Make sure this computer meets the minimum system requirements. +;; Currently: Windows Vista SP2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CloseSecondLife - Push $0 - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - - StrCmp $SKIP_DIALOGS "true" CLOSE - MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL - - CANCEL_INSTALL: +Function CheckWindowsVersion + ${If} ${AtMostWin2003} + MessageBox MB_OK $(CheckWindowsVersionMB) Quit + ${EndIf} - CLOSE: - DetailPrint $(CloseSecondLifeInstDP) - SendMessage $0 16 0 0 - - LOOP: - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - Sleep 500 - Goto LOOP + ${If} ${IsWinVista} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} - DONE: - Pop $0 - Return + ${If} ${IsWin2008} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Test our connection to secondlife.com -;; Also allows us to count attempted installs by examining web logs. -;; *TODO: Return current SL version info and have installer check -;; if it is up to date. +;; Install Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckNetworkConnection - Push $0 - Push $1 - Push $2 # Option value for GetOptions - DetailPrint $(CheckNetworkConnectionDP) -# Look for a tag value from the stub installer, used for statistics to correlate installs. -# Default to "" if not found on command line. - StrCpy $2 "" - ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 - GetTempFileName $0 - !define HTTP_TIMEOUT 5000 # milliseconds -# Don't show secondary progress bar, this will be quick. - NSISdl::download_quiet \ - /TIMEOUT=${HTTP_TIMEOUT} \ - "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ - $0 - Pop $1 # Return value, either "success", "cancel" or an error message - ; MessageBox MB_OK "Download result: $1" - ; Result ignored for now - ; StrCmp $1 "success" +2 - ; DetailPrint "Connection failed: $1" - Delete $0 # temporary file - Pop $2 - Pop $1 - Pop $0 - Return +Section "" -FunctionEnd +SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckOldExeName -;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -;; If that name is found in the install folder, delete it to invalidate any -;; old shortcuts to it that may be in non-standard locations. This is to prevent -;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +# Start with some default values. +StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTEXE "${INSTEXE}" +StrCpy $INSTSHORTCUT "${SHORTCUT}" -Function CheckOldExeName - IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE +Call CheckIfAdministrator # Make sure the user can install/uninstall +Call CheckIfAlreadyCurrent # Make sure this version is not already installed +Call CloseSecondLife # Make sure Second Life not currently running +Call CheckNetworkConnection # Ping secondlife.com +Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckOldExeName # Clean up a previous version of the exeicutable -CHECKOLDEXE_FOUND: - Delete "$INSTDIR\SecondLife.exe" -CHECKOLDEXE_DONE: +StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE + Call PreserveUserFiles +PRESERVE_DONE: -FunctionEnd +# Don't remove cache files during a regular install, +# removing the inventory cache on upgrades results in lots of damage to the servers. +;Call RemoveCacheFiles # Installing over removes potentially corrupted VFS and cache files. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckWillUninstallV2 -;; -;; If called through auto-update, need to uninstall any existing V2 installation. -;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations -;; existing side by side with no indication on which to use. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWillUninstallV2 +# Need to clean out shader files from previous installs to fix DEV-5663 +Call RemoveOldShaders - StrCpy $DO_UNINSTALL_V2 "" +# Need to clean out old XUI files that predate skinning +Call RemoveOldXUI - StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE - StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. - IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE +# Clear out old releasenotes.txt files. These are now on the public wiki. +Call RemoveOldReleaseNotes -CHECKV2_FOUND: - StrCpy $DO_UNINSTALL_V2 "true" +# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py +%%INSTALL_FILES%% -CHECKV2_DONE: +# Pass the installer's language to the client to use as a default +StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" -FunctionEnd +# Shortcuts in start menu +CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" +SetOutPath "$INSTDIR" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Save user files to temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function PreserveUserFiles -Push $0 -Push $1 -Push $2 +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ + "InternetShortcut" "URL" \ + "http://join.secondlife.com/" +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ + "InternetShortcut" "URL" \ + "http://www.secondlife.com/account/" +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ + "InternetShortcut" "URL" \ + "http://wiki.secondlife.com/wiki/LSL_Portal" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '' - RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there - CreateDirectory "$TEMP\SecondLifeSettingsBackup" - StrCpy $0 0 # Index number used to iterate via EnumRegKey +# Other shortcuts +SetOutPath "$INSTDIR" +CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '' - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +# Write registry +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +# Write URL registry info +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' - CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" +# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: +# Write out uninstaller +WriteUninstaller "$INSTDIR\uninst.exe" -Pop $2 -Pop $1 -Pop $0 +# Uninstall existing "Second Life Viewer 2" install if needed. +StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE + ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" -Pop $0 + Call RestoreUserFiles + Call RemoveTempUserFiles +REMOVE_SLV2_DONE: -FunctionEnd +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Restore user files from temp location +;; Uninstall Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RestoreUserFiles +Section Uninstall -Push $0 -Push $1 -Push $2 +# Start with some default values. +StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTEXE "${INSTEXE}" +StrCpy $INSTSHORTCUT "${SHORTCUT}" - StrCpy $0 0 # Index number used to iterate via EnumRegKey +# Make sure the user can install/uninstall +Call un.CheckIfAdministrator - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +# Uninstall for all users (if you change this, change it in the install as well) +SetShellVarContext all - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +# Make sure we're not running +Call un.CloseSecondLife -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +# Clean up registry keys and subkeys (these should all be !defines somewhere) +DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" +DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" +# Clean up shortcuts +Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" +RMDir "$SMPROGRAMS\$INSTSHORTCUT" - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: +Delete "$DESKTOP\$INSTSHORTCUT.lnk" +Delete "$INSTDIR\$INSTSHORTCUT.lnk" +Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -Pop $2 -Pop $1 -Pop $0 +# Clean up cache and log files, but leave them in-place for non AGNI installs. -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" -Pop $0 +!ifdef UNINSTALL_SETTINGS +Call un.DocumentsAndSettingsFolder +!endif -FunctionEnd +# Remove stored password on uninstall +Call un.RemovePassword + +Call un.ProgramFiles + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove temp directories +;; Make sure the user can install ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveTempUserFiles +Function CheckIfAdministrator + DetailPrint $(CheckAdministratorInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorInstMB) + Quit +lbl_is_admin: + Return -Push $0 -Push $1 -Push $2 +FunctionEnd - StrCpy $0 0 # Index number used to iterate via EnumRegKey +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Make sure the user can uninstall +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function un.CheckIfAdministrator + DetailPrint $(CheckAdministratorUnInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorUnInstMB) + Quit +lbl_is_admin: + Return - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users +FunctionEnd - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Checks to see if the current version has already been installed (according to the registry). +;; If it has, allow user to bail out of install process. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckIfAlreadyCurrent + Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" + StrCmp $0 ${VERSION_LONG} 0 continue_install + StrCmp $SKIP_DIALOGS "true" continue_install + MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install + Quit +continue_install: + Pop $0 + Return -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 +FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckWillUninstallV2 +;; +;; If called through auto-update, need to uninstall any existing V2 installation. +;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations +;; existing side by side with no indication on which to use. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWillUninstallV2 - RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" + StrCpy $DO_UNINSTALL_V2 "" - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: + StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE + StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir. + IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE -Pop $2 -Pop $1 -Pop $0 +CHECKV2_FOUND: + StrCpy $DO_UNINSTALL_V2 "true" -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*" -Pop $0 +CHECKV2_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Clobber user files - TEST ONLY -;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of install process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;Function ClobberUserFilesTESTONLY +Function CloseSecondLife + Push $0 + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + + StrCmp $SKIP_DIALOGS "true" CLOSE + MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL -;Push $0 -;Push $1 -;Push $2 -; -; StrCpy $0 0 # Index number used to iterate via EnumRegKey -; -; LOOP: -; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 -; StrCmp $1 "" DONE # no more users -; -; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" -; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing -; -;# Required since ProfileImagePath is of type REG_EXPAND_SZ -; ExpandEnvStrings $2 $2 -; -; RMDir /r "$2\Application Data\SecondLife\" -; -; CONTINUE: -; IntOp $0 $0 + 1 -; Goto LOOP -; DONE: -; -;Pop $2 -;Pop $1 -;Pop $0 -; -;# Copy files in Documents and Settings\All Users\SecondLife -;Push $0 -; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" -; StrCmp $0 "" +2 -; RMDir /r "$2\Application Data\SecondLife\" -;Pop $0 -; -;FunctionEnd + CANCEL_INSTALL: + Quit -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed shader files -;; Since shaders are in active development, we'll likely need to shuffle them -;; around a bit from build to build. This ensures that shaders that were removed -;; or renamed don't get left behind in the install directory. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldShaders + CLOSE: + DetailPrint $(CloseSecondLifeInstDP) + SendMessage $0 16 0 0 -;; Remove old shader files first so fallbacks will work. see DEV-5663 -RMDir /r "$INSTDIR\app_settings\shaders\*" + LOOP: + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + Sleep 500 + Goto LOOP + + DONE: + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed XUI files -;; We've changed the directory hierarchy for skins, putting all XUI and texture -;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;; Close the program, if running. Modifies no variables. +;; Allows user to bail out of uninstall process. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldXUI +Function un.CloseSecondLife + Push $0 + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL -RmDir /r "$INSTDIR\skins\html" -RmDir /r "$INSTDIR\skins\xui" -RmDir /r "$INSTDIR\skins\textures" -Delete "$INSTDIR\skins\*.txt" + CANCEL_UNINSTALL: + Quit + + CLOSE: + DetailPrint $(CloseSecondLifeUnInstDP) + SendMessage $0 16 0 0 + + LOOP: + FindWindow $0 "Second Life" "" + IntCmp $0 0 DONE + Sleep 500 + Goto LOOP + + DONE: + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove any release notes files. -;; We are no longer including release notes with the viewer, so remove them. +;; Test our connection to secondlife.com +;; Also allows us to count attempted installs by examining web logs. +;; *TODO: Return current SL version info and have installer check +;; if it is up to date. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldReleaseNotes - -Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" -Delete "$INSTDIR\releasenotes.txt" +Function CheckNetworkConnection + Push $0 + Push $1 + Push $2 # Option value for GetOptions + DetailPrint $(CheckNetworkConnectionDP) +# Look for a tag value from the stub installer, used for statistics to correlate installs. +# Default to "" if not found on command line. + StrCpy $2 "" + ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 + GetTempFileName $0 + !define HTTP_TIMEOUT 5000 # milliseconds +# Don't show secondary progress bar, this will be quick. + NSISdl::download_quiet \ + /TIMEOUT=${HTTP_TIMEOUT} \ + "http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \ + $0 + Pop $1 # Return value, either "success", "cancel" or an error message + ; MessageBox MB_OK "Download result: $1" + ; Result ignored for now + ; StrCmp $1 "success" +2 + ; DetailPrint "Connection failed: $1" + Delete $0 # temporary file + Pop $2 + Pop $1 + Pop $0 + Return FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files in \Users\\AppData\Roaming\SecondLife +;; Save user files to temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.DocumentsAndSettingsFolder +Function PreserveUserFiles -# Delete files in \Users\\AppData\Roaming\SecondLife Push $0 Push $1 Push $2 - DetailPrint "Deleting Second Life files" - - StrCpy $0 0 # Index number used to iterate via EnumRegKey + RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there + CreateDirectory "$TEMP\SecondLifeSettingsBackup" + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 @@ -600,15 +574,8 @@ Push $2 # Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 -# Remove all settings files but leave any other .txt files to preserve the chat logs -; RMDir /r "$2\Application Data\SecondLife\logs" - RMDir /r "$2\Application Data\SecondLife\browser_profile" - RMDir /r "$2\Application Data\SecondLife\user_settings" - Delete "$2\Application Data\SecondLife\*.xml" - Delete "$2\Application Data\SecondLife\*.bmp" - Delete "$2\Application Data\SecondLife\search_history.txt" - Delete "$2\Application Data\SecondLife\plugin_cookies.txt" - Delete "$2\Application Data\SecondLife\typed_locations.txt" + CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" + CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" CONTINUE: IntOp $0 $0 + 1 @@ -619,344 +586,373 @@ Pop $2 Pop $1 Pop $0 -# Delete files in Program Data folder +# Copy files in Documents and Settings\All Users\SecondLife Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - RMDir /r "$0\SecondLife" + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" + CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" Pop $0 -# Delete files in C:\Windows\Application Data\SecondLife -# If the user is running on a pre-NT system, Application Data lives here instead of -# in Documents and Settings. -RMDir /r "$WINDIR\Application Data\SecondLife" - FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Close the program, if running. Modifies no variables. -;; Allows user to bail out of uninstall process. +;; Restore user files from temp location ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CloseSecondLife - Push $0 - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL +Function RestoreUserFiles - CANCEL_UNINSTALL: - Quit +Push $0 +Push $1 +Push $2 - CLOSE: - DetailPrint $(CloseSecondLifeUnInstDP) - SendMessage $0 16 0 0 + StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: - FindWindow $0 "Second Life" "" - IntCmp $0 0 DONE - Sleep 500 - Goto LOOP + EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + StrCmp $1 "" DONE # no more users + + ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing + +# Required since ProfileImagePath is of type REG_EXPAND_SZ + ExpandEnvStrings $2 $2 + + CreateDirectory "$2\Application Data\SecondLife\" + CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP DONE: - Pop $0 - Return + +Pop $2 +Pop $1 +Pop $0 + +# Copy files in Documents and Settings\All Users\SecondLife +Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + CreateDirectory "$2\Application Data\SecondLife\" + CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" +Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the stored password for the current Windows user -;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled +;; Remove temp directories ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.RemovePassword +Function RemoveTempUserFiles -DetailPrint "Removing Second Life password" +Push $0 +Push $1 +Push $2 -SetShellVarContext current -Delete "$APPDATA\SecondLife\user_settings\password.dat" -SetShellVarContext all + StrCpy $0 0 # Index number used to iterate via EnumRegKey -FunctionEnd + LOOP: + EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + StrCmp $1 "" DONE # no more users -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed files -;; This deletes the uninstall executable, but it works because it is copied to temp directory before running -;; -;; Note: You must list all files here, because we only want to delete our files, -;; not things users left in the application directories. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.ProgramFiles + ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing -# Remove mozilla file first so recursive directory deletion doesn't get hung up -Delete "$INSTDIR\app_settings\mozilla\components" +# Required since ProfileImagePath is of type REG_EXPAND_SZ + ExpandEnvStrings $2 $2 -# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py -%%DELETE_FILES%% + RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" -# Optional/obsolete files. Delete won't fail if they don't exist. -Delete "$INSTDIR\dronesettings.ini" -Delete "$INSTDIR\message_template.msg" -Delete "$INSTDIR\newview.pdb" -Delete "$INSTDIR\newview.map" -Delete "$INSTDIR\SecondLife.pdb" -Delete "$INSTDIR\SecondLife.map" -Delete "$INSTDIR\comm.dat" -Delete "$INSTDIR\*.glsl" -Delete "$INSTDIR\motions\*.lla" -Delete "$INSTDIR\trial\*.html" -Delete "$INSTDIR\newview.exe" -Delete "$INSTDIR\SecondLife.exe" + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP + DONE: -# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert -Delete "$INSTDIR\VivoxVoiceService-*.log" +Pop $2 +Pop $1 +Pop $0 -# Remove entire help directory -Delete "$INSTDIR\help\Advanced\*" -RMDir "$INSTDIR\help\Advanced" -Delete "$INSTDIR\help\basics\*" -RMDir "$INSTDIR\help\basics" -Delete "$INSTDIR\help\Concepts\*" -RMDir "$INSTDIR\help\Concepts" -Delete "$INSTDIR\help\welcome\*" -RMDir "$INSTDIR\help\welcome" -Delete "$INSTDIR\help\*" -RMDir "$INSTDIR\help" +# Copy files in Documents and Settings\All Users\SecondLife +Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*" +Pop $0 -Delete "$INSTDIR\uninst.exe" -RMDir "$INSTDIR" +FunctionEnd -IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Function CheckOldExeName +;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' +;; If that name is found in the install folder, delete it to invalidate any +;; old shortcuts to it that may be in non-standard locations. This is to prevent +;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -FOLDERFOUND: -# Silent uninstall always removes all files (/SD IDYES) - MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER - RMDir /r "$INSTDIR" +Function CheckOldExeName + IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE -NOFOLDER: +CHECKOLDEXE_FOUND: + Delete "$INSTDIR\SecondLife.exe" +CHECKOLDEXE_DONE: FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Uninstall settings +;; Delete the installed shader files +;; Since shaders are in active development, we'll likely need to shuffle them +;; around a bit from build to build. This ensures that shaders that were removed +;; or renamed don't get left behind in the install directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -UninstallText $(UninstallTextMsg) +Function RemoveOldShaders -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Uninstall Section -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section Uninstall +;; Remove old shader files first so fallbacks will work. see DEV-5663 +RMDir /r "$INSTDIR\app_settings\shaders\*" -# Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" -StrCpy $INSTEXE "${INSTEXE}" -StrCpy $INSTSHORTCUT "${SHORTCUT}" +FunctionEnd -# Make sure the user can install/uninstall -Call un.CheckIfAdministrator +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete the installed XUI files +;; We've changed the directory hierarchy for skins, putting all XUI and texture +;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed +;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function RemoveOldXUI -# uninstall for all users (if you change this, change it in the install as well) -SetShellVarContext all +RmDir /r "$INSTDIR\skins\html" +RmDir /r "$INSTDIR\skins\xui" +RmDir /r "$INSTDIR\skins\textures" +Delete "$INSTDIR\skins\*.txt" -# Make sure we're not running -Call un.CloseSecondLife +FunctionEnd -# Clean up registry keys and subkeys (these should all be !defines somewhere) -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Remove any release notes files. +;; We are no longer including release notes with the viewer, so remove them. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function RemoveOldReleaseNotes -# Clean up shortcuts -Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -RMDir "$SMPROGRAMS\$INSTSHORTCUT" +Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" +Delete "$INSTDIR\releasenotes.txt" -Delete "$DESKTOP\$INSTSHORTCUT.lnk" -Delete "$INSTDIR\$INSTSHORTCUT.lnk" -Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" +FunctionEnd -# Clean up cache and log files, but leave them in-place for non AGNI installs. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete files in \Users\\AppData\Roaming\SecondLife +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function un.DocumentsAndSettingsFolder -!ifdef UNINSTALL_SETTINGS -Call un.DocumentsAndSettingsFolder -!endif +# Delete files in \Users\\AppData\Roaming\SecondLife +Push $0 +Push $1 +Push $2 -# Remove stored password on uninstall -Call un.RemovePassword + DetailPrint "Deleting Second Life files" -Call un.ProgramFiles + StrCpy $0 0 # Index number used to iterate via EnumRegKey -SectionEnd + LOOP: + EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + StrCmp $1 "" DONE # no more users -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Prep Installer Section -;; -;; Note: to add new languages, add a language file include to the list -;; at the top of this file, add an entry to the menu and then add an -;; entry to the language ID selector below -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function .onInit -Call CheckWindowsVersion # Don't install On unsupported systems - Push $0 - ${GetParameters} $COMMANDLINE # Get our command line + ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0 - IfErrors +2 0 # If error jump past setting SKIP_DIALOGS - StrCpy $SKIP_DIALOGS "true" +# Required since ProfileImagePath is of type REG_EXPAND_SZ + ExpandEnvStrings $2 $2 - ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English +# Remove all settings files but leave any other .txt files to preserve the chat logs +; RMDir /r "$2\Application Data\SecondLife\logs" + RMDir /r "$2\Application Data\SecondLife\browser_profile" + RMDir /r "$2\Application Data\SecondLife\user_settings" + Delete "$2\Application Data\SecondLife\*.xml" + Delete "$2\Application Data\SecondLife\*.bmp" + Delete "$2\Application Data\SecondLife\search_history.txt" + Delete "$2\Application Data\SecondLife\plugin_cookies.txt" + Delete "$2\Application Data\SecondLife\typed_locations.txt" -# If no language (error), then proceed - IfErrors lbl_configure_default_lang -# No error means we got a language, so use it - StrCpy $LANGUAGE $0 - Goto lbl_return + CONTINUE: + IntOp $0 $0 + 1 + Goto LOOP + DONE: -lbl_configure_default_lang: -# If we currently have a version of SL installed, default to the language of that install -# Otherwise don't change $LANGUAGE and it will default to the OS UI language. - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors +2 0 # If error skip the copy instruction - StrCpy $LANGUAGE $0 +Pop $2 +Pop $1 +Pop $0 -# For silent installs, no language prompt, use default - IfSilent lbl_return - StrCmp $SKIP_DIALOGS "true" lbl_return - -lbl_build_menu: - Push "" -# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC - !include "%%SOURCE%%\installers\windows\language_menu.nsi" - - Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain - LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) - Pop $0 - StrCmp $0 "cancel" 0 +2 - Abort - StrCpy $LANGUAGE $0 +# Delete files in Program Data folder +Push $0 + ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + StrCmp $0 "" +2 + RMDir /r "$0\SecondLife" +Pop $0 -# save language in registry - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE -lbl_return: - Pop $0 - Return +# Delete files in C:\Windows\Application Data\SecondLife +# If the user is running on a pre-NT system, Application Data lives here instead of +# in Documents and Settings. +RMDir /r "$WINDIR\Application Data\SecondLife" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Prep Uninstaller Section +;; Delete the stored password for the current Windows user +;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.onInit -# Read language from registry and set for uninstaller. Key will be removed on successful uninstall - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" - IfErrors lbl_end - StrCpy $LANGUAGE $0 -lbl_end: - Return +Function un.RemovePassword + +DetailPrint "Removing Second Life password" + +SetShellVarContext current +Delete "$APPDATA\SecondLife\user_settings\password.dat" +SetShellVarContext all FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Default Section +;; Delete the installed files +;; This deletes the uninstall executable, but it works because it is copied to temp directory before running +;; +;; Note: You must list all files here, because we only want to delete our files, +;; not things users left in the application directories. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Section "" - -SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) - -# Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" -StrCpy $INSTEXE "${INSTEXE}" -StrCpy $INSTSHORTCUT "${SHORTCUT}" - -Call CheckCPUFlags # Make sure we have SSE2 support -Call CheckIfAdministrator # Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent # Make sure this version is not already installed -Call CloseSecondLife # Make sure Second Life not currently running -Call CheckNetworkConnection # Ping secondlife.com -Call CheckWillUninstallV2 # Check if SecondLife is already installed -Call CheckOldExeName # Clean up a previous version of the exeicutable +Function un.ProgramFiles -StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE - Call PreserveUserFiles -PRESERVE_DONE: +# Remove mozilla file first so recursive directory deletion doesn't get hung up +Delete "$INSTDIR\app_settings\mozilla\components" -# Don't remove cache files during a regular install, -# removing the inventory cache on upgrades results in lots of damage to the servers. -;Call RemoveCacheFiles # Installing over removes potentially corrupted VFS and cache files. +# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py +%%DELETE_FILES%% -# Need to clean out shader files from previous installs to fix DEV-5663 -Call RemoveOldShaders +# Optional/obsolete files. Delete won't fail if they don't exist. +Delete "$INSTDIR\dronesettings.ini" +Delete "$INSTDIR\message_template.msg" +Delete "$INSTDIR\newview.pdb" +Delete "$INSTDIR\newview.map" +Delete "$INSTDIR\SecondLife.pdb" +Delete "$INSTDIR\SecondLife.map" +Delete "$INSTDIR\comm.dat" +Delete "$INSTDIR\*.glsl" +Delete "$INSTDIR\motions\*.lla" +Delete "$INSTDIR\trial\*.html" +Delete "$INSTDIR\newview.exe" +Delete "$INSTDIR\SecondLife.exe" -# Need to clean out old XUI files that predate skinning -Call RemoveOldXUI +# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert +Delete "$INSTDIR\VivoxVoiceService-*.log" -# Clear out old releasenotes.txt files. These are now on the public wiki. -Call RemoveOldReleaseNotes +# Remove entire help directory +Delete "$INSTDIR\help\Advanced\*" +RMDir "$INSTDIR\help\Advanced" +Delete "$INSTDIR\help\basics\*" +RMDir "$INSTDIR\help\basics" +Delete "$INSTDIR\help\Concepts\*" +RMDir "$INSTDIR\help\Concepts" +Delete "$INSTDIR\help\welcome\*" +RMDir "$INSTDIR\help\welcome" +Delete "$INSTDIR\help\*" +RMDir "$INSTDIR\help" -# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py -%%INSTALL_FILES%% +Delete "$INSTDIR\uninst.exe" +RMDir "$INSTDIR" -# Pass the installer's language to the client to use as a default -StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" +IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER -# Shortcuts in start menu -CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" -SetOutPath "$INSTDIR" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" +FOLDERFOUND: +# Silent uninstall always removes all files (/SD IDYES) + MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER + RMDir /r "$INSTDIR" +NOFOLDER: -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ - "InternetShortcut" "URL" \ - "http://join.secondlife.com/" -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ - "InternetShortcut" "URL" \ - "http://www.secondlife.com/account/" -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ - "InternetShortcut" "URL" \ - "http://wiki.secondlife.com/wiki/LSL_Portal" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '' +FunctionEnd -# Other shortcuts -SetOutPath "$INSTDIR" -CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" -CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '' +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; After install completes, launch app +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function .onInstSuccess +Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $R0 # Option value, unused -# Write registry -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' + StrCmp $SKIP_DIALOGS "true" label_launch -# Write URL registry info -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" -WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' + ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 + # If parameter was there (no error) just launch + # Otherwise ask + IfErrors label_ask_launch label_launch + +label_ask_launch: + # Don't launch by default when silent + IfSilent label_no_launch + MessageBox MB_YESNO $(InstSuccesssQuestion) \ + IDYES label_launch IDNO label_no_launch + +label_launch: +# Assumes SetOutPath $INSTDIR + Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' +label_no_launch: + Pop $R0 -# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. -WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" -WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' +FunctionEnd -# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. -WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWindowsServPack + ${If} ${IsWin7} + ${AndIfNot} ${IsServicePack} 1 + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} -# write out uninstaller -WriteUninstaller "$INSTDIR\uninst.exe" + ${If} ${IsWin2008R2} + ${AndIfNot} ${IsServicePack} 1 + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} -# Uninstall existing "Second Life Viewer 2" install if needed. -StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE - ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. +FunctionEnd - Call RestoreUserFiles - Call RemoveTempUserFiles -REMOVE_SLV2_DONE: +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clobber user files - TEST ONLY +;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR! +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Function ClobberUserFilesTESTONLY -SectionEnd +;Push $0 +;Push $1 +;Push $2 +; +; StrCpy $0 0 # Index number used to iterate via EnumRegKey +; +; LOOP: +; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 +; StrCmp $1 "" DONE # no more users +; +; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" +; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing +; +;# Required since ProfileImagePath is of type REG_EXPAND_SZ +; ExpandEnvStrings $2 $2 +; +; RMDir /r "$2\Application Data\SecondLife\" +; +; CONTINUE: +; IntOp $0 $0 + 1 +; Goto LOOP +; DONE: +; +;Pop $2 +;Pop $1 +;Pop $0 +; +;# Copy files in Documents and Settings\All Users\SecondLife +;Push $0 +; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" +; StrCmp $0 "" +2 +; RMDir /r "$2\Application Data\SecondLife\" +;Pop $0 +; +;FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From e9a7222ac3535ee027f0fc669832d1ecc797cc37 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 10:12:23 -0800 Subject: Remove no longer used code; Combine calls to delete files on install into one call Functionality change: deletion of entire skins folder to prevent issues when an XML file is deleted from the installer, but left on the hard drive after upgrade --- .../installers/windows/installer_template.nsi | 80 ++++------------------ 1 file changed, 12 insertions(+), 68 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 36a8d7216b..22a7336858 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -175,7 +175,7 @@ lbl_build_menu: Abort StrCpy $LANGUAGE $0 -# save language in registry +# Save language in registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE lbl_return: Pop $0 @@ -253,24 +253,12 @@ Call CheckIfAlreadyCurrent # Make sure this version is not already installed Call CloseSecondLife # Make sure Second Life not currently running Call CheckNetworkConnection # Ping secondlife.com Call CheckWillUninstallV2 # Check if SecondLife is already installed -Call CheckOldExeName # Clean up a previous version of the exeicutable StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE Call PreserveUserFiles PRESERVE_DONE: -# Don't remove cache files during a regular install, -# removing the inventory cache on upgrades results in lots of damage to the servers. -;Call RemoveCacheFiles # Installing over removes potentially corrupted VFS and cache files. - -# Need to clean out shader files from previous installs to fix DEV-5663 -Call RemoveOldShaders - -# Need to clean out old XUI files that predate skinning -Call RemoveOldXUI - -# Clear out old releasenotes.txt files. These are now on the public wiki. -Call RemoveOldReleaseNotes +Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer # This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% @@ -681,63 +669,27 @@ Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Function CheckOldExeName -;; Viewer versions < 3.6.12 used the name 'SecondLife.exe' -;; If that name is found in the install folder, delete it to invalidate any -;; old shortcuts to it that may be in non-standard locations. This is to prevent -;; the userpotentially getting caught in an infinite update loop). See MAINT-3575 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -Function CheckOldExeName - IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE - -CHECKOLDEXE_FOUND: - Delete "$INSTDIR\SecondLife.exe" -CHECKOLDEXE_DONE: - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed shader files -;; Since shaders are in active development, we'll likely need to shuffle them -;; around a bit from build to build. This ensures that shaders that were removed -;; or renamed don't get left behind in the install directory. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldShaders - -;; Remove old shader files first so fallbacks will work. see DEV-5663 -RMDir /r "$INSTDIR\app_settings\shaders\*" - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the installed XUI files -;; We've changed the directory hierarchy for skins, putting all XUI and texture -;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed -;; to skins/xui/en-us. Need to clean up the old path when upgrading. +;; Delete files on install if previous isntall exsists to prevent undesiered behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldXUI +Function RemoveProgFilesOnInst -RmDir /r "$INSTDIR\skins\html" -RmDir /r "$INSTDIR\skins\xui" -RmDir /r "$INSTDIR\skins\textures" -Delete "$INSTDIR\skins\*.txt" +# Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 +Delete "$INSTDIR\SecondLife.exe" -FunctionEnd +# Remove old shader files first so fallbacks will work. see DEV-5663 +RMDir /r "$INSTDIR\app_settings\shaders" -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove any release notes files. -;; We are no longer including release notes with the viewer, so remove them. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveOldReleaseNotes +# Remove skins folder to clean up files removed during development +RMDir /r "$INSTDIR\skins" +# We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files in \Users\\AppData\Roaming\SecondLife +;; Delete files in \Users\\AppData\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.DocumentsAndSettingsFolder @@ -786,11 +738,6 @@ Push $0 RMDir /r "$0\SecondLife" Pop $0 -# Delete files in C:\Windows\Application Data\SecondLife -# If the user is running on a pre-NT system, Application Data lives here instead of -# in Documents and Settings. -RMDir /r "$WINDIR\Application Data\SecondLife" - FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -816,9 +763,6 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.ProgramFiles -# Remove mozilla file first so recursive directory deletion doesn't get hung up -Delete "$INSTDIR\app_settings\mozilla\components" - # This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py %%DELETE_FILES%% -- cgit v1.2.3 From 96cc2770c646d5bdf68be2960c3f7893b296689f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 19:34:10 -0800 Subject: Add option to remove user settings and cache files at uninstall, with message Removed function to delete use stored password file Removed no longer used RemoveCacheFilesDP from language files Added message to English language file for prompt when asking to remove user files -Note: this needs translations in other languages added --- .../installers/windows/installer_template.nsi | 53 ++++++++------------- indra/newview/installers/windows/lang_da.nsi | Bin 8032 -> 7816 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9352 -> 9090 bytes indra/newview/installers/windows/lang_en-us.nsi | Bin 8126 -> 8448 bytes indra/newview/installers/windows/lang_es.nsi | Bin 8770 -> 8458 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 9036 -> 8748 bytes indra/newview/installers/windows/lang_it.nsi | Bin 8378 -> 8102 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7294 -> 7052 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8432 -> 8136 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 8794 -> 8522 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 8150 -> 7898 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 8272 -> 8006 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6804 -> 6576 bytes 13 files changed, 21 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 22a7336858..49500ab80d 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -363,14 +363,9 @@ Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" # Clean up cache and log files, but leave them in-place for non AGNI installs. +Call un.UserSettingsFiles -!ifdef UNINSTALL_SETTINGS -Call un.DocumentsAndSettingsFolder -!endif - -# Remove stored password on uninstall -Call un.RemovePassword - +# Remove the main instalation directory Call un.ProgramFiles SectionEnd @@ -691,14 +686,17 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Delete files in \Users\\AppData\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.DocumentsAndSettingsFolder +Function un.UserSettingsFiles -# Delete files in \Users\\AppData\Roaming\SecondLife +# Ask if user wants to keep data files or not +MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep + +Remove: Push $0 Push $1 Push $2 - DetailPrint "Deleting Second Life files" + DetailPrint "Deleting Second Life data files" StrCpy $0 0 # Index number used to iterate via EnumRegKey @@ -712,15 +710,18 @@ Push $2 # Required since ProfileImagePath is of type REG_EXPAND_SZ ExpandEnvStrings $2 $2 +# Delete files in \Users\\AppData\Roaming\SecondLife # Remove all settings files but leave any other .txt files to preserve the chat logs -; RMDir /r "$2\Application Data\SecondLife\logs" - RMDir /r "$2\Application Data\SecondLife\browser_profile" - RMDir /r "$2\Application Data\SecondLife\user_settings" - Delete "$2\Application Data\SecondLife\*.xml" - Delete "$2\Application Data\SecondLife\*.bmp" - Delete "$2\Application Data\SecondLife\search_history.txt" - Delete "$2\Application Data\SecondLife\plugin_cookies.txt" - Delete "$2\Application Data\SecondLife\typed_locations.txt" +; RMDir /r "$2\AppData\Roaming\SecondLife\logs" + RMDir /r "$2\AppData\Roaming\SecondLife\browser_profile" + RMDir /r "$2\AppData\Roaming\SecondLife\user_settings" + Delete "$2\AppData\Roaming\SecondLife\*.xml" + Delete "$2\AppData\Roaming\SecondLife\*.bmp" + Delete "$2\AppData\Roaming\SecondLife\search_history.txt" + Delete "$2\AppData\Roaming\SecondLife\plugin_cookies.txt" + Delete "$2\AppData\Roaming\SecondLife\typed_locations.txt" +# Delete files in \Users\\AppData\Local\SecondLife + RmDir /r "$2\AppData\Local\SecondLife" #Delete the cache folder CONTINUE: IntOp $0 $0 + 1 @@ -731,26 +732,14 @@ Pop $2 Pop $1 Pop $0 -# Delete files in Program Data folder +# Delete files in ProgramData\Secondlife Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 RMDir /r "$0\SecondLife" Pop $0 -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete the stored password for the current Windows user -;; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.RemovePassword - -DetailPrint "Removing Second Life password" - -SetShellVarContext current -Delete "$APPDATA\SecondLife\user_settings\password.dat" -SetShellVarContext all +Keep: FunctionEnd diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 1080fd2e3d..83e1a3ea94 100755 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index fd59bf8f71..dbf4bc84bf 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 4cf605e398..c06e5ac00d 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index bfc1bf7248..f4f0786332 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index c2ee17fbd4..1b5dbfc975 100755 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index cb97335488..a456e6e417 100755 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 3fbf434b6a..fc5f4fabca 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 1564c25293..a172f0cdeb 100755 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 8e858c8742..9ef252d232 100755 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 8b98ed5032..d7c728d3e2 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 7c41811b30..97c602f4fc 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index e89a1e7e51..39c005a683 100755 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From bee9166a80c9fd426bea66e1f893bd59aee9d83e Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 19:42:18 -0800 Subject: Remove LicenseDescUpdate, LicenseDescSetup, and LicenseDescNext from Ja and De language files These are not present in any other file, including English --- indra/newview/installers/windows/lang_de.nsi | Bin 9090 -> 8420 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7052 -> 6514 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index dbf4bc84bf..866accae99 100755 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index fc5f4fabca..5b1c5f4ce9 100755 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ -- cgit v1.2.3 From d2a373a58f001037e2d62c12fe55f7345ed4b19d Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 23:09:36 -0800 Subject: =?UTF-8?q?Don=E2=80=99t=20delete=20user's=20settings=20with=20aut?= =?UTF-8?q?o=20install,=20removing=20the=20need=20to=20back=20them=20up=20?= =?UTF-8?q?and=20then=20restore=20them=20later=20This=20saves=20time=20and?= =?UTF-8?q?=20lowers=20the=20risk=20of=20something=20going=20wrong=20with?= =?UTF-8?q?=20the=20file=20copy=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../installers/windows/installer_template.nsi | 134 +-------------------- 1 file changed, 2 insertions(+), 132 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 49500ab80d..574feb2099 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -255,7 +255,6 @@ Call CheckNetworkConnection # Ping secondlife.com Call CheckWillUninstallV2 # Check if SecondLife is already installed StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE - Call PreserveUserFiles PRESERVE_DONE: Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer @@ -325,8 +324,6 @@ StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. - Call RestoreUserFiles - Call RemoveTempUserFiles REMOVE_SLV2_DONE: SectionEnd @@ -534,135 +531,6 @@ Function CheckNetworkConnection FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Save user files to temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function PreserveUserFiles - -Push $0 -Push $1 -Push $2 - - RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there - CreateDirectory "$TEMP\SecondLifeSettingsBackup" - StrCpy $0 0 # Index number used to iterate via EnumRegKey - - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users - - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 - - CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\" - CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\" -Pop $0 - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Restore user files from temp location -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RestoreUserFiles - -Push $0 -Push $1 -Push $2 - - StrCpy $0 0 # Index number used to iterate via EnumRegKey - - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users - - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 - - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - CreateDirectory "$2\Application Data\SecondLife\" - CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\" -Pop $0 - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Remove temp directories -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function RemoveTempUserFiles - -Push $0 -Push $1 -Push $2 - - StrCpy $0 0 # Index number used to iterate via EnumRegKey - - LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users - - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" - StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing - -# Required since ProfileImagePath is of type REG_EXPAND_SZ - ExpandEnvStrings $2 $2 - - RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*" - - CONTINUE: - IntOp $0 $0 + 1 - Goto LOOP - DONE: - -Pop $2 -Pop $1 -Pop $0 - -# Copy files in Documents and Settings\All Users\SecondLife -Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" - StrCmp $0 "" +2 - RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*" -Pop $0 - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Delete files on install if previous isntall exsists to prevent undesiered behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -688,6 +556,8 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles +StrCmp $DO_UNINSTALL_V2 "" Keep # don't remove user's settings files on auto upgrade + # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep -- cgit v1.2.3 From dce1339439417fe27b301f3fd727acb673fcd02b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sat, 14 Feb 2015 23:24:06 -0800 Subject: Add myself to contribution --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 574feb2099..ec97cff193 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -21,7 +21,7 @@ ;; NSIS Unicode 2.46.5 or higher required ;; http://www.scratchpaper.com/ ;; -;; Author: James Cook, Don Kjer, Callum Prentice +;; Author: James Cook, TankMaster Finesmith, Don Kjer, Callum Prentice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 084575c037d62aaf396539d5e1dd2c6db44e3055 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Sun, 15 Feb 2015 08:43:35 -0800 Subject: Line ending fix --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index ec97cff193..e03ec8ee4e 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -543,7 +543,7 @@ Delete "$INSTDIR\SecondLife.exe" RMDir /r "$INSTDIR\app_settings\shaders" # Remove skins folder to clean up files removed during development -RMDir /r "$INSTDIR\skins" +RMDir /r "$INSTDIR\skins" # We are no longer including release notes with the viewer, so remove them. Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" -- cgit v1.2.3 From b204b0823951618228acc5ee38e2b3967ec4630f Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 11:08:03 -0800 Subject: Simplify deleting Help folder, more comments format fixes --- .../installers/windows/installer_template.nsi | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index e03ec8ee4e..d603975a9f 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -321,8 +321,8 @@ WriteUninstaller "$INSTDIR\uninst.exe" # Uninstall existing "Second Life Viewer 2" install if needed. StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2' - Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind. - RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty. + Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # With _? option above, uninst.exe will be left behind. + RMDir "$PROGRAMFILES\SecondLifeViewer2" # Will remove only if empty. REMOVE_SLV2_DONE: @@ -512,7 +512,7 @@ Function CheckNetworkConnection StrCpy $2 "" ${GetOptions} $COMMANDLINE "/STUBTAG=" $2 GetTempFileName $0 - !define HTTP_TIMEOUT 5000 # milliseconds + !define HTTP_TIMEOUT 5000 # Milliseconds # Don't show secondary progress bar, this will be quick. NSISdl::download_quiet \ /TIMEOUT=${HTTP_TIMEOUT} \ @@ -523,7 +523,7 @@ Function CheckNetworkConnection ; Result ignored for now ; StrCmp $1 "success" +2 ; DetailPrint "Connection failed: $1" - Delete $0 # temporary file + Delete $0 # Temporary file Pop $2 Pop $1 Pop $0 @@ -539,7 +539,7 @@ Function RemoveProgFilesOnInst # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 Delete "$INSTDIR\SecondLife.exe" -# Remove old shader files first so fallbacks will work. see DEV-5663 +# Remove old shader files first so fallbacks will work. See DEV-5663 RMDir /r "$INSTDIR\app_settings\shaders" # Remove skins folder to clean up files removed during development @@ -556,7 +556,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles -StrCmp $DO_UNINSTALL_V2 "" Keep # don't remove user's settings files on auto upgrade +StrCmp $DO_UNINSTALL_V2 "" Keep # Don't remove user's settings files on auto upgrade # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep @@ -572,7 +572,7 @@ Push $2 LOOP: EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 - StrCmp $1 "" DONE # no more users + StrCmp $1 "" DONE # No more users ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing @@ -643,15 +643,6 @@ Delete "$INSTDIR\SecondLife.exe" Delete "$INSTDIR\VivoxVoiceService-*.log" # Remove entire help directory -Delete "$INSTDIR\help\Advanced\*" -RMDir "$INSTDIR\help\Advanced" -Delete "$INSTDIR\help\basics\*" -RMDir "$INSTDIR\help\basics" -Delete "$INSTDIR\help\Concepts\*" -RMDir "$INSTDIR\help\Concepts" -Delete "$INSTDIR\help\welcome\*" -RMDir "$INSTDIR\help\welcome" -Delete "$INSTDIR\help\*" RMDir "$INSTDIR\help" Delete "$INSTDIR\uninst.exe" -- cgit v1.2.3 From c90389184187ee448488320432eab01f982aef3b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 17:58:32 -0800 Subject: Fix speeling errors --- indra/newview/installers/windows/installer_template.nsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index d603975a9f..c78c0b539b 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -1,5 +1,5 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; secondlife setup.nsi +;; Second Life setup.nsi ;; Copyright 2004-2015, Linden Research, Inc. ;; ;; This library is free software; you can redistribute it and/or @@ -252,7 +252,7 @@ Call CheckIfAdministrator # Make sure the user can install/uninstall Call CheckIfAlreadyCurrent # Make sure this version is not already installed Call CloseSecondLife # Make sure Second Life not currently running Call CheckNetworkConnection # Ping secondlife.com -Call CheckWillUninstallV2 # Check if SecondLife is already installed +Call CheckWillUninstallV2 # Check if Second Life is already installed StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE PRESERVE_DONE: @@ -362,7 +362,7 @@ Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" # Clean up cache and log files, but leave them in-place for non AGNI installs. Call un.UserSettingsFiles -# Remove the main instalation directory +# Remove the main installation directory Call un.ProgramFiles SectionEnd @@ -532,7 +532,7 @@ Function CheckNetworkConnection FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Delete files on install if previous isntall exsists to prevent undesiered behavior +;; Delete files on install if previous install exists to prevent undesired behavior ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function RemoveProgFilesOnInst @@ -618,7 +618,7 @@ FunctionEnd ;; This deletes the uninstall executable, but it works because it is copied to temp directory before running ;; ;; Note: You must list all files here, because we only want to delete our files, -;; not things users left in the application directories. +;; not things users left in the program directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.ProgramFiles -- cgit v1.2.3 From a413e3adb39723e07bb85d526940b6857c1bca8c Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 18:47:08 -0800 Subject: Get the normal uninstall process working again --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c78c0b539b..9a69c97065 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -556,7 +556,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.UserSettingsFiles -StrCmp $DO_UNINSTALL_V2 "" Keep # Don't remove user's settings files on auto upgrade +StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade # Ask if user wants to keep data files or not MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep -- cgit v1.2.3 From 9204f238c4cc572149d31ec12862e417f7666623 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 19:43:22 -0800 Subject: Launch SL as a user from the UAC elevated installer. Fixes BUG-8358 and others. --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 9a69c97065..db613a658a 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -681,7 +681,7 @@ label_ask_launch: label_launch: # Assumes SetOutPath $INSTDIR - Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM' + Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' label_no_launch: Pop $R0 -- cgit v1.2.3 From 7fc88d040a8fce7ac5709ccc2a1fdd6ae3cb3086 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 16 Feb 2015 21:27:42 -0800 Subject: Add more info to the registry for display on Programs and Feature control panel --- indra/newview/installers/windows/installer_template.nsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index db613a658a..3233a89950 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -298,8 +298,14 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$I WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" ; 117 MB # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -- cgit v1.2.3 From 09238639e70a2c87e1e03eace2590dc6a22dced0 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 09:20:58 -0800 Subject: BUG-2707; Disable SEHOP for installed binary via 'Image File Exection Options' during installation. With permission from Nicky Dasmijn --- indra/newview/installers/windows/installer_template.nsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 3233a89950..02f21e4187 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -38,6 +38,7 @@ RequestExecutionLevel admin # For when we write to Program Files ;; Project flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +# This placeholder is replaced by viewer_manifest.py %%VERSION%% ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -72,7 +73,7 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru" LangString LanguageCode ${LANG_TURKISH} "tr" LangString LanguageCode ${LANG_TRADCHINESE} "zh" -# this placeholder is replaced by viewer_manifest.py +# This placeholder is replaced by viewer_manifest.py %%INST_VARS%% Name ${INSTNAME} @@ -305,7 +306,9 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" ; 117 MB +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB +# BUG-2707 Disable SEHOP for installed viewer. +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" @@ -356,6 +359,8 @@ Call un.CloseSecondLife # Clean up registry keys and subkeys (these should all be !defines somewhere) DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" +# BUG-2707 Remove entry that disabled SEHOP +DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" # Clean up shortcuts Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -- cgit v1.2.3 From 727777eab6f70db86191263d2d84abd6973f352b Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 09:23:32 -0800 Subject: Fix line endings --- indra/newview/installers/windows/installer_template.nsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 02f21e4187..83c364ff7e 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -299,16 +299,16 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$I WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB -# BUG-2707 Disable SEHOP for installed viewer. -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 +# BUG-2707 Disable SEHOP for installed viewer. +WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" -- cgit v1.2.3 From 5fef5f11ea3acb6936f9da21181dde3e5dfac6b7 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:53:39 -0800 Subject: Made message asking to delete user data folder a little more clear. --- indra/newview/installers/windows/lang_en-us.nsi | Bin 8448 -> 8510 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index c06e5ac00d..343c312ddc 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ -- cgit v1.2.3 From 65c130a9a803eb40ea5d7510faef86aacb556e53 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:55:00 -0800 Subject: Move prompt and processing the deletion of user settings to end of uninstall. --- indra/newview/installers/windows/installer_template.nsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 83c364ff7e..1d6bde0052 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -348,7 +348,7 @@ StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" # Make sure the user can install/uninstall -Call un.CheckIfAdministrator +Call un.CheckIfAdministrator # Uninstall for all users (if you change this, change it in the install as well) SetShellVarContext all @@ -370,13 +370,13 @@ Delete "$DESKTOP\$INSTSHORTCUT.lnk" Delete "$INSTDIR\$INSTSHORTCUT.lnk" Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" -# Clean up cache and log files, but leave them in-place for non AGNI installs. -Call un.UserSettingsFiles - # Remove the main installation directory Call un.ProgramFiles -SectionEnd +# Clean up cache and log files, but leave them in-place for non AGNI installs. +Call un.UserSettingsFiles + +SectionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Make sure the user can install @@ -734,7 +734,7 @@ FunctionEnd ; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 ; StrCmp $1 "" DONE # no more users ; -; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" +; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" ; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing ; ;# Required since ProfileImagePath is of type REG_EXPAND_SZ -- cgit v1.2.3 From 412bfd9edc3000a143f8757d1f97f9bac79f33fc Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 17 Feb 2015 18:55:56 -0800 Subject: opps, let's make the deletion of the help directory recursive --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 1d6bde0052..509b4f6d84 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -654,7 +654,7 @@ Delete "$INSTDIR\SecondLife.exe" Delete "$INSTDIR\VivoxVoiceService-*.log" # Remove entire help directory -RMDir "$INSTDIR\help" +RMDir /r "$INSTDIR\help" Delete "$INSTDIR\uninst.exe" RMDir "$INSTDIR" -- cgit v1.2.3 From d4a99c46a411aca038d8bccaf2098f8eeae3a267 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 8 Jan 2014 20:25:40 +0200 Subject: MAINT-3591 FIXED Remove "Start Second LIfe now?" dialogue in the installer --- indra/newview/installers/windows/installer_template.nsi | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 509b4f6d84..20623ced84 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -676,24 +676,9 @@ FunctionEnd Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 # Option value, unused - - StrCmp $SKIP_DIALOGS "true" label_launch - - ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 - # If parameter was there (no error) just launch - # Otherwise ask - IfErrors label_ask_launch label_launch - -label_ask_launch: - # Don't launch by default when silent - IfSilent label_no_launch - MessageBox MB_YESNO $(InstSuccesssQuestion) \ - IDYES label_launch IDNO label_no_launch -label_launch: # Assumes SetOutPath $INSTDIR Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' -label_no_launch: Pop $R0 FunctionEnd -- cgit v1.2.3 From 7555596c44a85ecbfe823fc8dea33cb01a7b89dd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 8 Apr 2014 16:01:46 -0700 Subject: added SKIP_AUTORUN command line flag to disable automatically running viewer after install --- indra/newview/installers/windows/installer_template.nsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 20623ced84..8c8b4971cf 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -105,8 +105,8 @@ Var INSTEXE Var INSTSHORTCUT Var COMMANDLINE # Command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer -Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall - # GUI and the defaults. +Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall GUI and the defaults. +Var SKIP_AUTORUN # Skip automatic launch of the viewer after install Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled. # Function definitions should go before file includes, because calls to @@ -145,6 +145,10 @@ Call CheckWindowsVersion # Don't install On unsupported systems IfErrors +2 0 # If error jump past setting SKIP_DIALOGS StrCpy $SKIP_DIALOGS "true" + ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0 + IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN + StrCpy $SKIP_AUTORUN "true" + ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English # If no language (error), then proceed @@ -675,8 +679,8 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused - + Push $R0 # Option value, unused + StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"' Pop $R0 -- cgit v1.2.3 From 71baa9cdf4d74a7ab1d194b4f823416f5f450c39 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 11 Sep 2014 18:50:26 +0300 Subject: MAINT-4440 FIXED Bad colors for spillover menu in viewer-lion --- indra/llui/llmenugl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index d3ed4a1286..3e6002e546 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2369,7 +2369,9 @@ void LLMenuGL::createSpilloverBranch() branch_params.label = label; branch_params.branch = mSpilloverMenu; branch_params.font.style = "italic"; - + branch_params.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + branch_params.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); + branch_params.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); mSpilloverBranch = LLUICtrlFactory::create(branch_params); } -- cgit v1.2.3 From 7615008efa39786aabf35b13e9717ff5651f43ff Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 11 Sep 2014 17:31:15 +0300 Subject: MAINT-4415 FIXED Speak button does not become enabled after enabling voice on parcel, if voice was disabled upon parcel entry --- indra/newview/llviewerparcelmgr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 7c94442f09..2f4365036c 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1562,6 +1562,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (parcel == parcel_mgr.mAgentParcel) { + // new agent parcel S32 bitmap_size = parcel_mgr.mParcelsPerEdge * parcel_mgr.mParcelsPerEdge / 8; @@ -1591,6 +1592,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } } } + else if (local_id == parcel_mgr.mAgentParcel->getLocalID()) + { + // updated agent parcel + parcel_mgr.mAgentParcel->unpackMessage(msg); + } } // Handle updating selections, if necessary. -- cgit v1.2.3 From b75d2f7c3f955ce98064e688e61f5fdf785b1ed8 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 12 Sep 2014 11:30:52 +0300 Subject: MAINT-3666 FIXED Update modifiers when viewer window becomes key window --- indra/llwindow/llopenglview-objc.mm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 1b5804ec83..06b96dd1ea 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -133,6 +133,10 @@ attributedStringInfo getSegments(NSAttributedString *str) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:[self window]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification + object:[self window]]; } - (void)setOldResize:(bool)oldresize @@ -159,6 +163,11 @@ attributedStringInfo getSegments(NSAttributedString *str) callWindowUnhide(); } +- (void)windowDidBecomeKey:(NSNotification *)notification; +{ + mModifiers = [NSEvent modifierFlags]; +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; -- cgit v1.2.3 From f1d2a1a4957ff6ee76d98f307bd682a36fe94038 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 15 Sep 2014 20:26:28 +0300 Subject: MAINT-3562 FIXED Viewer crashes when updating local textures using Substance Designer : add code for control input buffer size --- indra/llimage/llimagepng.cpp | 4 ++-- indra/llimage/llpngwrapper.cpp | 9 ++++++++- indra/llimage/llpngwrapper.h | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index 294f68b122..7735dc1379 100755 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp @@ -67,7 +67,7 @@ BOOL LLImagePNG::updateData() } LLPngWrapper::ImageInfo infop; - if (! pngWrapper.readPng(getData(), NULL, &infop)) + if (! pngWrapper.readPng(getData(), getDataSize(), NULL, &infop)) { setLastError(pngWrapper.getErrorMessage()); return FALSE; @@ -102,7 +102,7 @@ BOOL LLImagePNG::decode(LLImageRaw* raw_image, F32 decode_time) return FALSE; } - if (! pngWrapper.readPng(getData(), raw_image)) + if (! pngWrapper.readPng(getData(), getDataSize(), raw_image)) { setLastError(pngWrapper.getErrorMessage()); return FALSE; diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 2cc7d3c460..aad139f570 100755 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -87,6 +87,12 @@ void LLPngWrapper::errorHandler(png_structp png_ptr, png_const_charp msg) void LLPngWrapper::readDataCallback(png_structp png_ptr, png_bytep dest, png_size_t length) { PngDataInfo *dataInfo = (PngDataInfo *) png_get_io_ptr(png_ptr); + if(dataInfo->mOffset + length > dataInfo->mDataSize) + { + png_error(png_ptr, "Data read error. Requested data size exceeds available data size."); + return; + } + U8 *src = &dataInfo->mData[dataInfo->mOffset]; memcpy(dest, src, length); dataInfo->mOffset += static_cast(length); @@ -114,7 +120,7 @@ void LLPngWrapper::writeFlush(png_structp png_ptr) // The scanline also begins at the bottom of // the image (per SecondLife conventions) instead of at the top, so we // must assign row-pointers in "reverse" order. -BOOL LLPngWrapper::readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop) +BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop) { try { @@ -133,6 +139,7 @@ BOOL LLPngWrapper::readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop) PngDataInfo dataPtr; dataPtr.mData = src; dataPtr.mOffset = 0; + dataPtr.mDataSize = dataSize; png_set_read_fn(mReadPngPtr, &dataPtr, &readDataCallback); png_set_sig_bytes(mReadPngPtr, 0); diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h index 739f435996..27d7df3bef 100755 --- a/indra/llimage/llpngwrapper.h +++ b/indra/llimage/llpngwrapper.h @@ -44,7 +44,7 @@ public: }; BOOL isValidPng(U8* src); - BOOL readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop = NULL); + BOOL readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL); BOOL writePng(const LLImageRaw* rawImage, U8* dst); U32 getFinalSize(); const std::string& getErrorMessage(); @@ -61,6 +61,7 @@ private: { U8 *mData; U32 mOffset; + S32 mDataSize; }; static void writeFlush(png_structp png_ptr); -- cgit v1.2.3 From d61a8e34a3d81e5de02bf997ba6df055217af937 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 16 Sep 2014 11:01:11 +0300 Subject: MAINT-4434 FIXED Update "Total land in use" and "Land available" when saving changes. --- indra/newview/llpanelgrouplandmoney.cpp | 37 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 375c54479d..e7002395f8 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -421,20 +421,43 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) msg->getUUID("QueryData", "OwnerID", owner_id, 0); msg->getUUID("TransactionData", "TransactionID", trans_id); - S32 total_contribution = 0; if(owner_id.isNull()) { // special block which has total contribution ++first_block; + S32 committed = 0; + S32 billable_area = 0; + for(S32 i = first_block; i < count; ++i) + { + msg->getS32("QueryData", "BillableArea", billable_area, i); + committed+=billable_area; + } + + S32 total_contribution; msg->getS32("QueryData", "ActualArea", total_contribution, 0); mPanel.getChild("total_contributed_land_value")->setTextArg("[AREA]", llformat("%d", total_contribution)); + + mPanel.getChild("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed)); + S32 available = total_contribution - committed; + mPanel.getChild("land_available_value")->setTextArg("[AREA]", llformat("%d", available)); + + + if ( mGroupOverLimitTextp && mGroupOverLimitIconp ) + + { + mGroupOverLimitIconp->setVisible(available < 0); + mGroupOverLimitTextp->setVisible(available < 0); + } + } if ( trans_id != mTransID ) return; + // This power was removed to make group roles simpler //if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return; if (!gAgent.isInGroup(mPanel.mGroupID)) return; + mGroupParcelsp->setCommentText(mEmptyParcelsText); std::string name; @@ -447,7 +470,6 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) std::string sim_name; std::string land_sku; std::string land_type; - S32 committed = 0; for(S32 i = first_block; i < count; ++i) { @@ -477,7 +499,6 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); std::string area; - committed+=billable_area; if(billable_area == actual_area) @@ -516,16 +537,6 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) mGroupParcelsp->addElement(row); } - - mPanel.getChild("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed)); - - S32 available = total_contribution - committed; - mPanel.getChild("land_available_value")->setTextArg("[AREA]", llformat("%d", available)); - if ( mGroupOverLimitTextp && mGroupOverLimitIconp ) - { - mGroupOverLimitIconp->setVisible(available < 0); - mGroupOverLimitTextp->setVisible(available < 0); - } } } -- cgit v1.2.3 From eebb94159e061ec90e8dc1387a0de8f7a0733217 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 15 Sep 2014 20:29:36 +0300 Subject: MAINT-4437 FIXED Spillover Branch shows when it should not --- indra/llui/llmenugl.cpp | 67 +++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 3e6002e546..cb0b75ea48 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -60,6 +60,7 @@ #include "v2math.h" #include #include +#include // static LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL; @@ -2038,15 +2039,7 @@ void LLMenuGL::arrange( void ) // torn off menus are not constrained to the size of the screen U32 max_width = getTornOff() ? U32_MAX : menu_region_rect.getWidth(); - U32 max_height = U32_MAX; - if (!getTornOff()) - { - max_height = getRect().mTop - menu_region_rect.mBottom; - if (menu_region_rect.mTop - getRect().mTop > (S32)max_height) - { - max_height = menu_region_rect.mTop - getRect().mTop; - } - } + U32 max_height = getTornOff() ? U32_MAX: menu_region_rect.getHeight(); // *FIX: create the item first and then ask for its dimensions? S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::getFontSansSerif()->getWidth( std::string("More") ); // *TODO: Translate @@ -2104,13 +2097,15 @@ void LLMenuGL::arrange( void ) } else { + BOOST_FOREACH(LLMenuItemGL* itemp, mItems) + { + // do first so LLMenuGLItemCall can call on_visible to determine if visible + itemp->buildDrawLabel(); + } item_list_t::iterator item_iter; for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) { - // do first so LLMenuGLItemCall can call on_visible to determine if visible - (*item_iter)->buildDrawLabel(); - if ((*item_iter)->getVisible()) { if (!getTornOff() @@ -2118,34 +2113,40 @@ void LLMenuGL::arrange( void ) && *item_iter != mSpilloverBranch && height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height) { - // no room for any more items - createSpilloverBranch(); - - std::vector items_to_remove; - std::copy(item_iter, mItems.end(), std::back_inserter(items_to_remove)); - std::vector::iterator spillover_iter; - for (spillover_iter= items_to_remove.begin(); spillover_iter != items_to_remove.end(); ++spillover_iter) + // don't show only one item + int visible_items = std::count_if(item_iter, mItems.end(), [](LLMenuItemGL* itemp) { - LLMenuItemGL* itemp = (*spillover_iter); - removeChild(itemp); - mSpilloverMenu->addChild(itemp); - } + return itemp->getVisible(); + }); + if (visible_items>1) + { + // no room for any more items + createSpilloverBranch(); + std::vector items_to_remove; + std::copy(item_iter, mItems.end(), std::back_inserter(items_to_remove)); + std::vector::iterator spillover_iter; + for (spillover_iter= items_to_remove.begin(); spillover_iter != items_to_remove.end(); ++spillover_iter) + { + LLMenuItemGL* itemp = (*spillover_iter); + removeChild(itemp); + mSpilloverMenu->addChild(itemp); + } - addChild(mSpilloverBranch); - height += mSpilloverBranch->getNominalHeight(); - width = llmax( width, mSpilloverBranch->getNominalWidth() ); + addChild(mSpilloverBranch); - break; - } - else - { - // track our rect - height += (*item_iter)->getNominalHeight(); - width = llmax( width, (*item_iter)->getNominalWidth() ); + height += mSpilloverBranch->getNominalHeight(); + width = llmax( width, mSpilloverBranch->getNominalWidth() ); + + break; + } } + // track our rect + height += (*item_iter)->getNominalHeight(); + width = llmax( width, (*item_iter)->getNominalWidth() ); + if (mScrollable) { // Determining visible items boundaries -- cgit v1.2.3 From ac23d948a483d9194c7d0daef440521c9f4b4b90 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 16 Sep 2014 16:49:50 +0300 Subject: MAINT-4437 buildfix for linux - removed lambda expression --- indra/llui/llmenugl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index cb0b75ea48..31df853ab4 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2114,10 +2114,13 @@ void LLMenuGL::arrange( void ) && height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height) { // don't show only one item - int visible_items = std::count_if(item_iter, mItems.end(), [](LLMenuItemGL* itemp) + int visible_items = 0; + item_list_t::iterator count_iter; + for (count_iter = item_iter; count_iter != mItems.end(); ++count_iter) { - return itemp->getVisible(); - }); + if((*count_iter)->getVisible()) + visible_items++; + } if (visible_items>1) { // no room for any more items -- cgit v1.2.3 From c1fe3a3ed6aca0e0439a4f0d1116a31e9999a495 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 18 Sep 2014 11:46:36 +0300 Subject: MAINT-4433 FIXED Don't start changing scale on first click. --- indra/newview/llmanipscale.cpp | 14 +++++++++++++- indra/newview/llmanipscale.h | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 2810941d83..cb505c9d4c 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -352,6 +352,10 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) updateSnapGuides(bbox); + mFirstClickX = x; + mFirstClickY = y; + mIsFirstClick = true; + mDragStartPointGlobal = gAgent.getPosGlobalFromAgent(box_corner_agent); mDragStartCenterGlobal = gAgent.getPosGlobalFromAgent(box_center_agent); LLVector3 far_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox ) ); @@ -415,7 +419,15 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask) } else { - drag( x, y ); + if((mFirstClickX != x) || (mFirstClickY != y)) + { + mIsFirstClick = false; + } + + if(!mIsFirstClick) + { + drag( x, y ); + } } LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL; } diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 7cc3c99810..e93b3d4f83 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -172,6 +172,9 @@ private: ESnapRegimes mSnapRegime; // Date: Wed, 17 Sep 2014 21:13:18 +0300 Subject: =?UTF-8?q?MAINT-4341=20FIXED=20Pixel=20width=20and=20height=20of?= =?UTF-8?q?=20the=20preview=20is=20not=20matched=20to=20value=20of=20Width?= =?UTF-8?q?=20or=20Height=20text-box=20in=20the=20=E2=80=9CSnapshot=20to?= =?UTF-8?q?=20inventory=E2=80=9D=20window?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llfloatersnapshot.cpp | 18 ++++++++++++++++++ indra/newview/llpanelsnapshot.cpp | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 8677028942..04329ff66e 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -383,12 +383,20 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) S32 w = gViewerWindow->getWindowWidthRaw(); LL_DEBUGS() << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << LL_ENDL; width_ctrl->setValue(w); + if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + width_ctrl->setIncrement(w >> 1); + } } if (height_ctrl->getValue().asInteger() == 0) { S32 h = gViewerWindow->getWindowHeightRaw(); LL_DEBUGS() << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << LL_ENDL; height_ctrl->setValue(h); + if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + height_ctrl->setIncrement(h >> 1); + } } // Clamp snapshot resolution to window size when showing UI or HUD in snapshot. @@ -823,6 +831,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL { getWidthSpinner(view)->setValue(width); getHeightSpinner(view)->setValue(height); + if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + getWidthSpinner(view)->setIncrement(width >> 1); + getHeightSpinner(view)->setIncrement(height >> 1); + } } if(original_width != width || original_height != height) @@ -942,6 +955,11 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshot *view { getWidthSpinner(view)->forceSetValue(width); getHeightSpinner(view)->forceSetValue(height); + if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + getWidthSpinner(view)->setIncrement(width >> 1); + getHeightSpinner(view)->setIncrement(height >> 1); + } } // static diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index 56569e3207..106fb4997e 100755 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -37,6 +37,19 @@ #include "llsidetraypanelcontainer.h" #include "llviewercontrol.h" // gSavedSettings +const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 + +S32 power_of_two(S32 sz, S32 upper) +{ + S32 res = upper; + while( upper >= sz) + { + res = upper; + upper >>= 1; + } + return res; +} + // virtual BOOL LLPanelSnapshot::postBuild() { @@ -164,8 +177,26 @@ void LLPanelSnapshot::cancel() void LLPanelSnapshot::onCustomResolutionCommit() { LLSD info; - info["w"] = getChild(getWidthSpinnerName())->getValue().asInteger(); - info["h"] = getChild(getHeightSpinnerName())->getValue().asInteger(); + LLSpinCtrl *widthSpinner = getChild(getWidthSpinnerName()); + LLSpinCtrl *heightSpinner = getChild(getHeightSpinnerName()); + if (getName() == "panel_snapshot_inventory") + { + S32 width = widthSpinner->getValue().asInteger(); + width = power_of_two(width, MAX_TEXTURE_SIZE); + info["w"] = width; + widthSpinner->setIncrement(width >> 1); + widthSpinner->forceSetValue(width); + S32 height = heightSpinner->getValue().asInteger(); + height = power_of_two(height, MAX_TEXTURE_SIZE); + heightSpinner->setIncrement(height >> 1); + heightSpinner->forceSetValue(height); + info["h"] = height; + } + else + { + info["w"] = widthSpinner->getValue().asInteger(); + info["h"] = heightSpinner->getValue().asInteger(); + } LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info)); } -- cgit v1.2.3 From 82eca97e7b945d76b4cc562d7f4178b00466de5c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 19 Sep 2014 13:25:54 +0300 Subject: MAINT-4458 FIXED Enable/disable combobox instead of changing its visibility. --- indra/newview/llfloaterpreference.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 6e47cbb09f..2eadd40bfa 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -701,13 +701,13 @@ void LLFloaterPreference::onOpen(const LLSD& key) maturity_list->deleteItems(LLSD(SIM_ACCESS_ADULT)); } } - getChildView("maturity_desired_combobox")->setVisible( true); + getChildView("maturity_desired_combobox")->setEnabled( true); getChildView("maturity_desired_textbox")->setVisible( false); } else { getChild("maturity_desired_textbox")->setValue(maturity_combo->getSelectedItemLabel()); - getChildView("maturity_desired_combobox")->setVisible( false); + getChildView("maturity_desired_combobox")->setEnabled( false); } // Forget previous language changes. -- cgit v1.2.3 From bfd29121a8e53abb78047764bec5e6b6bdd557f4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 19 Sep 2014 19:46:34 +0300 Subject: MAINT-4464 FIXED Viewer displays L$ balance of 'L$20' when L$ service is unavailable --- indra/newview/skins/default/xui/en/panel_status_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 064ece6e4b..dbf7bc031f 100755 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -51,7 +51,7 @@ v_pad="4" top="0" wrap="false" - value="L$20" + value="L$??" width="40" />