--- AE/Installer/trunk/source/main_window.cpp 2009/10/09 03:22:08 461 +++ AE/Installer/trunk/source/main_window.cpp 2009/10/10 02:49:27 462 @@ -722,13 +722,13 @@ void recompileAll(vector install - ofstream BSLlog("BSL.log"); + vector BSLfolders; vector skippedfolders; - +ofstream BSLlog("BSL.log"); for ( directory_iterator dir_itr( "../GameDataFolder/IGMD/" ), end_itr; dir_itr != end_itr; ++dir_itr ) { @@ -741,18 +741,23 @@ void recompileAll(vector install for (int i = installedMods.size() - 1; i >= 0; i--) { //Iterates through the installed mods (backwards :P) for (unsigned int j = 0; j < globalPackages.size(); ++j) { //looking in the global packages if (globalPackages[j].modStringName == installedMods[i]) { //for a mod that has BSL in it - BSLlog << "Testing " << globalPackages[j].modStringName << "\n" + /*BSLlog << "Testing " << globalPackages[j].modStringName << "\n" << "HasBSL: " << globalPackages[j].hasBSL << "\n" - << "HasAddon: " << globalPackages[j].hasAddon << "\n"; + << "HasAddon: " << globalPackages[j].hasAddon << "\n";*/ if(!(globalPackages[j].hasAddon || globalPackages[j].hasBSL)) break; //skip non-BSL - if( exists( "packages/" + globalPackages[j].modStringName + "/BSL" ) ) + if( exists( "packages/" + globalPackages[j].modStringName + "/BSL/" ) ) { copyBSL("packages/" + globalPackages[j].modStringName + "/BSL", BSLfolders, globalPackages[j] ); + BSLlog << "Copied " << globalPackages[j].modStringName << "!\n"; + } + } } } ModPackage emptyPackage; + emptyPackage.modStringName = "VanillaBSL"; + emptyPackage.hasBSL = 1; copyBSL("packages/VanillaBSL/IGMD", BSLfolders, emptyPackage); BSLlog.close(); @@ -763,7 +768,7 @@ void recompileAll(vector install string finallyDone = "Done! You can now play Oni."; -a + setStatusArea(finallyDone); @@ -797,17 +802,24 @@ a busy = 0; } -void copyBSL(string copypath, vector BSLfolders, ModPackage pkg) { +void copyBSL(string copypath, vector& BSLfolders, ModPackage pkg) { + + ofstream BSLlog("BSL2.log", ios::app ); + try { for ( directory_iterator dir_itr( copypath ), end_itr; dir_itr != end_itr; ++dir_itr ) { if ( is_directory( dir_itr->path() ) && dir_itr->path().string() != ".svn" ) { + BSLlog << "Testing " << dir_itr->path().string() << " HasBSL: " << pkg.hasBSL << " HasAddon: " << pkg.hasAddon << "\n"; int skip_folder = 0; + for(unsigned int k = 0; k < BSLfolders.size(); k++) {//iterate through already found BSL folders + BSLlog << "testing " << dir_itr->path().filename() << " vs " << BSLfolders[k] << "\n"; if(dir_itr->path().filename() == BSLfolders[k]) { - skip_folder = 1; + skip_folder = 1; + BSLlog << "skipping " << BSLfolders[k] << " in " << pkg.modStringName << "\n"; break; } } @@ -815,7 +827,7 @@ void copyBSL(string copypath, vectorpath().filename() ); Sleep(100); create_directory( "../GameDataFolder/IGMD/" + dir_itr->path().filename()); - + BSLlog << "Copied " << dir_itr->path().string() << " in " << pkg.modStringName << "!\n"; for ( directory_iterator bsl_itr( dir_itr->path() ); bsl_itr != end_itr; bsl_itr++ ) { @@ -823,7 +835,8 @@ void copyBSL(string copypath, vectorpath(), "../GameDataFolder/IGMD/" + dir_itr->path().filename() + "/" + bsl_itr->path().filename()); } } - BSLfolders.push_back( dir_itr->path().filename() ); + BSLfolders.push_back( dir_itr->path().filename() ); //add back check for addon + BSLlog << "Pushing " << dir_itr->path().filename() << "\n" ; } } } @@ -833,10 +846,11 @@ void copyBSL(string copypath, vector installedMods) {