super tasty version fixes
[feisty_meow.git] / nucleus / tools / clam_tools / vsts_version_fixer.cpp
index f43ce64fd23fb75dcede61a792a163066e722667..3beb8779ee2310e125a71ef2eff21a010aa6577e 100644 (file)
@@ -96,7 +96,7 @@ HOOPLE_MAIN(vsts_version_fixer, )
 bool vsts_version_fixer::spider_directory(directory start,
     spider_method to_invoke)
 {
-//  FUNCDEF("spider_directory");
+  FUNCDEF("spider_directory");
 
   using namespace basis;
 
@@ -133,7 +133,7 @@ string_array global_dir_whacks;
 
 bool whacking_spider(const directory &current)
 {
-//  FUNCDEF("whacking_spider");
+  FUNCDEF("whacking_spider");
   using namespace basis;
 //LOG(astring("whacking_spider: ") + current.path());
   // iterate across the files in the directory and check for evil ones.
@@ -205,7 +205,7 @@ basis::astring global_build_ini;
 
 bool stamping_spider(const directory &current)
 {
-//  FUNCDEF("stamping_spider");
+  FUNCDEF("stamping_spider");
   using namespace basis;
 //LOG(astring("stamping_spider: ") + current.path());
 
@@ -219,8 +219,13 @@ bool stamping_spider(const directory &current)
     if (current_file.ends("version.ini")
         && !current_file.iequals("core_version.ini") ) {
 //LOG(astring("found ver file: ") + current.path() + "/" + current_file);
+//
+      astring versions_directory = environment::get("FEISTY_MEOW_GENERATED_STORE");
+     // we keep our version files one level below the top of the generated store.
+      versions_directory += "/versions";
+
       version_ini::one_stop_version_stamp(current.path() + "/" + current_file,
-          global_build_ini, true);
+          versions_directory, global_build_ini, true);
     }
   }
   return true;
@@ -232,7 +237,7 @@ bool stamping_spider(const directory &current)
 
 bool vsts_version_fixer::perform_version_stamping(const filename &start_name)
 {
-//  FUNCDEF("perform_version_stamping");
+  FUNCDEF("perform_version_stamping");
   directory start(start_name);
   return spider_directory(start, stamping_spider);
 }
@@ -254,18 +259,18 @@ void vsts_version_fixer::remove_confusing_files()
   source_dir_whacks += "Release";
   source_dir_whacks += "bin";
   source_dir_whacks += "temp_build";
-  directory repo_source(environment::get("FEISTY_MEOW_DIR") + "/source");
+  directory repo_source(environment::get("FEISTY_MEOW_APEX") + "/source");
   whack_in_subdirs(repo_source, source_file_whacks, source_dir_whacks);
-  directory libra_src(environment::get("FEISTY_MEOW_DIR") + "/libraries");
+  directory libra_src(environment::get("FEISTY_MEOW_APEX") + "/libraries");
   whack_in_subdirs(libra_src, source_file_whacks, source_dir_whacks);
-  directory produ_src(environment::get("FEISTY_MEOW_DIR") + "/products");
+  directory produ_src(environment::get("FEISTY_MEOW_APEX") + "/products");
   whack_in_subdirs(produ_src, source_file_whacks, source_dir_whacks);
 
 /* this never helped.
   // clean out a variety of bad files in the objects hierarchy.
   // currently this is just the generated RES files which we have seen cause
   // vsts to think apps and dlls are up to date when they are actually not.
-  directory repo_objects(environment::get("FEISTY_MEOW_DIR"));
+  directory repo_objects(environment::get("FEISTY_MEOW_APEX"));
   string_array objects_file_whacks;
   objects_file_whacks += ".res";
   string_array objects_dir_whacks;  // none right now.
@@ -281,7 +286,7 @@ int vsts_version_fixer::execute()
 
   remove_confusing_files();
 
-  astring repo_dir = environment::get("FEISTY_MEOW_DIR");
+  astring repo_dir = environment::get("FEISTY_MEOW_APEX");
 
   // figure out which build parameter file to use.
   global_build_ini = "";