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 385 by gumby, Mon Jul 6 00:59:40 2009 UTC vs.
Revision 401 by gumby, Tue Jul 7 00:34:21 2009 UTC

# Line 110 | Line 110 | bool AEInstallerApp::OnInit()
110          ////@end AEInstallerApp initialisation
111          TheWindow = mainWindow;
112          
113 < #ifndef WIN32
113 > #ifdef WIN32
114 >         HKEY hKey;
115 >         if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework\\policy\\v2.0", 0L, KEY_READ , &hKey) == ERROR_SUCCESS) {
116 >                 wxMessageDialog* MonoDialogOfDeath = new wxMessageDialog(TheWindow, "You don't have .NET 2.0 installed! .NET is a framework required by the Edition. You can download it from:\nhttp://gumby.oni2.net/dotnet\nPlease install .NET 2.0, then open this Installer again. \n\nWould you like to open the download webpage?",  "AE Installer Alert",  wxYES_NO | wxICON_EXCLAMATION        , wxDefaultPosition);
117 >                 if(MonoDialogOfDeath->ShowModal() == wxID_YES) {
118 >                        system("start http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5");
119 >                 }
120 >                RegCloseKey(hKey);
121 >                TheWindow->Close();
122 >         }
123 > #else
124          // test for the third-party mono framework, because without it, on Mac, we are up a creek
125          char monoCommand[300] = "which mono >> ";
126 <        strcat(monoCommand, system_complete("./mono_check.log").string().c_str());
126 >        strcat(monoCommand, escapePath(system_complete("mono_check.log").string()).c_str());
127          system(monoCommand);
128          fstream file;
129 <        file.open("./mono_check.log");
129 >        file.open("mono_check.log");
130          string line;
131          int line_count = 0;
132          while (!file.eof())
# Line 125 | Line 135 | bool AEInstallerApp::OnInit()
135                  getline(file, line);
136          }
137          file.close();
138 <        remove("./mono_check.log");
138 >        remove("mono_check.log");
139          
140          if (line_count <= 1) // this means that "which mono" returned nothing -- abort! abort! abort!
141          {

Diff Legend

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