Changeset 462 for AE/Installer/trunk
- Timestamp:
- Oct 10, 2009, 4:49:27 AM (15 years ago)
- Location:
- AE/Installer/trunk/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Installer/trunk/source/installer.h
r461 r462 101 101 void setProgressBar( int ); 102 102 103 void copyBSL( string, vector<string> , ModPackage );103 void copyBSL( string, vector<string>&, ModPackage ); 104 104 105 105 //New copy(path, path) function. Too lazy to implement my own, this is basically how I would have done it though. -
AE/Installer/trunk/source/main_window.cpp
r461 r462 723 723 724 724 725 ofstream BSLlog("BSL.log");725 726 726 727 727 vector<string> BSLfolders; … … 729 729 730 730 731 731 ofstream BSLlog("BSL.log"); 732 732 for ( directory_iterator dir_itr( "../GameDataFolder/IGMD/" ), end_itr; 733 733 dir_itr != end_itr; … … 742 742 for (unsigned int j = 0; j < globalPackages.size(); ++j) { //looking in the global packages 743 743 if (globalPackages[j].modStringName == installedMods[i]) { //for a mod that has BSL in it 744 744 /*BSLlog << "Testing " << globalPackages[j].modStringName << "\n" 745 745 << "HasBSL: " << globalPackages[j].hasBSL << "\n" 746 << "HasAddon: " << globalPackages[j].hasAddon << "\n"; 746 << "HasAddon: " << globalPackages[j].hasAddon << "\n";*/ 747 747 if(!(globalPackages[j].hasAddon || globalPackages[j].hasBSL)) break; //skip non-BSL 748 if( exists( "packages/" + globalPackages[j].modStringName + "/BSL " ) )748 if( exists( "packages/" + globalPackages[j].modStringName + "/BSL/" ) ) { 749 749 copyBSL("packages/" + globalPackages[j].modStringName + "/BSL", BSLfolders, globalPackages[j] ); 750 BSLlog << "Copied " << globalPackages[j].modStringName << "!\n"; 751 } 752 750 753 } 751 754 … … 754 757 755 758 ModPackage emptyPackage; 759 emptyPackage.modStringName = "VanillaBSL"; 760 emptyPackage.hasBSL = 1; 756 761 copyBSL("packages/VanillaBSL/IGMD", BSLfolders, emptyPackage); 757 762 BSLlog.close(); … … 764 769 string finallyDone = "Done! You can now play Oni."; 765 770 766 a 771 767 772 768 773 setStatusArea(finallyDone); … … 798 803 } 799 804 800 void copyBSL(string copypath, vector<string> BSLfolders, ModPackage pkg) { 805 void copyBSL(string copypath, vector<string>& BSLfolders, ModPackage pkg) { 806 807 ofstream BSLlog("BSL2.log", ios::app ); 808 801 809 try { 802 810 for ( directory_iterator dir_itr( copypath ), end_itr; … … 805 813 806 814 if ( is_directory( dir_itr->path() ) && dir_itr->path().string() != ".svn" ) { 815 BSLlog << "Testing " << dir_itr->path().string() << " HasBSL: " << pkg.hasBSL << " HasAddon: " << pkg.hasAddon << "\n"; 807 816 int skip_folder = 0; 817 808 818 for(unsigned int k = 0; k < BSLfolders.size(); k++) {//iterate through already found BSL folders 819 BSLlog << "testing " << dir_itr->path().filename() << " vs " << BSLfolders[k] << "\n"; 809 820 if(dir_itr->path().filename() == BSLfolders[k]) { 810 skip_folder = 1; 821 skip_folder = 1; 822 BSLlog << "skipping " << BSLfolders[k] << " in " << pkg.modStringName << "\n"; 811 823 break; 812 824 } … … 816 828 Sleep(100); 817 829 create_directory( "../GameDataFolder/IGMD/" + dir_itr->path().filename()); 818 830 BSLlog << "Copied " << dir_itr->path().string() << " in " << pkg.modStringName << "!\n"; 819 831 for ( directory_iterator bsl_itr( dir_itr->path() ); 820 832 bsl_itr != end_itr; … … 824 836 } 825 837 } 826 BSLfolders.push_back( dir_itr->path().filename() ); 838 BSLfolders.push_back( dir_itr->path().filename() ); //add back check for addon 839 BSLlog << "Pushing " << dir_itr->path().filename() << "\n" ; 827 840 } 828 841 } … … 834 847 while(1) Sleep(1000); 835 848 } 836 837 } 838 839 849 BSLlog.close(); 850 851 } 852 853 840 854 void writeInstalledMods(vector<string> installedMods) 841 855 {
Note:
See TracChangeset
for help on using the changeset viewer.