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 357 by gumby, Fri Jun 19 21:32:17 2009 UTC vs.
Revision 372 by iritscen, Tue Jun 23 02:53:59 2009 UTC

# Line 3 | Line 3 | AE/Mod Installer
3   by Gumby and Iritscen
4   */
5  
6 < // To-do: -
6 > // To-do: - Load credits from text resource file
7 > //                - Version number in credits should be universalized
8   //                - Institute lots of checks into file-handling
9 < //                - Clear mod info fields when mod is de-selected ???
9 > //                - Clear mod info fields when mod is de-selected
10  
11   #define DEBUG
12   #include <stdio.h>
# Line 265 | Line 266 | int globalizeData(void)
266  
267                                                  }
268                                                  else {
269 <                                                        logfile << "\tMoved file: " << dir_itr->path().filename() << "\n";
269 >                                                        //logfile << "\tMoved file: " << dir_itr->path().filename() << "\n";
270                                                  }
271                                          }
272  
# Line 288 | Line 289 | int globalizeData(void)
289                          //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");
290                          setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + " reimporting level" + levels[i]+"_Final.oni");
291                          system( (strOniSplit + " " + strImportOption + " ../GameDataFolder/level" + levels[i] + "_Final packages/VanillaDats/level" + levels[i] + "_Final/level"
292 <                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni > Globalize.oni").c_str());
292 >                                + levels[i] + "_Final/level" + levels[i] + "_Final.oni >> Globalize.log").c_str());
293                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
294                          parts_done++;
295                  }
# Line 300 | Line 301 | int globalizeData(void)
301  
302                  for(int j = 0; j < GDFPaths.size(); j++) {
303                          logfile << "\tReimporting " << GDFPaths[j].filename() << ".oni\n";
304 <                        setStatusArea("Step" + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() );
304 >                        setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() );
305                          system((strOniSplit + " " + strImportOption + " " + GDFPaths[j].string() + " " + VanillaPaths[j].string()).c_str());
306                          parts_done++;
307                          setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) ));
# Line 323 | Line 324 | int globalizeData(void)
324                  if (exists("../GameDataFolder/IGMD")) remove_all("../GameDataFolder/IGMD");
325                  */
326                  create_directory((path)"../GameDataFolder/IGMD");
327 <                copy((path)"packages/VanillaBSL/", (path)"../GameDataFolder");
327 >                copy((path)"packages/VanillaBSL/IGMD", (path)"../GameDataFolder");
328                  setProgressBar( 1000 );
329                  setStatusArea((string)"Done! Now select your mod packages and click install.");
330                  //      while(1) Sleep(-1);
# Line 1279 | Line 1280 | void MainWindow::OnOptionsClick( wxComma
1280  
1281          if (!event.GetInt() ) {
1282                  OptionsPanel->Hide();
1283 <                MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
1283 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()-OptionsPanel->GetRect().GetHeight());}
1284          else {
1285 <                //Uncomment this when we release, it gets annoying if you are testing globalization a lot ;)
1286 <                //wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                      "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert",  wxOK | wxICON_EXCLAMATION       , wxDefaultPosition);
1287 <                //YesNoDialog->ShowModal();
1285 > //              Uncomment this when we release, it gets annoying if you are testing globalization a lot ;)
1286 >                wxMessageDialog* YesNoDialog = new wxMessageDialog(this,                        "WARNING: These options are for advanced users only, use with caution.", "AE Installer Alert",  wxOK | wxICON_EXCLAMATION       , wxDefaultPosition);
1287 >                YesNoDialog->ShowModal();
1288                  OptionsPanel->Show();
1289 <                MainWindow::SetSize(MainWindow::GetRect().GetWidth(), MainWindow::GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight());
1289 >                this->SetSize(this->GetRect().GetWidth(), this->GetRect().GetHeight()+OptionsPanel->GetRect().GetHeight());
1290          }
1291 +        
1292   }
1293  
1294  
# Line 1566 | Line 1568 | void MainWindow::OnReGlobalizeButtonClic
1568                  // Tg.create_thread( &globalizeData(), this );
1569   #else
1570                  globalizeData();
1569                setProgressBar(1000);
1570                setStatusArea("Done!");
1571   #endif
1572                  
1573                  this->InstallButton->Enable();

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)