Changeset 423 for AE/Installer
- Timestamp:
- Jul 15, 2009, 11:16:14 PM (15 years ago)
- Location:
- AE/Installer/trunk/source
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Installer/trunk/source/aeinstallerapp.cpp
r402 r423 157 157 else 158 158 { 159 TheWindow->InstallButton->Disable(); 160 TheWindow->ReglobalizeButton->Disable(); 159 161 160 162 161 #ifdef WIN32 163 boost::thread thrd3(globalize Data);162 boost::thread thrd3(globalize2); 164 163 //globalizeData(); 165 164 //boost::thread::create_thread(&globalizeData); … … 167 166 // Tg.create_thread( &globalizeData(), this ); 168 167 #else 168 TheWindow->InstallButton->Disable(); 169 TheWindow->ReglobalizeButton->Disable(); 169 170 globalizeData(); 171 TheWindow->InstallButton->Enable(); 172 TheWindow->ReglobalizeButton->Enable(); 170 173 #endif 171 174 172 TheWindow->InstallButton->Enable(); 173 TheWindow->ReglobalizeButton->Enable(); 175 174 176 } 175 177 } -
AE/Installer/trunk/source/aeinstallerapp.h
r393 r423 83 83 // _AEINSTALLERAPP_H_ 84 84 int globalizeData(void); 85 void globalize2(void); 85 86 MainWindow* TheWindow; -
AE/Installer/trunk/source/main_window.cpp
r410 r423 363 363 setProgressBar( 1000 ); 364 364 365 if( !exists("../persist.dat"))365 if(exists("../../persist.dat")) if(!exists("../persist.dat")) 366 366 copy("../../persist.dat",".."); 367 if( !exists("../key_config.txt"))367 if(exists("../../key_config.txt"))if(!exists("../key_config.txt")) 368 368 copy("../../key_config.txt",".."); 369 369 … … 546 546 547 547 void recompileAll(vector<string> installedMods) 548 { 548 {try { 549 549 busy = 1; 550 550 using namespace boost::gregorian; … … 552 552 using boost::lexical_cast; 553 553 using boost::bad_lexical_cast; 554 555 setStatusArea("Importing levels..."); 556 //setStatusArea("Recompiling Data..."); 557 path vanilla_dir = "./VanillaDats/"; 554 path vanilla_dir = "./VanillaDats/"; 558 555 string importCommand = ""; 559 556 char statusString[128]; … … 561 558 int j = 1; 562 559 string datString; 560 561 562 setStatusArea("Importing levels..."); 563 //setStatusArea("Recompiling Data..."); 564 563 565 std::stringstream out; 564 566 565 567 ptime start_time(second_clock::local_time()); 566 568 clearOldDats(); 567 remove("Install.log"); 569 570 if(exists("Install.log")) remove("Install.log"); 568 571 ofstream logfile("Install.log"); 569 572 logfile << "Mod Installation started " << to_simple_string(start_time) << endl; 570 573 logfile.close(); 574 575 571 576 if(splitInstances == SPLIT){ 572 577 recursive_directory_iterator end_iter; … … 582 587 } 583 588 } 584 catch(exception ex) { 585 589 catch(exception & ex) { 590 remove("Install.log"); 591 ofstream logfile("Install.log"); 592 593 594 logfile << "Warning, exception " << ex.what() << "!"; 595 setStatusArea("Warning, exception " + (string)ex.what() + "!"); 596 logfile.close(); 586 597 } 587 598 } 588 599 try { 589 600 //recursive_directory_iterator end_iter; 590 601 591 602 592 603 out << numberOfDats; … … 722 733 Sleep(1000); 723 734 setProgressBar(0); 724 busy = 0; 725 } 735 736 } 737 catch(exception & ex) { 738 remove("Install.log"); 739 ofstream logfile("Install.log"); 740 741 742 logfile << "Warning, exception " << ex.what() << "!"; 743 setStatusArea("Warning, exception " + (string)ex.what() + "!"); 744 logfile.close(); 745 } 746 busy = 0; 747 } 748 726 749 727 750 void writeInstalledMods(vector<string> installedMods) … … 1392 1415 recompileAll(thePackages); 1393 1416 TheInstallButton->Enable(); 1417 1394 1418 } 1395 1419 … … 1397 1421 }; 1398 1422 1423 void globalize2(void) { 1424 TheInstallButton->Disable(); 1425 globalizeData(); 1426 TheInstallButton->Enable(); 1427 } 1428 1429 1430 1399 1431 void MainWindow::OnInstallButtonClick( wxCommandEvent& event ) 1400 1432 { 1401 1433 1402 1434 vector<string> localPackages; 1403 localPackages.push_back(" Globalize");1435 localPackages.push_back("00000Globalize"); 1404 1436 for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); 1405 1437 if ( !localPackages.empty() ) { 1406 1438 sort(localPackages.begin(), localPackages.end()); 1439 localPackages[0] = "Globalize"; 1407 1440 //MainWindow::MainWindow().Hide(); 1408 1441 // boost::thread thrd2(recompileAll(localPackages) );
Note:
See TracChangeset
for help on using the changeset viewer.