save current installed config install select all (only of current type?) revert - select mods that are currently installed globalization: installation: - remove current .dat/.raw/.sep from GDF - remove current BSL-folders? - combine vanilla+default-mods+selected-mods - combine BSL orig: globalization: installer.cpp/h - globalizeData() in #31 installation: installer.cpp/h - recompileAll() in #500 #ifdef WIN32 bool splitInstances = false; string strImportOption = "-import:nosep"; string strOniSplit = "Onisplit.exe"; #else bool splitInstances = false; string strImportOption = "-import:sep"; string strOniSplit = "mono Onisplit.exe"; #endif check .net>2.0: bool CheckForRequiredSoftware(void) { #ifdef WIN32 // test for .NET 2.0 or higher HKEY hKey; if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework\\policy\\v2.0", 0L, KEY_READ , &hKey) == ERROR_SUCCESS) { string dotnetMsg = "You don't have .NET 2.0 installed! .NET is a framework required by the Edition.\n"; dotnetMsg = dotnetMsg + "You can download it from:\n" + "http://gumby.oni2.net/dotnet\n" + "Please install .NET 2.0, then open this Installer again.\n\n" + "Would you like to open the download webpage?"; wxMessageDialog* DotNetDialogOfDeath = new wxMessageDialog(TheWindow, dotnetMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); if (DotNetDialogOfDeath->ShowModal() == wxID_YES) system("start http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5"); RegCloseKey(hKey); return false; } #else // on Mac... // test for the third-party "mono" framework, because without it, we are up a creek FILE *fWhichMono = NULL; char chrWhichMono[32]; fWhichMono = popen("which mono", "r"); fgets(chrWhichMono, sizeof(chrWhichMono), fWhichMono); pclose(fWhichMono); string strWhichMono = (string)chrWhichMono; string::size_type loc = strWhichMono.find("mono", 0); if (loc == string::npos) // this means that "which mono" did not return a path leading to the mono binary -- abort! abort! abort! { string monoMsg = "You don't have 'mono' installed! 'mono' is a command-line tool required by the Edition.\n"; monoMsg = monoMsg + "You can download it from: http://www.go-mono.com/mono-downloads/download.html (OS X 10.4+)\n" + "or http://edt.oni2.net/AE/MonoFramework10.3.dmg (OS X 10.3)\n\n" + "Please install 'mono', then open this Installer again."; wxMessageDialog* MonoDialogOfDeath = new wxMessageDialog(TheWindow, monoMsg.c_str(), "AE Installer Alert", wxOK | wxICON_EXCLAMATION, wxDefaultPosition); MonoDialogOfDeath->ShowModal(); return false; // it's quittin' time, Joe } #endif return true; } check globalization: bool CheckForGlobalization(bool justDoIt) { if (!exists("../GameDataFolder")) { string globMsg = "You haven't globalized yet!\n"; globMsg = globMsg + "You must globalize to use the Anniversary Edition framework.\n" + "Would you like to globalize now? (This could take a while...)\n" + "(Selecting \"No\" will exit this program...)"; wxMessageDialog* YesNoDialog = new wxMessageDialog(TheWindow, globMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition); if (YesNoDialog->ShowModal() == wxID_NO) // if the user said no... { TheWindow->Close(); return true; } } else if (!justDoIt) return false; // Code below this point runs if user clicks "Yes" or if they are never asked but justDoIt is true #ifdef WIN32 boost::thread thrd3(globalize2); #else // cannot use multi-threading in Mac build TheWindow->InstallButton->Disable(); TheWindow->ReglobalizeButton->Disable(); globalizeData(); TheWindow->InstallButton->Enable(); TheWindow->ReglobalizeButton->Enable(); #endif return true; }