From 75778b43c0c928b88c6dc93f2c8b2c1ac6af59e5 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Fri, 25 Sep 2009 12:01:51 +0000 Subject: [PATCH] Try to make it work on Windows, as well. --- src2/creaImageIOGimmick.cpp | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src2/creaImageIOGimmick.cpp b/src2/creaImageIOGimmick.cpp index 0e3e4be..09a6fd0 100644 --- a/src2/creaImageIOGimmick.cpp +++ b/src2/creaImageIOGimmick.cpp @@ -10,8 +10,6 @@ namespace creaImageIO { - - //============================================================== Gimmick::Gimmick() : mImageAdder(0) @@ -23,7 +21,6 @@ namespace creaImageIO //============================================================== - //============================================================== Gimmick::~Gimmick() { @@ -57,7 +54,6 @@ namespace creaImageIO mSettings = new Settings(mCurrentDirectory); - std::string dbpath = GetLocalDatabasePath(); // Create or open local database std::string dpath= mCurrentDirectory + "/.gimmick/Shared/gimmick/localdatabase_Descriptor.dscp"; @@ -69,9 +65,7 @@ namespace creaImageIO mTreeHandlerMap[i_nameDB] = mLocalDatabase; //Add additional DB from user Settings - addDBSettings(); - - + addDBSettings(); } /////////////////////////////////////////////////////////////////////// @@ -131,7 +125,6 @@ namespace creaImageIO return sqlTreeH; } - //============================================================== void Gimmick::Finalize() { @@ -199,7 +192,6 @@ namespace creaImageIO return mLocalDatabasePath; } - //======================================================================== //======================================================================== @@ -237,9 +229,14 @@ namespace creaImageIO path=path.substr(0,path.size()-1); path=path.substr(0,path.find_last_of("/")); //Creating directories + +// The following stuff works on Linux, NOT CHECKED on Windows // JPR - //path+="/bin/Shared/gimmick/localdatabase_Descriptor.dscp"; // JPR +#if defined(_WIN32) + path+="/bin/Shared/gimmick/localdatabase_Descriptor.dscp"; +#else path+="/Shared/gimmick/localdatabase_Descriptor.dscp"; +#endif std::cout <<"From: " << path <second; } - - //======================================================================== /// Add the files to the tree handler void Gimmick::AddFiles(const std::string& d, @@ -406,12 +401,11 @@ namespace creaImageIO } //======================================================================== - - ///////////////////////////////////////////////////////////////////////// - // add DB from Settings file // - // @param : - // - // return : - // - ///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // add DB from Settings file // + // @param : - // + // return : - // + //////////////////////////////////////////////////////////////////////// void Gimmick::addDBSettings() { @@ -438,7 +432,5 @@ namespace creaImageIO std::string name = it_path->substr(pos +1, last_pos -pos-1 ); addDB(name, it_path->c_str()); } - - } - + } } -- 2.45.0