Changeset 423 for AE/Installer/trunk/source/main_window.cpp
- Timestamp:
- Jul 15, 2009, 11:16:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.