--- AE/Installer/trunk/source/installer.cpp 2010/05/26 22:55:00 548 +++ AE/Installer/trunk/source/installer.cpp 2010/05/26 23:28:22 550 @@ -647,6 +647,13 @@ void recompileAll(vector install vector skippedfolders; ofstream BSLlog("BSL.log"); + if(exists("../GameDataFolder/BSLBackup/")) { + remove_all("../GameDataFolder/BSLBackup/"); + } + else { + create_directory("../GameDataFolder/BSLBackup/"); + } + copy("../GameDataFolder/IGMD/", "../GameDataFolder/BSLBackup/"); for ( directory_iterator dir_itr( "../GameDataFolder/IGMD/" ), end_itr; dir_itr != end_itr; ++dir_itr ) { @@ -659,7 +666,7 @@ 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 - if(globalPackages[j].hasBSL)) break; //skip non-BSL + if(globalPackages[j].hasBSL) break; //skip non-BSL if( exists( "packages/" + globalPackages[j].modStringName + "/BSL/" ) ) { copyBSL("packages/" + globalPackages[j].modStringName + "/BSL", BSLfolders, globalPackages[j] ); BSLlog << "Copied " << globalPackages[j].modStringName << "!\n"; @@ -728,7 +735,7 @@ void copyBSL(string copypath, vectorpath() ) && dir_itr->path().string() != ".svn" ) { BSLlog << "Testing " << dir_itr->path().string() << " HasBSL: " << pkg.hasBSL << " HasAddon: " << pkg.hasAddon << "\n"; int skip_folder = 0; - if(!pkg.HasAddon) { + if(!pkg.hasAddon) { 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]) { @@ -1377,13 +1384,13 @@ bool ProcessAEUpdate(Install_info_cfg *c // Special code to replace our special files -- the Oni app, OniSplit, the Daodan DLL, and the GUI for OniSplit if (exists(strPathToEUFN + strOniApp)) { - if (exists(strOniApp)) + if (exists("../" + strOniApp)) #ifdef WIN32 - remove((path)strOniApp); + remove((path)("../" + strOniApp)); #else - rename((path)strOniApp, (path)(strTrashDir + strOniApp)); + rename((path)("../" + strOniApp), (path)(strTrashDir + strOniApp)); #endif - rename((path)(strPathToEUFN + strOniApp), (path)strOniApp); + rename((path)(strPathToEUFN + strOniApp), (path)("../" + strOniApp)); } if (updateAE->OniSplitVersion.compare(currentAE->OniSplitVersion) >= 1) { @@ -1506,7 +1513,7 @@ bool ProcessAEUpdate(Install_info_cfg *c // Clean up after ourselves, trashing any packages or programs in the update package that are not newer than the current AE #ifdef WIN32 - remove((path)strPathToEUFN); + remove_all((path)strPathToEUFN); #else create_directory(strTrashDir + "Unneeded update files"); rename((path)strPathToEUFN, (path)(strTrashDir + "Unneeded update files/" + strEUFN));