Skip to content

Commit

Permalink
impr: Make auto updater work better on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Feb 15, 2025
1 parent 2d6da52 commit 419787e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/libimhex/source/api/imhex_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ namespace hex {
}

EventImHexClosing::subscribe([executablePath, updateTypeString] {
hex::executeCommand(
hex::startProgram(
hex::format("\"{}\" \"{}\"",
wolv::util::toUTF8String(executablePath),
updateTypeString
Expand Down
2 changes: 1 addition & 1 deletion lib/libimhex/source/helpers/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion main/updater/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}" },
Expand Down

0 comments on commit 419787e

Please sign in to comment.