feat: Added Auto Updater for Windows, macOS and Ubuntu (#1377)

This commit is contained in:
Nik
2023-10-21 20:40:24 +02:00
committed by GitHub
parent c46e445a04
commit f114239f51
19 changed files with 390 additions and 92 deletions

View File

@@ -313,7 +313,7 @@ namespace hex {
return std::to_string(value).substr(0, 5) + Suffixes[suffixIndex];
}
void runCommand(const std::string &command) {
void startProgram(const std::string &command) {
#if defined(OS_WINDOWS)
hex::unused(system(hex::format("start {0}", command).c_str()));
@@ -326,6 +326,10 @@ namespace hex {
#endif
}
int executeCommand(const std::string &command) {
return ::system(command.c_str());
}
void openWebpage(std::string url) {
if (!url.contains("://"))
url = "https://" + url;