--- AE/Installer/trunk/source/aeinstallerapp.cpp 2009/12/30 01:51:38 487 +++ AE/Installer/trunk/source/aeinstallerapp.cpp 2010/03/14 23:31:14 500 @@ -18,6 +18,8 @@ ////@begin includes ////@end includes +extern int updateStatus; +extern bool installerJustUpdated; Install_info_cfg currentAE, updateAE; MainWindow* TheWindow; @@ -110,13 +112,11 @@ bool AEInstallerApp::OnInit() return true; } - bool installerJustUpdated = false; - int updateStatus = GetUpdateStatus(¤tAE, &updateAE, &installerJustUpdated); - if (updateStatus) // otherwise there's no update + if (updateStatus) // updateStatus was set when MainWindow::CreateControls() was called during initialization of the window { string updateMsg = "An update for the Anniversary Edition is available.\n"; // for some reason we can't set the initial value while using the '+' operator... updateMsg = updateMsg + "Do you wish to update to Edition version " + updateAE.AEVersion + "?\n" + - "(Current version is " + currentAE.AEVersion + ")\n"; // ...so tack the rest on in a second command + "(Current version is " + currentAE.AEVersion + ")\n"; // ...so we tack the rest on in a second command wxMessageDialog* updateNotification; switch (updateStatus) // for the meanings of these return values, see the comments preceding installer.cpp's GetUpdateStatus() @@ -152,7 +152,6 @@ bool AEInstallerApp::OnInit() "If you click Yes, the Installer will quit and re-launch itself, then\n" + "you will be prompted to begin the installation."; updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition); - updateNotification->ShowModal(); if (updateNotification->ShowModal() == wxID_YES) { if (ProcessInstallerUpdate(¤tAE, &updateAE)) // there's an intentional logic gap here: if the user clicks "Yes"... @@ -165,11 +164,12 @@ bool AEInstallerApp::OnInit() break; case UPDATE_INST_REPL_ERR: // the Installer replacement failed, user has to do it :-( updateMsg = "The Installer replacement process failed for some reason.\n"; - updateMsg = updateMsg + "Please quit, go into the folder Edition/Updates/" + strEUFN + "/install/ and drag the Installer to Edition/install/, " + - "replacing the current Installer application, then launch the new version."; - updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxOK | wxICON_EXCLAMATION, wxDefaultPosition); - updateNotification->ShowModal(); - TheWindow->Close(); + updateMsg = updateMsg + "In order for the update to continue, go into the folder Edition/updates/" + strEUFN + "/install/ and " + + "drag the Installer to Edition/install/, replacing the current Installer application, then launch the " + + "new version. Click Yes to quit."; + updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition); + if (updateNotification->ShowModal() == wxID_YES) + TheWindow->Close(); return true; } }