| 34 |
|
const bool SPLIT = 1; |
| 35 |
|
const bool NOT_SPLIT = 0; |
| 36 |
|
bool splitInstances = SPLIT; |
| 37 |
< |
|
| 37 |
> |
bool busy = 0; |
| 38 |
|
#ifdef WIN32 |
| 39 |
|
const string strOniSplit = "Onisplit.exe"; |
| 40 |
|
string strImportOption = "-import:nosep"; |
| 60 |
|
|
| 61 |
|
int globalizeData(void) |
| 62 |
|
{ |
| 63 |
< |
using boost::lexical_cast; |
| 64 |
< |
using boost::bad_lexical_cast; |
| 65 |
< |
// using namespace boost::posix_time; |
| 63 |
> |
busy = 1; |
| 64 |
> |
using boost::lexical_cast; |
| 65 |
> |
using boost::bad_lexical_cast; |
| 66 |
> |
// using namespace boost::posix_time; |
| 67 |
|
using namespace boost::gregorian; |
| 68 |
|
using namespace boost::posix_time; |
| 69 |
|
ptime start_time(second_clock::local_time()); |
| 77 |
|
ofstream logfile("Globalize.log"); |
| 78 |
|
logfile << "Globalization started " << to_simple_string(start_time) << endl; |
| 79 |
|
try { |
| 80 |
< |
|
| 80 |
> |
|
| 81 |
|
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. |
| 82 |
|
//const vector<double> ck(cv, &cv[CvSize]); |
| 83 |
|
vector<string> levels; |
| 96 |
|
path Animations = "../GameDataFolder/level0_Animations"; |
| 97 |
|
path TRAC = Animations / "level0_TRAC"; |
| 98 |
|
path TRAM = Animations / "level0_TRAM"; |
| 99 |
< |
|
| 99 |
> |
|
| 100 |
|
vector<path> GDFPaths; |
| 101 |
|
GDFPaths.push_back(Characters); |
| 102 |
|
GDFPaths.push_back(Particles); |
| 104 |
|
GDFPaths.push_back(Sounds); |
| 105 |
|
GDFPaths.push_back(TRAC); |
| 106 |
|
GDFPaths.push_back(TRAM); |
| 107 |
< |
|
| 108 |
< |
|
| 107 |
> |
|
| 108 |
> |
|
| 109 |
|
path VanillaCharacters = "packages/VanillaDats/level0_Final/level0_Characters/level0_Characters.oni"; |
| 110 |
|
path VanillaParticles = "packages/VanillaDats/level0_Final/level0_Particles/level0_Particles.oni"; |
| 111 |
|
path VanillaTextures = "packages/VanillaDats/level0_Final/level0_Textures/level0_Textures.oni"; |
| 115 |
|
path VanillaTRAM = "packages/VanillaDats/level0_Final/level0_Animations/level0_TRAM.oni"; |
| 116 |
|
|
| 117 |
|
vector<path> VanillaPaths; |
| 118 |
< |
|
| 118 |
> |
|
| 119 |
|
VanillaPaths.push_back(VanillaCharacters); |
| 120 |
|
VanillaPaths.push_back(VanillaParticles); |
| 121 |
|
VanillaPaths.push_back(VanillaTextures); |
| 122 |
|
VanillaPaths.push_back(VanillaSounds); |
| 123 |
|
VanillaPaths.push_back(VanillaTRAC); |
| 124 |
|
VanillaPaths.push_back(VanillaTRAM); |
| 125 |
< |
|
| 125 |
> |
|
| 126 |
|
/* |
| 127 |
|
if (exists("../GameDataFolder/")) |
| 128 |
|
{ |
| 143 |
|
setStatusArea("Creating needed directories..."); |
| 144 |
|
logfile << "Creating needed directories...\n"; |
| 145 |
|
create_directory( "../GameDataFolder/" ); |
| 146 |
< |
|
| 146 |
> |
|
| 147 |
|
create_directory( "packages" ); |
| 148 |
< |
|
| 148 |
> |
|
| 149 |
|
if (exists("packages/VanillaDats")) remove_all("packages/VanillaDats"); |
| 150 |
|
create_directory( "packages/VanillaDats" ); |
| 151 |
< |
|
| 151 |
> |
|
| 152 |
|
create_directory( "packages/VanillaDats/level0_Final/" ); |
| 153 |
|
//blah blah finish this. |
| 154 |
|
//logfile << "packages/VanillaDats/level0_Final/ created"; |
| 163 |
|
int num_levels = 0; |
| 164 |
|
for(int i = 1; i < 15; i++) |
| 165 |
|
{ |
| 166 |
< |
if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) { |
| 166 |
> |
if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) { |
| 167 |
|
num_levels++; |
| 168 |
|
|
| 169 |
|
} |
| 172 |
|
int total_steps = 8 + 2 * num_levels; |
| 173 |
|
for(int i = 0; i < 15; i++) |
| 174 |
|
{ |
| 175 |
< |
|
| 175 |
> |
|
| 176 |
|
//printf(levels[i],"%d",levels[i]); // int to char array |
| 177 |
< |
|
| 177 |
> |
|
| 178 |
|
if (exists("../../GameDataFolder/level" + levels[i] + "_Final.dat")) { |
| 179 |
|
logfile << "level" << levels[i] << "_Final\n"; |
| 180 |
|
logfile << "\tExporting level" << levels[i] << "_Final.dat\n"; |
| 181 |
|
//printf(Step_x_x,"Step %d/%d: exporting level%d_final.dat", parts_done + 1,, levels[i]); setStatusArea((string)Step_x_x); |
| 182 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " exporting level" + levels[i]+"_Final.dat"); |
| 183 |
|
create_directory( "../GameDataFolder/level" + levels[i] + "_Final" ); |
| 184 |
< |
// setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat"); |
| 184 |
> |
// setStatusArea(strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat"); |
| 185 |
|
system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str()); |
| 186 |
|
create_directory( "packages/VanillaDats/level" + levels[i] + "_Final" ); |
| 187 |
|
create_directory( "packages/VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); |
| 257 |
|
else if (dir_itr->path().filename().substr(0,4) == "AGDB" |
| 258 |
|
|| dir_itr->path().filename().substr(0,4) == "TRCM") { |
| 259 |
|
cout <<dir_itr->path().filename() << "\n"; |
| 260 |
< |
|
| 260 |
> |
|
| 261 |
|
if(!exists( Archive / dir_itr->filename())) rename(dir_itr->path(), Archive / dir_itr->filename()); |
| 262 |
|
else remove(dir_itr->path()); |
| 263 |
|
} |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
|
| 273 |
< |
|
| 273 |
> |
|
| 274 |
|
} |
| 275 |
|
logfile << "\tCleaning up TXMPs...\n"; |
| 276 |
|
system( (strOniSplit + " -move:delete " + Textures.string() + " ../GameDataFolder/level" + levels[i] + "_Final/TXMP*.oni").c_str()); |
| 277 |
|
parts_done++; |
| 278 |
|
|
| 279 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 280 |
< |
|
| 280 |
> |
|
| 281 |
|
} |
| 282 |
|
} |
| 283 |
|
logfile << "Reimporting levels\n"; |
| 290 |
|
system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" |
| 291 |
|
+ levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.oni").c_str()); |
| 292 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 293 |
< |
parts_done++; |
| 293 |
> |
parts_done++; |
| 294 |
|
} |
| 295 |
|
create_directory( VanillaCharacters.parent_path() ); |
| 296 |
|
create_directory( VanillaParticles.parent_path() ); |
| 297 |
|
create_directory( VanillaTextures.parent_path() ); |
| 298 |
|
create_directory( VanillaSounds.parent_path() ); |
| 299 |
|
create_directory( VanillaAnimations.remove_filename() ); |
| 300 |
< |
|
| 300 |
> |
|
| 301 |
|
for(int j = 0; j < GDFPaths.size(); j++) { |
| 302 |
|
logfile << "\tReimporting " << GDFPaths[j].filename() << ".oni\n"; |
| 303 |
|
setStatusArea("Step" + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() ); |
| 305 |
|
parts_done++; |
| 306 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 307 |
|
} |
| 308 |
< |
/* |
| 308 |
> |
/* |
| 309 |
|
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) )); |
| 310 |
|
system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str()); |
| 311 |
|
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) )); |
| 321 |
|
system((strOniSplit + " " + strImportOption + " " + TRAM.string() + " " + VanillaTRAM.string()).c_str()); |
| 322 |
|
//parts_done++; setStatusArea((string)"Copying level scripts...");setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) )); |
| 323 |
|
if (exists("../GameDataFolder/IGMD")) remove_all("../GameDataFolder/IGMD"); |
| 324 |
< |
*/ |
| 324 |
> |
*/ |
| 325 |
|
create_directory((path)"../GameDataFolder/IGMD"); |
| 326 |
|
copy((path)"packages/VanillaBSL/", (path)"../GameDataFolder"); |
| 327 |
|
setProgressBar( 1000 ); |
| 328 |
|
setStatusArea((string)"Done! Now select your mod packages and click install."); |
| 329 |
< |
// while(1) Sleep(-1); |
| 330 |
< |
|
| 329 |
> |
// while(1) Sleep(-1); |
| 330 |
> |
|
| 331 |
|
} |
| 332 |
|
catch (exception ex) { |
| 333 |
|
setStatusArea("Warning, handled exception: " + (string)ex.what()); |
| 334 |
|
} |
| 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(); |
| 335 |
|
|
| 336 |
+ |
ptime end_time(second_clock::local_time()); |
| 337 |
+ |
time_period total_time (start_time, end_time); |
| 338 |
+ |
logfile << "\n\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length(); |
| 339 |
+ |
//total_time.length().hours(); |
| 340 |
+ |
logfile.close(); |
| 341 |
+ |
busy = 0; |
| 342 |
|
return err; |
| 343 |
|
} |
| 344 |
|
|
| 491 |
|
|
| 492 |
|
void recompileAll(vector<string> installedMods) |
| 493 |
|
{ |
| 494 |
+ |
busy = 1; |
| 495 |
|
using namespace boost::gregorian; |
| 496 |
|
using namespace boost::posix_time; |
| 497 |
+ |
using boost::lexical_cast; |
| 498 |
+ |
using boost::bad_lexical_cast; |
| 499 |
|
|
| 500 |
|
setStatusArea("Importing levels..."); |
| 501 |
|
//setStatusArea("Recompiling Data..."); |
| 554 |
|
} |
| 555 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 556 |
|
|
| 557 |
< |
printf(statusString,"%d/%i\0",j,numberOfDats); |
| 557 |
> |
|
| 558 |
|
setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats |
| 559 |
< |
setStatusArea("Importing " + dir_itr->path().filename() + " " + statusString); |
| 559 |
> |
setStatusArea("Step " + lexical_cast<std::string>(j) + '/' + lexical_cast<std::string>(numberOfDats)+ ": Importing " + dir_itr->path().filename() + " "); |
| 560 |
|
|
| 561 |
|
system(importCommand.c_str()); |
| 562 |
|
//Sleep(1000); |
| 567 |
|
} |
| 568 |
|
catch ( const std::exception & ex ) |
| 569 |
|
{ |
| 570 |
< |
|
| 571 |
< |
remove("Install.log"); |
| 572 |
< |
ofstream logfile("Install.log"); |
| 573 |
< |
|
| 574 |
< |
|
| 570 |
> |
|
| 571 |
> |
remove("Install.log"); |
| 572 |
> |
ofstream logfile("Install.log"); |
| 573 |
> |
|
| 574 |
> |
|
| 575 |
|
logfile << "Warning, exception " << ex.what() << "!"; |
| 576 |
|
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 577 |
< |
logfile.close(); |
| 577 |
> |
logfile.close(); |
| 578 |
|
} |
| 579 |
|
} |
| 580 |
|
|
| 581 |
|
} |
| 582 |
|
catch( const std::exception & ex ) { |
| 583 |
< |
|
| 584 |
< |
remove("Install.log"); |
| 585 |
< |
ofstream logfile("Install.log"); |
| 586 |
< |
|
| 587 |
< |
|
| 588 |
< |
logfile << "Warning, exception " << ex.what() << "!"; |
| 589 |
< |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 590 |
< |
logfile.close(); |
| 583 |
> |
|
| 584 |
> |
remove("Install.log"); |
| 585 |
> |
ofstream logfile("Install.log"); |
| 586 |
> |
|
| 587 |
> |
|
| 588 |
> |
logfile << "Warning, exception " << ex.what() << "!"; |
| 589 |
> |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 590 |
> |
logfile.close(); |
| 591 |
|
} |
| 592 |
|
|
| 593 |
|
} |
| 626 |
|
} |
| 627 |
|
importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat >> Install.log"; |
| 628 |
|
|
| 629 |
< |
printf(statusString,"%d/%i\0",j,numberOfDats); |
| 629 |
> |
|
| 630 |
|
setProgressBar( (int)(1000 * (float)(j-1) / (float)numberOfDats) ); //100% * dat we're on / total dats |
| 631 |
< |
setStatusArea("Importing " + dir_itr->path().filename() + " " + statusString); |
| 631 |
> |
setStatusArea("Step " + lexical_cast<std::string>(j) + '/' + lexical_cast<std::string>(numberOfDats)+ ": Importing " + dir_itr->path().filename() + " "); |
| 632 |
|
|
| 633 |
|
system(importCommand.c_str()); |
| 634 |
|
|
| 637 |
|
} |
| 638 |
|
catch ( const std::exception & ex ) |
| 639 |
|
{ |
| 640 |
< |
|
| 641 |
< |
remove("Install.log"); |
| 642 |
< |
ofstream logfile("Install.log"); |
| 643 |
< |
|
| 644 |
< |
|
| 645 |
< |
logfile << "Warning, exception " << ex.what() << "!"; |
| 646 |
< |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 647 |
< |
logfile.close(); |
| 640 |
> |
|
| 641 |
> |
remove("Install.log"); |
| 642 |
> |
ofstream logfile("Install.log"); |
| 643 |
> |
|
| 644 |
> |
|
| 645 |
> |
logfile << "Warning, exception " << ex.what() << "!"; |
| 646 |
> |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 647 |
> |
logfile.close(); |
| 648 |
|
}} |
| 649 |
|
} |
| 650 |
|
logfile << "Writing config file"; |
| 651 |
|
writeInstalledMods(installedMods); |
| 652 |
|
setProgressBar(1000); |
| 653 |
|
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(); |
| 654 |
|
|
| 655 |
< |
//total_time.length().hours(); |
| 656 |
< |
|
| 655 |
> |
ptime end_time(second_clock::local_time()); |
| 656 |
> |
time_period total_time (start_time, end_time); |
| 657 |
> |
|
| 658 |
> |
|
| 659 |
> |
ofstream logfile2("Install.log", ios::app | ios::ate); |
| 660 |
> |
string outstring = (string)"\n\nGlobalization ended " + to_simple_string(end_time) + "\nThe process took ";// + (string)total_time.length(); |
| 661 |
> |
|
| 662 |
> |
logfile2 << "\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length(); |
| 663 |
> |
|
| 664 |
> |
//logfile2.write(outstring.c_str(), outstring.length()); |
| 665 |
> |
logfile2.close(); |
| 666 |
> |
|
| 667 |
> |
//total_time.length().hours(); |
| 668 |
> |
|
| 669 |
|
Sleep(1000); |
| 670 |
|
setProgressBar(0); |
| 671 |
+ |
busy = 0; |
| 672 |
|
} |
| 673 |
|
|
| 674 |
|
void writeInstalledMods(vector<string> installedMods) |
| 873 |
|
CreateControls(); |
| 874 |
|
SetIcon(GetIconResource(wxT("oni_special.ico"))); |
| 875 |
|
Centre(); |
| 876 |
< |
|
| 877 |
< |
|
| 876 |
> |
|
| 877 |
> |
|
| 878 |
|
////@end MainWindow creation |
| 879 |
|
return true; |
| 880 |
|
} |
| 962 |
|
itemMenu44->Append(wxID_ABOUT, _("About"), wxEmptyString, wxITEM_NORMAL); |
| 963 |
|
menuBar->Append(itemMenu44, _("Help")); |
| 964 |
|
itemFrame1->SetMenuBar(menuBar); |
| 965 |
< |
|
| 965 |
> |
|
| 966 |
|
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); |
| 967 |
|
itemFrame1->SetSizer(itemBoxSizer2); |
| 968 |
|
|
| 1120 |
|
|
| 1121 |
|
if(strImportOption == "-import:nosep") NoSepRadio->SetValue(true); |
| 1122 |
|
else SepRadio->SetValue(true); |
| 1123 |
< |
|
| 1124 |
< |
|
| 1123 |
> |
|
| 1124 |
> |
|
| 1125 |
|
#ifdef WIN32 |
| 1126 |
|
RedirectIOToConsole(); |
| 1127 |
|
HWND hWnd = GetConsoleWindow(); |
| 1128 |
|
ShowWindow( hWnd, SW_HIDE ); |
| 1129 |
|
#endif |
| 1130 |
< |
|
| 1131 |
< |
//MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight() ); |
| 1130 |
> |
|
| 1131 |
> |
//MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight() ); |
| 1132 |
|
} |
| 1133 |
|
|
| 1134 |
|
|
| 1222 |
|
wxUnusedVar(name); |
| 1223 |
|
if (name == _T("oni_special.ico")) |
| 1224 |
|
{ |
| 1225 |
< |
// wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO); |
| 1226 |
< |
// return icon; |
| 1225 |
> |
// wxIcon icon(_T("oni_special.ico"), wxBITMAP_TYPE_ICO); |
| 1226 |
> |
// return icon; |
| 1227 |
|
} |
| 1228 |
|
return wxNullIcon; |
| 1229 |
|
////@end MainWindow icon retrieval |
| 1275 |
|
{ |
| 1276 |
|
|
| 1277 |
|
|
| 1278 |
< |
|
| 1278 |
> |
|
| 1279 |
|
|
| 1280 |
|
if (!event.GetInt() ) { |
| 1281 |
|
OptionsPanel->Hide(); |
| 1325 |
|
localPackages.push_back("Globalize"); |
| 1326 |
|
for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); |
| 1327 |
|
if ( !localPackages.empty() ) { |
| 1328 |
< |
|
| 1328 |
> |
|
| 1329 |
|
//MainWindow::MainWindow().Hide(); |
| 1330 |
|
// boost::thread thrd2(recompileAll(localPackages) ); |
| 1331 |
|
//MainWindow::MainWindow().Show(); |
| 1332 |
+ |
this->InstallButton->Disable(); |
| 1333 |
+ |
this->ReglobalizeButton->Disable(); |
| 1334 |
|
#ifdef WIN32 |
| 1335 |
|
recompile packages(localPackages); |
| 1336 |
|
boost::thread thrd(packages); |
| 1337 |
|
#else |
| 1331 |
– |
this->Disable(); |
| 1338 |
|
recompileAll(localPackages); |
| 1333 |
– |
this->Enable(); |
| 1339 |
|
#endif |
| 1340 |
|
|
| 1341 |
+ |
this->InstallButton->Enable(); |
| 1342 |
+ |
this->ReglobalizeButton->Enable(); |
| 1343 |
|
} |
| 1344 |
|
|
| 1345 |
|
|
| 1466 |
|
|
| 1467 |
|
void MainWindow::OnLoadClick( wxCommandEvent& event ) |
| 1468 |
|
{ |
| 1469 |
+ |
if (busy == 1) return; |
| 1470 |
|
static const wxChar *FILETYPES = _T( |
| 1471 |
|
"Mod Loadouts (*.cfg)|*.cfg|" |
| 1472 |
|
"All files (*.*)|*.*" |
| 1491 |
|
|
| 1492 |
|
void MainWindow::OnSaveClick( wxCommandEvent& event ) |
| 1493 |
|
{ |
| 1494 |
+ |
if (busy == 1) return; |
| 1495 |
|
static const wxChar *FILETYPES = _T( |
| 1496 |
|
"Mod Loadouts (*.cfg)|*.cfg|" |
| 1497 |
|
"All files (*.*)|*.*" |
| 1550 |
|
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); |
| 1551 |
|
|
| 1552 |
|
if (YesNoDialog->ShowModal() == wxID_NO) { //if the user said no... |
| 1553 |
< |
|
| 1553 |
> |
|
| 1554 |
|
} |
| 1555 |
|
else { |
| 1547 |
– |
|
| 1556 |
|
|
| 1557 |
+ |
this->InstallButton->Disable(); |
| 1558 |
+ |
this->ReglobalizeButton->Disable(); |
| 1559 |
|
|
| 1560 |
|
#ifdef WIN32 |
| 1561 |
|
|
| 1562 |
< |
boost::thread thrd2(globalizeData); |
| 1563 |
< |
//globalizeData(); |
| 1564 |
< |
//boost::thread::create_thread(&globalizeData); |
| 1565 |
< |
// boost::thread_group Tg; |
| 1566 |
< |
// Tg.create_thread( &globalizeData(), this ); |
| 1562 |
> |
boost::thread thrd2(globalizeData); |
| 1563 |
> |
//globalizeData(); |
| 1564 |
> |
//boost::thread::create_thread(&globalizeData); |
| 1565 |
> |
// boost::thread_group Tg; |
| 1566 |
> |
// Tg.create_thread( &globalizeData(), this ); |
| 1567 |
|
#else |
| 1568 |
< |
globalizeData(); |
| 1569 |
< |
setProgressBar(1000); |
| 1570 |
< |
setStatusArea("Done!"); |
| 1568 |
> |
globalizeData(); |
| 1569 |
> |
setProgressBar(1000); |
| 1570 |
> |
setStatusArea("Done!"); |
| 1571 |
|
#endif |
| 1572 |
< |
} |
| 1572 |
> |
|
| 1573 |
> |
this->InstallButton->Enable(); |
| 1574 |
> |
this->ReglobalizeButton->Enable(); |
| 1575 |
> |
} |
| 1576 |
|
|
| 1577 |
|
} |
| 1578 |
|
/* |