impr: Make auto updater work better on Windows

This commit is contained in:
WerWolv
2025-02-15 16:46:36 +01:00
parent 2d6da52a86
commit 419787e17c
3 changed files with 3 additions and 3 deletions

View File

@@ -936,7 +936,7 @@ namespace hex {
}
EventImHexClosing::subscribe([executablePath, updateTypeString] {
hex::executeCommand(
hex::startProgram(
hex::format("\"{}\" \"{}\"",
wolv::util::toUTF8String(executablePath),
updateTypeString

View File

@@ -339,7 +339,7 @@ namespace hex {
void startProgram(const std::string &command) {
#if defined(OS_WINDOWS)
std::ignore = system(hex::format("start {0}", command).c_str());
std::ignore = system(hex::format("start \"\" {0}", command).c_str());
#elif defined(OS_MACOS)
std::ignore = system(hex::format("open {0}", command).c_str());
#elif defined(OS_LINUX)

View File

@@ -100,7 +100,7 @@ int installUpdate(const std::string &type, std::fs::path updatePath) {
};
constexpr static auto UpdateHandlers = {
UpdateHandler { "win-msi", ".msi", "msiexec /passive /package {}" },
UpdateHandler { "win-msi", ".msi", "msiexec /i {} /qb" },
UpdateHandler { "macos-dmg", ".dmg", "hdiutil attach {}" },
UpdateHandler { "linux-deb-22.04", ".deb", "sudo apt update && sudo apt install -y --fix-broken {}" },
UpdateHandler { "linux-deb-23.04", ".deb", "sudo apt update && sudo apt install -y --fix-broken {}" },