--- AE/Installer/trunk/source/main_window.cpp 2009/06/19 21:32:17 357 +++ AE/Installer/trunk/source/main_window.cpp 2009/06/21 01:50:24 371 @@ -3,9 +3,10 @@ AE/Mod Installer by Gumby and Iritscen */ -// To-do: - +// To-do: - Load credits from text resource file +// - Version number in credits should be universalized // - Institute lots of checks into file-handling -// - Clear mod info fields when mod is de-selected ??? +// - Clear mod info fields when mod is de-selected #define DEBUG #include @@ -288,7 +289,7 @@ int globalizeData(void) //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"); setStatusArea("Step " + lexical_cast(parts_done + 1) + "/" + lexical_cast(total_steps) + " reimporting level" + levels[i]+"_Final.oni"); system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level" - + levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.oni").c_str()); + + levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.log").c_str()); setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); parts_done++; } @@ -300,7 +301,7 @@ int globalizeData(void) for(int j = 0; j < GDFPaths.size(); j++) { logfile << "\tReimporting " << GDFPaths[j].filename() << ".oni\n"; - setStatusArea("Step" + lexical_cast(parts_done + 1) + "/" + lexical_cast(total_steps) + ": reimporting " + GDFPaths[j].filename() ); + setStatusArea("Step " + lexical_cast(parts_done + 1) + "/" + lexical_cast(total_steps) + ": reimporting " + GDFPaths[j].filename() ); system((strOniSplit + " " + strImportOption + " " + GDFPaths[j].string() + " " + VanillaPaths[j].string()).c_str()); parts_done++; setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); @@ -323,7 +324,7 @@ int globalizeData(void) if (exists("../GameDataFolder/IGMD")) remove_all("../GameDataFolder/IGMD"); */ create_directory((path)"../GameDataFolder/IGMD"); - copy((path)"packages/VanillaBSL/", (path)"../GameDataFolder"); + copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder"); setProgressBar( 1000 ); setStatusArea((string)"Done! Now select your mod packages and click install."); // while(1) Sleep(-1); @@ -1279,14 +1280,15 @@ void MainWindow::OnOptionsClick( wxComma if (!event.GetInt() ) { OptionsPanel->Hide(); - MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());} + this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());} else { - //Uncomment this when we release, it gets annoying if you are testing globalization a lot ;) - //wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); - //YesNoDialog->ShowModal(); +// Uncomment this when we release, it gets annoying if you are testing globalization a lot ;) + wxMessageDialog* YesNoDialog = new wxMessageDialog(this, "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert", wxOK | wxICON_EXCLAMATION , wxDefaultPosition); + YesNoDialog->ShowModal(); OptionsPanel->Show(); - MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()); + this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight()); } + } @@ -1566,8 +1568,6 @@ void MainWindow::OnReGlobalizeButtonClic // Tg.create_thread( &globalizeData(), this ); #else globalizeData(); - setProgressBar(1000); - setStatusArea("Done!"); #endif this->InstallButton->Enable();