ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/subs.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/subs.cpp (file contents):
Revision 319 by gumby, Tue May 5 07:30:34 2009 UTC vs.
Revision 320 by gumby, Tue May 5 18:56:20 2009 UTC

# Line 42 | Line 42 | bool splitInstances;
42   using namespace boost::filesystem;
43   using namespace std;
44  
45 < string strInstallCfg = "../GameDataFolder/Install.cfg";
45 > string strInstallCfg = "../GameDataFolder/Add.cfg";
46  
47  
48   int main(void)
49   {
50          if ( exists( "../GameDataFolder/level0_Final.sep" ) ) splitInstances = NOT_SPLIT;
51 <        else splitInstances = SPLIT;
51 >        else splitInstances = NOT_SPLIT;
52          //      SetConsoleTitle("AE Installer"); windows junk, convert to SDL
53   #ifdef WIN32    
54          system("color 0A");
# Line 67 | Line 67 | int mainMenu(void)
67          do
68          {
69                  if( exists( "../GameDataFolder" ) ) {
70 <                        cout << "\n1. Install new packages\n";
71 <                        cout << "2. Uninstall packages\n";
70 >                        cout << "\n1. Add new packages\n";
71 >                        cout << "2. Remove packages\n";
72                          cout << "3. See what is installed\n";
73                          cout << "4. Globalize data\n";
74                          cout << "5. About AE\n";
# Line 340 | Line 340 | int installPackages(void)
340                          cout << "\n"
341                                   << (*package_iter).readme << "\n\n"
342                                   << "Please enter a number choice\n"
343 <                                 << " 1. Install\n"
344 <                                 << " 2. Don't Install\n"
343 >                                 << " 1. Add\n"
344 >                                 << " 2. Don't Add\n"
345                                   << "";
346                          index++;
347                          choice = 0;
# Line 372 | Line 372 | int installPackages(void)
372          }
373          if (installed_something == 0)
374          {
375 <                cout << "Warning: You didn't install anything!\n";
375 >                cout << "Warning: You didn't add anything!\n";
376                  //would you like to recombine your data?
377                  return 0;
378          }
# Line 423 | Line 423 | int err = 0;
423                          cout << "\n"
424                                   << (*package_iter).readme << "\n\n"
425                                   << "Please enter a number choice\n"
426 <                                 << " 1. Uninstall\n"
427 <                                 << " 2. Don't Uninstall\n"
426 >                                 << " 1. Remove\n"
427 >                                 << " 2. Don't Remove\n"
428                                   << "";
429                          
430                          choice = 0;
# Line 456 | Line 456 | int err = 0;
456                  }
457                  else
458                  {
459 <                        cout << "\nWarning: You didn't uninstall anything!";
459 >                        cout << "\nWarning: You didn't remove anything!";
460                  }
461                                  //would you like to recombine your data?
462                          return 0;
# Line 673 | Line 673 | void recompileAll(vector<string> install
673                  catch( const std::exception & ex ) {
674                          cout << "Warning, exception " << ex.what() << "!\n"
675                          << "You probably need to re-globalize.";
676 <                        create_directory( "./packages/VanillaDats" );
676 >                        //create_directory( "./packages/VanillaDats" );
677                  }
678                  
679          }
# Line 687 | Line 687 | void recompileAll(vector<string> install
687                          {
688                                  if ( is_directory( dir_itr->status() ) )
689                                  {
690 <                                        system((strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
691 <                                                        + ".dat").c_str());
690 >                                        importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " " + "../GameDataFolder/" + dir_itr->path().filename()
691 >                                                        + ".dat";
692 >                                        for (int i = 0; i < installedMods.size(); ++i) {
693 >                                        if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename()  ))
694 >                                                importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename();
695 >                                        }
696 >                                        importCommand += " ../GameDataFolder/" + dir_itr->path().filename() + ".dat";
697 >                                        system(importCommand.c_str());
698                                  }
699                          }
700                          catch ( const std::exception & ex )

Diff Legend

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