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"); |
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"; |
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; |
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 |
|
} |
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; |
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; |
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 |
|
} |
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 ) |