]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkConfigurationFile.cxx
#3203 BBTK Feature New Normal - vtk7itk4wx3-mingw64
[bbtk.git] / kernel / src / bbtkConfigurationFile.cxx
index c79747c0378f512cd63f36182cab6a074831618e..4c6ffe3608d61dbb86f3b3530a7177fd0b87d97f 100644 (file)
@@ -64,6 +64,7 @@ namespace bbtk
     // ==> Set system paths
     mBin_path = Utilities::GetExecutablePath();
 
+
 /*     EED 23 Mars 2009
 #ifdef MACOSX
     mInstall_path = mBin_path + "/../../../..";
@@ -81,6 +82,7 @@ namespace bbtk
          }
 #endif
 
+
 ///\TODO : better use ??
          mInstall_path = mBin_path + "/..";
 
@@ -144,7 +146,6 @@ namespace bbtk
       Utilities::replace( mBbs_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
     }
 
-
     // always add "." (current working directory) at the begining
     mPackage_paths.push_back(".");
     // add system bin path (for build tree / standalone folder install)
@@ -212,6 +213,7 @@ namespace bbtk
 
     // In any case, deal with bbtk_config.xml!
     Read(configXmlFullPathName.c_str());
+       
   }
   //=========================================================================
 
@@ -230,6 +232,7 @@ namespace bbtk
     if (!Utilities::FileExists(mDot_bbtk_path)) mDot_bbtk_is_new = true;
     Utilities::CreateDirectoryIfNeeded(mDot_bbtk_path);
 
+
     mDoc_path = Utilities::MakeUserSettingsFullFileName("doc");
     Utilities::CreateDirectoryIfNeeded(mDoc_path);
 
@@ -293,6 +296,7 @@ namespace bbtk
     mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp");
     Utilities::CreateDirectoryIfNeeded(mTemp_path);
 
+
   }
   //=========================================================================
 
@@ -339,16 +343,22 @@ namespace bbtk
 
     // -----------------------------------------------------------------
 #if defined(__GNUC__)
-
     // ------------------ create some usefull strings ----------------
     // installed bbtk_path
     char bbtk_path[1000];
     strcpy(bbtk_path, Utilities::GetExecutablePath().c_str());  // JPR
     //strcpy(bbtk_path, "/usr/local/bin");
 
+
+    std::string str_home=Utilities::GetEnvHome();
+
+       #if defined(WIN32)      
+               str_home="C:"+str_home;
+       #endif
+
     // rootDirectory
     char rootDirectory[200];
-    sprintf( rootDirectory,  "%s/.bbtk", getenv("HOME"));
+    sprintf( rootDirectory,  "%s/.bbtk", str_home.c_str());
 
     // configPath
     char configPath[200];
@@ -379,7 +389,6 @@ namespace bbtk
     // ------------------------------------------------------------------
 #elif defined(WIN32)
 
-
     // installed bbtk_path
     char bbtk_path[100];
     strcpy(bbtk_path, "\"c:\\Program Files\\BBTK\\bin\"");