ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/main_window.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/main_window.cpp (file contents):
Revision 372 by iritscen, Tue Jun 23 02:53:59 2009 UTC vs.
Revision 410 by gumby, Wed Jul 8 17:20:07 2009 UTC

# Line 1 | Line 1
1 + #ifndef NTDDI_VERSION          
2 + #define NTDDI_VERSION NTDDI_WIN7
3 + #endif
4 + #ifdef WIN32
5 + #include <windows.h>
6 + #include <shobjidl.h>
7 + HWND Handle;
8 +
9 + ITaskbarList *pTaskbarList;
10 + ITaskbarList3 *pTaskbarList3;
11 + #endif
12 +
13   /*
14 < AE/Mod Installer
15 < by Gumby and Iritscen
14 > AE/Mod Installer
15 > by Gumby and Iritscen
16   */
17  
18   // To-do: - Load credits from text resource file
7 //                - Version number in credits should be universalized
19   //                - Institute lots of checks into file-handling
20   //                - Clear mod info fields when mod is de-selected
21  
# Line 31 | Line 42 | by Gumby and Iritscen
42   #include <dirent.h>
43   #endif
44  
45 < const string strInstallerVersion = "1.0";
45 > //const string strInstallerVersion = "1.0";
46   const bool SPLIT = 1;
47   const bool NOT_SPLIT = 0;
48   bool splitInstances = SPLIT;
# Line 59 | Line 70 | using namespace std;
70   #include "boost/date_time/date_parsing.hpp"
71   #include "boost/date_time/posix_time/posix_time.hpp"
72  
73 + string escapePath(string input) {
74 +        
75 +        string output;
76 +        string escape_me = "& ;()|<>\"'\\#*?$";
77 +        for(int i = 0; i < input.size(); i++)  {
78 +                for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\';
79 +                output += input[i];
80 +        }
81 +        return output;
82 + }
83 +
84   int globalizeData(void)
85   {
86          busy = 1;
# Line 99 | Line 121 | int globalizeData(void)
121                  path TRAM = Animations / "level0_TRAM";
122  
123                  vector<path> GDFPaths;
124 <                GDFPaths.push_back(Characters);
124 >                //GDFPaths.push_back(Characters);
125                  GDFPaths.push_back(Particles);
126                  GDFPaths.push_back(Textures);
127                  GDFPaths.push_back(Sounds);
# Line 107 | Line 129 | int globalizeData(void)
129                  GDFPaths.push_back(TRAM);
130  
131  
132 <                path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
133 <                path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
134 <                path VanillaTextures  = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
135 <                path VanillaSounds = "packages/VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
136 <                path VanillaAnimations = "packages/VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
137 <                path VanillaTRAC = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
138 <                path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
132 >                path VanillaCharacters = "VanillaDats/level0_Final/level0_Characters/level0_Characters.oni";
133 >                path VanillaParticles = "VanillaDats/level0_Final/level0_Particles/level0_Particles.oni";
134 >                path VanillaTextures  = "VanillaDats/level0_Final/level0_Textures/level0_Textures.oni";
135 >                path VanillaSounds = "VanillaDats/level0_Final/level0_Sounds/level0_Sounds.oni";
136 >                path VanillaAnimations = "VanillaDats/level0_Final/level0_Animations/level0_Animations.oni";
137 >                path VanillaTRAC = "VanillaDats/level0_Final/level0_Animations/level0_TRAC.oni";
138 >                path VanillaTRAM = "VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni";
139  
140                  vector<path> VanillaPaths;
141  
142 <                VanillaPaths.push_back(VanillaCharacters);
142 >                //VanillaPaths.push_back(VanillaCharacters);
143                  VanillaPaths.push_back(VanillaParticles);
144                  VanillaPaths.push_back(VanillaTextures);
145                  VanillaPaths.push_back(VanillaSounds);
# Line 147 | Line 169 | int globalizeData(void)
169  
170                  create_directory( "packages" );
171  
172 <                if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
173 <                create_directory( "packages/VanillaDats" );
174 <
153 <                create_directory( "packages/VanillaDats/level0_Final/" );
172 >                if (exists("VanillaDats")) remove_all("VanillaDats");
173 >                create_directory( "VanillaDats" );
174 >                create_directory( "VanillaDats/level0_Final/" );
175                  //blah blah finish this.
176 <                //logfile <<  "packages/VanillaDats/level0_Final/ created";
176 >                //logfile <<  "VanillaDats/level0_Final/ created";
177                  create_directory( Characters );
178                  create_directory( Particles );
179                  create_directory( Archive );
# Line 184 | Line 205 | int globalizeData(void)
205                                  create_directory( "../GameDataFolder/level" + levels[i] + "_Final" );
206                                  //                              setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat");
207                                  system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str());
208 <                                create_directory( "packages/VanillaDats/level" + levels[i] + "_Final" );
209 <                                create_directory( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" );
208 >                                create_directory( "VanillaDats/level" + levels[i] + "_Final" );
209 >                                create_directory( "VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" );
210  
211                                  directory_iterator end_iter;
212                                  for ( directory_iterator dir_itr( "../GameDataFolder/level" + levels[i] + "_Final" ); dir_itr != end_iter; ++dir_itr )
# Line 208 | Line 229 | int globalizeData(void)
229                                                          else remove(dir_itr->path());
230                                                  }
231                                                  else if (dir_itr->path().filename().substr(0,4) == "TRAC"
232 <                                                        || dir_itr->path().filename().substr(0,4) == "ONVL") {
232 >                                                        ) {
233                                                                  cout <<dir_itr->path().filename() << "\n";
234                                                                  if(!exists( TRAC / dir_itr->filename())) rename(dir_itr->path(), TRAC / dir_itr->filename());
235                                                                  else remove(dir_itr->path());
# Line 228 | Line 249 | int globalizeData(void)
249                                                  else if (dir_itr->path().filename().substr(0,4) == "ONCC"
250                                                          || dir_itr->path().filename().substr(0,4) == "TRBS"
251                                                          || dir_itr->path().filename().substr(0,4) == "ONCV"
252 +                                                        || dir_itr->path().filename().substr(0,4) == "ONVL"
253                                                          || dir_itr->path().filename().substr(0,4) == "TRMA"
254                                                          || dir_itr->path().filename().substr(0,4) == "TRSC"
255                                                          || dir_itr->path().filename().substr(0,4) == "TRAS") {
# Line 262 | Line 284 | int globalizeData(void)
284                                                                  if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename());
285                                                                  else remove(dir_itr->path());
286                                                  }
287 +                                                else if (dir_itr->path().filename().substr(0,4) == "ONWC") { //fix for buggy ONWC overriding
288 +                                                                cout <<dir_itr->path().filename() << "\n";
289 +
290 +                                                                if(!exists( "VanillaDats/level0_Final/level0_Final/" +  dir_itr->filename())) rename(dir_itr->path(), "VanillaDats/level0_Final/level0_Final/" +  dir_itr->filename());
291 +                                                                else remove(dir_itr->path());
292 +                                                }
293 +
294                                                  if (exists(dir_itr->path())) {
295  
296                                                  }
297                                                  else {
298 <                                                        //logfile << "\tMoved file: " << dir_itr->path().filename() << "\n";
298 >                                                        logfile << "\tMoved file: " << dir_itr->path().filename() << "\n";
299                                                  }
300                                          }
301  
# Line 288 | Line 317 | int globalizeData(void)
317                          //printf(levels[i],"%d",levels[i]);
318                          //printf(Step_x_x,"Step %d/%d: reimporting level", parts_done + 1, 7 + 2 * num_levels); setStatusArea((string)Step_x_x + levels[i] + (string)"_Final.dat");
319                          setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni");
320 <                        system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
321 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str());
320 >                        logfile << (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level"
321 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str() << '\n';
322 >                        string sys_str = (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final VanillaDats/level" + levels[i] + "_Final/level"
323 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni");
324 >                                system(sys_str.c_str() );
325                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
326                          parts_done++;
327                  }
328 <                create_directory( VanillaCharacters.parent_path() );
328 >                //create_directory( VanillaCharacters.parent_path() );
329                  create_directory( VanillaParticles.parent_path() );
330                  create_directory( VanillaTextures.parent_path() );
331                  create_directory( VanillaSounds.parent_path() );
# Line 306 | Line 338 | int globalizeData(void)
338                          parts_done++;
339                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
340                  }
341 +                logfile << "\nMoving level0_Characters\n";
342 +                setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": moving level0_Characters" );      
343 +                copy((path)"../GameDataFolder/level0_Characters", (path)("VanillaDats/level0_Final"));
344                  /*
345                  printf(Step_x_x,"Step %d/%d: reimporting level0_Characters", parts_done,7 + 2 * num_levels); setStatusArea((string)Step_x_x);setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) ));
346                  system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str());
# Line 325 | Line 360 | int globalizeData(void)
360                  */
361                  create_directory((path)"../GameDataFolder/IGMD");
362                  copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
363 <                setProgressBar( 1000 );
363 >                setProgressBar( 1000 );
364 >
365 >                if(!exists("../persist.dat"))
366 >                        copy("../../persist.dat","..");
367 >                if(!exists("../key_config.txt"))
368 >                        copy("../../key_config.txt","..");
369 >                
370 > #ifndef WIN32
371 >                /* On Mac only, set the current GDF to the AE GDF by writing to Oni's global preferences file (thankfully a standard OS X ".plist" XML file).
372 >                   Tests for presence of prefs with [ -f ] before doing anything so it doesn't create a partial prefs file -- just in case user has never
373 >                   run Oni before :-p */
374 >                string fullAEpath = escapePath(system_complete(".").parent_path().parent_path().string()); // get full path for edition/
375 >                char prefsCommand[300] = "[ -f ~/Library/Preferences/com.godgames.oni.plist ] && defaults write com.godgames.oni RetailInstallationPath -string '";
376 >                strcat(prefsCommand, fullAEpath.c_str()); // get path of edition/ folder (Oni wants the folder that *contains* the GDF)
377 >                strcat(prefsCommand, "'"); // path string is enclosed in single quotes to avoid the need to escape UNIX-unfriendly characters
378 >                system(prefsCommand);
379 >                
380 > #endif
381 >                
382 >                
383                  setStatusArea((string)"Done! Now select your mod packages and click install.");
384                  //      while(1) Sleep(-1);
385  
386          }
387 <        catch (exception ex) {
387 >        catch (exception & ex) {
388                  setStatusArea("Warning, handled exception: " + (string)ex.what());
389          }
390  
# Line 500 | Line 554 | void recompileAll(vector<string> install
554          
555          setStatusArea("Importing levels...");
556          //setStatusArea("Recompiling Data...");
557 <        path vanilla_dir = "./packages/VanillaDats/";
557 >        path vanilla_dir = "./VanillaDats/";
558          string importCommand = "";
559          char statusString[128];
560          int numberOfDats = 0;
# Line 531 | Line 585 | void recompileAll(vector<string> install
585  
586                          }
587                  }
588 <
588 >                try {
589                  //recursive_directory_iterator end_iter;
590  
591  
592                  out << numberOfDats;
593                  datString = out.str();
540                try {
594                          for ( recursive_directory_iterator dir_itr( vanilla_dir );
595                                  dir_itr != end_iter;
596                                  ++dir_itr )
# Line 551 | Line 604 | void recompileAll(vector<string> install
604                                                          if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename()  ))
605                                                                  importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename();
606  
607 <                                                        //else cout << " packages/VanillaDats/" + installedMods[i] + "/oni/";
607 >                                                        //else cout << " VanillaDats/" + installedMods[i] + "/oni/";
608                                                  }
609                                                  importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log";
610  
# Line 619 | Line 672 | void recompileAll(vector<string> install
672                          {
673                                  if ( is_directory( dir_itr->status() ) )
674                                  {
675 <                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
623 <                                                + ".dat";
675 >                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " ";
676                                          for (int i = 0; i < installedMods.size(); ++i) {
677                                                  if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
678                                                          importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
# Line 781 | Line 833 | vector<ModPackage> globalPackages;
833   #endif
834  
835   ////@begin includes
836 < #include "about_window.h"
836 > #include "about.h"
837   ////@end includes
838  
839   #include "main_window.h"
840  
841   ////@begin XPM images
842 < #include "redo.xpm"
842 > #include "aelogosmall.xpm"
843 > #include "undo.xpm"
844   #include "fileopen.xpm"
845   #include "filesaveas.xpm"
846   #include "quit.xpm"
# Line 810 | Line 863 | IMPLEMENT_CLASS( MainWindow, wxFrame )
863   BEGIN_EVENT_TABLE( MainWindow, wxFrame )
864  
865   ////@begin MainWindow event table entries
866 < EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
866 >    EVT_CHECKBOX( SelectAll_Checkbox, MainWindow::OnSelectAllCheckboxClick )
867  
868 < EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
868 >    EVT_BUTTON( Refresh_Button, MainWindow::OnRefreshButtonClick )
869  
870 < EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
871 < EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
870 >    EVT_LISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Selected )
871 >    EVT_CHECKLISTBOX( Mods_CheckboxList1, MainWindow::OnModsCheckboxList1Toggled )
872  
873 < EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
873 >    EVT_UPDATE_UI( ID_STATUSBAR, MainWindow::OnStatusbarUpdate )
874  
875 < EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
875 >    EVT_BUTTON( Install_Button, MainWindow::OnInstallButtonClick )
876  
877 < EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
877 >    EVT_RADIOBUTTON( Sep_RadioButton, MainWindow::OnSepRadioButtonSelected )
878  
879 < EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
879 >    EVT_RADIOBUTTON( NoSep_RadioButton, MainWindow::OnNoSepRadioButtonSelected )
880  
881 < EVT_RADIOBUTTON( Separated_RadioButton, MainWindow::OnSeparatedRadioButtonSelected )
881 >    EVT_RADIOBUTTON( Seperated_RadioButton, MainWindow::OnSeperatedRadioButtonSelected )
882  
883 < EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
883 >    EVT_RADIOBUTTON( Complete_RadioButton, MainWindow::OnCompleteRadioButtonSelected )
884  
885 < EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
885 >    EVT_BUTTON( ReGlobalize_Button, MainWindow::OnReGlobalizeButtonClick )
886  
887 < EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
887 >    EVT_MENU( wxID_LOAD, MainWindow::OnLoadClick )
888  
889 < EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
889 >    EVT_MENU( wxID_SAVE, MainWindow::OnSaveClick )
890  
891 < EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
891 >    EVT_MENU( wxID_EXIT, MainWindow::OnExitClick )
892  
893 < EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
893 >    EVT_MENU( wxID_OPTIONS, MainWindow::OnOptionsClick )
894  
895 < EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
895 >    EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
896  
897   ////@end MainWindow event table entries
898  
# Line 869 | Line 922 | MainWindow::MainWindow( wxWindow* parent
922   bool MainWindow::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
923   {
924          ////@begin MainWindow creation
925 <        wxFrame::Create( parent, id, caption, pos, size, style );
873 <
874 <        CreateControls();
875 <        SetIcon(GetIconResource(wxT("oni_special.ico")));
876 <        Centre();
877 <
925 >    wxFrame::Create( parent, id, caption, pos, size, style );
926  
927 +    CreateControls();
928 +    SetIcon(GetIconResource(wxT("aelogosmall.png")));
929 +    Centre();
930          ////@end MainWindow creation
931          return true;
932   }
# Line 899 | Line 950 | MainWindow::~MainWindow()
950   void MainWindow::Init()
951   {
952          ////@begin MainWindow member initialisation
953 <        MainSplitter = NULL;
954 <        SelectAll = NULL;
955 <        RefreshButton = NULL;
956 <        Mods_CheckboxList = NULL;
957 <        titleText = NULL;
958 <        creatorText = NULL;
959 <        descriptionText = NULL;
960 <        StatusArea = NULL;
961 <        ProgressBar = NULL;
962 <        InstallButton = NULL;
963 <        OptionsPanel = NULL;
964 <        SepRadio = NULL;
965 <        NoSepRadio = NULL;
966 <        SeparatedRadio = NULL;
967 <        CompleteRadio = NULL;
968 <        ReglobalizeButton = NULL;
953 >    MainSplitter = NULL;
954 >    SelectAll = NULL;
955 >    RefreshButton = NULL;
956 >    Mods_CheckboxList = NULL;
957 >    titleText = NULL;
958 >    creatorText = NULL;
959 >    descriptionText = NULL;
960 >    StatusArea = NULL;
961 >    ProgressBar = NULL;
962 >    InstallButton = NULL;
963 >    OptionsPanel = NULL;
964 >    SepRadio = NULL;
965 >    NoSepRadio = NULL;
966 >    SeperatedRadio = NULL;
967 >    CompleteRadio = NULL;
968 >    ReglobalizeButton = NULL;
969          ////@end MainWindow member initialisation
970  
971   }
# Line 929 | Line 980 | wxGauge* TheProgressBar;
980   void MainWindow::CreateControls()
981   {    
982          ////@begin MainWindow content construction
983 <        // Generated by DialogBlocks, 31/05/2009 19:03:55 (unregistered)
933 <
934 <        MainWindow* itemFrame1 = this;
983 >    MainWindow* itemFrame1 = this;
984  
985 <        wxMenuBar* menuBar = new wxMenuBar;
986 <        wxMenu* itemMenu37 = new wxMenu;
987 <        {
988 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
989 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
990 <                menuItem->SetBitmap(bitmap);
991 <                itemMenu37->Append(menuItem);
992 <        }
993 <        {
994 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
995 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
996 <                menuItem->SetBitmap(bitmap);
997 <                itemMenu37->Append(menuItem);
998 <        }
999 <        itemMenu37->AppendSeparator();
1000 <        {
1001 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
1002 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
1003 <                menuItem->SetBitmap(bitmap);
1004 <                itemMenu37->Append(menuItem);
1005 <        }
1006 <        menuBar->Append(itemMenu37, _("&File"));
1007 <        wxMenu* itemMenu42 = new wxMenu;
1008 <        itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
1009 <        menuBar->Append(itemMenu42, _("Options"));
1010 <        wxMenu* itemMenu44 = new wxMenu;
1011 <        itemMenu44->Append(wxID_HELP, _("Help"), wxEmptyString, wxITEM_NORMAL);
985 >    wxMenuBar* menuBar = new wxMenuBar;
986 >    wxMenu* itemMenu37 = new wxMenu;
987 >    {
988 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
989 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
990 >        menuItem->SetBitmap(bitmap);
991 >        itemMenu37->Append(menuItem);
992 >    }
993 >    {
994 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
995 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
996 >        menuItem->SetBitmap(bitmap);
997 >        itemMenu37->Append(menuItem);
998 >    }
999 >    itemMenu37->AppendSeparator();
1000 >    {
1001 >        wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
1002 >        wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
1003 >        menuItem->SetBitmap(bitmap);
1004 >        itemMenu37->Append(menuItem);
1005 >    }
1006 >    menuBar->Append(itemMenu37, _("&File"));
1007 >    wxMenu* itemMenu42 = new wxMenu;
1008 >    itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
1009 >    menuBar->Append(itemMenu42, _("Options"));
1010 >    wxMenu* itemMenu44 = new wxMenu;
1011 > #ifdef WIN32
1012          itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1013          menuBar->Append(itemMenu44, _("Help"));
1014 <        itemFrame1->SetMenuBar(menuBar);
1015 <        
1016 <        wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1017 <        itemFrame1->SetSizer(itemBoxSizer2);
1014 > #else
1015 >        itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1016 > #endif  
1017 >
1018 >    itemFrame1->SetMenuBar(menuBar);
1019 >
1020 >    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
1021 >    itemFrame1->SetSizer(itemBoxSizer2);
1022  
1023 <        MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
1024 <        MainSplitter->SetMinimumPaneSize(150);
1025 <        MainSplitter->SetName(_T("MainSplitter"));
1026 <
1027 <        wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1028 <        wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
1029 <        itemPanel4->SetSizer(itemBoxSizer5);
1030 <
1031 <        wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
1032 <        itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
1033 <        SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
1034 <        SelectAll->SetValue(false);
1035 <        SelectAll->SetName(_T("SelectAll_Checkbox"));
1036 <        itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1037 <
1038 <        RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("redo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
1039 <        RefreshButton->SetName(_T("RefreshButton"));
1040 <        itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
1041 <
1042 <        wxArrayString Mods_CheckboxListStrings;
1043 <        Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
1044 <        Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
1045 <        itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
1046 <
1047 <        wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1048 <        itemPanel10->SetName(_T("DescriptionHolder_Panel"));
1049 <        wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
1050 <        itemPanel10->SetSizer(itemBoxSizer11);
1051 <
1052 <        wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
1053 <        itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1054 <        wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1055 <        itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1056 <        titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1057 <        titleText->SetName(_T("Title_Text"));
1058 <        titleText->SetBackgroundColour(wxColour(240, 240, 240));
1059 <        itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1060 <
1061 <        wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1062 <        itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1063 <        creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1064 <        creatorText->SetName(_T("Author_Text"));
1065 <        creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1066 <        itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1067 <
1068 <        wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1069 <        itemStaticLine17->Show(false);
1070 <        itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1071 <
1072 <        descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_AUTO_URL );
1073 <        descriptionText->SetName(_T("DescriptionName"));
1074 <        descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1075 <        itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1076 <
1077 <        MainSplitter->SplitVertically(itemPanel4, itemPanel10, 150);
1078 <        itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1079 <
1080 <        StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1081 <        StatusArea->SetName(_T("StatusArea"));
1082 <        StatusArea->SetFieldsCount(1);
1083 <        StatusArea->SetStatusText(_("Status Area"), 0);
1084 <        itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1085 <
1086 <        wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1087 <        itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1088 <
1089 <        ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxSize(-1, 30), wxGA_SMOOTH );
1090 <        ProgressBar->SetValue(0);
1091 <        itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1092 <
1093 <        InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxSize(-1, 30), 0 );
1094 <        itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1095 <
1096 <        wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1097 <        itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1098 <
1099 <        OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1100 <        itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1101 <
1102 <        wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1103 <        OptionsPanel->SetSizer(itemBoxSizer25);
1104 <
1105 <        wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1106 <        itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1107 <
1108 <        SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1109 <        SepRadio->SetValue(false);
1110 <        if (MainWindow::ShowToolTips())
1111 <                SepRadio->SetToolTip(_("For PC Demo and Mac"));
1112 <        itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1113 <
1114 <        NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1115 <        NoSepRadio->SetValue(false);
1116 <        if (MainWindow::ShowToolTips())
1117 <                NoSepRadio->SetToolTip(_("For PC Retail"));
1118 <        itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1119 <
1120 <        wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1121 <        itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1122 <
1123 <        wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1124 <        itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1125 <
1126 <        SeparatedRadio = new wxRadioButton( OptionsPanel, Separated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1127 <        SeparatedRadio->SetValue(false);
1128 <        SeparatedRadio->SetName(_T("Separated_RadioButton"));
1129 <        itemBoxSizer30->Add(SeparatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1130 <
1131 <        CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1132 <        CompleteRadio->SetValue(false);
1133 <        CompleteRadio->SetName(_T("Complete_RadioButton"));
1134 <        itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1135 <
1136 <        wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1137 <        itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1138 <
1139 <        wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1140 <        itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1141 <
1142 <        ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1143 <        ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1144 <        itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
1023 >    MainSplitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_LIVE_UPDATE|wxNO_BORDER );
1024 >    MainSplitter->SetMinimumPaneSize(1);
1025 >    MainSplitter->SetName(_T("MainSplitter"));
1026 >
1027 >    wxPanel* itemPanel4 = new wxPanel( MainSplitter, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1028 >    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
1029 >    itemPanel4->SetSizer(itemBoxSizer5);
1030 >
1031 >    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
1032 >    itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0);
1033 >    SelectAll = new wxCheckBox( itemPanel4, SelectAll_Checkbox, _("Select All/None"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE );
1034 >    SelectAll->SetValue(false);
1035 >    SelectAll->SetName(_T("SelectAll_Checkbox"));
1036 >    itemBoxSizer6->Add(SelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1037 >
1038 >    RefreshButton = new wxBitmapButton( itemPanel4, Refresh_Button, itemFrame1->GetBitmapResource(wxT("undo.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
1039 >    RefreshButton->SetName(_T("RefreshButton"));
1040 >    itemBoxSizer6->Add(RefreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
1041 >
1042 >    wxArrayString Mods_CheckboxListStrings;
1043 >    Mods_CheckboxList = new wxCheckListBox( itemPanel4, Mods_CheckboxList1, wxDefaultPosition, wxDefaultSize, Mods_CheckboxListStrings, wxLB_HSCROLL );
1044 >    Mods_CheckboxList->SetName(_T("Mods_CheckboxList"));
1045 >    itemBoxSizer5->Add(Mods_CheckboxList, 1, wxGROW|wxALL, 0);
1046 >
1047 >    wxPanel* itemPanel10 = new wxPanel( MainSplitter, DescriptionHolder_Panel, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1048 >    itemPanel10->SetName(_T("DescriptionHolder_Panel"));
1049 >    wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
1050 >    itemPanel10->SetSizer(itemBoxSizer11);
1051 >
1052 >    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
1053 >    itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 0);
1054 >    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
1055 >    itemBoxSizer12->Add(itemBoxSizer13, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0);
1056 >    titleText = new wxTextCtrl( itemPanel10, Title_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
1057 >    titleText->SetName(_T("Title_Text"));
1058 >    titleText->SetBackgroundColour(wxColour(240, 240, 240));
1059 >    itemBoxSizer13->Add(titleText, 1, wxGROW|wxLEFT, 5);
1060 >
1061 >    wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
1062 >    itemBoxSizer12->Add(itemBoxSizer15, 1, wxGROW|wxALL, 0);
1063 >    creatorText = new wxTextCtrl( itemPanel10, Author_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_RIGHT );
1064 >    creatorText->SetName(_T("Author_Text"));
1065 >    creatorText->SetBackgroundColour(wxColour(240, 240, 240));
1066 >    itemBoxSizer15->Add(creatorText, 1, wxGROW|wxRIGHT, 5);
1067 >
1068 >    wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1069 >    itemStaticLine17->Show(false);
1070 >    itemBoxSizer11->Add(itemStaticLine17, 0, wxGROW|wxALL, 5);
1071 >
1072 >    descriptionText = new wxTextCtrl( itemPanel10, Description_Text, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH|wxTE_RICH2 );
1073 >    descriptionText->SetName(_T("DescriptionName"));
1074 >    descriptionText->SetBackgroundColour(wxColour(240, 240, 240));
1075 >    itemBoxSizer11->Add(descriptionText, 1, wxGROW|wxLEFT|wxRIGHT, 5);
1076 >
1077 >    MainSplitter->SplitVertically(itemPanel4, itemPanel10, 200);
1078 >    itemBoxSizer2->Add(MainSplitter, 1, wxGROW|wxALL, 0);
1079 >
1080 >    StatusArea = new wxStatusBar( itemFrame1, ID_STATUSBAR, 0 );
1081 >    StatusArea->SetName(_T("StatusArea"));
1082 >    StatusArea->SetFieldsCount(1);
1083 >    StatusArea->SetStatusText(_("AE Installer v1.0"), 0);
1084 >    itemBoxSizer2->Add(StatusArea, 0, wxGROW|wxALL, 0);
1085 >
1086 >    wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
1087 >    itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 0);
1088 >
1089 >    ProgressBar = new wxGauge( itemFrame1, ProgressBar_Gauge, 1000, wxDefaultPosition, wxDefaultSize, wxGA_SMOOTH );
1090 >    ProgressBar->SetValue(0);
1091 >    itemBoxSizer20->Add(ProgressBar, 1, wxGROW|wxALL, 0);
1092 >
1093 >    InstallButton = new wxButton( itemFrame1, Install_Button, _("Install!"), wxDefaultPosition, wxDefaultSize, 0 );
1094 >    itemBoxSizer20->Add(InstallButton, 0, wxGROW|wxALL, 0);
1095 >
1096 >    wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxVERTICAL);
1097 >    itemBoxSizer2->Add(itemBoxSizer23, 0, wxGROW|wxALL, 0);
1098 >
1099 >    OptionsPanel = new wxPanel( itemFrame1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
1100 >    itemBoxSizer2->Add(OptionsPanel, 0, wxGROW, 0);
1101 >
1102 >    wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
1103 >    OptionsPanel->SetSizer(itemBoxSizer25);
1104 >
1105 >    wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL);
1106 >    itemBoxSizer25->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5);
1107 >
1108 >    SepRadio = new wxRadioButton( OptionsPanel, Sep_RadioButton, _("Sep"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1109 >    SepRadio->SetValue(false);
1110 >    if (MainWindow::ShowToolTips())
1111 >        SepRadio->SetToolTip(_("For PC Demo and Mac"));
1112 >    itemBoxSizer26->Add(SepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1113 >
1114 >    NoSepRadio = new wxRadioButton( OptionsPanel, NoSep_RadioButton, _("NoSep"), wxDefaultPosition, wxDefaultSize, 0 );
1115 >    NoSepRadio->SetValue(false);
1116 >    if (MainWindow::ShowToolTips())
1117 >        NoSepRadio->SetToolTip(_("For PC Retail"));
1118 >    itemBoxSizer26->Add(NoSepRadio, 0, wxALIGN_LEFT|wxALL, 5);
1119 >
1120 >    wxStaticLine* itemStaticLine29 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1121 >    itemBoxSizer25->Add(itemStaticLine29, 0, wxGROW|wxALL, 5);
1122 >
1123 >    wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL);
1124 >    itemBoxSizer25->Add(itemBoxSizer30, 0, wxGROW|wxALL, 5);
1125 >
1126 >    SeperatedRadio = new wxRadioButton( OptionsPanel, Seperated_RadioButton, _("Separated Level0"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
1127 >    SeperatedRadio->SetValue(false);
1128 >    SeperatedRadio->SetName(_T("Seperated_RadioButton"));
1129 >    itemBoxSizer30->Add(SeperatedRadio, 0, wxALIGN_LEFT|wxALL, 5);
1130 >
1131 >    CompleteRadio = new wxRadioButton( OptionsPanel, Complete_RadioButton, _("Complete Level0"), wxDefaultPosition, wxDefaultSize, 0 );
1132 >    CompleteRadio->SetValue(false);
1133 >    CompleteRadio->SetName(_T("Complete_RadioButton"));
1134 >    itemBoxSizer30->Add(CompleteRadio, 0, wxALIGN_LEFT|wxALL, 5);
1135 >
1136 >    wxStaticLine* itemStaticLine33 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
1137 >    itemBoxSizer25->Add(itemStaticLine33, 0, wxGROW|wxALL, 5);
1138 >
1139 >    wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
1140 >    itemBoxSizer25->Add(itemBoxSizer34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
1141 >
1142 >    ReglobalizeButton = new wxButton( OptionsPanel, ReGlobalize_Button, _("Reglobalize"), wxDefaultPosition, wxDefaultSize, 0 );
1143 >    ReglobalizeButton->SetName(_T("Reglobalize_Button"));
1144 >    itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
1145  
1146 <        // Connect events and objects
1147 <        Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1146 >    // Connect events and objects
1147 >    Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
1148          ////@end MainWindow content construction
1149 + #ifdef WIN32
1150 +        Handle = (HWND)GetHWND();
1151 +        ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbarList);
1152 + #endif
1153 +
1154  
1155 <        if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
1156 <                static_cast<string>("-import:sep");
1155 >        /*if ( exists( "../../GameDataFolder/level0_Final.sep" ) ) {
1156 >                strImportOption = "-import:sep";
1157                  splitInstances = NOT_SPLIT;
1158          }
1159          else {
1160 <                static_cast<string>("-import:nosep");
1160 >                strImportOption = "-import:nosep";
1161                  splitInstances = SPLIT;
1162 <        }
1162 >        }*/
1163 >        
1164 >
1165 > #ifndef WIN32
1166 >                strImportOption = "-import:sep";
1167 >                splitInstances = NOT_SPLIT;
1168 > #else
1169 >                strImportOption = "-import:nosep";
1170 >                splitInstances = SPLIT;
1171 > #endif
1172  
1173 + #ifndef WIN32
1174 +        strImportOption = "-import:sep";
1175 +        splitInstances = NOT_SPLIT;
1176 + #else
1177 +        strImportOption = "-import:nosep";
1178 +        splitInstances = SPLIT;
1179 + #endif
1180 +        
1181          globalPackages = getPackages();
1182          globalInstalledMods = getInstallString();
1183          for (int i = 0; i < globalPackages.size(); i++) {
# Line 1114 | Line 1189 | void MainWindow::CreateControls()
1189          TheInstallButton = InstallButton;
1190          TheProgressBar = ProgressBar;
1191          OptionsPanel->Hide();
1192 <        if(splitInstances == SPLIT) SeparatedRadio->SetValue(true);
1192 >        
1193 > //#ifndef WIN32
1194 > //      itemMenu37->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL);
1195 >        
1196 > //#endif
1197 >        
1198 >        if(splitInstances == SPLIT) SeperatedRadio->SetValue(true);
1199          else CompleteRadio->SetValue(true);
1119
1120
1121
1200          if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true);
1201          else SepRadio->SetValue(true);
1202  
# Line 1186 | Line 1264 | wxBitmap MainWindow::GetBitmapResource(
1264   {
1265          // Bitmap retrieval
1266          ////@begin MainWindow bitmap retrieval
1267 <        wxUnusedVar(name);
1268 <        if (name == _T("redo.xpm"))
1269 <        {
1270 <                wxBitmap bitmap(redo_xpm);
1271 <                return bitmap;
1272 <        }
1273 <        else if (name == _T("fileopen.xpm"))
1274 <        {
1275 <                wxBitmap bitmap( fileopen_xpm);
1276 <                return bitmap;
1277 <        }
1278 <        else if (name == _T("filesaveas.xpm"))
1279 <        {
1280 <                wxBitmap bitmap( filesaveas_xpm);
1281 <                return bitmap;
1282 <        }
1283 <        else if (name == _T("quit.xpm"))
1284 <        {
1285 <                wxBitmap bitmap( quit_xpm);
1286 <                return bitmap;
1287 <        }
1288 <        return wxNullBitmap;
1267 >    wxUnusedVar(name);
1268 >    if (name == _T("undo.xpm"))
1269 >    {
1270 >        wxBitmap bitmap( undo_xpm);
1271 >        return bitmap;
1272 >    }
1273 >    else if (name == _T("fileopen.xpm"))
1274 >    {
1275 >        wxBitmap bitmap( fileopen_xpm);
1276 >        return bitmap;
1277 >    }
1278 >    else if (name == _T("filesaveas.xpm"))
1279 >    {
1280 >        wxBitmap bitmap( filesaveas_xpm);
1281 >        return bitmap;
1282 >    }
1283 >    else if (name == _T("quit.xpm"))
1284 >    {
1285 >        wxBitmap bitmap( quit_xpm);
1286 >        return bitmap;
1287 >    }
1288 >    return wxNullBitmap;
1289          ////@end MainWindow bitmap retrieval
1290   }
1291  
# Line 1220 | Line 1298 | wxIcon MainWindow::GetIconResource( cons
1298  
1299          // Icon retrieval
1300          ////@begin MainWindow icon retrieval
1301 <        wxUnusedVar(name);
1302 <        if (name == _T("oni_special.ico"))
1303 <        {
1304 <                //      wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO);
1305 <                //      return icon;
1306 <        }
1307 <        return wxNullIcon;
1301 >    wxUnusedVar(name);
1302 >    if (name == _T("aelogosmall.png"))
1303 >    {
1304 >        wxIcon icon(aelogosmall_xpm);
1305 >        return icon;
1306 >    }
1307 >    return wxNullIcon;
1308          ////@end MainWindow icon retrieval
1309   }
1310  
# Line 1274 | Line 1352 | void MainWindow::OnModsCheckboxList1Togg
1352  
1353   void MainWindow::OnOptionsClick( wxCommandEvent& event )
1354   {
1277
1278
1279
1280
1355          if (!event.GetInt() ) {
1356                  OptionsPanel->Hide();
1357 +                
1358                  this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
1359          else {
1360   //              Uncomment this when we release, it gets annoying if you are testing globalization a lot ;)
1361 <                wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert",  wxOK | wxICON_EXCLAMATION       , wxDefaultPosition);
1361 >                wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: These options are for advanced users only, use with caution.",
1362 >                                                                                                                   "AE Installer Alert",  wxOK | wxICON_EXCLAMATION     , wxDefaultPosition);
1363                  YesNoDialog->ShowModal();
1364                  OptionsPanel->Show();
1365 <                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight());
1365 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()+1);
1366 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-1);
1367          }
1291        
1368   }
1369  
1370  
# Line 1361 | Line 1437 | void MainWindow::OnInstallButtonClick( w
1437  
1438   void setProgressBar( int i ) {
1439          //TheProgressBar->SetValue(
1440 + #ifdef WIN32
1441 +        
1442 +
1443 +
1444 + if (SUCCEEDED(pTaskbarList->QueryInterface(IID_ITaskbarList3, (void **)&pTaskbarList3)))
1445 + {
1446 +        
1447 +        pTaskbarList3->SetProgressValue(Handle,i, 1000);
1448 +        if ( i == 0 ) {
1449 +
1450 +        pTaskbarList3->SetProgressState(Handle,TBPF_NOPROGRESS);
1451 +        }
1452 + }
1453 +
1454  
1455 + #endif
1456          TheProgressBar->SetValue(i);
1457  
1458   }
# Line 1374 | Line 1465 | void setProgressBar( int i ) {
1465   void MainWindow::OnStatusbarUpdate( wxUpdateUIEvent& event )
1466   {
1467          ////@begin wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1468 <        // Before editing this code, remove the block markers.
1469 <        event.Skip();
1468 >    // Before editing this code, remove the block markers.
1469 >    event.Skip();
1470          ////@end wxEVT_UPDATE_UI event handler for ID_STATUSBAR in MainWindow.
1471   }
1472  
# Line 1387 | Line 1478 | void MainWindow::OnStatusbarUpdate( wxUp
1478   void MainWindow::OnAboutClick( wxCommandEvent& event )
1479   {
1480          ////@begin wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1481 <        // Before editing this code, remove the block markers.
1482 <        About* window = new About(this);
1483 <        int returnValue = window->ShowModal();
1484 <        window->Destroy();
1481 >    // Before editing this code, remove the block markers.
1482 >    About* window = new About(this);
1483 >    int returnValue = window->ShowModal();
1484 >    window->Destroy();
1485          ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
1486   }
1487  
# Line 1419 | Line 1510 | void MainWindow::OnSepRadioButtonSelecte
1510   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
1511   */
1512  
1422 void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event )
1423 {
1424        splitInstances = SPLIT;
1425
1426 }
1427
1428
1513   /*
1514   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
1515   */
# Line 1549 | Line 1633 | void MainWindow::OnSaveClick( wxCommandE
1633  
1634   void MainWindow::OnReGlobalizeButtonClick( wxCommandEvent& event )
1635   {
1636 <        wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: This will DELETE the Edition's GameDataFolder and reglobalize all of your data. \n Are you SURE you want to do this? ", "AE Installer Alert",  wxYES_NO | wxICON_EXCLAMATION  , wxDefaultPosition);
1636 >        wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: This will DELETE the Edition's GameDataFolder and recreate it from the vanilla Oni game data. \n Are you SURE you want to do this? ", "AE Installer Alert",  wxYES_NO | wxICON_EXCLAMATION    , wxDefaultPosition);
1637  
1638          if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no...
1639  
# Line 1587 | Line 1671 | event.Skip();
1671   ////@end wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton in MainWindow.
1672   }*/
1673  
1674 +
1675 + /*
1676 + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton
1677 + */
1678 +
1679 + void MainWindow::OnSeperatedRadioButtonSelected( wxCommandEvent& event )
1680 + {
1681 + splitInstances = SPLIT;
1682 + }
1683 +

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)