Skip to content

Commit

Permalink
in mac version, download the update file using a browser
Browse files Browse the repository at this point in the history
not possible to update executable inside app packages anymore
TODO: update website to serve .dmg link instead
  • Loading branch information
jacob1 committed Jan 19, 2019
1 parent e8b4256 commit 87f17fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/gui/game/GameController.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}

0 comments on commit 87f17fd

Please sign in to comment.