From 87f17fd7c3572fd1e15e91f806374aef6ab39812 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 19 Jan 2019 11:54:43 -0500 Subject: [PATCH] in mac version, download the update file using a browser not possible to update executable inside app packages anymore TODO: update website to serve .dmg link instead --- src/gui/game/GameController.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index b8aeb5dc4..6fa13b389 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -1650,7 +1650,11 @@ void GameController::NotifyUpdateAvailable(Client * sender) { UpdateInfo info = Client::Ref().GetUpdateInfo(); StringBuilder updateMessage; +#ifndef MACOSX updateMessage << "Are you sure you want to run the updater? Please save any changes before updating.\n\nCurrent version:\n "; +#else + updateMessage << "Click \"Continue\" to download the latest version from our website.\n\nCurrent version:\n "; +#endif #ifdef SNAPSHOT updateMessage << "Snapshot " << SNAPSHOT_ID; @@ -1706,6 +1710,17 @@ void GameController::RemoveNotification(Notification * notification) void GameController::RunUpdater() { +#ifndef MACOSX Exit(); new UpdateActivity(); +#else + +#ifdef UPDATESERVER + ByteString file = ByteString::Build("https://", UPDATESERVER, Client::Ref().GetUpdateInfo().File); +#else + ByteString file = ByteString::Build("https://", SERVER, Client::Ref().GetUpdateInfo().File); +#endif + + Platform::OpenURI(file); +#endif // MACOSX }