Index: /AE/Installer/trunk/source/about_window.cpp
===================================================================
--- /AE/Installer/trunk/source/about_window.cpp	(revision 324)
+++ /AE/Installer/trunk/source/about_window.cpp	(revision 324)
@@ -0,0 +1,182 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        about_window.cpp
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     08/05/2009 11:10:32
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+////@begin includes
+////@end includes
+
+#include "about_window.h"
+
+////@begin XPM images
+////@end XPM images
+
+
+/*
+ * About type definition
+ */
+
+IMPLEMENT_DYNAMIC_CLASS( About, wxDialog )
+
+
+/*
+ * About event table definition
+ */
+
+BEGIN_EVENT_TABLE( About, wxDialog )
+
+////@begin About event table entries
+////@end About event table entries
+
+END_EVENT_TABLE()
+
+
+/*
+ * About constructors
+ */
+
+About::About()
+{
+    Init();
+}
+
+About::About( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+    Init();
+    Create(parent, id, caption, pos, size, style);
+}
+
+
+/*
+ * About creator
+ */
+
+bool About::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+////@begin About creation
+    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
+    wxDialog::Create( parent, id, caption, pos, size, style );
+
+    CreateControls();
+    if (GetSizer())
+    {
+        GetSizer()->SetSizeHints(this);
+    }
+    Centre();
+////@end About creation
+    return true;
+}
+
+
+/*
+ * About destructor
+ */
+
+About::~About()
+{
+////@begin About destruction
+////@end About destruction
+}
+
+
+/*
+ * Member initialisation
+ */
+
+void About::Init()
+{
+////@begin About member initialisation
+////@end About member initialisation
+}
+
+
+/*
+ * Control creation for About
+ */
+
+void About::CreateControls()
+{    
+////@begin About content construction
+    About* itemDialog1 = this;
+
+    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
+    itemDialog1->SetSizer(itemBoxSizer2);
+
+    wxPanel* itemPanel3 = new wxPanel( itemDialog1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
+    itemBoxSizer2->Add(itemPanel3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+    wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
+    itemPanel3->SetSizer(itemBoxSizer4);
+
+    wxStaticText* itemStaticText5 = new wxStaticText( itemPanel3, wxID_STATIC, _("Mod Installer v1.0\nby Gumby and Iritscen\n\nThe AE was made possible by:\nNeo - Writing OniSplit, documenting Oni, and lots of technical support\nSsg - Documenting Oni\ngeyser - Guiding the AE work, creating original installer\nSFeLi - Writing the original Daodan DLL\nRossyMiles - Porting the Daodan DLL to C\nGumby - name any AE work you've done here or remove your name\nLoser - Fine-tuning tons of animations\nEdT - Making the BGI troops"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
+    itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL, 5);
+
+    wxStaticLine* itemStaticLine6 = new wxStaticLine( itemPanel3, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+    itemBoxSizer4->Add(itemStaticLine6, 0, wxGROW|wxALL, 5);
+
+    wxStaticText* itemStaticText7 = new wxStaticText( itemPanel3, wxID_STATIC, _("oni.bungie.org"), wxDefaultPosition, wxDefaultSize, 0 );
+    itemBoxSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+    wxStdDialogButtonSizer* itemStdDialogButtonSizer8 = new wxStdDialogButtonSizer;
+
+    itemBoxSizer4->Add(itemStdDialogButtonSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+    wxButton* itemButton9 = new wxButton( itemPanel3, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
+    itemStdDialogButtonSizer8->AddButton(itemButton9);
+
+    itemStdDialogButtonSizer8->Realize();
+
+////@end About content construction
+}
+
+
+/*
+ * Should we show tooltips?
+ */
+
+bool About::ShowToolTips()
+{
+    return true;
+}
+
+/*
+ * Get bitmap resources
+ */
+
+wxBitmap About::GetBitmapResource( const wxString& name )
+{
+    // Bitmap retrieval
+////@begin About bitmap retrieval
+    wxUnusedVar(name);
+    return wxNullBitmap;
+////@end About bitmap retrieval
+}
+
+/*
+ * Get icon resources
+ */
+
+wxIcon About::GetIconResource( const wxString& name )
+{
+    // Icon retrieval
+////@begin About icon retrieval
+    wxUnusedVar(name);
+    return wxNullIcon;
+////@end About icon retrieval
+}
Index: /AE/Installer/trunk/source/about_window.h
===================================================================
--- /AE/Installer/trunk/source/about_window.h	(revision 324)
+++ /AE/Installer/trunk/source/about_window.h	(revision 324)
@@ -0,0 +1,93 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        about_window.h
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     08/05/2009 11:10:32
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _ABOUT_H_
+#define _ABOUT_H_
+
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+#include "wx/statline.h"
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_ABOUT 10020
+#define ID_PANEL2 10021
+#define SYMBOL_ABOUT_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
+#define SYMBOL_ABOUT_TITLE _("About AE")
+#define SYMBOL_ABOUT_IDNAME ID_ABOUT
+#define SYMBOL_ABOUT_SIZE wxSize(400, 300)
+#define SYMBOL_ABOUT_POSITION wxDefaultPosition
+////@end control identifiers
+
+
+/*!
+ * About class declaration
+ */
+
+class About: public wxDialog
+{    
+    DECLARE_DYNAMIC_CLASS( About )
+    DECLARE_EVENT_TABLE()
+
+public:
+    /// Constructors
+    About();
+    About( wxWindow* parent, wxWindowID id = SYMBOL_ABOUT_IDNAME, const wxString& caption = SYMBOL_ABOUT_TITLE, const wxPoint& pos = SYMBOL_ABOUT_POSITION, const wxSize& size = SYMBOL_ABOUT_SIZE, long style = SYMBOL_ABOUT_STYLE );
+
+    /// Creation
+    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_ABOUT_IDNAME, const wxString& caption = SYMBOL_ABOUT_TITLE, const wxPoint& pos = SYMBOL_ABOUT_POSITION, const wxSize& size = SYMBOL_ABOUT_SIZE, long style = SYMBOL_ABOUT_STYLE );
+
+    /// Destructor
+    ~About();
+
+    /// Initialises member variables
+    void Init();
+
+    /// Creates the controls and sizers
+    void CreateControls();
+
+////@begin About event handler declarations
+
+////@end About event handler declarations
+
+////@begin About member function declarations
+
+    /// Retrieves bitmap resources
+    wxBitmap GetBitmapResource( const wxString& name );
+
+    /// Retrieves icon resources
+    wxIcon GetIconResource( const wxString& name );
+////@end About member function declarations
+
+    /// Should we show tooltips?
+    static bool ShowToolTips();
+
+////@begin About member variables
+////@end About member variables
+};
+
+#endif
+    // _ABOUT_H_
Index: /AE/Installer/trunk/source/app_resources.cpp
===================================================================
--- /AE/Installer/trunk/source/app_resources.cpp	(revision 324)
+++ /AE/Installer/trunk/source/app_resources.cpp	(revision 324)
@@ -0,0 +1,83 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     06/05/2009 08:47:16
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+////@begin includes
+////@end includes
+
+#include "app_resources.h"
+
+////@begin XPM images
+////@end XPM images
+
+/*!
+ * Resource functions
+ */
+
+////@begin AppResources resource functions
+
+/*
+ * Menubar creation function for ID_MENUBAR
+ */
+
+wxMenuBar* AppResources::CreateMenuMenubar()
+{
+    wxMenuBar* menuBar = new wxMenuBar;
+    wxMenu* itemMenu2 = new wxMenu;
+    itemMenu2->Append(Open, _("Open"), wxEmptyString, wxITEM_NORMAL);
+    menuBar->Append(itemMenu2, _("File"));
+    wxMenu* itemMenu4 = new wxMenu;
+    menuBar->Append(itemMenu4, _("Menu"));
+    wxMenu* itemMenu5 = new wxMenu;
+    menuBar->Append(itemMenu5, _("Menu"));
+    wxMenu* itemMenu6 = new wxMenu;
+    menuBar->Append(itemMenu6, _("Menu"));
+    return menuBar;
+}
+
+////@end AppResources resource functions
+
+/*!
+ * Get bitmap resources
+ */
+
+wxBitmap AppResources::GetBitmapResource( const wxString& name )
+{
+    // Bitmap retrieval
+////@begin AppResources bitmap retrieval
+    wxUnusedVar(name);
+    return wxNullBitmap;
+////@end AppResources bitmap retrieval
+}
+
+/*!
+ * Get icon resources
+ */
+
+wxIcon AppResources::GetIconResource( const wxString& name )
+{
+    wxUnusedVar(name);
+    // Icon retrieval
+////@begin AppResources icon retrieval
+    wxUnusedVar(name);
+    return wxNullIcon;
+////@end AppResources icon retrieval
+}
Index: /AE/Installer/trunk/source/app_resources.h
===================================================================
--- /AE/Installer/trunk/source/app_resources.h	(revision 324)
+++ /AE/Installer/trunk/source/app_resources.h	(revision 324)
@@ -0,0 +1,48 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     06/05/2009 08:47:17
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _APP_RESOURCES_H_
+#define _APP_RESOURCES_H_
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define Open 10002
+#define ID_MENU 10003
+#define ID_MENU1 10004
+////@end control identifiers
+
+class AppResources
+{
+public:
+    AppResources() {}
+
+/*!
+ * Resource functions
+ */
+
+////@begin AppResources resource functions
+    /// Menubar creation function for ID_MENUBAR
+    static wxMenuBar* CreateMenuMenubar();
+
+    /// Retrieves bitmap resources
+    static wxBitmap GetBitmapResource( const wxString& name );
+
+    /// Retrieves icon resources
+    static wxIcon GetIconResource( const wxString& name );
+////@end AppResources resource functions
+
+};
+
+#endif
+    // _APP_RESOURCES_H_
Index: /AE/Installer/trunk/source/fileopen.xpm
===================================================================
--- /AE/Installer/trunk/source/fileopen.xpm	(revision 324)
+++ /AE/Installer/trunk/source/fileopen.xpm	(revision 324)
@@ -0,0 +1,57 @@
+/* XPM */
+static const char * fileopen_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 36 1",
+"6 c #9BACC2",
+"< c #9AEA53",
+"9 c #94A5BD",
+"5 c #839CB5",
+"; c #4D7492",
+". c #376485",
+"$ c #7F99B4",
+"r c #D1D9E5",
+"7 c #EAEDF3",
+"@ c #CAD2DC",
+"% c #718BA7",
+"t c #BECAD9",
+"& c #65839D",
+"0 c #DCE2EA",
+"4 c #F5F6F7",
+"w c #597B9A",
+"O c #8DA0B9",
+"  c None",
+"+ c #467291",
+"u c #305F81",
+"= c #B4C4D3",
+"# c #CAE2AA",
+"1 c #FAFCFE",
+"3 c #A8B6CA",
+"q c #E4E9ED",
+"8 c #EEF1F3",
+"X c #215579",
+"2 c #7F97B0",
+": c #B3BFD1",
+"y c #7A90AC",
+", c #C2CBDB",
+"- c #ADD668",
+"* c #B6D791",
+"e c #CAD6E1",
+"o c #DFF0D0",
+"> c #BBC4D6",
+/* pixels */
+"                ",
+"     ....       ",
+"XXXXX .oo.      ",
+"XOOOO+@.#o.     ",
+"XOOOO$%&.*oXXX  ",
+"XOOOOOOO.*oX=X  ",
+"XOXXXX...-oXXXX;",
+"XOX:>,.<<<<<oX1;",
+"X2X3:>,.<<<oX4=;",
+"XX563:>>.<oX78; ",
+"XXO963:>>.X0q7; ",
+"Xw2O963:>>er0t; ",
+"X&y2O963:>,er;  ",
+"uXXXXXXXXXXXX;  ",
+"                "
+};
Index: /AE/Installer/trunk/source/filesaveas.xpm
===================================================================
--- /AE/Installer/trunk/source/filesaveas.xpm	(revision 324)
+++ /AE/Installer/trunk/source/filesaveas.xpm	(revision 324)
@@ -0,0 +1,44 @@
+/* XPM */
+static const char * filesaveas_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 23 1",
+"X c Black",
+"+ c #FFFFFF",
+"< c #D5D6D8",
+"> c #446A8C",
+"3 c #CAD2DC",
+", c #C0C7D1",
+"  c #5F666D",
+"* c #A5B0BA",
+"O c #65839D",
+"1 c #DCE2EA",
+"2 c #C3C5C8",
+": c #E1E6EE",
+". c #FFFF00",
+"- c #C6CCD3",
+"@ c None",
+"& c #305F81",
+"4 c #D6DFE7",
+"; c #D2D9E0",
+"= c #B7BFC7",
+"o c #1B4467",
+"$ c #BCBDBE",
+"# c #7A90AC",
+"% c #5D7C93",
+/* pixels */
+"         .X .XX.",
+" oO+++++++.X.X.@",
+" #O+$$$$$XX...XX",
+" #O++++++.......",
+" #O+$$$$$XX...XX",
+" #O+++++++.X.X.@",
+" ##%%%%%%.X%.X .",
+" ############# @",
+" ###&&&&&&&&## @",
+" ##&***=-;:+&# @",
+" ##&*o>>-;:+&# @",
+" ##&*o>>,<1+&# @",
+" ##&*o>>234+&# @",
+" ##&224+++++&# @",
+"@             @@"
+};
Index: /AE/Installer/trunk/source/installer.cpp
===================================================================
--- /AE/Installer/trunk/source/installer.cpp	(revision 324)
+++ /AE/Installer/trunk/source/installer.cpp	(revision 324)
@@ -0,0 +1,865 @@
+/*
+ AE/Mod Installer
+ v1.0
+ by Gumby and Iritscen
+ */
+
+#define DEBUG
+#include <stdio.h>
+//#include <conio.h>
+//#include <process.h>
+#include <string>
+#include <iostream>
+#include <cctype>
+#include <vector>
+#include <fstream>
+#include <errno.h>
+#include <sstream>
+
+#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations
+
+#include "installer.h"
+
+#ifdef WIN32
+#include <windows.h>
+#else // assume we're on Mac
+#include <stdlib.h>
+#include <dirent.h>
+#endif
+
+const string strInstallerVersion = "1.0";
+const bool SPLIT = 1;
+const bool NOT_SPLIT = 0;
+bool splitInstances = SPLIT;
+
+#ifdef WIN32
+const string strOniSplit = "Onisplit.exe";
+string strImportOption = "-import:nosep";
+const char* strClsCmd = "cls";
+const char* strPauseCmd = "PAUSE";
+#else // set up Mac equivalents since we're in Mac OS
+const string strOniSplit = "mono Onisplit.exe";
+string strImportOption = "-import:sep";
+const char* strClsCmd = "clear";
+const char* strPauseCmd = "read -n 1 -p \"Press any key to continue\"";
+#endif
+
+using namespace boost::filesystem; 
+using namespace std;
+
+
+/*
+ int main(void)
+ {
+ if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) splitInstances = NOT_SPLIT;
+ else splitInstances = NOT_SPLIT;
+ //	SetConsoleTitle("AE Installer"); windows junk, convert to SDL
+ #ifdef WIN32	
+ system("color 0A"); 
+ #endif
+ cout << "\nWelcome to the AE installer!\n";
+ cout << "\nWhat would you like to do?\n";
+ 
+ return mainMenu();
+ }
+ */
+
+
+
+int mainMenu(void)
+{
+	char choice = '0';
+	bool exit = false;
+	int err = 0;
+	do
+	{
+		if( exists( "../GameDataFolder" ) ) {
+			cout << "\n1. Add new packages\n";
+			cout << "2. Remove packages\n";
+			cout << "3. See what is installed\n";
+			cout << "4. Globalize data\n";
+			cout << "5. About AE\n";
+			cout << "6. Quit\n\n";
+			
+			choice = cin.get();
+			cin.ignore(128, '\n');
+			switch(choice)
+			{
+				case '1':
+					err = installPackages();
+					break;
+				case '2':
+					err = uninstallPackages();
+					break;
+				case '3':
+					err = listInstalledPackages();
+					break;
+				case '4':
+					err = globalizeData();
+					break;
+				case '5':
+					err = printInstallerInfo();
+					break;
+				case '6':
+					exit = true;
+					break;
+				default:
+					cout << "Please choose one of the above numbers, and press Enter.\n\n";
+			}
+			if (err) // if something fatal happened
+				exit = true;
+		}
+		else {
+			cout << "\n1. Globalize data\n";
+			cout << "2. About AE\n";
+			cout << "3. Quit\n\n";
+			
+			choice = cin.get();
+			cin.ignore(128, '\n');
+			switch(choice)
+			{
+				case '1':
+					err = globalizeData();
+					break;
+				case '2':
+					err = printInstallerInfo();
+					break;
+				case '3':
+					exit = true;
+					break;
+				default:
+					cout << "Please choose one of the above numbers, and press Enter.\n\n";
+			}
+			if (err) // if something fatal happened
+				exit = true;
+		}
+	} while(!exit);
+	
+	return err;
+}
+
+int globalizeData(void)
+{
+	int err = 0;
+	
+	try {
+		int levels[15] = {0, 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19}; // the levels Oni has
+		char choice = 0;
+		
+		//SetCurrentDirectory("C:/Program Files/Oni/edition/install");
+		char levelnum[3];
+		path Characters = "../GameDataFolder/level0_Characters";
+		path Particles = "../GameDataFolder/level0_Particles";
+		path Archive = "../GameDataFolder/Archive";
+		path Textures  = "../GameDataFolder/level0_Textures";
+		path Sounds = "../GameDataFolder/level0_Sounds";
+		path Animations = "../GameDataFolder/level0_Animations";
+		path TRAC = Animations / "level0_TRAC";
+		path TRAM = Animations / "level0_TRAM";
+		/*
+		 if (exists("../GameDataFolder/"))
+		 {
+		 //cout << "\nIt looks like you've already globalized Oni's data.\nDo you want to re-globalize?\n(This will erase existing mods installed to the AE's game data.)"
+		 //	 << "\n1. Re-globalize"
+		 //	 << "\n2. Return to main menu\n";
+		 //choice = cin.get();
+		 cin.ignore(128, '\n');
+		 if (choice == '1')
+		 remove_all("../GameDataFolder"); // remove AE GDF
+		 if (choice == '2')
+		 return 0;
+		 }
+		 */
+		create_directory( "../GameDataFolder/" );
+		create_directory( "packages" );
+		if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
+		create_directory( "packages/VanillaDats" );
+		
+		create_directory( "packages/VanillaDats/level0_Final/" );
+		create_directory( Characters );
+		create_directory( Particles );
+		create_directory( Archive );
+		create_directory( Textures );
+		create_directory( Sounds );
+		create_directory( Animations );
+		create_directory( TRAC );
+		create_directory( TRAM );
+		
+		for(int i = 0; i < 15; i++)
+		{
+			sprintf(levelnum,"%d",levels[i]); // int to char array
+			exists("../../GameDataFolder/level" + (string)levelnum + "_Final");
+			system((strOniSplit + " -export ../GameDataFolder/level" + (string)levelnum + "_Final ../../GameDataFolder/level" + (string)levelnum + "_Final.dat").c_str());
+			
+			create_directory( "packages/VanillaDats/level" + (string)levelnum + "_Final" ); //remember to cast your arrays as strings :)
+			create_directory( "packages/VanillaDats/level" + (string)levelnum + "_Final/level" + (string)levelnum + "_Final" );
+			
+			directory_iterator end_iter;
+			for ( directory_iterator dir_itr( "../GameDataFolder/level" + (string)levelnum + "_Final" ); dir_itr != end_iter; ++dir_itr )
+			{
+				//cout << dir_itr->path().filename();
+				if ( is_regular_file( dir_itr->status() ) )
+				{
+					
+					if ( dir_itr->path().filename().substr(0,8) == "TXMPfail" || 
+						dir_itr->path().filename().substr(0,9) == "TXMPlevel" ||
+						( dir_itr->path().filename().substr(0,4) == "TXMP" && dir_itr->path().filename().find("intro")!=string::npos) ||
+						dir_itr->path().filename().substr(0,4) == "TXMB" || 
+						dir_itr->path().filename() == "M3GMpowerup_lsi.oni" ||
+						dir_itr->path().filename() == "TXMPlsi_icon.oni" ||
+						( dir_itr->path().filename().substr(0,4) == "TXMB" && dir_itr->path().filename().find("splash_screen.oni")!=string::npos)	)
+					{
+						cout <<dir_itr->path().filename() << "\n";
+						create_directory( dir_itr->path().parent_path() / "NoGlobal");	
+						if(!exists( dir_itr->path().parent_path() / "NoGlobal" / dir_itr->filename())) rename(dir_itr->path(), dir_itr->path().parent_path() / "NoGlobal" /
+																											  dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "TRAC") {
+						cout <<dir_itr->path().filename() << "\n";
+						if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "TRAM") {
+						cout <<dir_itr->path().filename() << "\n";
+						if(!exists( TRAM / dir_itr->filename())) rename(dir_itr->path(), TRAM / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "ONSK" ||
+							 dir_itr->path().filename().substr(0,4) == "TXMP") {
+						cout <<dir_itr->path().filename() << "\n";\
+						create_directory( dir_itr->path().parent_path() / "TexFix");	
+						if(!exists( Textures / dir_itr->filename())) rename(dir_itr->path(), Textures / dir_itr->filename());
+						//rename(dir_itr->path(), dir_itr->path().parent_path() / "TexFix" / dir_itr->filename());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "ONCC" 
+							 || dir_itr->path().filename().substr(0,4) == "TRBS"
+							 || dir_itr->path().filename().substr(0,4) == "TRMA"
+							 || dir_itr->path().filename().substr(0,4) == "TRSC"
+							 || dir_itr->path().filename().substr(0,4) == "TRAS") {
+						cout <<dir_itr->path().filename() << "\n";
+						if(!exists( Characters / dir_itr->filename())) rename(dir_itr->path(), Characters / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "OSBD"
+							 || dir_itr->path().filename().substr(0,4) == "SNDD") {
+						cout << dir_itr->path().filename() << "\n";
+						if(!exists( Sounds / dir_itr->filename())) rename(dir_itr->path(), Sounds / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,5) == "BINA3"
+							 || dir_itr->path().filename().substr(0,10) == "M3GMdebris"
+							 || dir_itr->path().filename() == "M3GMtoxic_bubble.oni"
+							 || dir_itr->path().filename().substr(0,8) == "M3GMelec"
+							 || dir_itr->path().filename().substr(0,7) == "M3GMrat"
+							 || dir_itr->path().filename().substr(0,7) == "M3GMjet"
+							 || dir_itr->path().filename().substr(0,9) == "M3GMbomb_"
+							 || dir_itr->path().filename() == "M3GMbarab_swave.oni"
+							 || dir_itr->path().filename() == "M3GMbloodyfoot.oni"
+							 ){
+						cout <<dir_itr->path().filename() << "\n";
+						if(!exists( Particles / dir_itr->filename())) rename(dir_itr->path(), Particles / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+					else if (dir_itr->path().filename().substr(0,4) == "AGDB"
+							 || dir_itr->path().filename().substr(0,4) == "TRCM") {
+						cout <<dir_itr->path().filename() << "\n";
+						
+						if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename());
+						else remove(dir_itr->path());
+					}
+				}
+				
+				
+			}
+			system( (strOniSplit + " -move:delete " + Textures.string() + " ../GameDataFolder/level" + (string)levelnum + "_Final/TXMP*.oni").c_str());
+			
+		}
+		
+		for (int i = 0; i < 15; i++)
+		{
+			sprintf(levelnum,"%d",levels[i]);
+			system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levelnum + "_Final packages/VanillaDats/level" + levelnum + "_Final/level"
+					 + levelnum + "_Final/level" + levelnum + "_Final.oni").c_str());
+		}
+		path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
+		path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
+		path VanillaTextures  = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
+		path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
+		path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
+		path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
+		path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
+		create_directory( VanillaCharacters.parent_path() );
+		create_directory( VanillaParticles.parent_path() );
+		create_directory( VanillaTextures.parent_path() );
+		create_directory( VanillaSounds.parent_path() );
+		create_directory( VanillaAnimations.remove_filename() );
+		system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str());
+		system((strOniSplit + " " + strImportOption + " " + Particles.string() + " " + VanillaParticles.string()).c_str());
+		system((strOniSplit + " " + strImportOption + " " + Textures.string() + " " + VanillaTextures.string()).c_str());
+		//system((strOniSplit	+ " " + strImportOption + (string)" " + Animations.string() + (string)" " + VanillaAnimations.string()).c_str());
+		system((strOniSplit + " " + strImportOption + " " + TRAC.string() + " " + VanillaTRAC.string()).c_str());
+		system((strOniSplit + " " + strImportOption + " " + Sounds.string() + " " + VanillaSounds.string()).c_str());
+		system((strOniSplit + " " + strImportOption + " " + TRAM.string() + " " + VanillaTRAM.string()).c_str());
+		
+		create_directory("../GameDataFolder/IGMD");
+		copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
+	}
+	catch (exception ex) {
+		cout << ex.what();
+	}
+	return err;
+}
+
+int installPackages(void)
+{
+	bool installed_something = 0;
+	int err = 0;
+	ModPackage package;
+	vector<string> installed_packages;
+	vector<ModPackage> packages; 
+	vector<ModPackage>::iterator iter;
+	vector<string> installString;
+	
+	iter = packages.begin();
+	packages = getPackages();
+	vector<string> installedMods = getInstallString();
+	
+	if (packages.empty())
+	{
+		cout << "Error: You have no packages!\n";
+		return 0;
+	}
+	
+	cout << "Detecting installed packages...\n";
+	
+	int index = 1;
+	char choice = '0';
+	
+	for (vector<ModPackage>::iterator package_iter = packages.begin(); package_iter != packages.end(); ++package_iter)
+	{
+		if (!binary_search(installedMods.begin(), installedMods.end(), package_iter->modStringName))
+		{ //package_iter->isInstalled :< I forgot about this...
+			//cout << index << " ";
+			system(strClsCmd);
+			cout << (*package_iter).name << "\n";
+			for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << '-';
+			cout << "\n"
+			<< (*package_iter).readme << "\n\n"
+			<< "Please enter a number choice\n"
+			<< " 1. Add\n"
+			<< " 2. Don't Add\n"
+			<< "";
+			index++;
+			choice = 0;
+			
+			do
+			{
+				choice = cin.get();
+				cin.ignore(1280, '\n');
+			} while(choice == 0);
+			
+			if (choice == '1')
+			{
+				cout << "\nInstalling...\n\n";
+				if (package_iter->hasOnis || (package_iter->hasDeltas /*(*package_iter).isUnpacked */ ))
+				{
+					installed_something = 1;
+					installedMods.push_back(package_iter->modStringName);
+					system(strPauseCmd);
+				}
+			}
+		}
+	}
+	if (index == 1)
+	{
+		cout << "Warning: All packages are already installed\n";
+		//would you like to recombine your data?
+		return 0;
+	}
+	if (installed_something == 0)
+	{
+		cout << "Warning: You didn't add anything!\n";
+		//would you like to recombine your data?
+		return 0;
+	}
+	
+	sort(installedMods.begin(), installedMods.end());
+	//system(Onisplit.c_str());
+	recompileAll(installedMods);
+	system(strPauseCmd);
+	
+	return err;
+}
+
+int uninstallPackages(void)
+{
+	int err = 0;
+	ModPackage package;
+	vector<string> installed_packages;
+	vector<ModPackage> packages; 
+	vector<ModPackage>::iterator iter;
+	vector<string> installString;
+	
+	iter = packages.begin();
+	packages = getPackages();
+	
+	
+	cout << "Detecting installed packages...\n";
+	
+	vector<string> installedMods = getInstallString();
+	
+	if (packages.empty())
+	{
+		cout << "Error: You have no packages!\n";
+		return 0;
+	}
+	
+	int index = 0;
+	int uninstalled_something = 0;
+	char choice = '0';
+	
+	for (vector<ModPackage>::iterator package_iter = packages.begin(); package_iter != packages.end(); ++package_iter)
+	{
+		if (binary_search(installedMods.begin(), installedMods.end(), package_iter->modStringName))
+		{ //package_iter->isInstalled :< I forgot about this...
+			//cout << index << " ";
+			system(strClsCmd);
+			cout << (*package_iter).name << "\n";
+			for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << '-';
+			cout << "\n"
+			<< (*package_iter).readme << "\n\n"
+			<< "Please enter a number choice\n"
+			<< " 1. Remove\n"
+			<< " 2. Don't Remove\n"
+			<< "";
+			
+			choice = 0;
+			
+			do
+			{
+				choice = cin.get();
+				cin.ignore(1280, '\n');
+			} while(choice == 0);
+			
+			if (choice == '1')
+			{
+				cout << "\nUninstalling...\n\n";
+				installedMods.erase( installedMods.begin() + (index) );
+				system(strPauseCmd);
+				uninstalled_something = 1; 
+				
+			}
+			else {
+				index++;
+			}
+		}
+	}
+	if ( uninstalled_something == 0 )
+	{
+		if (index == 0) //bad practice, I need to implement a second vector or something. Meh.
+		{
+			cout << "\nWarning: You have no installed packages!";
+		}
+		else
+		{
+			cout << "\nWarning: You didn't remove anything!";
+		}
+		//would you like to recombine your data?
+		return 0;
+		
+	}	
+	sort(installedMods.begin(), installedMods.end());
+	//system(Onisplit.c_str());
+	recompileAll(installedMods);
+	system(strPauseCmd);
+	
+	return err;
+}
+
+int listInstalledPackages(void)
+{
+	cout << "\nThis feature not yet implemented.\n\n";
+	
+	return 0;
+}
+
+int printInstallerInfo(void)
+{
+	cout << "\nAE/Mod Installer\n";
+	cout << "version " << strInstallerVersion << "\n";
+	cout << "by Gumby & Iritscen\n";
+	cout << "see http://oni.bungie.org/community/forums for more info\n\n";
+	
+	return 0;
+}
+
+vector<ModPackage> getPackages(void)
+{
+	vector<ModPackage> packages;
+	packages.reserve(65536); // come on, we shouldn't need this much space...right?!
+	fstream file;
+	string filename = "\0";
+	string MODINFO_CFG = "Mod_Info.cfg";
+	
+	try
+	{
+		directory_iterator end_iter;
+		for (directory_iterator dir_itr("./packages"); dir_itr != end_iter; ++dir_itr)
+		{
+			file.open((dir_itr->path().string() + "/" + MODINFO_CFG).c_str());
+			//cout << filename << "\n";
+			
+			if(!file.fail())
+			{
+				//cout << dir_itr->path().string() + MODINFO_CFG;
+				//would prefer to push a pointer to a package, but this will do for now
+				packages.push_back(fileToModPackage(file));
+			}	
+			file.close();
+			file.clear();
+		}
+	}
+	catch (const std::exception & ex)
+	{
+		cout << "Warning, something odd happened!\n";
+	}
+	
+	return packages;
+}
+
+ModPackage fileToModPackage(fstream &file)
+{
+	/*
+	 This converts a file to a ModPackage struct.
+	 
+	 A few notes...
+	 "iter" is the current word we are on. I should have named it "token" or something, but I don't have multiple iterators, so its ok.
+	 I refer to (*iter) at the beginning of each if statement block. I could probably store it as a variable, but I'm pretty sure that dereferencing a pointer\iterator isn't much
+	 slower than reading a variable.
+	 */
+	ModPackage package;
+	string line;
+	static string NameOfMod = "NameOfMod";	//used for comparing to the current token...
+	//I could have done it in reverse (*iter).compare("ModString") or  
+	static string ARROW = "->";				//did something like "ModString".compare(*iter), and it would have been
+	static string ModString = "ModString";	//functionably the same. 
+	static string HasOnis = "HasOnis";
+	static string HasDeltas = "HasDeltas";
+	static string HasBSL = "HasBSL";
+	static string HasDats = "HasDats";
+	static string IsEngine = "IsEngine";
+	static string Readme = "Readme";
+	static string GlobalNeeded = "GlobalNeeded";
+	static string Category = "Category";
+	static string Creator = "Creator";
+	while (! file.eof() )
+	{
+		getline (file,line);
+		vector<string> tokens; 
+		vector<string>::iterator iter;
+		tokenize(line, tokens);					//string to vector of "words"
+		if (tokens.capacity() >= 2) {			//make sure they are using enough stuff
+			iter = tokens.begin();				//what word we are on, starts at first word
+			/*
+			 if (!AEInstallVersion.compare(*iter))
+			 If mod is too old, skip this mod.
+			 */
+			/*else*/if (!NameOfMod.compare(*iter))  {	//if it contains the name
+				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
+					if (ARROW.compare(*iter) && NameOfMod.compare(*iter)) {			//ignores "->" and "NameOfMod"
+						//cout << *iter; 
+						//cout << " ";
+						package.name += *iter + " ";
+					}
+				}
+				
+			}
+			else if (!ModString.compare(*iter)) {
+				iter++; iter++;
+				package.modStringName = *iter;
+				iter++;
+				package.modStringVersion = atoi((*iter).c_str());
+			}
+			else if (!HasOnis.compare(*iter)) {
+				iter++; iter++;  
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasOnis = 1; //Gotta love c++'s lack of a standard case-insensitive
+				else if (!HasBSL.compare(*iter)) { // string comparer...I know my implementation here sucks. I need to change it to check each character one by one. At the moment,
+				iter++; iter++;}  // using "YFR" would probably set it off. :<
+				
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasBSL = 1;
+			}
+			else if (!HasDeltas.compare(*iter)) {
+				iter++; iter++;  
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasDeltas = 1;
+			}
+			else if (!HasDats.compare(*iter)) {
+				iter++; iter++;  
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasDats = 1;
+			}
+			else if (!IsEngine.compare(*iter)) {
+				iter++; iter++;  
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.isEngine = 1;
+			}
+			else if (!GlobalNeeded.compare(*iter)) {
+				iter++; iter++;  
+				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.globalNeeded = 1;
+				else if (toupper((*iter)[0]) + toupper((*iter)[1]) == 'N' + 'O') package.globalNeeded = 1; //Really the only place where checking for "No" is important atm.
+			}
+			else if (!Category.compare(*iter))  {	
+				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
+					if (ARROW.compare(*iter) && Category.compare(*iter)) {			//ignores "->" and "Category"
+						//cout << *iter; 
+						//cout << " ";
+						package.category += *iter + " ";
+					}
+				}
+			}
+			else if (!Creator.compare(*iter))  {	//if it contains the name
+				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
+					if (ARROW.compare(*iter) && Creator.compare(*iter)) {			//ignores "->" and "Category"
+						//cout << *iter; 
+						//cout << " ";
+						package.creator += *iter + " ";
+					}
+				}
+			}
+			else if (!Readme.compare(*iter))  {	//if it contains the name
+				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
+					if (ARROW.compare(*iter) && Readme.compare(*iter)) {			//ignores "->" and "Category"
+						if(!(*iter).compare("\\n")) package.readme += '\n';
+						else package.readme += *iter + " ";
+					}
+				}
+			}
+		}
+		
+	}
+	package.doOutput();
+	return package;
+}
+
+void recompileAll(vector<string> installedMods)
+{
+#ifdef WIN32
+	RedirectIOToConsole(); 
+	HWND hWnd = GetConsoleWindow(); 
+	ShowWindow( hWnd, SW_HIDE ); 
+#endif
+	setStatusArea("Importing levels...");
+	//setStatusArea("Recompiling Data...");
+	path vanilla_dir = "./packages/VanillaDats/";
+	string importCommand = "";
+	char statusString[128];
+	int numberOfDats = 0;
+	int j = 1;
+	string datString;
+	std::stringstream out;
+	
+	
+	clearOldDats();
+	remove("Onisplit.log");
+	if(splitInstances == SPLIT){
+		recursive_directory_iterator end_iter;
+		
+		for ( recursive_directory_iterator dir_itr( vanilla_dir );
+			 dir_itr != end_iter;
+			 ++dir_itr )
+		{
+			try{
+				if ( is_directory( dir_itr->status() ) &&  dir_itr.level() == 1)
+				{
+					numberOfDats++;
+				}
+			}
+			catch(exception ex) {
+				
+			}
+		}
+		
+		//recursive_directory_iterator end_iter;
+		
+		
+		out << numberOfDats;
+		datString = out.str();
+		try {
+			for ( recursive_directory_iterator dir_itr( vanilla_dir );
+				 dir_itr != end_iter;
+				 ++dir_itr )
+			{
+				try
+				{
+					if ( is_directory( dir_itr->status() ) &&  dir_itr.level() == 1)
+					{
+						importCommand = strOniSplit + " " + strImportOption + " " + dir_itr->path().parent_path().string() + '/' + dir_itr->path().filename();
+						for (int i = 0; i < installedMods.size(); ++i) {
+							if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename()  ))
+								importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename();
+							
+							//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/";
+						}
+						importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Onisplit.log";
+						
+						sprintf(statusString,"%d/%i\0",j,numberOfDats);	
+						setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats
+						setStatusArea("Importing " +  dir_itr->path().filename() + " " + statusString);
+						
+						system(importCommand.c_str());
+						//Sleep(1000);
+						//cout << importCommand << "\n";
+						j++;
+						
+					}
+				}
+				catch ( const std::exception & ex )
+				{
+					cout << "Warning, exception " << ex.what() << "!";
+				}
+			}
+			
+		}
+		catch( const std::exception & ex ) {
+			cout << "Warning, exception " << ex.what() << "!\n"
+			<< "You probably need to re-globalize.";
+			//create_directory( "./packages/VanillaDats" );
+		}
+		
+	}
+	else if(splitInstances == NOT_SPLIT){
+		directory_iterator end_iter;
+		
+		for ( directory_iterator dir_itr( vanilla_dir );
+			 dir_itr != end_iter;
+			 ++dir_itr )
+		{
+			
+			if ( is_directory( dir_itr->status() ) )
+			{
+				numberOfDats++;
+			}
+			
+			
+		}
+		
+		out << numberOfDats;
+		datString = out.str();
+		
+		for ( directory_iterator dir_itr( vanilla_dir );
+			 dir_itr != end_iter;
+			 ++dir_itr )
+		{
+			try
+			{
+				if ( is_directory( dir_itr->status() ) )
+				{
+					importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
+					+ ".dat";
+					for (int i = 0; i < installedMods.size(); ++i) {
+						if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
+							importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
+					}
+					importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat";
+					
+					sprintf(statusString,"%d/%i\0",j,numberOfDats);	
+					setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats
+					setStatusArea("Importing " +  dir_itr->path().filename() + " " + statusString);
+					
+					system(importCommand.c_str());
+					
+					j++;
+				}
+			}
+			catch ( const std::exception & ex )
+			{
+				cout << "Warning, something odd happened!\n";
+			}
+		}
+	}
+	writeInstalledMods(installedMods);
+	setProgressBar(1000);
+	setStatusArea("Done!");
+	sleep(1000);
+	setProgressBar(0);
+	
+}
+
+void writeInstalledMods(vector<string> installedMods)
+{
+	
+	if ( exists( strInstallCfg ) )
+	{
+		remove( strInstallCfg );
+	}
+	
+	ofstream file(strInstallCfg.c_str());
+	
+	vector<string>list = installedMods;
+	vector<string>::iterator begin_iter = list.begin(); 
+	vector<string>::iterator end_iter = list.end();
+	
+	sort( list.begin(), list.end() );
+	
+	for( ; begin_iter != end_iter; ++begin_iter) {
+		file << *begin_iter << " ";
+	}
+	
+	file.close();
+	file.clear();
+	
+}
+
+vector<string> getInstallString(string Cfg)
+{
+	//system(strPauseCmd);
+	vector<string> returnval;
+	
+	string line;
+	fstream file;
+	
+	if (exists( Cfg ))
+	{
+		file.open(Cfg.c_str());
+		getline(file, line);
+		tokenize(line, returnval);
+		file.close();
+		file.clear();
+		sort(returnval.begin(), returnval.end());
+	}
+	else cout << "fail";
+	
+	return returnval;
+}
+
+//stolen token function...
+void tokenize(const string& str, vector<string>& tokens, const string& delimiters)
+{
+	// Skip delimiters at beginning.
+	string::size_type lastPos = str.find_first_not_of(delimiters, 0);
+	// Find first "non-delimiter".
+	string::size_type pos     = str.find_first_of(delimiters, lastPos);
+	
+	while (string::npos != pos || string::npos != lastPos)
+	{
+		// Found a token, add it to the vector.
+		tokens.push_back(str.substr(lastPos, pos - lastPos));
+		// Skip delimiters.  Note the "not_of"
+		lastPos = str.find_first_not_of(delimiters, pos);
+		// Find next "non-delimiter"
+		pos = str.find_first_of(delimiters, lastPos);
+	}
+}
+
+void clearOldDats(void) {
+	directory_iterator end_iter_gdf;
+	for ( directory_iterator dir_itr_gdf( "../GameDataFolder" );
+		 dir_itr_gdf != end_iter_gdf;
+		 ++dir_itr_gdf )
+	{
+		//cout << dir_itr_gdf->path().extension() << "\n";
+		if ( dir_itr_gdf->path().extension() == ".dat" || dir_itr_gdf->path().extension() == ".raw" || dir_itr_gdf->path().extension() == ".sep" ) {
+			remove( dir_itr_gdf->path() );
+		}
+		
+	}
+	
+}
Index: /AE/Installer/trunk/source/installer.h
===================================================================
--- /AE/Installer/trunk/source/installer.h	(revision 324)
+++ /AE/Installer/trunk/source/installer.h	(revision 324)
@@ -0,0 +1,305 @@
+#pragma once 
+/* AE/Mod Installer header file */
+#ifndef DOUBLE_HEADER
+#define DOUBLE_HEADER
+
+
+#include <string>
+#include <vector>
+#include <fstream>
+
+using namespace std;
+
+static string SLASHSLASH = "//";
+static string DIRSLASH = "\\";
+string strInstallCfg = "../GameDataFolder/Add.cfg";
+
+
+
+#define STRUCT_DEFS 
+struct ModPackage
+{
+	bool	isInstalled; //replace with function 
+	string	name;
+	string	modStringName;
+	int	modStringVersion;
+	bool	hasOnis;
+	bool	hasDeltas;
+	bool	hasBSL;
+	bool	hasDats;
+	string	category;
+	string	creator;
+	bool	isEngine;
+	string	readme;
+	bool	globalNeeded;
+	ModPackage();
+	void doOutput()
+	{
+		cout << "Mod: " << name; cout << "\n"; // remove this when done
+		cout << "	String: " << modStringName << " v." << modStringVersion << "\n";
+		cout << "	Category: " << category << "\n";
+		cout << "	Creator: " << creator << "\n";
+		cout << "	HasOnis: " << hasOnis << "\n";
+		cout << "	HasBSL: " << hasBSL << "\n";
+		cout << "	HasDeltas: " << hasDeltas << "\n";
+		cout << "	HasDats: " << hasDats << "\n";
+		cout << "	IsEngine: " << isEngine << "\n";
+		cout << "	GlobalNeeded: " << globalNeeded << "\n";
+		cout << "	Readme: " << readme << "\n";
+		cout << "\n";
+	}
+	
+};
+
+#define METHOD_DEFS 
+// Initialization to default values
+ModPackage::ModPackage()
+{
+	isInstalled = true; // replace with function 
+	name = "";
+	modStringName = "";
+	modStringVersion = 0;
+	hasOnis = false;
+	hasDeltas = false;
+	hasBSL = false;
+	hasDats = false;
+	category = "";
+	creator = "";
+	isEngine = false;
+	readme = "";
+	globalNeeded = true;
+	//		void doOutput() const
+	//		{ };
+}
+
+#define FUNCTION_PROTOTYPES 
+int mainMenu(void);
+int globalizeData(void);
+int installPackages(void);
+int uninstallPackages(void);
+int listInstalledPackages(void);
+int printInstallerInfo(void);
+vector<ModPackage> getPackages(void);
+ModPackage fileToModPackage(fstream&);
+void recompileAll(vector<string>);
+vector<string> getInstallString(string = strInstallCfg);
+void tokenize(const string&, vector<string>&, const string& delimiters = " ");
+//bool getDirectoryContents(char , char &);
+void clearOldDats(void);
+void writeInstalledMods( vector<string> );
+void setStatusArea( string );
+void setProgressBar( int );
+
+//New copy(path, path) function. Too lazy to implement my own, this is basically how I would have done it though.
+//No, really. :)
+//Move to utilities.cpp when the time comes.
+using namespace boost::filesystem; 
+using namespace std;
+
+void copy_directory( const path & from_dir_ph, 
+					const path & to_dir_ph ); 
+
+void copy( const path & from_file_ph, 
+		  const path & to_file_ph ); 
+
+
+// this function copies files and directories. If copying a 
+// directory to a directory, it copies recursively. 
+
+//pardon the mess, I did this at midnight, and had to fix a bug
+void copy( const path & from_ph, 
+		  const path & to_ph ) 
+{ 
+	cout << to_ph.string() << "\n";
+	// Make sure that the destination, if it exists, is a directory 
+	if((exists(to_ph) && !is_directory(to_ph)) || (!exists(from_ph))) cout << "error";
+	if(!is_directory(from_ph)) 
+	{ 
+		
+		if(exists(to_ph)) 
+		{ 
+			copy_file(from_ph,to_ph/from_ph.filename()); 
+		} 
+		else 
+		{ 
+			try{
+				
+				copy_file(from_ph,to_ph);
+			}
+			catch (exception ex){
+				cout << from_ph.string() << " to " << to_ph.string() << "\n";
+			}
+		}
+		
+	} 
+	else if(from_ph.filename() != ".svn")
+	{ 
+		path destination; 
+		if(!exists(to_ph)) 
+		{ 
+			destination=to_ph; 
+		} 
+		else 
+		{ 
+			destination=to_ph/from_ph.filename(); 
+		} 
+		//not sure what this did, its going away though. probably error checking ;)
+		//copy_directory(from_ph,destination); 
+		
+		for(directory_iterator i(from_ph); i!=directory_iterator(); ++i) 
+		{ 
+			//the idiot who coded this in the first place (not me)
+			//forgot to make a new directory. Exception city. x_x
+			create_directory(destination); 
+			copy(*i,destination/i->filename()); 
+		} 
+	} 
+} 
+
+void copy_directory( const path &from_dir_ph, 
+					const path &to_dir_ph) 
+{ 
+	if(!exists(from_dir_ph) || !is_directory(from_dir_ph) 
+	   || exists(to_dir_ph)) 
+		cout << !exists(from_dir_ph) << " " << !is_directory(from_dir_ph) 
+		<< " " << exists(to_dir_ph);
+	//boost::throw_exception( filesystem_error( 
+	//"boost::filesystem::copy_directory", 
+	//from_dir_ph, to_dir_ph, boost::system::error_code() )); 
+	
+# ifdef BOOST_POSIX 
+	struct stat from_stat; 
+	if ( (::stat( from_dir_ph.string().c_str(), &from_stat ) != 0) 
+		|| ::mkdir(to_dir_ph.native_directory_string().c_str(), 
+				   from_stat.st_mode)!=0) 
+# endif 
+		//	boost::throw_exception( filesystem_error( 
+		//	//"boost::filesystem::copy_directory", 
+		//	from_dir_ph, to_dir_ph, boost::system::error_code())); 
+		} 
+
+#endif
+
+#ifdef WIN32
+
+#ifndef __GUICON_H__
+
+#define __GUICON_H__
+
+
+
+void RedirectIOToConsole();
+
+
+
+#endif
+
+/* End of File */
+
+
+#include <windows.h>
+
+#include <stdio.h>
+
+#include <fcntl.h>
+
+#include <io.h>
+
+#include <iostream>
+
+#include <fstream>
+
+#ifndef _USE_OLD_IOSTREAMS
+
+using namespace std;
+
+#endif
+
+// maximum mumber of lines the output console should have
+
+static const WORD MAX_CONSOLE_LINES = 500;
+
+
+void RedirectIOToConsole()
+
+{
+	
+	int hConHandle;
+	
+	long lStdHandle;
+	
+	CONSOLE_SCREEN_BUFFER_INFO coninfo;
+	
+	FILE *fp;
+	
+	// allocate a console for this app
+	
+	AllocConsole();
+	
+	// set the screen buffer to be big enough to let us scroll text
+	
+	GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), 
+							   
+							   &coninfo);
+	
+	coninfo.dwSize.Y = MAX_CONSOLE_LINES;
+	
+	SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), 
+							   
+							   coninfo.dwSize);
+	
+	// redirect unbuffered STDOUT to the console
+	
+	lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
+	
+	hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+	
+	fp = _fdopen( hConHandle, "w" );
+	
+	*stdout = *fp;
+	
+	setvbuf( stdout, NULL, _IONBF, 0 );
+	
+	// redirect unbuffered STDIN to the console
+	
+	lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
+	
+	hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+	
+	fp = _fdopen( hConHandle, "r" );
+	
+	*stdin = *fp;
+	
+	setvbuf( stdin, NULL, _IONBF, 0 );
+	
+	// redirect unbuffered STDERR to the console
+	
+	lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
+	
+	hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+	
+	fp = _fdopen( hConHandle, "w" );
+	
+	*stderr = *fp;
+	
+	setvbuf( stderr, NULL, _IONBF, 0 );
+	
+	
+	// make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog 
+	
+	// point to console as well
+	
+	ios::sync_with_stdio();
+	
+}
+
+
+
+//End of File
+
+
+
+
+
+
+#endif
Index: /AE/Installer/trunk/source/main.cpp
===================================================================
--- /AE/Installer/trunk/source/main.cpp	(revision 324)
+++ /AE/Installer/trunk/source/main.cpp	(revision 324)
@@ -0,0 +1,120 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        main.cpp
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     07/05/2009 17:23:39
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+////@begin includes
+////@end includes
+
+#include "main.h"
+
+////@begin XPM images
+////@end XPM images
+
+
+/*
+ * Application instance implementation
+ */
+
+////@begin implement app
+IMPLEMENT_APP( AEInstallerApp )
+////@end implement app
+
+
+/*
+ * AEInstallerApp type definition
+ */
+
+IMPLEMENT_CLASS( AEInstallerApp, wxApp )
+
+
+/*
+ * AEInstallerApp event table definition
+ */
+
+BEGIN_EVENT_TABLE( AEInstallerApp, wxApp )
+
+////@begin AEInstallerApp event table entries
+////@end AEInstallerApp event table entries
+
+END_EVENT_TABLE()
+
+
+/*
+ * Constructor for AEInstallerApp
+ */
+
+AEInstallerApp::AEInstallerApp()
+{
+    Init();
+}
+
+
+/*
+ * Member initialisation
+ */
+
+void AEInstallerApp::Init()
+{
+////@begin AEInstallerApp member initialisation
+////@end AEInstallerApp member initialisation
+}
+
+/*
+ * Initialisation for AEInstallerApp
+ */
+
+bool AEInstallerApp::OnInit()
+{    
+////@begin AEInstallerApp initialisation
+	// Remove the comment markers above and below this block
+	// to make permanent changes to the code.
+
+#if wxUSE_XPM
+	wxImage::AddHandler(new wxXPMHandler);
+#endif
+#if wxUSE_LIBPNG
+	wxImage::AddHandler(new wxPNGHandler);
+#endif
+#if wxUSE_LIBJPEG
+	wxImage::AddHandler(new wxJPEGHandler);
+#endif
+#if wxUSE_GIF
+	wxImage::AddHandler(new wxGIFHandler);
+#endif
+	MainWindow* mainWindow = new MainWindow( NULL );
+	mainWindow->Show(true);
+////@end AEInstallerApp initialisation
+
+    return true;
+}
+
+
+/*
+ * Cleanup for AEInstallerApp
+ */
+
+int AEInstallerApp::OnExit()
+{    
+////@begin AEInstallerApp cleanup
+	return wxApp::OnExit();
+////@end AEInstallerApp cleanup
+}
+
Index: /AE/Installer/trunk/source/main.h
===================================================================
--- /AE/Installer/trunk/source/main.h	(revision 324)
+++ /AE/Installer/trunk/source/main.h	(revision 324)
@@ -0,0 +1,81 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        main.h
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     07/05/2009 17:23:39
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _AEINSTALLERAPP_H_
+#define _AEINSTALLERAPP_H_
+
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+#include "wx/image.h"
+#include "main_window.h"
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+////@end control identifiers
+
+/*!
+ * AEInstallerApp class declaration
+ */
+
+class AEInstallerApp: public wxApp
+{    
+    DECLARE_CLASS( AEInstallerApp )
+    DECLARE_EVENT_TABLE()
+
+public:
+    /// Constructor
+    AEInstallerApp();
+
+    void Init();
+
+    /// Initialises the application
+    virtual bool OnInit();
+
+    /// Called on exit
+    virtual int OnExit();
+
+////@begin AEInstallerApp event handler declarations
+
+////@end AEInstallerApp event handler declarations
+
+////@begin AEInstallerApp member function declarations
+
+////@end AEInstallerApp member function declarations
+
+////@begin AEInstallerApp member variables
+////@end AEInstallerApp member variables
+};
+
+/*!
+ * Application instance declaration 
+ */
+
+////@begin declare app
+DECLARE_APP(AEInstallerApp)
+////@end declare app
+
+#endif
+    // _AEINSTALLERAPP_H_
Index: /AE/Installer/trunk/source/main_window.cpp
===================================================================
--- /AE/Installer/trunk/source/main_window.cpp	(revision 324)
+++ /AE/Installer/trunk/source/main_window.cpp	(revision 324)
@@ -0,0 +1,771 @@
+#include "installer.cpp"
+
+vector<string> globalInstalledMods;
+vector<ModPackage> globalPackages;
+#include "boost/thread.hpp"
+#include <boost/thread/mutex.hpp>
+
+/////////////////////////////////////////////////////////////////////////////
+// Name:        main_window.cpp
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     07/05/2009 20:38:25
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+////@begin includes
+#include "about_window.h"
+////@end includes
+
+#include "main_window.h"
+
+////@begin XPM images
+#include "redo.xpm"
+#include "fileopen.xpm"
+#include "filesaveas.xpm"
+#include "quit.xpm"
+////@end XPM images
+
+//#define wxDebug 1;
+//#define wxUSE_UNICODE 1;
+
+/*
+ * MainWindow type definition
+ */
+
+IMPLEMENT_CLASS( MainWindow, wxFrame )
+
+
+/*
+ * MainWindow event table definition
+ */
+
+BEGIN_EVENT_TABLE( MainWindow, wxFrame )
+
+////@begin MainWindow event table entries
+    EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
+
+    EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
+
+    EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
+    EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
+
+    EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
+
+    EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
+
+    EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
+
+    EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
+
+    EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected )
+
+    EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
+
+    EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
+
+    EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
+
+    EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
+
+    EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
+
+    EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
+
+    EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
+
+////@end MainWindow event table entries
+
+END_EVENT_TABLE()
+
+
+/*
+ * MainWindow constructors
+ */
+
+MainWindow::MainWindow()
+{
+    Init();
+}
+
+MainWindow::MainWindow( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+    Init();
+    Create( parent, id, caption, pos, size, style );
+}
+
+
+/*
+ * MainWindow creator
+ */
+
+bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
+{
+////@begin MainWindow creation
+    wxFrame::Create( parent, id, caption, pos, size, style );
+
+    CreateControls();
+    SetIcon(GetIconResource(wxT("oni_special.ico")));
+    Centre();
+////@end MainWindow creation
+    return true;
+}
+
+
+/*
+ * MainWindow destructor
+ */
+
+MainWindow::~MainWindow()
+{
+////@begin MainWindow destruction
+////@end MainWindow destruction
+}
+
+
+/*
+ * Member initialisation
+ */
+
+void MainWindow::Init()
+{
+////@begin MainWindow member initialisation
+    MainSplitter = NULL;
+    SelectAll = NULL;
+    RefreshButton = NULL;
+    Mods_CheckboxList = NULL;
+    titleText = NULL;
+    creatorText = NULL;
+    descriptionText = NULL;
+    StatusArea = NULL;
+    ProgressBar = NULL;
+    InstallButton = NULL;
+    OptionsPanel = NULL;
+    SepRadio = NULL;
+    NoSepRadio = NULL;
+    SeparatedRadio = NULL;
+    CompleteRadio = NULL;
+    ReglobalizeButton = NULL;
+////@end MainWindow member initialisation
+
+}
+
+
+/*
+ * Control creation for MainWindow
+ */
+wxStatusBar* TheStatusBar;
+wxButton* TheInstallButton;
+wxGauge* TheProgressBar;
+void MainWindow::CreateControls()
+{    
+////@begin MainWindow content construction
+    MainWindow* itemFrame1 = this;
+
+    wxMenuBar* menuBar = new wxMenuBar;
+    wxMenu* itemMenu37 = new wxMenu;
+    {
+        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
+        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
+        menuItem->SetBitmap(bitmap);
+        itemMenu37->Append(menuItem);
+    }
+    {
+        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
+        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
+        menuItem->SetBitmap(bitmap);
+        itemMenu37->Append(menuItem);
+    }
+    itemMenu37->AppendSeparator();
+    {
+        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
+        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
+        menuItem->SetBitmap(bitmap);
+        itemMenu37->Append(menuItem);
+    }
+    menuBar->Append(itemMenu37, _("&File"));
+    wxMenu* itemMenu42 = new wxMenu;
+    itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
+    menuBar->Append(itemMenu42, _("Options"));
+    wxMenu* itemMenu44 = new wxMenu;
+    itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL);
+    itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
+    menuBar->Append(itemMenu44, _("Help"));
+    itemFrame1->SetMenuBar(menuBar);
+
+    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
+    itemFrame1->SetSizer(itemBoxSizer2);
+
+    MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
+    MainSplitter->SetMinimumPaneSize(150);
+    MainSplitter->SetName(_T("MainSplitter"));
+
+    wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
+    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
+    itemPanel4->SetSizer(itemBoxSizer5);
+
+    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
+    itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
+    SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
+    SelectAll->SetValue(false);
+    SelectAll->SetName(_T("SelectAll_Checkbox"));
+    itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+    RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
+    RefreshButton->SetName(_T("RefreshButton"));
+    itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
+
+    wxArrayString Mods_CheckboxListStrings;
+    Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
+    Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
+    itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
+
+    wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
+    itemPanel10->SetName(_T("DescriptionHolder_Panel"));
+    wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
+    itemPanel10->SetSizer(itemBoxSizer11);
+
+    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
+    itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
+    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
+    titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+    titleText->SetName(_T("Title_Text"));
+    titleText->SetBackgroundColour(wxColour(240, 240, 240));
+    itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
+
+    wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
+    creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
+    creatorText->SetName(_T("Author_Text"));
+    creatorText->SetBackgroundColour(wxColour(240, 240, 240));
+    itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
+
+    wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+    itemStaticLine17->Show(false);
+    itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
+
+    descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 );
+    descriptionText->SetName(_T("DescriptionName"));
+    descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
+    itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
+
+    MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150);
+    itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
+
+    StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
+    StatusArea->SetName(_T("StatusArea"));
+    StatusArea->SetFieldsCount(1);
+    StatusArea->SetStatusText(_("Status Area"), 0);
+    itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
+
+    wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
+    itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
+
+    ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH );
+    ProgressBar->SetValue(0);
+    itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
+
+    InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 );
+    itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
+
+    wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
+
+    OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
+    itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
+
+    wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
+    OptionsPanel->SetSizer(itemBoxSizer25);
+
+    wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
+
+    SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+    SepRadio->SetValue(false);
+    if (MainWindow::ShowToolTips())
+        SepRadio->SetToolTip(_("For PC Demo and Mac"));
+    itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
+
+    NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
+    NoSepRadio->SetValue(false);
+    if (MainWindow::ShowToolTips())
+        NoSepRadio->SetToolTip(_("For PC Retail"));
+    itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
+
+    wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+    itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
+
+    wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
+
+    SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+    SeparatedRadio->SetValue(false);
+    SeparatedRadio->SetName(_T("Separated_RadioButton"));
+    itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
+
+    CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
+    CompleteRadio->SetValue(false);
+    CompleteRadio->SetName(_T("Complete_RadioButton"));
+    itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
+
+    wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+    itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
+
+    wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
+    itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+    ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
+    ReglobalizeButton->SetName(_T("Reglobalize_Button"));
+    itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
+
+    // Connect events and objects
+    Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
+////@end MainWindow content construction
+	
+	if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
+		static_cast<string>("-import:sep");
+		splitInstances = NOT_SPLIT;
+	}
+	else {
+		static_cast<string>("-import:nosep");
+		splitInstances = SPLIT;
+	}
+
+	globalPackages = getPackages();
+	globalInstalledMods = getInstallString();
+		for (int i = 0; i < globalPackages.size(); i++) {
+			Mods_CheckboxList->Append(globalPackages[i].name.c_str());
+			if( binary_search(globalInstalledMods.begin(), globalInstalledMods.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i);
+	}
+		TheStatusBar = StatusArea;
+		TheInstallButton = InstallButton;
+		TheProgressBar = ProgressBar;
+		OptionsPanel->Hide();
+		if(splitInstances == SPLIT) SeparatedRadio->SetValue(true);
+		else CompleteRadio->SetValue(true);
+		
+		
+		
+		if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true);
+		else SepRadio->SetValue(true);
+
+			//MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight() );
+}
+
+		
+/*
+ * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for SelectAll_Checkbox
+ */
+
+void MainWindow::OnSelectAllCheckboxClick( wxCommandEvent& event )
+{
+		switch(SelectAll->Get3StateValue()) {
+	case wxCHK_UNCHECKED:
+		for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false);
+		//SelectAll->Set3StateValue(wxCHK_CHECKED);
+		break;
+	case wxCHK_CHECKED:
+		for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, true);
+		//SelectAll->Set3StateValue(wxCHK_UNCHECKED);
+		break;
+	case wxCHK_UNDETERMINED:
+		for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false);
+		//SelectAll->Set3StateValue(wxCHK_CHECKED);
+		break;
+
+	}
+	
+}
+
+
+/*
+ * wxEVT_CREATE event handler for Mods_CheckboxList
+ */
+
+void MainWindow::ModList_OnCreate( wxWindowCreateEvent& event )
+{
+
+
+}
+
+
+/*
+ * Should we show tooltips?
+ */
+
+bool MainWindow::ShowToolTips()
+{
+    return true;
+}
+
+/*
+ * Get bitmap resources
+ */
+
+wxBitmap MainWindow::GetBitmapResource( const wxString& name )
+{
+    // Bitmap retrieval
+////@begin MainWindow bitmap retrieval
+    wxUnusedVar(name);
+    if (name == _T("redo.xpm"))
+    {
+        wxBitmap bitmap(redo_xpm);
+        return bitmap;
+    }
+    else if (name == _T("fileopen.xpm"))
+    {
+        wxBitmap bitmap( fileopen_xpm);
+        return bitmap;
+    }
+    else if (name == _T("filesaveas.xpm"))
+    {
+        wxBitmap bitmap( filesaveas_xpm);
+        return bitmap;
+    }
+    else if (name == _T("quit.xpm"))
+    {
+        wxBitmap bitmap( quit_xpm);
+        return bitmap;
+    }
+    return wxNullBitmap;
+////@end MainWindow bitmap retrieval
+}
+
+/*
+ * Get icon resources
+ */
+
+wxIcon MainWindow::GetIconResource( const wxString& name )
+{
+    // Icon retrieval
+////@begin MainWindow icon retrieval
+    wxUnusedVar(name);
+    if (name == _T("oni_special.ico"))
+    {
+        wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO);
+        return icon;
+    }
+    return wxNullIcon;
+////@end MainWindow icon retrieval
+}
+
+
+/*
+ * wxEVT_COMMAND_LISTBOX_SELECTED event handler for Mods_CheckboxList1
+ */
+
+void MainWindow::OnModsCheckboxList1Selected( wxCommandEvent& event )
+{
+	//event.GetSelection
+	titleText->SetLabel(wxT(globalPackages[event.GetSelection()].name.c_str()));
+	creatorText->SetLabel(globalPackages[event.GetSelection()].creator.c_str());
+	descriptionText->SetLabel(globalPackages[event.GetSelection()].readme.c_str());
+
+	creatorText->Refresh();
+}
+
+
+/*
+ * wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event handler for Mods_CheckboxList1
+ */
+
+void MainWindow::OnModsCheckboxList1Toggled( wxCommandEvent& event )
+{
+	SelectAll->Set3StateValue(wxCHK_UNDETERMINED);
+	if(event.GetInt()) {
+	/*
+		switch(SelectAll->Get3StateValue()) {
+	case wxCHK_UNCHECKED:
+		break;
+	case wxCHK_CHECKED:
+		break;
+	case wxCHK_UNDETERMINED :
+		break;
+	}
+	*/
+	}
+}
+
+
+/*
+ * wxEVT_COMMAND_MENU_SELECTED event handler for wxID_OPTIONS
+ */
+
+void MainWindow::OnOptionsClick( wxCommandEvent& event )
+{
+	
+	if (!event.GetInt() ) {
+		OptionsPanel->Hide(); 
+		MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
+	else {
+		OptionsPanel->Show();
+		MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight());
+	}
+}
+
+
+/*
+ * wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT
+ */
+
+void MainWindow::OnExitClick( wxCommandEvent& event )
+{
+exit(0);
+}
+
+
+/*
+ * wxEVT_COMMAND_BUTTON_CLICKED event handler for Install_Button
+ */
+
+
+struct recompile
+{
+    recompile(vector<string> localPackages) : thePackages(localPackages) { }
+    void operator()()
+    {
+		TheInstallButton->Disable();
+       recompileAll(thePackages);
+	   TheInstallButton->Enable();
+    }
+
+    vector<string> thePackages;
+};
+
+void MainWindow::OnInstallButtonClick( wxCommandEvent& event )
+{
+	
+	vector<string> localPackages;
+	localPackages.push_back("Globalize");
+	for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName );
+	if ( !localPackages.empty() )	{
+		
+		//MainWindow::MainWindow().Hide();	
+	//	boost::thread thrd2(recompileAll(localPackages) );
+		//MainWindow::MainWindow().Show();
+    recompile packages(localPackages);
+    boost::thread thrd(packages);
+
+	}
+	
+	
+}
+
+void setStatusArea( string s ) {
+	TheStatusBar->SetStatusText(_(s.c_str()));
+	
+		//MainWindow::MainWindow().SetSize(MainWindow::MainWindow().GetRect().GetWidth(), MainWindow::MainWindow().GetRect().GetHeight()+1);
+						
+	//MainWindow::StatusBar->SetLabel("Importing Files...");
+	//StatusBar->SetLabel(s);
+//->SetLabel(s);
+	
+}
+
+void setProgressBar( int i ) {
+//TheProgressBar->SetValue(
+
+	TheProgressBar->SetValue(i);
+
+}
+
+
+/*
+ * wxEVT_UPDATE_UI event handler for ID_STATUSBAR
+ */
+
+void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event )
+{
+////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
+    // Before editing this code, remove the block markers.
+    event.Skip();
+////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow. 
+}
+
+
+/*
+ * wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT
+ */
+
+void MainWindow::OnAboutClick( wxCommandEvent& event )
+{
+////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
+    // Before editing this code, remove the block markers.
+    About* window = new About(this);
+    int returnValue = window->ShowModal();
+    window->Destroy();
+////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow. 
+}
+
+
+/*
+ * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
+ */
+
+void MainWindow::OnNoSepRadioButtonSelected( wxCommandEvent& event )
+{
+	static_cast<string>("-import:nosep");
+}
+
+
+/*
+ * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Sep_RadioButton
+ */
+
+void MainWindow::OnSepRadioButtonSelected( wxCommandEvent& event )
+{
+	static_cast<string>("-import:sep");
+}
+
+
+/*
+ * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
+ */
+
+void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event )
+{
+splitInstances = SPLIT;
+
+}
+
+
+/*
+ * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
+ */
+
+void MainWindow::OnCompleteRadioButtonSelected( wxCommandEvent& event )
+{
+splitInstances = NOT_SPLIT;
+
+}
+
+
+/*
+ * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON
+ */
+
+void MainWindow::OnRefreshButtonClick( wxCommandEvent& event )
+{
+	refreshMods(globalInstalledMods);
+}
+
+
+/*
+ * wxEVT_COMMAND_MENU_SELECTED event handler for wxID_LOAD
+ */
+
+
+
+
+void MainWindow::refreshMods (vector<string> s) {
+	
+	Mods_CheckboxList->Clear();
+					   //globalInstalledMods = getPackages();
+		for (int i = 0; i < globalPackages.size(); i++) {
+			Mods_CheckboxList->Append(globalPackages[i].name.c_str());
+			if( binary_search(s.begin(), s.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i);
+			//else Mods_CheckboxList->Check(i,0);
+		
+		}
+}
+
+void MainWindow::OnLoadClick( wxCommandEvent& event )
+{
+	static const wxChar *FILETYPES = _T(
+		"Mod Loadouts (*.cfg)|*.cfg|"
+		"All files (*.*)|*.*"
+	);
+	
+	wxFileDialog* openFileDialog =
+		new wxFileDialog( this, _("Open Mod Loadout"), "", "", FILETYPES,
+		                  wxOPEN, wxDefaultPosition);
+ 
+	if ( openFileDialog->ShowModal() == wxID_OK )
+	{
+		refreshMods(getInstallString( string(openFileDialog->GetPath()) ));
+	}
+
+
+}
+
+
+/*
+ * wxEVT_COMMAND_MENU_SELECTED event handler for wxID_SAVE
+ */
+
+void MainWindow::OnSaveClick( wxCommandEvent& event )
+{
+	static const wxChar *FILETYPES = _T(
+		"Mod Loadouts (*.cfg)|*.cfg|"
+		"All files (*.*)|*.*"
+	);
+
+		wxFileDialog* openFileDialog =
+		new wxFileDialog( this, _("Open file"), "", "", FILETYPES,
+		wxSAVE, wxDefaultPosition);
+
+	if ( openFileDialog->ShowModal() == wxID_OK )
+	{
+
+		
+			//Mods_CheckboxList->
+
+
+
+		//
+		
+		if ( exists( openFileDialog->GetPath().c_str() ) )
+	{
+		remove( openFileDialog->GetPath().c_str() );
+	}
+
+	ofstream file(openFileDialog->GetPath().c_str());
+	
+	vector<string>list;
+	for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) list.push_back( globalPackages[i].modStringName );
+	vector<string>::iterator begin_iter = list.begin(); 
+	vector<string>::iterator end_iter = list.end();
+
+	sort( list.begin(), list.end() );
+
+	for( ; begin_iter != end_iter; ++begin_iter) {
+		file << *begin_iter << " ";
+	}
+	
+	file.close();
+	file.clear();
+
+		//SetCurrentFilename(openFileDialog->GetFilename());
+		//theText->LoadFile(openFileDialog->GetFilename());
+		//SetStatusText(GetCurrentFilename(), 0);
+		//SetStatusText(openFileDialog->GetDirectory(),1);
+	}
+}
+
+
+/*
+ * wxEVT_COMMAND_BUTTON_CLICKED event handler for ReGlobalize_Button
+ */
+
+void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event )
+{
+globalizeData();
+		setProgressBar(1000);
+		setStatusArea("Done!");
+}
+
Index: /AE/Installer/trunk/source/main_window.h
===================================================================
--- /AE/Installer/trunk/source/main_window.h	(revision 324)
+++ /AE/Installer/trunk/source/main_window.h	(revision 324)
@@ -0,0 +1,191 @@
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Name:        main_window.h
+// Purpose:     
+// Author:      
+// Modified by: 
+// Created:     07/05/2009 20:38:25
+// RCS-ID:      
+// Copyright:   
+// Licence:     
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MAINWINDOW_H_
+#define _MAINWINDOW_H_
+
+
+/*!
+ * Includes
+ */
+
+////@begin includes
+#include "wx/frame.h"
+#include "wx/splitter.h"
+#include "wx/statline.h"
+#include "wx/statusbr.h"
+////@end includes
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+class wxSplitterWindow;
+class wxStatusBar;
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_MAINWINDOW 10000
+#define ID_SPLITTERWINDOW 10001
+#define ID_PANEL 10011
+#define SelectAll_Checkbox 10012
+#define Refresh_Button 10007
+#define Mods_CheckboxList1 10002
+#define DescriptionHolder_Panel 10003
+#define Title_Text 10005
+#define Author_Text 10004
+#define Description_Text 10022
+#define ID_STATUSBAR 10008
+#define ProgressBar_Gauge 10009
+#define Install_Button 10010
+#define ID_PANEL1 10019
+#define Sep_RadioButton 10013
+#define NoSep_RadioButton 10014
+#define Separated_RadioButton 10015
+#define Complete_RadioButton 10016
+#define ReGlobalize_Button 10018
+#define wxID_LOAD 10006
+#define wxID_OPTIONS 10017
+#define SYMBOL_MAINWINDOW_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX
+#define SYMBOL_MAINWINDOW_TITLE _("Installer")
+#define SYMBOL_MAINWINDOW_IDNAME ID_MAINWINDOW
+#define SYMBOL_MAINWINDOW_SIZE wxSize(400, 500)
+#define SYMBOL_MAINWINDOW_POSITION wxDefaultPosition
+////@end control identifiers
+
+
+/*!
+ * MainWindow class declaration
+ */
+
+using namespace std;
+
+#include <vector>
+
+class MainWindow: public wxFrame
+{    
+    DECLARE_CLASS( MainWindow )
+    DECLARE_EVENT_TABLE()
+
+public:
+    /// Constructors
+    MainWindow();
+    MainWindow( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE, const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
+
+    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE, const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
+
+    /// Destructor
+    ~MainWindow();
+
+    /// Initialises member variables
+    void Init();
+
+    /// Creates the controls and sizers
+    void CreateControls();
+
+////@begin MainWindow event handler declarations
+
+    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for SelectAll_Checkbox
+    void OnSelectAllCheckboxClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Refresh_Button
+    void OnRefreshButtonClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for Mods_CheckboxList1
+    void OnModsCheckboxList1Selected( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event handler for Mods_CheckboxList1
+    void OnModsCheckboxList1Toggled( wxCommandEvent& event );
+
+    /// wxEVT_CREATE event handler for Mods_CheckboxList1
+    void ModList_OnCreate( wxWindowCreateEvent& event );
+
+    /// wxEVT_UPDATE_UI event handler for ID_STATUSBAR
+    void OnStatusbarUpdate( wxUpdateUIEvent& event );
+
+    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Install_Button
+    void OnInstallButtonClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Sep_RadioButton
+    void OnSepRadioButtonSelected( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
+    void OnNoSepRadioButtonSelected( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
+    void OnSeparatedRadioButtonSelected( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
+    void OnCompleteRadioButtonSelected( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ReGlobalize_Button
+    void OnReGlobalizeButtonClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_LOAD
+    void OnLoadClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_SAVE
+    void OnSaveClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT
+    void OnExitClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_OPTIONS
+    void OnOptionsClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT
+    void OnAboutClick( wxCommandEvent& event );
+
+////@end MainWindow event handler declarations
+
+////@begin MainWindow member function declarations
+
+    /// Retrieves bitmap resources
+    wxBitmap GetBitmapResource( const wxString& name );
+
+    /// Retrieves icon resources
+    wxIcon GetIconResource( const wxString& name );
+////@end MainWindow member function declarations
+
+    /// Should we show tooltips?
+    static bool ShowToolTips();
+
+////@begin MainWindow member variables
+    wxSplitterWindow* MainSplitter;
+    wxCheckBox* SelectAll;
+    wxBitmapButton* RefreshButton;
+    wxCheckListBox* Mods_CheckboxList;
+    wxTextCtrl* titleText;
+    wxTextCtrl* creatorText;
+    wxTextCtrl* descriptionText;
+    wxStatusBar* StatusArea;
+    wxGauge* ProgressBar;
+    wxButton* InstallButton;
+    wxPanel* OptionsPanel;
+    wxRadioButton* SepRadio;
+    wxRadioButton* NoSepRadio;
+    wxRadioButton* SeparatedRadio;
+    wxRadioButton* CompleteRadio;
+    wxButton* ReglobalizeButton;
+////@end MainWindow member variables
+
+	void refreshMods( vector<string> );
+};
+
+#endif
+    // _MAINWINDOW_H_
Index: Installer/trunk/source/methods.h
===================================================================
--- /AE/Installer/trunk/source/methods.h	(revision 323)
+++ 	(revision )
@@ -1,171 +1,0 @@
-/* AE/Mod Installer header file */
-
-#include <string>
-#include <vector>
-#include <fstream>
-
-using namespace std;
-
-static string SLASHSLASH = "//";
-static string DIRSLASH = "\\";
-
-#define STRUCT_DEFS 
-struct ModPackage
-{
-	bool	isInstalled; //replace with function 
-	string	name;
-	string	modStringName;
-	int	modStringVersion;
-	bool	hasOnis;
-	bool	hasDeltas;
-	bool	hasBSL;
-	bool	hasDats;
-	string	category;
-	string	creator;
-	bool	isEngine;
-	string	readme;
-	bool	globalNeeded;
-	ModPackage();
-	void doOutput()
-	{
-		cout << "Mod: " << name; cout << "\n"; // remove this when done
-		cout << "	String: " << modStringName << " v." << modStringVersion << "\n";
-		cout << "	Category: " << category << "\n";
-		cout << "	Creator: " << creator << "\n";
-		cout << "	HasOnis: " << hasOnis << "\n";
-		cout << "	HasBSL: " << hasBSL << "\n";
-		cout << "	HasDeltas: " << hasDeltas << "\n";
-		cout << "	HasDats: " << hasDats << "\n";
-		cout << "	IsEngine: " << isEngine << "\n";
-		cout << "	GlobalNeeded: " << globalNeeded << "\n";
-		cout << "	Readme: " << readme << "\n";
-		cout << "\n";
-	}
-
-};
-
-#define METHOD_DEFS 
-// Initialization to default values
-ModPackage::ModPackage()
-{
-	isInstalled = true; // replace with function 
-	name = "";
-	modStringName = "";
-	modStringVersion = 0;
-	hasOnis = false;
-	hasDeltas = false;
-	hasBSL = false;
-	hasDats = false;
-	category = "";
-	creator = "";
-	isEngine = false;
-	readme = "";
-	globalNeeded = true;
-	//		void doOutput() const
-	//		{ };
-}
-
-#define FUNCTION_PROTOTYPES 
-int mainMenu(void);
-int globalizeData(void);
-int installPackages(void);
-int uninstallPackages(void);
-int listInstalledPackages(void);
-int printInstallerInfo(void);
-vector<ModPackage> getPackages(void);
-ModPackage fileToModPackage(fstream&);
-void recompileAll(vector<string>);
-vector<string> getInstallString(void);
-void tokenize(const string&, vector<string>&, const string& delimiters = " ");
-//bool getDirectoryContents(char , char &);
-void clearOldDats(void);
-void writeInstalledMods( vector<string> );
-
-//New copy(path, path) function. Too lazy to implement my own, this is basically how I would have done it though.
-//No, really. :)
-//Move to utilities.cpp when the time comes.
-using namespace boost::filesystem; 
-using namespace std;
-
-void copy_directory( const path & from_dir_ph, 
- const path & to_dir_ph ); 
- 
- void copy( const path & from_file_ph, 
- const path & to_file_ph ); 
-
-
-// this function copies files and directories. If copying a 
-// directory to a directory, it copies recursively. 
-
- //pardon the mess, I did this at midnight, and had to fix a bug
-void copy( const path & from_ph, 
-		  const path & to_ph ) 
-{ 
-	cout << to_ph.string() << "\n";
-	// Make sure that the destination, if it exists, is a directory 
-	if((exists(to_ph) && !is_directory(to_ph)) || (!exists(from_ph))) cout << "error";
-	if(!is_directory(from_ph)) 
-	{ 
-		
-		if(exists(to_ph)) 
-		{ 
-			copy_file(from_ph,to_ph/from_ph.filename()); 
-		} 
-		else 
-		{ 
-			try{
-			
-			copy_file(from_ph,to_ph);
-			}
-			catch (exception ex){
-			cout << from_ph.string() << " to " << to_ph.string() << "\n";
-			}
-		}
-
-	} 
-	else if(from_ph.filename() != ".svn")
-	{ 
-		path destination; 
-		if(!exists(to_ph)) 
-		{ 
-			destination=to_ph; 
-		} 
-		else 
-		{ 
-			destination=to_ph/from_ph.filename(); 
-		} 
-		//not sure what this did, its going away though. probably error checking ;)
-		//copy_directory(from_ph,destination); 
-
-		for(directory_iterator i(from_ph); i!=directory_iterator(); ++i) 
-		{ 
-			//the idiot who coded this in the first place (not me)
-			//forgot to make a new directory. Exception city. x_x
-			create_directory(destination); 
-			copy(*i,destination/i->filename()); 
-		} 
-	} 
-} 
-
-void copy_directory( const path &from_dir_ph, 
-					const path &to_dir_ph) 
-{ 
-	if(!exists(from_dir_ph) || !is_directory(from_dir_ph) 
-		|| exists(to_dir_ph)) 
-		cout << !exists(from_dir_ph) << " " << !is_directory(from_dir_ph) 
-		<< " " << exists(to_dir_ph);
-		//boost::throw_exception( filesystem_error( 
-		//"boost::filesystem::copy_directory", 
-		//from_dir_ph, to_dir_ph, boost::system::error_code() )); 
-
-# ifdef BOOST_POSIX 
-	struct stat from_stat; 
-	if ( (::stat( from_dir_ph.string().c_str(), &from_stat ) != 0) 
-		|| ::mkdir(to_dir_ph.native_directory_string().c_str(), 
-		from_stat.st_mode)!=0) 
-# endif 
-	//	boost::throw_exception( filesystem_error( 
-	//	//"boost::filesystem::copy_directory", 
-	//	from_dir_ph, to_dir_ph, boost::system::error_code())); 
-} 
-
Index: /AE/Installer/trunk/source/quit.xpm
===================================================================
--- /AE/Installer/trunk/source/quit.xpm	(revision 324)
+++ /AE/Installer/trunk/source/quit.xpm	(revision 324)
@@ -0,0 +1,90 @@
+/* XPM */
+static const char * quit_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 69 1",
+"@ c Black",
+"i c #9AEA53",
+"D c #7E9BB1",
+"H c #839FB4",
+", c #B7C7D3",
+"8 c #BCCBD6",
+"7 c #C1CFDA",
+"v c #92ABBD",
+"- c #D0DBE2",
+"O c #547897",
+"+ c #376485",
+"L c #7090A8",
+"t c #AEC0CE",
+"g c #B3C4D1",
+"S c #84A0B4",
+"G c #89A4B8",
+"> c #BDCCD7",
+"F c #5A809C",
+"2 c #C2D0DA",
+"k c #93ACBE",
+"= c #D6E0E6",
+"* c #446A8C",
+"z c #A5B9C8",
+"# c #DEE5EB",
+"0 c #AFC1CE",
+"r c #B4C5D2",
+"p c #B9C9D5",
+"A c #8AA5B8",
+"M c #92AABD",
+"j c #A6BAC9",
+"K c #7796AC",
+"l c #ABBECC",
+"o c #E4EAEF",
+"9 c #B5C6D2",
+"  c None",
+"; c #C9D6DF",
+"X c #305F81",
+"m c #98AFC0",
+"V c #9DB3C3",
+"% c #D1DBE3",
+"u c #A2B7C6",
+"y c #A7BBCA",
+"h c #ACBFCD",
+"4 c #B6C7D3",
+"w c #C0CFD9",
+"d c #982106",
+"B c #85A0B5",
+"6 c #C8D4DE",
+"c c #99B0C1",
+"x c #9EB4C4",
+"$ c #D7E0E7",
+"q c #A8BCCA",
+"s c #ADC0CD",
+"3 c #BCCCD7",
+"N c #8BA5B9",
+": c #C4D1DB",
+"1 c #C9D5DE",
+"f c #9AB1C2",
+"n c #A4B9C8",
+"a c #B3C5D1",
+". c #215579",
+"J c #7D9AB0",
+"& c #829EB5",
+"e c #BBCAD6",
+"b c #8CA6B9",
+"Z c #91AABC",
+"C c #96AEC0",
+"< c #CFDAE2",
+"5 c #AFC2CF",
+/* pixels */
+" ..XXXXXXXXXX   ",
+" XoO+X@@@@@@X   ",
+" X#$%&X*@@@@X   ",
+" X=-;:>,X@@@X   ",
+" X<12345X@@@X   ",
+" X67890qX@XXX   ",
+" XwertyuX@XiX   ",
+" XpasddfX++iiX  ",
+" XghjddkXiiiiiX ",
+" XlzxcvbXiiiiiiX",
+" XnxmMNBXiiiiiX ",
+" XVCZASDXXXiiX  ",
+" XXFGHJKX XiX   ",
+"   FXXFLX XX    ",
+"      XX*       "
+};
Index: /AE/Installer/trunk/source/redo.xpm
===================================================================
--- /AE/Installer/trunk/source/redo.xpm	(revision 324)
+++ /AE/Installer/trunk/source/redo.xpm	(revision 324)
@@ -0,0 +1,25 @@
+/* XPM */
+static char *redo_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"    16    15        3            1",
+/* colors */
+". c #000080",
+"# c None",
+"a c #808080",
+/* pixels */
+"################",
+"################",
+"################",
+"################",
+"###a....########",
+"##a.####..###.##",
+"##.#######.#..##",
+"##.########...##",
+"##.#######....##",
+"##a.#####.....##",
+"###.a###########",
+"################",
+"################",
+"################",
+"################"
+};
Index: Installer/trunk/source/subs.cpp
===================================================================
--- /AE/Installer/trunk/source/subs.cpp	(revision 323)
+++ 	(revision )
@@ -1,788 +1,0 @@
-/*
- AE/Mod Installer
- v1.0
- by Gumby and Iritscen
-*/
-
-#define DEBUG
-
-#include <string>
-#include <iostream>
-#include <cctype>
-#include <vector>
-#include <fstream>
-#include <errno.h>
-#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations
-#include "methods.h"
-
-#ifdef WIN32
-	#include <windows.h>
-#else // assume we're on Mac
-	#include <stdlib.h>
-	#include <dirent.h>
-#endif
-
-const string strInstallerVersion = "1.0";
-const bool SPLIT = 1;
-const bool NOT_SPLIT = 0;
-bool splitInstances;
-
-#ifdef WIN32
-	const string strOniSplit = "Onisplit.exe";
-	const string strImportOption = "-import:nosep";
-	const char* strClsCmd = "cls";
-	const char* strPauseCmd = "PAUSE";
-#else // set up Mac equivalents since we're in Mac OS
-	const string strOniSplit = "mono Onisplit.exe";
-	const string strImportOption = "-import:sep";
-	const char* strClsCmd = "clear";
-	const char* strPauseCmd = "read -n 1 -p \"Press any key to continue\"";
-#endif
-
-using namespace boost::filesystem; 
-using namespace std;
-
-string strInstallCfg = "../GameDataFolder/Add.cfg";
-
-
-int main(void)
-{
-	if ( exists( "../GameDataFolder/level0_Final.sep" ) ) splitInstances = NOT_SPLIT;
-	else splitInstances = NOT_SPLIT;
-	//	SetConsoleTitle("AE Installer"); windows junk, convert to SDL
-#ifdef WIN32	
-	system("color 0A"); 
-#endif
-	cout << "\nWelcome to the AE installer!\n";
-	cout << "\nWhat would you like to do?\n";
-	
-	return mainMenu();
-}
-
-int mainMenu(void)
-{
-	char choice = '0';
-	bool exit = false;
-	int err = 0;
-	do
-	{
-		if( exists( "../GameDataFolder" ) ) {
-			cout << "\n1. Add new packages\n";
-			cout << "2. Remove packages\n";
-			cout << "3. See what is installed\n";
-			cout << "4. Globalize data\n";
-			cout << "5. About AE\n";
-			cout << "6. Quit\n\n";
-
-			choice = cin.get();
-			cin.ignore(128, '\n');
-			switch(choice)
-			{
-			case '1':
-				err = installPackages();
-				break;
-			case '2':
-				err = uninstallPackages();
-				break;
-			case '3':
-				err = listInstalledPackages();
-				break;
-			case '4':
-				err = globalizeData();
-				break;
-			case '5':
-				err = printInstallerInfo();
-				break;
-			case '6':
-				exit = true;
-				break;
-			default:
-				cout << "Please choose one of the above numbers, and press Enter.\n\n";
-			}
-			if (err) // if something fatal happened
-				exit = true;
-		}
-		else {
-			cout << "\n1. Globalize data\n";
-			cout << "2. About AE\n";
-			cout << "3. Quit\n\n";
-
-			choice = cin.get();
-			cin.ignore(128, '\n');
-			switch(choice)
-			{
-			case '1':
-				err = globalizeData();
-				break;
-			case '2':
-				err = printInstallerInfo();
-				break;
-			case '3':
-				exit = true;
-				break;
-			default:
-				cout << "Please choose one of the above numbers, and press Enter.\n\n";
-			}
-			if (err) // if something fatal happened
-				exit = true;
-		}
-	} while(!exit);
-
-return err;
-}
-
-int globalizeData(void)
-{
-	int err = 0;
-	
-	try {
-	int levels[15] = {0, 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19}; // the levels Oni has
-	char choice = 0;
-
-	//SetCurrentDirectory("C:/Program Files/Oni/edition/install");
-	char levelnum[3];
-	path Characters = "../GameDataFolder/level0_Characters";
-	path Particles = "../GameDataFolder/level0_Particles";
-	path Archive = "../GameDataFolder/Archive";
-	path Textures  = "../GameDataFolder/level0_Textures";
-	path Sounds = "../GameDataFolder/level0_Sounds";
-	path Animations = "../GameDataFolder/level0_Animations";
-	path TRAC = Animations / "level0_TRAC";
-	path TRAM = Animations / "level0_TRAM";
-	
-	if (exists("../GameDataFolder/"))
-	{
-		cout << "\nIt looks like you've already globalized Oni's data.\nDo you want to re-globalize?\n(This will erase existing mods installed to the AE's game data.)"
-			 << "\n1. Re-globalize"
-			 << "\n2. Return to main menu\n";
-		choice = cin.get();
-		cin.ignore(128, '\n');
-		if (choice == '1')
-			remove_all("../GameDataFolder"); // remove AE GDF
-		if (choice == '2')
-			return 0;
-	}
-
-	create_directory( "../GameDataFolder/" );
-	create_directory( "packages" );
-	if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
-	create_directory( "packages/VanillaDats" );
-	
-	create_directory( "packages/VanillaDats/level0_Final/" );
-	create_directory( Characters );
-	create_directory( Particles );
-	create_directory( Archive );
-	create_directory( Textures );
-	create_directory( Sounds );
-	create_directory( Animations );
-	create_directory( TRAC );
-	create_directory( TRAM );
-	
-	for(int i = 0; i < 15; i++)
-	{
-		sprintf(levelnum,"%d",levels[i]); // int to char array
-		exists("../../GameDataFolder/level" + (string)levelnum + "_Final");
-		system((strOniSplit + " -export ../GameDataFolder/level" + (string)levelnum + "_Final ../../GameDataFolder/level" + (string)levelnum + "_Final.dat").c_str());
-		
-		create_directory( "packages/VanillaDats/level" + (string)levelnum + "_Final" ); //remember to cast your arrays as strings :)
-		create_directory( "packages/VanillaDats/level" + (string)levelnum + "_Final/level" + (string)levelnum + "_Final" );
-		
-		directory_iterator end_iter;
-		for ( directory_iterator dir_itr( "../GameDataFolder/level" + (string)levelnum + "_Final" ); dir_itr != end_iter; ++dir_itr )
-		{
-			//cout << dir_itr->path().filename();
-			if ( is_regular_file( dir_itr->status() ) )
-			{
-				
-				if ( dir_itr->path().filename().substr(0,8) == "TXMPfail" || 
-					dir_itr->path().filename().substr(0,9) == "TXMPlevel" ||
-					( dir_itr->path().filename().substr(0,4) == "TXMP" && dir_itr->path().filename().find("intro")!=string::npos) ||
-					dir_itr->path().filename().substr(0,4) == "TXMB" || 
-					dir_itr->path().filename() == "M3GMpowerup_lsi.oni" ||
-					dir_itr->path().filename() == "TXMPlsi_icon.oni" ||
-					( dir_itr->path().filename().substr(0,4) == "TXMB" && dir_itr->path().filename().find("splash_screen.oni")!=string::npos)	)
-				{
-					cout <<dir_itr->path().filename() << "\n";
-					create_directory( dir_itr->path().parent_path() / "NoGlobal");	
-					if(!exists( dir_itr->path().parent_path() / "NoGlobal" / dir_itr->filename())) rename(dir_itr->path(), dir_itr->path().parent_path() / "NoGlobal" /
-																										  dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "TRAC") {
-					cout <<dir_itr->path().filename() << "\n";
-					if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "TRAM") {
-					cout <<dir_itr->path().filename() << "\n";
-					if(!exists( TRAM / dir_itr->filename())) rename(dir_itr->path(), TRAM / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "ONSK" ||
-						 dir_itr->path().filename().substr(0,4) == "TXMP") {
-					cout <<dir_itr->path().filename() << "\n";\
-					create_directory( dir_itr->path().parent_path() / "TexFix");	
-					if(!exists( Textures / dir_itr->filename())) rename(dir_itr->path(), Textures / dir_itr->filename());
-					//rename(dir_itr->path(), dir_itr->path().parent_path() / "TexFix" / dir_itr->filename());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "ONCC" 
-						 || dir_itr->path().filename().substr(0,4) == "TRBS"
-						 || dir_itr->path().filename().substr(0,4) == "TRMA"
-						 || dir_itr->path().filename().substr(0,4) == "TRSC"
-						 || dir_itr->path().filename().substr(0,4) == "TRAS") {
-					cout <<dir_itr->path().filename() << "\n";
-					if(!exists( Characters / dir_itr->filename())) rename(dir_itr->path(), Characters / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "OSBD"
-						 || dir_itr->path().filename().substr(0,4) == "SNDD") {
-					cout << dir_itr->path().filename() << "\n";
-					if(!exists( Sounds / dir_itr->filename())) rename(dir_itr->path(), Sounds / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,5) == "BINA3"
-						 || dir_itr->path().filename().substr(0,10) == "M3GMdebris"
-						 || dir_itr->path().filename() == "M3GMtoxic_bubble.oni"
-						 || dir_itr->path().filename().substr(0,8) == "M3GMelec"
-						 || dir_itr->path().filename().substr(0,7) == "M3GMrat"
-						 || dir_itr->path().filename().substr(0,7) == "M3GMjet"
-						 || dir_itr->path().filename().substr(0,9) == "M3GMbomb_"
-						 || dir_itr->path().filename() == "M3GMbarab_swave.oni"
-						 || dir_itr->path().filename() == "M3GMbloodyfoot.oni"
-						 ){
-					cout <<dir_itr->path().filename() << "\n";
-					if(!exists( Particles / dir_itr->filename())) rename(dir_itr->path(), Particles / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-				else if (dir_itr->path().filename().substr(0,4) == "AGDB"
-						 || dir_itr->path().filename().substr(0,4) == "TRCM") {
-					cout <<dir_itr->path().filename() << "\n";
-					
-					if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename());
-					else remove(dir_itr->path());
-				}
-			}
-			
-			
-		}
-		system( (strOniSplit + " -move:delete " + Textures.string() + " ../GameDataFolder/level" + (string)levelnum + "_Final/TXMP*.oni").c_str());
-		
-	}
-	
-	for (int i = 0; i < 15; i++)
-	{
-		sprintf(levelnum,"%d",levels[i]);
-		system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levelnum + "_Final packages/VanillaDats/level" + levelnum + "_Final/level"
-				 + levelnum + "_Final/level" + levelnum + "_Final.oni").c_str());
-	}
-	path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
-	path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
-	path VanillaTextures  = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
-	path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
-	path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
-	path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
-	path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
-	create_directory( VanillaCharacters.parent_path() );
-	create_directory( VanillaParticles.parent_path() );
-	create_directory( VanillaTextures.parent_path() );
-	create_directory( VanillaSounds.parent_path() );
-	create_directory( VanillaAnimations.remove_filename() );
-	system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str());
-	system((strOniSplit + " " + strImportOption + " " + Particles.string() + " " + VanillaParticles.string()).c_str());
-	system((strOniSplit + " " + strImportOption + " " + Textures.string() + " " + VanillaTextures.string()).c_str());
-	//system((strOniSplit	+ " " + strImportOption + (string)" " + Animations.string() + (string)" " + VanillaAnimations.string()).c_str());
-	system((strOniSplit + " " + strImportOption + " " + TRAC.string() + " " + VanillaTRAC.string()).c_str());
-	system((strOniSplit + " " + strImportOption + " " + Sounds.string() + " " + VanillaSounds.string()).c_str());
-	system((strOniSplit + " " + strImportOption + " " + TRAM.string() + " " + VanillaTRAM.string()).c_str());
-	
-	create_directory("../GameDataFolder/IGMD");
-	copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
-	}
-	catch (exception ex) {
-		cout << ex.what();
-	}
-	return err;
-}
-
-int installPackages(void)
-{
-	bool installed_something = 0;
-	int err = 0;
-	ModPackage package;
-	vector<string> installed_packages;
-	vector<ModPackage> packages; 
-	vector<ModPackage>::iterator iter;
-	vector<string> installString;
-	
-	iter = packages.begin();
-	packages = getPackages();
-	vector<string> installedMods = getInstallString();
-	
-	if (packages.empty())
-	{
-		cout << "Error: You have no packages!\n";
-		return 0;
-	}
-	
-	cout << "Detecting installed packages...\n";
-	
-	int index = 1;
-	char choice = '0';
-	
-	for (vector<ModPackage>::iterator package_iter = packages.begin(); package_iter != packages.end(); ++package_iter)
-	{
-		if (!binary_search(installedMods.begin(), installedMods.end(), package_iter->modStringName))
-		{ //package_iter->isInstalled :< I forgot about this...
-			//cout << index << " ";
-			system(strClsCmd);
-			cout << (*package_iter).name << "\n";
-			for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << '-';
-			cout << "\n"
-				 << (*package_iter).readme << "\n\n"
-				 << "Please enter a number choice\n"
-				 << " 1. Add\n"
-				 << " 2. Don't Add\n"
-				 << "";
-			index++;
-			choice = 0;
-			
-			do
-			{
-				choice = cin.get();
-				cin.ignore(1280, '\n');
-			} while(choice == 0);
-			
-			if (choice == '1')
-			{
-				cout << "\nInstalling...\n\n";
-				if (package_iter->hasOnis || (package_iter->hasDeltas /*(*package_iter).isUnpacked */ ))
-				{
-					installed_something = 1;
-					installedMods.push_back(package_iter->modStringName);
-					system(strPauseCmd);
-				}
-			}
-		}
-	}
-	if (index == 1)
-	{
-		cout << "Warning: All packages are already installed\n";
-		//would you like to recombine your data?
-		return 0;
-	}
-	if (installed_something == 0)
-	{
-		cout << "Warning: You didn't add anything!\n";
-		//would you like to recombine your data?
-		return 0;
-	}
-
-	sort(installedMods.begin(), installedMods.end());
-	//system(Onisplit.c_str());
-	recompileAll(installedMods);
-	system(strPauseCmd);
-	
-	return err;
-}
-
-int uninstallPackages(void)
-{
-int err = 0;
-	ModPackage package;
-	vector<string> installed_packages;
-	vector<ModPackage> packages; 
-	vector<ModPackage>::iterator iter;
-	vector<string> installString;
-	
-	iter = packages.begin();
-	packages = getPackages();
-
-	
-	cout << "Detecting installed packages...\n";
-	
-	vector<string> installedMods = getInstallString();
-	
-	if (packages.empty())
-	{
-		cout << "Error: You have no packages!\n";
-		return 0;
-	}
-	
-	int index = 0;
-	int uninstalled_something = 0;
-	char choice = '0';
-	
-	for (vector<ModPackage>::iterator package_iter = packages.begin(); package_iter != packages.end(); ++package_iter)
-	{
-		if (binary_search(installedMods.begin(), installedMods.end(), package_iter->modStringName))
-		{ //package_iter->isInstalled :< I forgot about this...
-			//cout << index << " ";
-			system(strClsCmd);
-			cout << (*package_iter).name << "\n";
-			for (int character = 1; character <= (*package_iter).name.length() - 1; character++) cout << '-';
-			cout << "\n"
-				 << (*package_iter).readme << "\n\n"
-				 << "Please enter a number choice\n"
-				 << " 1. Remove\n"
-				 << " 2. Don't Remove\n"
-				 << "";
-			
-			choice = 0;
-			
-			do
-			{
-				choice = cin.get();
-				cin.ignore(1280, '\n');
-			} while(choice == 0);
-			
-			if (choice == '1')
-			{
-					cout << "\nUninstalling...\n\n";
-					installedMods.erase( installedMods.begin() + (index) );
-					system(strPauseCmd);
-					uninstalled_something = 1; 
-				
-			}
-			else {
-				index++;
-			}
-		}
-	}
-	if ( uninstalled_something == 0 )
-	{
-		if (index == 0) //bad practice, I need to implement a second vector or something. Meh.
-		{
-			cout << "\nWarning: You have no installed packages!";
-		}
-		else
-		{
-			cout << "\nWarning: You didn't remove anything!";
-		}
-				//would you like to recombine your data?
-			return 0;
-
-	}	
-	sort(installedMods.begin(), installedMods.end());
-	//system(Onisplit.c_str());
-	recompileAll(installedMods);
-	system(strPauseCmd);
-	
-	return err;
-}
-
-int listInstalledPackages(void)
-{
-	cout << "\nThis feature not yet implemented.\n\n";
-	
-	return 0;
-}
-
-int printInstallerInfo(void)
-{
-	cout << "\nAE/Mod Installer\n";
-	cout << "version " << strInstallerVersion << "\n";
-	cout << "by Gumby & Iritscen\n";
-	cout << "see http://oni.bungie.org/community/forums for more info\n\n";
-	
-	return 0;
-}
-
-vector<ModPackage> getPackages(void)
-{
-	vector<ModPackage> packages;
-	packages.reserve(65536); // come on, we shouldn't need this much space...right?!
-	fstream file;
-	string filename = "\0";
-	string MODINFO_CFG = "Mod_Info.cfg";
-	
-	try
-	{
-		directory_iterator end_iter;
-		for (directory_iterator dir_itr("./packages"); dir_itr != end_iter; ++dir_itr)
-		{
-			file.open((dir_itr->path().string() + "/" + MODINFO_CFG).c_str());
-			//cout << filename << "\n";
-			
-			if(!file.fail())
-			{
-				cout << dir_itr->path().string() + MODINFO_CFG;
-				//would prefer to push a pointer to a package, but this will do for now
-				packages.push_back(fileToModPackage(file));
-			}	
-			file.close();
-			file.clear();
-		}
-	}
-	catch (const std::exception & ex)
-	{
-		cout << "Warning, something odd happened!\n";
-	}
-	
-	return packages;
-}
-
-ModPackage fileToModPackage(fstream &file)
-{
-	/*
-	 This converts a file to a ModPackage struct.
-	 
-	 A few notes...
-	 "iter" is the current word we are on. I should have named it "token" or something, but I don't have multiple iterators, so its ok.
-	 I refer to (*iter) at the beginning of each if statement block. I could probably store it as a variable, but I'm pretty sure that dereferencing a pointer\iterator isn't much
-	 slower than reading a variable.
-	 */
-	ModPackage package;
-	string line;
-	static string NameOfMod = "NameOfMod";	//used for comparing to the current token...
-	//I could have done it in reverse (*iter).compare("ModString") or  
-	static string ARROW = "->";				//did something like "ModString".compare(*iter), and it would have been
-	static string ModString = "ModString";	//functionably the same. 
-	static string HasOnis = "HasOnis";
-	static string HasDeltas = "HasDeltas";
-	static string HasBSL = "HasBSL";
-	static string HasDats = "HasDats";
-	static string IsEngine = "IsEngine";
-	static string Readme = "Readme";
-	static string GlobalNeeded = "GlobalNeeded";
-	static string Category = "Category";
-	static string Creator = "Creator";
-	while (! file.eof() )
-	{
-		getline (file,line);
-		vector<string> tokens; 
-		vector<string>::iterator iter;
-		tokenize(line, tokens);					//string to vector of "words"
-		if (tokens.capacity() >= 2) {			//make sure they are using enough stuff
-			iter = tokens.begin();				//what word we are on, starts at first word
-			/*
-			 if (!AEInstallVersion.compare(*iter))
-			 If mod is too old, skip this mod.
-			 */
-			/*else*/if (!NameOfMod.compare(*iter))  {	//if it contains the name
-				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
-					if (ARROW.compare(*iter) && NameOfMod.compare(*iter)) {			//ignores "->" and "NameOfMod"
-						//cout << *iter; 
-						//cout << " ";
-						package.name += *iter + " ";
-					}
-				}
-				
-			}
-			else if (!ModString.compare(*iter)) {
-				iter++; iter++;
-				package.modStringName = *iter;
-				iter++;
-				package.modStringVersion = atoi((*iter).c_str());
-			}
-			else if (!HasOnis.compare(*iter)) {
-				iter++; iter++;  
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasOnis = 1; //Gotta love c++'s lack of a standard case-insensitive
-				else if (!HasBSL.compare(*iter)) { // string comparer...I know my implementation here sucks. I need to change it to check each character one by one. At the moment,
-				iter++; iter++;}  // using "YFR" would probably set it off. :<
-
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasBSL = 1;
-			}
-			else if (!HasDeltas.compare(*iter)) {
-				iter++; iter++;  
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasDeltas = 1;
-			}
-			else if (!HasDats.compare(*iter)) {
-				iter++; iter++;  
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasDats = 1;
-			}
-			else if (!IsEngine.compare(*iter)) {
-				iter++; iter++;  
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.isEngine = 1;
-			}
-			else if (!GlobalNeeded.compare(*iter)) {
-				iter++; iter++;  
-				if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.globalNeeded = 1;
-				else if (toupper((*iter)[0]) + toupper((*iter)[1]) == 'N' + 'O') package.globalNeeded = 1; //Really the only place where checking for "No" is important atm.
-			}
-			else if (!Category.compare(*iter))  {	
-				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
-					if (ARROW.compare(*iter) && Category.compare(*iter)) {			//ignores "->" and "Category"
-						//cout << *iter; 
-						//cout << " ";
-						package.category += *iter + " ";
-					}
-				}
-			}
-			else if (!Creator.compare(*iter))  {	//if it contains the name
-				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
-					if (ARROW.compare(*iter) && Creator.compare(*iter)) {			//ignores "->" and "Category"
-						//cout << *iter; 
-						//cout << " ";
-						package.creator += *iter + " ";
-					}
-				}
-			}
-			else if (!Readme.compare(*iter))  {	//if it contains the name
-				for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) {	//interates through the words, ends if it reaches the end of the line or a "//" comment
-					if (ARROW.compare(*iter) && Readme.compare(*iter)) {			//ignores "->" and "Category"
-						//cout << *iter; 
-						//cout << " ";
-						package.readme += *iter + " ";
-					}
-				}
-			}
-		}
-		
-	}
-	package.doOutput();
-	return package;
-}
-
-void recompileAll(vector<string> installedMods)
-{
-	cout << "Recompiling Data...\n";
-	path vanilla_dir = "./packages/VanillaDats/";
-	string importCommand = "";
-	
-	clearOldDats();
-
-	if(splitInstances == SPLIT){
-		recursive_directory_iterator end_iter;
-		try {
-			for ( recursive_directory_iterator dir_itr( vanilla_dir );
-				 dir_itr != end_iter;
-				 ++dir_itr )
-			{
-				try
-				{
-					if ( is_directory( dir_itr->status() ) &&  dir_itr.level() == 1)
-					{
-						importCommand = strOniSplit + " " + strImportOption + " " + dir_itr->path().parent_path().string() + '/' + dir_itr->path().filename();
-						for (int i = 0; i < installedMods.size(); ++i) {
-							if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename()  ))
-								importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename();
-							
-							//else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/";
-						}
-						importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat";
-						system(importCommand.c_str());
-						//cout << importCommand << "\n";
-					}
-				}
-				catch ( const std::exception & ex )
-				{
-					cout << "Warning, exception " << ex.what() << "!";
-				}
-			}
-		}
-		catch( const std::exception & ex ) {
-			cout << "Warning, exception " << ex.what() << "!\n"
-			<< "You probably need to re-globalize.";
-			//create_directory( "./packages/VanillaDats" );
-		}
-		
-	}
-	else if(splitInstances == NOT_SPLIT){
-		directory_iterator end_iter;
-		for ( directory_iterator dir_itr( vanilla_dir );
-			 dir_itr != end_iter;
-			 ++dir_itr )
-		{
-			try
-			{
-				if ( is_directory( dir_itr->status() ) )
-				{
-					importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
-							+ ".dat";
-					for (int i = 0; i < installedMods.size(); ++i) {
-					if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
-						importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
-					}
-					importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat";
-					system(importCommand.c_str());
-				}
-			}
-			catch ( const std::exception & ex )
-			{
-				cout << "Warning, something odd happened!\n";
-			}
-		}
-	}
-	writeInstalledMods(installedMods);
-}
-
-void writeInstalledMods(vector<string> installedMods)
-{
-	
-	if ( exists( strInstallCfg ) )
-	{
-		remove( strInstallCfg );
-	}
-
-	ofstream file(strInstallCfg.c_str());
-	
-	vector<string>list = installedMods;
-	vector<string>::iterator begin_iter = list.begin(); 
-	vector<string>::iterator end_iter = list.end();
-
-	sort( list.begin(), list.end() );
-
-	for( ; begin_iter != end_iter; ++begin_iter) {
-		file << *begin_iter << " ";
-	}
-	
-	file.close();
-	file.clear();
-	
-}
-
-vector<string> getInstallString(void)
-{
-	system(strPauseCmd);
-	vector<string> returnval;
-
-	string line;
-	fstream file;
-	
-	if (exists(strInstallCfg ))
-	{
-		file.open(strInstallCfg.c_str());
-		getline(file, line);
-		tokenize(line, returnval);
-		file.close();
-		file.clear();
-		sort(returnval.begin(), returnval.end());
-	}
-	else cout << "fail";
-	
-	return returnval;
-}
-
-//stolen token function...
-void tokenize(const string& str, vector<string>& tokens, const string& delimiters)
-{
-	// Skip delimiters at beginning.
-	string::size_type lastPos = str.find_first_not_of(delimiters, 0);
-	// Find first "non-delimiter".
-	string::size_type pos     = str.find_first_of(delimiters, lastPos);
-	
-	while (string::npos != pos || string::npos != lastPos)
-	{
-		// Found a token, add it to the vector.
-		tokens.push_back(str.substr(lastPos, pos - lastPos));
-		// Skip delimiters.  Note the "not_of"
-		lastPos = str.find_first_not_of(delimiters, pos);
-		// Find next "non-delimiter"
-		pos = str.find_first_of(delimiters, lastPos);
-	}
-}
-
-void clearOldDats(void) {
-	directory_iterator end_iter_gdf;
-		for ( directory_iterator dir_itr_gdf( "../GameDataFolder" );
-			 dir_itr_gdf != end_iter_gdf;
-			 ++dir_itr_gdf )
-		{
-			//cout << dir_itr_gdf->path().extension() << "\n";
-			if ( dir_itr_gdf->path().extension() == ".dat" || dir_itr_gdf->path().extension() == ".raw" || dir_itr_gdf->path().extension() == ".sep" ) {
-				remove( dir_itr_gdf->path() );
-			}
-
-		}
-
-}
