Ignore:
Timestamp:
Jun 29, 2009, 9:23:42 PM (16 years ago)
Author:
iritscen
Message:

Adding GDF switch code to Mac side post-globalization.
Preparing way for new code (search for 'CIP' in proj).
Clarifying re-globalization warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/main_window.cpp

    r373 r379  
    11/*
    2 AE/Mod Installer
    3 by Gumby and Iritscen
     2 AE/Mod Installer
     3 by Gumby and Iritscen
    44*/
    55
    66// To-do: - Load credits from text resource file
    7 //                - Version number in credits should be universalized
    87//                - Institute lots of checks into file-handling
    98//                - Clear mod info fields when mod is de-selected
     
    3231#endif
    3332
    34 const string strInstallerVersion = "1.0";
     33//const string strInstallerVersion = "1.0";
    3534const bool SPLIT = 1;
    3635const bool NOT_SPLIT = 0;
     
    326325                create_directory((path)"../GameDataFolder/IGMD");
    327326                copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
    328                 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               
    329345                setStatusArea((string)"Done! Now select your mod packages and click install.");
    330346                //      while(1) Sleep(-1);
     
    12841300                YesNoDialog->ShowModal();
    12851301                OptionsPanel->Show();
    1286                 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);
    12871304        }
    12881305}
     
    15461563void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event )
    15471564{
    1548         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);
    15491566
    15501567        if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no...
Note: See TracChangeset for help on using the changeset viewer.