Index: AE/Installer/trunk/source/aeinstallerapp.cpp
===================================================================
--- AE/Installer/trunk/source/aeinstallerapp.cpp	(revision 378)
+++ AE/Installer/trunk/source/aeinstallerapp.cpp	(revision 379)
@@ -11,5 +11,5 @@
 #include "boost/thread.hpp"
 #include <boost/thread/mutex.hpp>
-
+#include <fstream>
 #include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations
 #include "boost/lexical_cast.hpp" //int -> string
@@ -111,4 +111,14 @@
 	TheWindow = mainWindow;
 	
+#ifndef WIN32
+	// CIP: test for the third-party mono framework, because without it, on Mac, we are up a creek
+	
+	
+	if (!monoPresent) // abort! abort! abort!
+	{
+		// CIP: disable window controls, present alert with URL to download mono, alert window has one button, "Quit"
+	}
+#endif
+
 	//anything after this is done after the window appears...
 		if ( !exists("../GameDataFolder") ) {
Index: AE/Installer/trunk/source/aeinstallerapp.h
===================================================================
--- AE/Installer/trunk/source/aeinstallerapp.h	(revision 378)
+++ AE/Installer/trunk/source/aeinstallerapp.h	(revision 379)
@@ -22,4 +22,6 @@
 #include "main_window.h"
 ////@end includes
+
+bool monoPresent = false; // the Mac won't be able to do anything without mono installed
 
 /*!
Index: AE/Installer/trunk/source/installer.cpp
===================================================================
--- AE/Installer/trunk/source/installer.cpp	(revision 378)
+++ AE/Installer/trunk/source/installer.cpp	(revision 379)
@@ -1,7 +1,6 @@
 /*
  AE/Mod Installer
- v1.0
  by Gumby and Iritscen
- */
+*/
 
 #define DEBUG
@@ -28,5 +27,5 @@
 #endif
 
-const string strInstallerVersion = "1.0";
+//const string strInstallerVersion = "1.0";
 const bool SPLIT = 1;
 const bool NOT_SPLIT = 0;
Index: AE/Installer/trunk/source/installer.h
===================================================================
--- AE/Installer/trunk/source/installer.h	(revision 378)
+++ AE/Installer/trunk/source/installer.h	(revision 379)
@@ -14,6 +14,5 @@
 static string DIRSLASH = "\\";
 string strInstallCfg = "../GameDataFolder/Add.cfg";
-
-
+static string strInstallerVersion = "1.0";
 
 #define STRUCT_DEFS 
Index: AE/Installer/trunk/source/main_window.cpp
===================================================================
--- AE/Installer/trunk/source/main_window.cpp	(revision 378)
+++ AE/Installer/trunk/source/main_window.cpp	(revision 379)
@@ -1,9 +1,8 @@
 /*
-AE/Mod Installer
-by Gumby and Iritscen
+ AE/Mod Installer
+ by Gumby and Iritscen
 */
 
 // To-do: - Load credits from text resource file
-//		  - Version number in credits should be universalized
 //		  - Institute lots of checks into file-handling
 //		  - Clear mod info fields when mod is de-selected
@@ -32,5 +31,5 @@
 #endif
 
-const string strInstallerVersion = "1.0";
+//const string strInstallerVersion = "1.0";
 const bool SPLIT = 1;
 const bool NOT_SPLIT = 0;
@@ -326,5 +325,22 @@
 		create_directory((path)"../GameDataFolder/IGMD");
 		copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
-		setProgressBar( 1000 ); 
+		setProgressBar( 1000 );
+		
+		// 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/
+		
+		// CIP:then copy persist.dat and keyconfig.txt into edition/ as well
+		
+#ifndef WIN32
+		/* 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).
+		   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,
+		   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 */
+		path fullAEpath = system_complete("."); // get full path for Installer
+		char prefsCommand[300] = "defaults write com.godgames.oni RetailInstallationPath -string '";
+		strcat(prefsCommand, fullAEpath.parent_path().parent_path().string().c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF)
+		strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters
+		system(prefsCommand);
+		
+#endif
+		
 		setStatusArea((string)"Done! Now select your mod packages and click install.");
 		//	while(1) Sleep(-1);
@@ -1284,5 +1300,6 @@
 		YesNoDialog->ShowModal();
 		OptionsPanel->Show();
-		this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+2);
+		this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1);
+		this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1);
 	}
 }
@@ -1546,5 +1563,5 @@
 void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event )
 {
-	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);
+	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);
 
 	if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no...
