Fix Windows portable updater for MSVC.
Some checks failed
Windows Release / windows-x86_64 (push) Failing after 38m20s
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:
parent
cdc4c5cb30
commit
94b586deb5
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue