1 |
|
/* |
2 |
< |
AE/Mod Installer |
3 |
< |
by Gumby and Iritscen |
2 |
> |
AE/Mod Installer |
3 |
> |
by Gumby and Iritscen |
4 |
|
*/ |
5 |
|
|
6 |
|
// To-do: - Load credits from text resource file |
7 |
– |
// - Version number in credits should be universalized |
7 |
|
// - Institute lots of checks into file-handling |
8 |
|
// - Clear mod info fields when mod is de-selected |
9 |
|
|
30 |
|
#include <dirent.h> |
31 |
|
#endif |
32 |
|
|
33 |
< |
const string strInstallerVersion = "1.0"; |
33 |
> |
//const string strInstallerVersion = "1.0"; |
34 |
|
const bool SPLIT = 1; |
35 |
|
const bool NOT_SPLIT = 0; |
36 |
|
bool splitInstances = SPLIT; |
324 |
|
*/ |
325 |
|
create_directory((path)"../GameDataFolder/IGMD"); |
326 |
|
copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); |
327 |
< |
setProgressBar( 1000 ); |
327 |
> |
setProgressBar( 1000 ); |
328 |
> |
|
329 |
> |
// CIP:last of all, set up the edition folder as a playable Oni installation by placing the latest application (+ Daodan DLL on Windows) in edition/ |
330 |
> |
|
331 |
> |
// CIP:then copy persist.dat and keyconfig.txt into edition/ as well |
332 |
> |
|
333 |
> |
#ifndef WIN32 |
334 |
> |
/* On Mac only, set the current GDF to the AE GDF by writing to Oni's global preferences file (thankfully a standard OS X ".plist" XML file). |
335 |
> |
If there are no Oni prefs (only possible if Oni has not been run even once), then the above line will fail silently, no harm done, |
336 |
> |
and when the user does run Oni for the first time, using the copy of the app in the AE GDF, Oni will set the prefs to use that GDF at that point */ |
337 |
> |
path fullAEpath = system_complete("."); // get full path for Installer |
338 |
> |
char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '"; |
339 |
> |
strcat(prefsCommand, fullAEpath.parent_path().parent_path().string().c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF) |
340 |
> |
strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters |
341 |
> |
system(prefsCommand); |
342 |
> |
|
343 |
> |
#endif |
344 |
> |
|
345 |
|
setStatusArea((string)"Done! Now select your mod packages and click install."); |
346 |
|
// while(1) Sleep(-1); |
347 |
|
|
1299 |
|
"AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); |
1300 |
|
YesNoDialog->ShowModal(); |
1301 |
|
OptionsPanel->Show(); |
1302 |
< |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+2); |
1302 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1); |
1303 |
> |
this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1); |
1304 |
|
} |
1305 |
|
} |
1306 |
|
|
1562 |
|
|
1563 |
|
void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event ) |
1564 |
|
{ |
1565 |
< |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: This will DELETE the Edition's GameDataFolder and reglobalize all of your data. \n Are you SURE you want to do this? ", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); |
1565 |
> |
wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: This will DELETE the Edition's GameDataFolder and recreate it from the vanilla Oni game data. \n Are you SURE you want to do this? ", "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION , wxDefaultPosition); |
1566 |
|
|
1567 |
|
if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no... |
1568 |
|
|