1 | save current installed config
|
---|
2 |
|
---|
3 | install
|
---|
4 | select all (only of current type?)
|
---|
5 | revert - select mods that are currently installed
|
---|
6 |
|
---|
7 |
|
---|
8 | globalization:
|
---|
9 |
|
---|
10 | installation:
|
---|
11 | - remove current .dat/.raw/.sep from GDF
|
---|
12 | - remove current BSL-folders?
|
---|
13 | - combine vanilla+default-mods+selected-mods
|
---|
14 | - combine BSL
|
---|
15 |
|
---|
16 |
|
---|
17 | orig:
|
---|
18 | globalization: installer.cpp/h - globalizeData() in #31
|
---|
19 | installation: installer.cpp/h - recompileAll() in #500
|
---|
20 |
|
---|
21 | #ifdef WIN32
|
---|
22 | bool splitInstances = false;
|
---|
23 | string strImportOption = "-import:nosep";
|
---|
24 | string strOniSplit = "Onisplit.exe";
|
---|
25 | #else
|
---|
26 | bool splitInstances = false;
|
---|
27 | string strImportOption = "-import:sep";
|
---|
28 | string strOniSplit = "mono Onisplit.exe";
|
---|
29 | #endif
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 |
|
---|
34 | check .net>2.0:
|
---|
35 | bool CheckForRequiredSoftware(void)
|
---|
36 | {
|
---|
37 | #ifdef WIN32
|
---|
38 | // test for .NET 2.0 or higher
|
---|
39 | HKEY hKey;
|
---|
40 | if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\.NETFramework\\policy\\v2.0", 0L, KEY_READ , &hKey) == ERROR_SUCCESS)
|
---|
41 | {
|
---|
42 | string dotnetMsg = "You don't have .NET 2.0 installed! .NET is a framework required by the Edition.\n";
|
---|
43 | dotnetMsg = dotnetMsg + "You can download it from:\n" +
|
---|
44 | "http://gumby.oni2.net/dotnet\n" +
|
---|
45 | "Please install .NET 2.0, then open this Installer again.\n\n" +
|
---|
46 | "Would you like to open the download webpage?";
|
---|
47 | wxMessageDialog* DotNetDialogOfDeath = new wxMessageDialog(TheWindow, dotnetMsg.c_str(), "AE Installer Alert",
|
---|
48 | wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition);
|
---|
49 | if (DotNetDialogOfDeath->ShowModal() == wxID_YES)
|
---|
50 | system("start http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5");
|
---|
51 | RegCloseKey(hKey);
|
---|
52 | return false;
|
---|
53 | }
|
---|
54 | #else // on Mac...
|
---|
55 | // test for the third-party "mono" framework, because without it, we are up a creek
|
---|
56 | FILE *fWhichMono = NULL;
|
---|
57 | char chrWhichMono[32];
|
---|
58 | fWhichMono = popen("which mono", "r");
|
---|
59 | fgets(chrWhichMono, sizeof(chrWhichMono), fWhichMono);
|
---|
60 | pclose(fWhichMono);
|
---|
61 | string strWhichMono = (string)chrWhichMono;
|
---|
62 | string::size_type loc = strWhichMono.find("mono", 0);
|
---|
63 |
|
---|
64 | if (loc == string::npos) // this means that "which mono" did not return a path leading to the mono binary -- abort! abort! abort!
|
---|
65 | {
|
---|
66 | string monoMsg = "You don't have 'mono' installed! 'mono' is a command-line tool required by the Edition.\n";
|
---|
67 | monoMsg = monoMsg + "You can download it from: http://www.go-mono.com/mono-downloads/download.html (OS X 10.4+)\n" +
|
---|
68 | "or http://edt.oni2.net/AE/MonoFramework10.3.dmg (OS X 10.3)\n\n" +
|
---|
69 | "Please install 'mono', then open this Installer again.";
|
---|
70 | wxMessageDialog* MonoDialogOfDeath = new wxMessageDialog(TheWindow, monoMsg.c_str(), "AE Installer Alert", wxOK | wxICON_EXCLAMATION, wxDefaultPosition);
|
---|
71 | MonoDialogOfDeath->ShowModal();
|
---|
72 | return false; // it's quittin' time, Joe
|
---|
73 | }
|
---|
74 | #endif
|
---|
75 | return true;
|
---|
76 | }
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 | check globalization:
|
---|
81 | bool CheckForGlobalization(bool justDoIt)
|
---|
82 | {
|
---|
83 | if (!exists("../GameDataFolder"))
|
---|
84 | {
|
---|
85 | string globMsg = "You haven't globalized yet!\n";
|
---|
86 | globMsg = globMsg + "You must globalize to use the Anniversary Edition framework.\n" +
|
---|
87 | "Would you like to globalize now? (This could take a while...)\n" +
|
---|
88 | "(Selecting \"No\" will exit this program...)";
|
---|
89 | wxMessageDialog* YesNoDialog = new wxMessageDialog(TheWindow, globMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);
|
---|
90 |
|
---|
91 | if (YesNoDialog->ShowModal() == wxID_NO) // if the user said no...
|
---|
92 | {
|
---|
93 | TheWindow->Close();
|
---|
94 | return true;
|
---|
95 | }
|
---|
96 | }
|
---|
97 | else if (!justDoIt)
|
---|
98 | return false;
|
---|
99 | // Code below this point runs if user clicks "Yes" or if they are never asked but justDoIt is true
|
---|
100 | #ifdef WIN32
|
---|
101 | boost::thread thrd3(globalize2);
|
---|
102 | #else // cannot use multi-threading in Mac build
|
---|
103 | TheWindow->InstallButton->Disable();
|
---|
104 | TheWindow->ReglobalizeButton->Disable();
|
---|
105 | globalizeData();
|
---|
106 | TheWindow->InstallButton->Enable();
|
---|
107 | TheWindow->ReglobalizeButton->Enable();
|
---|
108 | #endif
|
---|
109 |
|
---|
110 | return true;
|
---|
111 | }
|
---|