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 504 by gumby, Sat Mar 27 03:48:25 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 139 | Line 139 | bool AEInstallerApp::OnInit()
139                                  if (updateNotification->ShowModal() == wxID_YES)
140                                          ProcessAEUpdate(&currentAE, &updateAE, &installerJustUpdated);
141                                  break;
142 +                        case UPDATE_THIRD_PARTY: // there's an update with no globalization or Installer strings attached
143 +                                updateMsg = (string)"One or more third party update(s) for Anniversary Edition package(s) are available.\n" +
144 +                                        (string)"Please note that the AE team assumes no responsibility for the content of third party mods" +
145 +                                        (string)"nor effects that a third party mod may have on your install.\n" +
146 +                                        (string)"Do you wish to install these update(s)?";
147 +                                updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
148 +                                if (updateNotification->ShowModal() == wxID_YES)
149 +                                        ProcessThirdPartyUpdates();    
150 +                                break;
151                          case UPDATE_GLOB_AVAIL: // there's an update with globalization strings attached
152                                  updateMsg = updateMsg + "**Note that the update requires you to reglobalize, which will take 5-20 minutes.**\n" +
153                                                                                  "Before clicking Yes, MAKE SURE you have backed up any mods not installed through\n " +
# Line 152 | Line 161 | bool AEInstallerApp::OnInit()
161                                                                                  "If you click Yes, the Installer will quit and re-launch itself, then\n" +
162                                                                                  "you will be prompted to begin the installation.";
163                                  updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
155                                updateNotification->ShowModal();
164                                  if (updateNotification->ShowModal() == wxID_YES)
165                                  {
166                                          if (ProcessInstallerUpdate(&currentAE, &updateAE)) // there's an intentional logic gap here: if the user clicks "Yes"...
# Line 165 | Line 173 | bool AEInstallerApp::OnInit()
173                                          break;
174                          case UPDATE_INST_REPL_ERR: // the Installer replacement failed, user has to do it :-(
175                                  updateMsg = "The Installer replacement process failed for some reason.\n";
176 <                                updateMsg = updateMsg + "Please quit, go into the folder Edition/Updates/" + strEUFN + "/install/ and drag the Installer to Edition/install/, " +
177 <                                                                                "replacing the current Installer application, then launch the new version.";
178 <                                updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxOK | wxICON_EXCLAMATION, wxDefaultPosition);
179 <                                updateNotification->ShowModal();
180 <                                TheWindow->Close();
176 >                                updateMsg = updateMsg + "In order for the update to continue, go into the folder Edition/updates/" + strEUFN + "/install/ and " +
177 >                                                                                "drag the Installer to Edition/install/, replacing the current Installer application, then launch the " +
178 >                                                                                "new version. Click Yes to quit.";
179 >                                updateNotification = new wxMessageDialog(TheWindow, updateMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
180 >                                if (updateNotification->ShowModal() == wxID_YES)
181 >                                        TheWindow->Close();
182                                  return true;
183                  }
184          }

Diff Legend

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