Changeset 379 for AE/Installer


Ignore:
Timestamp:
Jun 29, 2009, 9:23:42 PM (10 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.

Location:
AE/Installer/trunk/source
Files:
5 edited

Legend:

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

    r360 r379  
    1111#include "boost/thread.hpp"
    1212#include <boost/thread/mutex.hpp>
    13 
     13#include <fstream>
    1414#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations
    1515#include "boost/lexical_cast.hpp" //int -> string
     
    111111        TheWindow = mainWindow;
    112112       
     113#ifndef WIN32
     114        // CIP: test for the third-party mono framework, because without it, on Mac, we are up a creek
     115       
     116       
     117        if (!monoPresent) // abort! abort! abort!
     118        {
     119                // CIP: disable window controls, present alert with URL to download mono, alert window has one button, "Quit"
     120        }
     121#endif
     122
    113123        //anything after this is done after the window appears...
    114124                if ( !exists("../GameDataFolder") ) {
  • AE/Installer/trunk/source/aeinstallerapp.h

    r356 r379  
    2222#include "main_window.h"
    2323////@end includes
     24
     25bool monoPresent = false; // the Mac won't be able to do anything without mono installed
    2426
    2527/*!
  • AE/Installer/trunk/source/installer.cpp

    r325 r379  
    11/*
    22 AE/Mod Installer
    3  v1.0
    43 by Gumby and Iritscen
    5  */
     4*/
    65
    76#define DEBUG
     
    2827#endif
    2928
    30 const string strInstallerVersion = "1.0";
     29//const string strInstallerVersion = "1.0";
    3130const bool SPLIT = 1;
    3231const bool NOT_SPLIT = 0;
  • AE/Installer/trunk/source/installer.h

    r358 r379  
    1414static string DIRSLASH = "\\";
    1515string strInstallCfg = "../GameDataFolder/Add.cfg";
    16 
    17 
     16static string strInstallerVersion = "1.0";
    1817
    1918#define STRUCT_DEFS
  • 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.