| 33 |
|
|
| 34 |
|
#include "boost/filesystem.hpp" // includes all needed Boost.Filesystem declarations |
| 35 |
|
#include "boost/lexical_cast.hpp" //int -> string |
| 36 |
+ |
#include "boost/algorithm/string.hpp" |
| 37 |
|
#include "installer.h" |
| 38 |
|
|
| 39 |
|
#ifdef WIN32 |
| 65 |
|
using namespace std; |
| 66 |
|
|
| 67 |
|
|
| 68 |
+ |
vector<string> globalInstalledMods; |
| 69 |
+ |
vector<ModPackage> globalPackages; |
| 70 |
|
|
| 71 |
|
|
| 72 |
|
#include "boost/date_time/gregorian/gregorian.hpp" |
| 77 |
|
|
| 78 |
|
string output; |
| 79 |
|
string escape_me = "& ;()|<>\"'\\#*?$"; |
| 80 |
< |
for(int i = 0; i < input.size(); i++) { |
| 81 |
< |
for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\'; |
| 80 |
> |
for(unsigned int i = 0; i < input.size(); i++) { |
| 81 |
> |
for(unsigned int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '\\'; |
| 82 |
|
output += input[i]; |
| 83 |
|
} |
| 84 |
|
return output; |
| 195 |
|
} |
| 196 |
|
logfile << "Exporting and moving...\n\n"; |
| 197 |
|
int total_steps = 8 + 2 * num_levels; |
| 198 |
+ |
|
| 199 |
|
for(int i = 0; i < 15; i++) |
| 200 |
|
{ |
| 201 |
|
|
| 211 |
|
system((strOniSplit + " -export ../GameDataFolder/level" + levels[i] + "_Final ../../GameDataFolder/level" + levels[i] + "_Final.dat").c_str()); |
| 212 |
|
create_directory( "VanillaDats/level" + levels[i] + "_Final" ); |
| 213 |
|
create_directory( "VanillaDats/level" + levels[i] + "_Final/level" + levels[i] + "_Final" ); |
| 214 |
+ |
|
| 215 |
+ |
//Moves the AKEV and other files into a safe directory so that level specific textures are not globalized... |
| 216 |
+ |
if ( strcmp(levels[i].c_str(), "0") ){ |
| 217 |
+ |
create_directory( "../GameDataFolder/level" + levels[i] + "_Final/AKEV" ); |
| 218 |
+ |
system((strOniSplit + " -move:overwrite ../GameDataFolder/level" + levels[i] + "_Final/AKEV ../GameDataFolder/level" + levels[i] + "_Final/AKEV*.oni").c_str()); |
| 219 |
+ |
|
| 220 |
+ |
} |
| 221 |
|
|
| 222 |
|
directory_iterator end_iter; |
| 223 |
|
for ( directory_iterator dir_itr( "../GameDataFolder/level" + levels[i] + "_Final" ); dir_itr != end_iter; ++dir_itr ) |
| 313 |
|
|
| 314 |
|
|
| 315 |
|
} |
| 316 |
+ |
|
| 317 |
|
logfile << "\tCleaning up TXMPs...\n"; |
| 318 |
|
system( (strOniSplit + " -move:delete " + Textures.string() + " ../GameDataFolder/level" + levels[i] + "_Final/TXMP*.oni").c_str()); |
| 319 |
+ |
|
| 320 |
+ |
|
| 321 |
+ |
if ( strcmp(levels[i].c_str(), "0") ){ |
| 322 |
+ |
system((strOniSplit + " -move:overwrite ../GameDataFolder/level" + levels[i] + "_Final ../GameDataFolder/level" + levels[i] + "_Final/AKEV/AKEV*.oni").c_str()); |
| 323 |
+ |
remove( "../GameDataFolder/level" + levels[i] + "_Final/AKEV" ); |
| 324 |
+ |
} |
| 325 |
+ |
|
| 326 |
|
parts_done++; |
| 327 |
|
|
| 328 |
|
setProgressBar( (int)(1000 * (float)(parts_done) / (float)(total_steps) )); |
| 350 |
|
create_directory( VanillaSounds.parent_path() ); |
| 351 |
|
create_directory( VanillaAnimations.remove_filename() ); |
| 352 |
|
|
| 353 |
< |
for(int j = 0; j < GDFPaths.size(); j++) { |
| 353 |
> |
for(unsigned int j = 0; j < GDFPaths.size(); j++) { |
| 354 |
|
logfile << "\tReimporting " << GDFPaths[j].filename() << ".oni\n"; |
| 355 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": reimporting " + GDFPaths[j].filename() ); |
| 356 |
|
system((strOniSplit + " " + strImportOption + " " + GDFPaths[j].string() + " " + VanillaPaths[j].string()).c_str()); |
| 360 |
|
logfile << "\nMoving level0_Characters\n"; |
| 361 |
|
setStatusArea("Step " + lexical_cast<std::string>(parts_done + 1) + "/" + lexical_cast<std::string>(total_steps) + ": moving level0_Characters" ); |
| 362 |
|
copy((path)"../GameDataFolder/level0_Characters", (path)("VanillaDats/level0_Final")); |
| 363 |
+ |
GDFPaths.push_back( Characters ); |
| 364 |
+ |
for(int i = 0; i < GDFPaths.size(); i++) |
| 365 |
+ |
{ |
| 366 |
+ |
directory_iterator end_iter; |
| 367 |
+ |
for ( directory_iterator dir_itr( GDFPaths[i] ); dir_itr != end_iter; ++dir_itr ) |
| 368 |
+ |
{ |
| 369 |
+ |
try |
| 370 |
+ |
{ |
| 371 |
+ |
|
| 372 |
+ |
|
| 373 |
+ |
rename(dir_itr->path(), "../GameDataFolder/level0_Final/" + dir_itr->path().filename() ); |
| 374 |
+ |
} |
| 375 |
+ |
catch(exception &ex) { |
| 376 |
+ |
|
| 377 |
+ |
} |
| 378 |
+ |
} |
| 379 |
+ |
} |
| 380 |
|
/* |
| 381 |
|
printf(Step_x_x,"Step %d/%d: reimporting level0_Characters", parts_done,7 + 2 * num_levels); setStatusArea((string)Step_x_x);setProgressBar( (int)(1000 * (float)(parts_done) / (float)(7 + 2 * num_levels) )); |
| 382 |
|
system((strOniSplit + " " + strImportOption + " " + Characters.string() + " " + VanillaCharacters.string()).c_str()); |
| 399 |
|
setProgressBar( 1000 ); |
| 400 |
|
|
| 401 |
|
if(exists("../../persist.dat")) if(!exists("../persist.dat")) |
| 402 |
+ |
|
| 403 |
+ |
//TODO: Concactate level0 Dirs. |
| 404 |
+ |
|
| 405 |
|
copy("../../persist.dat",".."); |
| 406 |
|
if(exists("../../key_config.txt"))if(!exists("../key_config.txt")) |
| 407 |
|
copy("../../key_config.txt",".."); |
| 447 |
|
|
| 448 |
|
try |
| 449 |
|
{ |
| 450 |
< |
directory_iterator end_iter; |
| 412 |
< |
for (directory_iterator dir_itr("./packages"); dir_itr != end_iter; ++dir_itr) |
| 450 |
> |
for (directory_iterator dir_itr("./packages"), end_itr; dir_itr != end_itr; ++dir_itr) |
| 451 |
|
{ |
| 452 |
|
file.open((dir_itr->path().string() + "/" + MODINFO_CFG).c_str()); |
| 453 |
|
//cout << filename << "\n"; |
| 526 |
|
} |
| 527 |
|
else if (!HasOnis.compare(*iter)) { |
| 528 |
|
iter++; iter++; |
| 529 |
< |
if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasOnis = 1; //Gotta love c++'s lack of a standard case-insensitive |
| 530 |
< |
else if (!HasBSL.compare(*iter)) { // string comparer...I know my implementation here sucks. I need to change it to check each character one by one. At the moment, |
| 531 |
< |
iter++; iter++;} // using "YFR" would probably set it off. :< |
| 532 |
< |
|
| 533 |
< |
if (toupper((*iter)[0]) + toupper((*iter)[1]) + toupper((*iter)[2]) == 'Y' + 'E' + 'S') package.hasBSL = 1; |
| 529 |
> |
if ( boost::iequals(*iter, "Yes")) package.hasOnis = 1; |
| 530 |
> |
} |
| 531 |
> |
else if (!HasBSL.compare(*iter)) { // string comparer...I know my implementation here sucks. I need to change it to check each character one by one. At the moment, |
| 532 |
> |
iter++; iter++; // using "YFR" would probably set it off. :< |
| 533 |
> |
if ( boost::iequals(*iter, "Yes")) package.hasBSL = 1; |
| 534 |
> |
else if ( boost::iequals(*iter, "Addon")) package.hasAddon = 1; |
| 535 |
|
} |
| 536 |
|
else if (!HasDeltas.compare(*iter)) { |
| 537 |
|
iter++; iter++; |
| 557 |
|
//cout << " "; |
| 558 |
|
package.category += *iter + " "; |
| 559 |
|
} |
| 521 |
– |
} |
| 560 |
|
} |
| 561 |
< |
else if (!Creator.compare(*iter)) { //if it contains the name |
| 562 |
< |
for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) { //interates through the words, ends if it reaches the end of the line or a "//" comment |
| 563 |
< |
if (ARROW.compare(*iter) && Creator.compare(*iter)) { //ignores "->" and "Category" |
| 564 |
< |
//cout << *iter; |
| 565 |
< |
//cout << " "; |
| 566 |
< |
package.creator += *iter + " "; |
| 567 |
< |
} |
| 561 |
> |
} |
| 562 |
> |
else if (!Creator.compare(*iter)) { //if it contains the name |
| 563 |
> |
for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) { //interates through the words, ends if it reaches the end of the line or a "//" comment |
| 564 |
> |
if (ARROW.compare(*iter) && Creator.compare(*iter)) { //ignores "->" and "Category" |
| 565 |
> |
//cout << *iter; |
| 566 |
> |
//cout << " "; |
| 567 |
> |
package.creator += *iter + " "; |
| 568 |
|
} |
| 569 |
|
} |
| 570 |
< |
else if (!Readme.compare(*iter)) { //if it contains the name |
| 571 |
< |
for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) { //interates through the words, ends if it reaches the end of the line or a "//" comment |
| 572 |
< |
if (ARROW.compare(*iter) && Readme.compare(*iter)) { //ignores "->" and "Category" |
| 573 |
< |
if(!(*iter).compare("\\n")) package.readme += '\n'; |
| 574 |
< |
else package.readme += *iter + " "; |
| 575 |
< |
} |
| 570 |
> |
} |
| 571 |
> |
else if (!Readme.compare(*iter)) { //if it contains the name |
| 572 |
> |
for ( ; iter !=tokens.end() && SLASHSLASH.compare(*iter); iter++) { //interates through the words, ends if it reaches the end of the line or a "//" comment |
| 573 |
> |
if (ARROW.compare(*iter) && Readme.compare(*iter)) { //ignores "->" and "Category" |
| 574 |
> |
if(!(*iter).compare("\\n")) package.readme += '\n'; |
| 575 |
> |
else package.readme += *iter + " "; |
| 576 |
|
} |
| 577 |
|
} |
| 578 |
|
} |
| 541 |
– |
|
| 579 |
|
} |
| 580 |
< |
package.doOutput(); |
| 581 |
< |
return package; |
| 580 |
> |
|
| 581 |
> |
} |
| 582 |
> |
package.doOutput(); |
| 583 |
> |
return package; |
| 584 |
|
} |
| 585 |
|
|
| 586 |
|
void recompileAll(vector<string> installedMods) |
| 650 |
|
if ( is_directory( dir_itr->status() ) && dir_itr.level() == 1) |
| 651 |
|
{ |
| 652 |
|
importCommand = strOniSplit + " " + strImportOption + " " + dir_itr->path().parent_path().string() + '/' + dir_itr->path().filename(); |
| 653 |
< |
for (int i = 0; i < installedMods.size(); ++i) { |
| 653 |
> |
for (unsigned int i = 0; i < installedMods.size(); ++i) { |
| 654 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename() )) |
| 655 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().parent_path().filename() + '/' + dir_itr->path().filename(); |
| 656 |
|
|
| 723 |
|
if ( is_directory( dir_itr->status() ) ) |
| 724 |
|
{ |
| 725 |
|
importCommand = strOniSplit + " " + strImportOption + " " + vanilla_dir.string() + dir_itr->path().filename() + " "; |
| 726 |
< |
for (int i = 0; i < installedMods.size(); ++i) { |
| 726 |
> |
for (unsigned int i = 0; i < installedMods.size(); ++i) { |
| 727 |
|
if (exists("packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename() )) |
| 728 |
|
importCommand += " packages/" + installedMods[i] + "/oni/" + dir_itr->path().filename(); |
| 729 |
|
} |
| 750 |
|
logfile.close(); |
| 751 |
|
}} |
| 752 |
|
} |
| 753 |
+ |
|
| 754 |
+ |
|
| 755 |
+ |
|
| 756 |
+ |
|
| 757 |
+ |
|
| 758 |
+ |
|
| 759 |
+ |
|
| 760 |
+ |
|
| 761 |
+ |
|
| 762 |
+ |
|
| 763 |
+ |
vector<string> BSLfolders; |
| 764 |
+ |
vector<string> skippedfolders; |
| 765 |
+ |
|
| 766 |
+ |
|
| 767 |
+ |
ofstream BSLlog("BSL.log"); |
| 768 |
+ |
for ( directory_iterator dir_itr( "../GameDataFolder/IGMD/" ), end_itr; |
| 769 |
+ |
dir_itr != end_itr; |
| 770 |
+ |
++dir_itr ) { |
| 771 |
+ |
if( exists(dir_itr->path().string() + "/ignore.txt") ){ |
| 772 |
+ |
BSLfolders.push_back(dir_itr->path().filename()); |
| 773 |
+ |
skippedfolders.push_back(dir_itr->path().filename()); |
| 774 |
+ |
} |
| 775 |
+ |
} |
| 776 |
+ |
|
| 777 |
+ |
for (int i = installedMods.size() - 1; i >= 0; i--) { //Iterates through the installed mods (backwards :P) |
| 778 |
+ |
for (unsigned int j = 0; j < globalPackages.size(); ++j) { //looking in the global packages |
| 779 |
+ |
if (globalPackages[j].modStringName == installedMods[i]) { //for a mod that has BSL in it |
| 780 |
+ |
/*BSLlog << "Testing " << globalPackages[j].modStringName << "\n" |
| 781 |
+ |
<< "HasBSL: " << globalPackages[j].hasBSL << "\n" |
| 782 |
+ |
<< "HasAddon: " << globalPackages[j].hasAddon << "\n";*/ |
| 783 |
+ |
if(!(globalPackages[j].hasAddon || globalPackages[j].hasBSL)) break; //skip non-BSL |
| 784 |
+ |
if( exists( "packages/" + globalPackages[j].modStringName + "/BSL/" ) ) { |
| 785 |
+ |
copyBSL("packages/" + globalPackages[j].modStringName + "/BSL", BSLfolders, globalPackages[j] ); |
| 786 |
+ |
BSLlog << "Copied " << globalPackages[j].modStringName << "!\n"; |
| 787 |
+ |
} |
| 788 |
+ |
|
| 789 |
+ |
} |
| 790 |
+ |
|
| 791 |
+ |
} |
| 792 |
+ |
} |
| 793 |
+ |
|
| 794 |
+ |
ModPackage emptyPackage; |
| 795 |
+ |
emptyPackage.modStringName = "VanillaBSL"; |
| 796 |
+ |
emptyPackage.hasBSL = 1; |
| 797 |
+ |
copyBSL("packages/VanillaBSL/IGMD", BSLfolders, emptyPackage); |
| 798 |
+ |
BSLlog.close(); |
| 799 |
+ |
|
| 800 |
+ |
|
| 801 |
|
logfile << "Writing config file"; |
| 802 |
|
writeInstalledMods(installedMods); |
| 803 |
|
setProgressBar(1000); |
| 804 |
< |
setStatusArea("Done! You can now play Oni."); |
| 804 |
> |
|
| 805 |
> |
string finallyDone = "Done! You can now play Oni."; |
| 806 |
> |
|
| 807 |
> |
|
| 808 |
> |
|
| 809 |
> |
setStatusArea(finallyDone); |
| 810 |
|
|
| 811 |
|
ptime end_time(second_clock::local_time()); |
| 812 |
|
time_period total_time (start_time, end_time); |
| 815 |
|
ofstream logfile2("Install.log", ios::app | ios::ate); |
| 816 |
|
string outstring = (string)"\n\nGlobalization ended " + to_simple_string(end_time) + "\nThe process took ";// + (string)total_time.length(); |
| 817 |
|
|
| 818 |
< |
logfile2 << "\nGlobalization ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length(); |
| 818 |
> |
logfile2 << "\nInstallation ended " << to_simple_string(end_time) << "\nThe process took " << total_time.length(); |
| 819 |
|
|
| 820 |
|
//logfile2.write(outstring.c_str(), outstring.length()); |
| 821 |
|
logfile2.close(); |
| 824 |
|
|
| 825 |
|
Sleep(1000); |
| 826 |
|
setProgressBar(0); |
| 827 |
< |
|
| 827 |
> |
|
| 828 |
> |
} |
| 829 |
> |
catch(exception & ex) { |
| 830 |
> |
remove("Install.log"); //why did we do this? :| |
| 831 |
> |
ofstream logfile("Install.log"); |
| 832 |
> |
|
| 833 |
> |
|
| 834 |
> |
logfile << "Warning, exception " << ex.what() << "!"; |
| 835 |
> |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 836 |
> |
logfile.close(); |
| 837 |
> |
} |
| 838 |
> |
busy = 0; |
| 839 |
|
} |
| 737 |
– |
catch(exception & ex) { |
| 738 |
– |
remove("Install.log"); |
| 739 |
– |
ofstream logfile("Install.log"); |
| 840 |
|
|
| 841 |
+ |
void copyBSL(string copypath, vector<string>& BSLfolders, ModPackage pkg) { |
| 842 |
|
|
| 843 |
< |
logfile << "Warning, exception " << ex.what() << "!"; |
| 844 |
< |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 845 |
< |
logfile.close(); |
| 846 |
< |
} |
| 847 |
< |
busy = 0; |
| 843 |
> |
ofstream BSLlog("BSL2.log", ios::app ); |
| 844 |
> |
|
| 845 |
> |
try { |
| 846 |
> |
for ( directory_iterator dir_itr( copypath ), end_itr; |
| 847 |
> |
dir_itr != end_itr; |
| 848 |
> |
++dir_itr ) { |
| 849 |
> |
|
| 850 |
> |
if ( is_directory( dir_itr->path() ) && dir_itr->path().string() != ".svn" ) { |
| 851 |
> |
BSLlog << "Testing " << dir_itr->path().string() << " HasBSL: " << pkg.hasBSL << " HasAddon: " << pkg.hasAddon << "\n"; |
| 852 |
> |
int skip_folder = 0; |
| 853 |
> |
|
| 854 |
> |
for(unsigned int k = 0; k < BSLfolders.size(); k++) {//iterate through already found BSL folders |
| 855 |
> |
BSLlog << "testing " << dir_itr->path().filename() << " vs " << BSLfolders[k] << "\n"; |
| 856 |
> |
if(dir_itr->path().filename() == BSLfolders[k]) { |
| 857 |
> |
skip_folder = 1; |
| 858 |
> |
BSLlog << "skipping " << BSLfolders[k] << " in " << pkg.modStringName << "\n"; |
| 859 |
> |
break; |
| 860 |
> |
} |
| 861 |
> |
} |
| 862 |
> |
if (!skip_folder && !exists("../GameDataFolder/IGMD/" + dir_itr->path().filename() + "/ignore.txt")) { |
| 863 |
> |
remove_all( "../GameDataFolder/IGMD/" + dir_itr->path().filename() ); |
| 864 |
> |
Sleep(100); |
| 865 |
> |
create_directory( "../GameDataFolder/IGMD/" + dir_itr->path().filename()); |
| 866 |
> |
BSLlog << "Copied " << dir_itr->path().string() << " in " << pkg.modStringName << "!\n"; |
| 867 |
> |
for ( directory_iterator bsl_itr( dir_itr->path() ); |
| 868 |
> |
bsl_itr != end_itr; |
| 869 |
> |
bsl_itr++ ) { |
| 870 |
> |
if ( bsl_itr->path().extension() == ".bsl" ) { |
| 871 |
> |
copy_file(bsl_itr->path(), "../GameDataFolder/IGMD/" + dir_itr->path().filename() + "/" + bsl_itr->path().filename()); |
| 872 |
> |
} |
| 873 |
> |
} |
| 874 |
> |
BSLfolders.push_back( dir_itr->path().filename() ); //add back check for addon |
| 875 |
> |
BSLlog << "Pushing " << dir_itr->path().filename() << "\n" ; |
| 876 |
> |
} |
| 877 |
> |
} |
| 878 |
> |
} |
| 879 |
> |
} |
| 880 |
> |
catch ( const std::exception & ex ) |
| 881 |
> |
{ |
| 882 |
> |
setStatusArea("Warning, exception " + (string)ex.what() + "!"); |
| 883 |
> |
while(1) Sleep(1000); |
| 884 |
> |
} |
| 885 |
> |
BSLlog.close(); |
| 886 |
> |
|
| 887 |
|
} |
| 888 |
|
|
| 889 |
|
|
| 968 |
|
|
| 969 |
|
} |
| 970 |
|
|
| 831 |
– |
vector<string> globalInstalledMods; |
| 832 |
– |
vector<ModPackage> globalPackages; |
| 971 |
|
#include "boost/thread.hpp" |
| 972 |
|
#include <boost/thread/mutex.hpp> |
| 973 |
|
|
| 1341 |
|
|
| 1342 |
|
globalPackages = getPackages(); |
| 1343 |
|
globalInstalledMods = getInstallString(); |
| 1344 |
< |
for (int i = 0; i < globalPackages.size(); i++) { |
| 1344 |
> |
for (unsigned int i = 0; i < globalPackages.size(); i++) { |
| 1345 |
|
Mods_CheckboxList->Append(globalPackages[i].name.c_str()); |
| 1346 |
|
if( binary_search(globalInstalledMods.begin(), globalInstalledMods.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i); |
| 1347 |
|
} |
| 1380 |
|
{ |
| 1381 |
|
switch(SelectAll->Get3StateValue()) { |
| 1382 |
|
case wxCHK_UNCHECKED: |
| 1383 |
< |
for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false); |
| 1383 |
> |
for(unsigned int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false); |
| 1384 |
|
//SelectAll->Set3StateValue(wxCHK_CHECKED); |
| 1385 |
|
break; |
| 1386 |
|
case wxCHK_CHECKED: |
| 1387 |
< |
for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, true); |
| 1387 |
> |
for(unsigned int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, true); |
| 1388 |
|
//SelectAll->Set3StateValue(wxCHK_UNCHECKED); |
| 1389 |
|
break; |
| 1390 |
|
case wxCHK_UNDETERMINED: |
| 1391 |
< |
for(int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false); |
| 1391 |
> |
for(unsigned int i = 0; i < globalPackages.size(); i++) Mods_CheckboxList->Check(i, false); |
| 1392 |
|
//SelectAll->Set3StateValue(wxCHK_CHECKED); |
| 1393 |
|
break; |
| 1394 |
|
|
| 1571 |
|
|
| 1572 |
|
vector<string> localPackages; |
| 1573 |
|
localPackages.push_back("00000Globalize"); |
| 1574 |
< |
for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); |
| 1574 |
> |
for(unsigned int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) localPackages.push_back( globalPackages[i].modStringName ); |
| 1575 |
|
if ( !localPackages.empty() ) { |
| 1576 |
|
sort(localPackages.begin(), localPackages.end()); |
| 1577 |
|
localPackages[0] = "Globalize"; |
| 1713 |
|
|
| 1714 |
|
Mods_CheckboxList->Clear(); |
| 1715 |
|
//globalInstalledMods = getPackages(); |
| 1716 |
< |
for (int i = 0; i < globalPackages.size(); i++) { |
| 1716 |
> |
for (unsigned int i = 0; i < globalPackages.size(); i++) { |
| 1717 |
|
Mods_CheckboxList->Append(globalPackages[i].name.c_str()); |
| 1718 |
|
if( binary_search(s.begin(), s.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i); |
| 1719 |
|
//else Mods_CheckboxList->Check(i,0); |
| 1776 |
|
ofstream file(openFileDialog->GetPath().c_str()); |
| 1777 |
|
|
| 1778 |
|
vector<string>list; |
| 1779 |
< |
for(int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) list.push_back( globalPackages[i].modStringName ); |
| 1779 |
> |
for(unsigned int i = 0; i < globalPackages.size(); i++) if(Mods_CheckboxList->IsChecked(i)) list.push_back( globalPackages[i].modStringName ); |
| 1780 |
|
vector<string>::iterator begin_iter = list.begin(); |
| 1781 |
|
vector<string>::iterator end_iter = list.end(); |
| 1782 |
|
|