diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-04-07 20:28:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-07 20:28:42 -0400 |
| commit | f4bc7652f8ec4dac7c41e40287615c56ac1cec10 (patch) | |
| tree | 08bbbeed17d08f1d92340dcffb71729e89988840 /indra/newview/llappviewerwin32.cpp | |
| parent | ab5b121a5f13147452050adfaff58a1a8bd25d25 (diff) | |
| parent | 46412a6bfcf232790b9a57931d3efafcbf758511 (diff) | |
Merge pull request #5624 from secondlife/geenz/velopack-26.2
Velopack -> 2026.02
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
| -rw-r--r-- | indra/newview/llappviewerwin32.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 45c8c369ca..8f11b219f5 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -72,6 +72,11 @@ #include <fstream> #include <exception> +// Velopack installer and update framework +#if LL_VELOPACK +#include "llvelopack.h" +#endif + // Bugsplat (http://bugsplat.com) crash reporting tool #ifdef LL_BUGSPLAT #include "BugSplat.h" @@ -234,7 +239,6 @@ LONG WINAPI catchallCrashHandler(EXCEPTION_POINTERS * /*ExceptionInfo*/) return 0; } -const std::string LLAppViewerWin32::sWindowClass = "Second Life"; /* This function is used to print to the command line a text message @@ -438,6 +442,31 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, PWSTR pCmdLine, int nCmdShow) { +#if LL_VELOPACK + // Velopack MUST be initialized first - it may handle install/uninstall + // commands and exit the process before we do anything else. + if (!velopack_initialize()) + { + // Velopack handled the invocation (install/uninstall hook) + + // Drop install related settings + gDirUtilp->initAppDirs("SecondLife"); + + std::string user_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml"); + LLControlGroup settings("global"); + if (settings.loadFromFile(user_settings_path)) + { + // If user reinstalls or updates, we want to recheck for nsis leftovers. + if (settings.controlExists("PreviousInstallChecked")) + { + settings.setBOOL("PreviousInstallChecked", false); + } + settings.saveToFile(user_settings_path, true); + } + return 0; + } +#endif + // Call Tracy first thing to have it allocate memory // https://github.com/wolfpld/tracy/issues/196 LL_PROFILER_FRAME_END; @@ -979,7 +1008,7 @@ bool LLAppViewerWin32::restoreErrorTrap() bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url) { wchar_t window_class[256]; /* Flawfinder: ignore */ // Assume max length < 255 chars. - mbstowcs(window_class, sWindowClass.c_str(), 255); + mbstowcs(window_class, sWindowClass, 255); window_class[255] = 0; // Use the class instead of the window name. HWND other_window = FindWindow(window_class, NULL); |
