--- AE/Installer/trunk/source/aeinstallerapp.cpp 2009/07/05 14:11:22 382 +++ AE/Installer/trunk/source/aeinstallerapp.cpp 2009/07/15 21:16:14 423 @@ -110,13 +110,23 @@ bool AEInstallerApp::OnInit() ////@end AEInstallerApp initialisation TheWindow = mainWindow; -#ifndef WIN32 +#ifdef WIN32 + HKEY hKey; + if(!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework\\policy\\v2.0", 0L, KEY_READ , &hKey) == ERROR_SUCCESS) { + 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); + if(MonoDialogOfDeath->ShowModal() == wxID_YES) { + system("start http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5"); + } + RegCloseKey(hKey); + TheWindow->Close(); + } +#else // test for the third-party mono framework, because without it, on Mac, we are up a creek char monoCommand[300] = "which mono >> "; - strcat(monoCommand, system_complete("./mono_check.log").string().c_str()); + strcat(monoCommand, escapePath(system_complete("mono_check.log").string()).c_str()); system(monoCommand); fstream file; - file.open("./mono_check.log"); + file.open("mono_check.log"); string line; int line_count = 0; while (!file.eof()) @@ -125,7 +135,7 @@ bool AEInstallerApp::OnInit() getline(file, line); } file.close(); - remove("./mono_check.log"); + remove("mono_check.log"); if (line_count <= 1) // this means that "which mono" returned nothing -- abort! abort! abort! { @@ -137,6 +147,7 @@ bool AEInstallerApp::OnInit() #endif //anything after this is done after the window appears... + if ( !exists("../GameDataFolder") ) { wxMessageDialog* YesNoDialog = new wxMessageDialog(TheWindow, "You haven't globalized yet! \nYou must globalize to use the Anniversary Edition framework. \nWould you like to globalize now? (This could take a while...)\n(Selecting \"No\" will exit this program...)", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); @@ -145,21 +156,23 @@ bool AEInstallerApp::OnInit() TheWindow->Close(); else { - TheWindow->InstallButton->Disable(); - TheWindow->ReglobalizeButton->Disable(); + #ifdef WIN32 - boost::thread thrd3(globalizeData); + boost::thread thrd3(globalize2); //globalizeData(); //boost::thread::create_thread(&globalizeData); // boost::thread_group Tg; // Tg.create_thread( &globalizeData(), this ); #else + TheWindow->InstallButton->Disable(); + TheWindow->ReglobalizeButton->Disable(); globalizeData(); + TheWindow->InstallButton->Enable(); + TheWindow->ReglobalizeButton->Enable(); #endif - TheWindow->InstallButton->Enable(); - TheWindow->ReglobalizeButton->Enable(); + } }