mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Make auto updater work better on Windows
This commit is contained in:
@@ -936,7 +936,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
EventImHexClosing::subscribe([executablePath, updateTypeString] {
|
||||
hex::executeCommand(
|
||||
hex::startProgram(
|
||||
hex::format("\"{}\" \"{}\"",
|
||||
wolv::util::toUTF8String(executablePath),
|
||||
updateTypeString
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {}" },
|
||||
|
||||
Reference in New Issue
Block a user