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 355 by gumby, Thu Jun 18 22:30:30 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: -
18 > // To-do: - Load credits from text resource file
19   //                - Institute lots of checks into file-handling
20 < //                - Clear mod info fields when mod is de-selected ???
20 > //                - Clear mod info fields when mod is de-selected
21  
22   #define DEBUG
23   #include <stdio.h>
# Line 30 | 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;
49 <
49 > bool busy = 0;
50   #ifdef WIN32
51   const string strOniSplit = "Onisplit.exe";
52   string strImportOption = "-import:nosep";
# Line 58 | 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 <            using boost::lexical_cast;
87 <    using boost::bad_lexical_cast;
88 < // using namespace boost::posix_time;
86 >        busy = 1;
87 >        using boost::lexical_cast;
88 >        using boost::bad_lexical_cast;
89 >        // using namespace boost::posix_time;
90          using namespace boost::gregorian;
91          using namespace boost::posix_time;
92          ptime start_time(second_clock::local_time());
# Line 76 | Line 100 | int globalizeData(void)
100          ofstream logfile("Globalize.log");
101          logfile << "Globalization started " << to_simple_string(start_time) << endl;
102          try {
103 <                
103 >
104                  char levels_cstr[15][3] = {"0", "1", "2", "3", "4", "6", "8", "9", "10", "11", "12", "13", "14", "18", "19"}; // the levels Oni has...probably should have made a string array. Oops.
105                  //const vector<double> ck(cv, &cv[CvSize]);
106                  vector<string> levels;
# Line 95 | Line 119 | int globalizeData(void)
119                  path Animations = "../GameDataFolder/level0_Animations";
120                  path TRAC = Animations / "level0_TRAC";
121                  path TRAM = Animations / "level0_TRAM";
122 <                
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);
128                  GDFPaths.push_back(TRAC);
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";
130 >
131 >
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);
141 >
142 >                //VanillaPaths.push_back(VanillaCharacters);
143                  VanillaPaths.push_back(VanillaParticles);
144                  VanillaPaths.push_back(VanillaTextures);
145                  VanillaPaths.push_back(VanillaSounds);
146                  VanillaPaths.push_back(VanillaTRAC);
147                  VanillaPaths.push_back(VanillaTRAM);
148 <                
148 >
149                  /*
150                  if (exists("../GameDataFolder/"))
151                  {
# Line 142 | Line 166 | int globalizeData(void)
166                  setStatusArea("Creating needed directories...");
167                  logfile <<  "Creating needed directories...\n";
168                  create_directory( "../GameDataFolder/" );
169 <                
169 >
170                  create_directory( "packages" );
171 <                
172 <                if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats");
173 <                create_directory( "packages/VanillaDats" );
174 <                
151 <                create_directory( "packages/VanillaDats/level0_Final/" );
171 >
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 162 | Line 185 | int globalizeData(void)
185                  int num_levels = 0;
186                  for(int i = 1; i < 15; i++)
187                  {
188 <                                if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) {
188 >                        if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) {
189                                  num_levels++;
190  
191                          }
# Line 171 | Line 194 | int globalizeData(void)
194                  int total_steps =  8 + 2 * num_levels;
195                  for(int i = 0; i < 15; i++)
196                  {
197 <                        
197 >
198                          //printf(levels[i],"%d",levels[i]); // int to char array
199 <                        
199 >
200                          if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) {
201                                  logfile << "level" << levels[i] << "_Final\n";
202                                  logfile << "\tExporting level" << levels[i] << "_Final.dat\n";
203                                  //printf(Step_x_x,"Step %d/%d: exporting level%d_final.dat", parts_done + 1,, levels[i]); setStatusArea((string)Step_x_x);
204                                  setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " exporting level" + levels[i]+"_Final.dat");
205                                  create_directory( "../GameDataFolder/level" + levels[i] + "_Final" );
206 < //                              setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat");
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 206 | 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 226 | 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 256 | Line 280 | int globalizeData(void)
280                                                  else if (dir_itr->path().filename().substr(0,4) == "AGDB"
281                                                          || dir_itr->path().filename().substr(0,4) == "TRCM") {
282                                                                  cout <<dir_itr->path().filename() << "\n";
283 <                                        
283 >
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                                                  }
# Line 269 | Line 300 | int globalizeData(void)
300                                          }
301  
302  
303 <                                                
303 >
304                                  }
305                                  logfile << "\tCleaning up TXMPs...\n";
306                                  system( (strOniSplit + " -move:delete " + Textures.string() + " ../GameDataFolder/level" + levels[i] + "_Final/TXMP*.oni").c_str());
307                                  parts_done++;
308  
309                                  setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
310 <                                
310 >
311                          }
312                  }
313                  logfile << "Reimporting levels\n";
# Line 286 | 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.oni").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++;
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() );
332                  create_directory( VanillaAnimations.remove_filename() );
333 <                
333 >
334                  for(int j = 0; j < GDFPaths.size(); j++) {
335                          logfile << "\tReimporting " << GDFPaths[j].filename() << ".oni\n";
336 <                        setStatusArea("Step" + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() );
336 >                        setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() );
337                          system((strOniSplit + " " + strImportOption + " " + GDFPaths[j].string() + " " + VanillaPaths[j].string()).c_str());
338                          parts_done++;
339                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
340                  }
341 < /*
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());
347                  parts_done++; printf(Step_x_x,"Step %d/%d: reimporting level0_Particles", parts_done,7 + 2 * num_levels); setStatusArea((string)Step_x_x);setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) ));
# Line 320 | Line 357 | int globalizeData(void)
357                  system((strOniSplit + " " + strImportOption + " " + TRAM.string() + " " + VanillaTRAM.string()).c_str());
358                  //parts_done++; setStatusArea((string)"Copying level scripts...");setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) ));
359                  if (exists("../GameDataFolder/IGMD")) remove_all("../GameDataFolder/IGMD");
360 < */
360 >                */
361                  create_directory((path)"../GameDataFolder/IGMD");
362 <                copy((path)"packages/VanillaBSL/", (path)"../GameDataFolder");
363 <                setProgressBar( 1000 );
364 <                setStatusArea((string)"Done! Now select your mod packages and click install.");
365 <        //      while(1) Sleep(-1);
362 >                copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
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          }
334        
335                ptime end_time(second_clock::local_time());
336                time_period total_time (start_time, end_time);
337                logfile << "\n\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length();
338                //total_time.length().hours();
339        logfile.close();
390  
391 +        ptime end_time(second_clock::local_time());
392 +        time_period total_time (start_time, end_time);
393 +        logfile << "\n\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length();
394 +        //total_time.length().hours();
395 +        logfile.close();
396 +        busy = 0;
397          return err;
398   }
399  
# Line 490 | Line 546 | ModPackage fileToModPackage(fstream &fil
546  
547   void recompileAll(vector<string> installedMods)
548   {
549 +        busy = 1;
550          using namespace boost::gregorian;
551          using namespace boost::posix_time;
552 +        using boost::lexical_cast;
553 +        using boost::bad_lexical_cast;
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 526 | 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();
535                try {
594                          for ( recursive_directory_iterator dir_itr( vanilla_dir );
595                                  dir_itr != end_iter;
596                                  ++dir_itr )
# Line 546 | 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  
611 <                                                printf(statusString,"%d/%i\0",j,numberOfDats);  
611 >                                                
612                                                  setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats
613 <                                                setStatusArea("Importing " +  dir_itr->path().filename() + " " + statusString);
613 >                                                setStatusArea("Step " + lexical_cast<std::string>(j) + '/' + lexical_cast<std::string>(numberOfDats)+ ": Importing " +  dir_itr->path().filename() + " ");
614  
615                                                  system(importCommand.c_str());
616                                                  //Sleep(1000);
# Line 563 | Line 621 | void recompileAll(vector<string> install
621                                  }
622                                  catch ( const std::exception & ex )
623                                  {
624 <                                        
625 <        remove("Install.log");
626 <        ofstream logfile("Install.log");
627 <        
628 <        
624 >
625 >                                        remove("Install.log");
626 >                                        ofstream logfile("Install.log");
627 >
628 >
629                                          logfile << "Warning, exception " << ex.what() << "!";
630                                          setStatusArea("Warning, exception " + (string)ex.what() + "!");
631 < logfile.close();        
631 >                                        logfile.close();        
632                                  }
633                          }
634  
635                  }
636                  catch( const std::exception & ex ) {
637 <        
638 <        remove("Install.log");
639 <        ofstream logfile("Install.log");
640 <        
641 <        
642 <                                        logfile << "Warning, exception " << ex.what() << "!";
643 <                                        setStatusArea("Warning, exception " + (string)ex.what() + "!");
644 < logfile.close();
637 >
638 >                        remove("Install.log");
639 >                        ofstream logfile("Install.log");
640 >
641 >
642 >                        logfile << "Warning, exception " << ex.what() << "!";
643 >                        setStatusArea("Warning, exception " + (string)ex.what() + "!");
644 >                        logfile.close();
645                  }
646  
647          }
# Line 614 | Line 672 | logfile.close();
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()
618 <                                                + ".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();
679                                          }
680                                          importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log";
681  
682 <                                        printf(statusString,"%d/%i\0",j,numberOfDats);  
682 >
683                                          setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats
684 <                                        setStatusArea("Importing " +  dir_itr->path().filename() + " " + statusString);
684 >                                        setStatusArea("Step " + lexical_cast<std::string>(j) + '/' + lexical_cast<std::string>(numberOfDats)+ ": Importing " +  dir_itr->path().filename() + " ");
685  
686                                          system(importCommand.c_str());
687  
# Line 633 | Line 690 | logfile.close();
690                          }
691                          catch ( const std::exception & ex )
692                          {
693 <        
694 <        remove("Install.log");
695 <        ofstream logfile("Install.log");
696 <        
697 <        
698 <                                        logfile << "Warning, exception " << ex.what() << "!";
699 <                                        setStatusArea("Warning, exception " + (string)ex.what() + "!");
700 < logfile.close();
693 >
694 >                                remove("Install.log");
695 >                                ofstream logfile("Install.log");
696 >
697 >
698 >                                logfile << "Warning, exception " << ex.what() << "!";
699 >                                setStatusArea("Warning, exception " + (string)ex.what() + "!");
700 >                                logfile.close();
701                          }}
702          }
703          logfile << "Writing config file";
704          writeInstalledMods(installedMods);
705          setProgressBar(1000);
706          setStatusArea("Done! You can now play Oni.");
650        
651                ptime end_time(second_clock::local_time());
652                time_period total_time (start_time, end_time);
653                        
654        
655                ofstream logfile2("Install.log", ios::app | ios::ate);
656                string outstring = (string)"\n\nGlobalization ended " + to_simple_string(end_time) + "\nThe process took ";// + (string)total_time.length();
657                
658                logfile2 << "\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length();
659                
660                //logfile2.write(outstring.c_str(), outstring.length());
661 logfile2.close();
707  
708 <                //total_time.length().hours();
709 <        
708 >        ptime end_time(second_clock::local_time());
709 >        time_period total_time (start_time, end_time);
710 >
711 >
712 >        ofstream logfile2("Install.log", ios::app | ios::ate);
713 >        string outstring = (string)"\n\nGlobalization ended " + to_simple_string(end_time) + "\nThe process took ";// + (string)total_time.length();
714 >
715 >        logfile2 << "\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length();
716 >
717 >        //logfile2.write(outstring.c_str(), outstring.length());
718 >        logfile2.close();
719 >
720 >        //total_time.length().hours();
721 >
722          Sleep(1000);
723          setProgressBar(0);
724 +        busy = 0;
725   }
726  
727   void writeInstalledMods(vector<string> installedMods)
# Line 775 | 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 804 | 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 863 | 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 );
925 >    wxFrame::Create( parent, id, caption, pos, size, style );
926  
927 <        CreateControls();
928 <        SetIcon(GetIconResource(wxT("oni_special.ico")));
929 <        Centre();
871 <        
872 <        
927 >    CreateControls();
928 >    SetIcon(GetIconResource(wxT("aelogosmall.png")));
929 >    Centre();
930          ////@end MainWindow creation
931          return true;
932   }
# Line 893 | 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 923 | 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)
983 >    MainWindow* itemFrame1 = this;
984  
985 <        MainWindow* itemFrame1 = this;
986 <
987 <        wxMenuBar* menuBar = new wxMenuBar;
988 <        wxMenu* itemMenu37 = new wxMenu;
989 <        {
990 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_LOAD, _("&Load Configuration..."), wxEmptyString, wxITEM_NORMAL);
991 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("fileopen.xpm")));
992 <                menuItem->SetBitmap(bitmap);
993 <                itemMenu37->Append(menuItem);
994 <        }
995 <        {
996 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_SAVE, _("&Save Configuration..."), wxEmptyString, wxITEM_NORMAL);
997 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")));
998 <                menuItem->SetBitmap(bitmap);
999 <                itemMenu37->Append(menuItem);
1000 <        }
1001 <        itemMenu37->AppendSeparator();
1002 <        {
1003 <                wxMenuItem* menuItem = new wxMenuItem(itemMenu37, wxID_EXIT, _("Exit"), wxEmptyString, wxITEM_NORMAL);
1004 <                wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("quit.xpm")));
1005 <                menuItem->SetBitmap(bitmap);
1006 <                itemMenu37->Append(menuItem);
1007 <        }
1008 <        menuBar->Append(itemMenu37, _("&File"));
1009 <        wxMenu* itemMenu42 = new wxMenu;
1010 <        itemMenu42->Append(wxID_OPTIONS, _("Show Advanced Options..."), wxEmptyString, wxITEM_CHECK);
1011 <        menuBar->Append(itemMenu42, _("Options"));
955 <        wxMenu* itemMenu44 = new wxMenu;
956 <        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);
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);
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 1108 | 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);
1113
1114
1115
1200          if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true);
1201          else SepRadio->SetValue(true);
1202 <        
1203 <        
1202 >
1203 >
1204   #ifdef WIN32
1205          RedirectIOToConsole();
1206          HWND hWnd = GetConsoleWindow();
1207          ShowWindow( hWnd, SW_HIDE );
1208   #endif
1209 <        
1210 <                //MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight() );
1209 >
1210 >        //MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight() );
1211   }
1212  
1213  
# Line 1180 | 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 1214 | 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 1268 | Line 1352 | void MainWindow::OnModsCheckboxList1Togg
1352  
1353   void MainWindow::OnOptionsClick( wxCommandEvent& event )
1354   {
1271
1272
1273        
1274
1355          if (!event.GetInt() ) {
1356                  OptionsPanel->Hide();
1357 <                MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
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);
1362 <                //YesNoDialog->ShowModal();
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.",
1362 >                                                                                                                   "AE Installer Alert",  wxOK | wxICON_EXCLAMATION     , wxDefaultPosition);
1363 >                YesNoDialog->ShowModal();
1364                  OptionsPanel->Show();
1365 <                MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::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          }
1368   }
1369  
# Line 1320 | Line 1403 | void MainWindow::OnInstallButtonClick( w
1403          localPackages.push_back("Globalize");
1404          for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName );
1405          if ( !localPackages.empty() )   {
1406 <
1406 >        
1407                  //MainWindow::MainWindow().Hide();      
1408                  //      boost::thread thrd2(recompileAll(localPackages) );
1409                  //MainWindow::MainWindow().Show();
1410 +                this->InstallButton->Disable();
1411 +                this->ReglobalizeButton->Disable();
1412   #ifdef WIN32
1413                  recompile packages(localPackages);
1414                  boost::thread thrd(packages);
1415   #else
1331                this->Disable();
1416                  recompileAll(localPackages);
1333                this->Enable();
1417   #endif
1418  
1419 +                this->InstallButton->Enable();
1420 +                this->ReglobalizeButton->Enable();
1421          }
1422  
1423  
# Line 1352 | 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 1365 | 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 1378 | 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 1410 | Line 1510 | void MainWindow::OnSepRadioButtonSelecte
1510   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Separated_RadioButton
1511   */
1512  
1413 void MainWindow::OnSeparatedRadioButtonSelected( wxCommandEvent& event )
1414 {
1415        splitInstances = SPLIT;
1416
1417 }
1418
1419
1513   /*
1514   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
1515   */
# Line 1459 | Line 1552 | void MainWindow::refreshMods (vector<str
1552  
1553   void MainWindow::OnLoadClick( wxCommandEvent& event )
1554   {
1555 +        if (busy == 1) return;
1556          static const wxChar *FILETYPES = _T(
1557                  "Mod Loadouts (*.cfg)|*.cfg|"
1558                  "All files (*.*)|*.*"
# Line 1483 | Line 1577 | void MainWindow::OnLoadClick( wxCommandE
1577  
1578   void MainWindow::OnSaveClick( wxCommandEvent& event )
1579   {
1580 +        if (busy == 1) return;
1581          static const wxChar *FILETYPES = _T(
1582                  "Mod Loadouts (*.cfg)|*.cfg|"
1583                  "All files (*.*)|*.*"
# Line 1538 | 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 <                
1639 >
1640          }
1641          else {
1547                
1642          
1643 +                this->InstallButton->Disable();
1644 +                this->ReglobalizeButton->Disable();
1645  
1646   #ifdef WIN32
1647  
1648 <        boost::thread thrd2(globalizeData);
1649 <        //globalizeData();
1650 <        //boost::thread::create_thread(&globalizeData);
1651 <        //       boost::thread_group Tg;
1652 <        // Tg.create_thread( &globalizeData(), this );
1648 >                boost::thread thrd2(globalizeData);
1649 >                //globalizeData();
1650 >                //boost::thread::create_thread(&globalizeData);
1651 >                //       boost::thread_group Tg;
1652 >                // Tg.create_thread( &globalizeData(), this );
1653   #else
1654 <        globalizeData();
1559 <        setProgressBar(1000);
1560 <        setStatusArea("Done!");
1654 >                globalizeData();
1655   #endif
1656 < }
1656 >                
1657 >                this->InstallButton->Enable();
1658 >                this->ReglobalizeButton->Enable();
1659 >        }
1660  
1661   }
1662   /*
# Line 1574 | 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)