ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/aeinstallerapp.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/aeinstallerapp.cpp (file contents):
Revision 487 by iritscen, Wed Dec 30 01:51:38 2009 UTC vs.
Revision 500 by iritscen, Sun Mar 14 23:31:14 2010 UTC

# Line 18 | Line 18
18   ////@begin includes
19   ////@end includes
20  
21 + extern int updateStatus;
22 + extern bool installerJustUpdated;
23   Install_info_cfg currentAE, updateAE;
24   MainWindow* TheWindow;
25  
# Line 110 | Line 112 | bool AEInstallerApp::OnInit()
112                  return true;
113          }
114          
115 <        bool installerJustUpdated = false;
114 <        int updateStatus = GetUpdateStatus(&currentAE, &updateAE, &installerJustUpdated);
115 <        if (updateStatus) // otherwise there's no update
115 >        if (updateStatus) // updateStatus was set when MainWindow::CreateControls() was called during initialization of the window
116          {
117                  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...
118                  updateMsg = updateMsg + "Do you wish to update to Edition version " + updateAE.AEVersion + "?\n" +
119 <                                                        "(Current version is " + currentAE.AEVersion + ")\n"; // ...so tack the rest on in a second command
119 >                                                        "(Current version is " + currentAE.AEVersion + ")\n"; // ...so we tack the rest on in a second command
120                  wxMessageDialog* updateNotification;
121                  
122                  switch (updateStatus) // for the meanings of these return values, see the comments preceding installer.cpp's GetUpdateStatus()
# Line 152 | Line 152 | bool AEInstallerApp::OnInit()
152                                                                                  "If you click Yes, the Installer will quit and re-launch itself, then\n" +
153                                                                                  "you will be prompted to begin the installation.";
154                                  updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
155                                updateNotification->ShowModal();
155                                  if (updateNotification->ShowModal() == wxID_YES)
156                                  {
157                                          if (ProcessInstallerUpdate(&currentAE, &updateAE)) // there's an intentional logic gap here: if the user clicks "Yes"...
# Line 165 | Line 164 | bool AEInstallerApp::OnInit()
164                                          break;
165                          case UPDATE_INST_REPL_ERR: // the Installer replacement failed, user has to do it :-(
166                                  updateMsg = "The Installer replacement process failed for some reason.\n";
167 <                                updateMsg = updateMsg + "Please quit, go into the folder Edition/Updates/" + strEUFN + "/install/ and drag the Installer to Edition/install/, " +
168 <                                                                                "replacing the current Installer application, then launch the new version.";
169 <                                updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxOK | wxICON_EXCLAMATION, wxDefaultPosition);
170 <                                updateNotification->ShowModal();
171 <                                TheWindow->Close();
167 >                                updateMsg = updateMsg + "In order for the update to continue, go into the folder Edition/updates/" + strEUFN + "/install/ and " +
168 >                                                                                "drag the Installer to Edition/install/, replacing the current Installer application, then launch the " +
169 >                                                                                "new version. Click Yes to quit.";
170 >                                updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
171 >                                if (updateNotification->ShowModal() == wxID_YES)
172 >                                        TheWindow->Close();
173                                  return true;
174                  }
175          }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)