Fix Windows portable updater for MSVC.
Some checks failed
Windows Release / windows-x86_64 (push) Failing after 38m20s

Use const SDL_GetBasePath and include shellapi.h so ShellExecuteA compiles under WIN32_LEAN_AND_MEAN.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
copilot 2026-11-12 13:44:27 +01:00
parent cdc4c5cb30
commit 94b586deb5

View file

@ -9,6 +9,7 @@
#ifdef _WIN32
#include <SDL3/SDL.h>
#include <windows.h>
#include <shellapi.h>
#endif
namespace WindowsPortableUpdater {
@ -86,11 +87,11 @@ bool apply_zip_and_restart(const std::string& zipBytes) {
#ifdef _WIN32
namespace fs = std::filesystem;
try {
char* basePath = SDL_GetBasePath();
const char* basePath = SDL_GetBasePath();
if(!basePath)
return false;
fs::path appDir = fs::path(basePath);
SDL_free(basePath);
SDL_free(const_cast<char*>(basePath));
fs::path tempRoot = fs::temp_directory_path() / "infinipaint-update";
fs::create_directories(tempRoot);