Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10295


Ignore:
Timestamp:
Mar 1, 2015, 9:59:53 PM (10 years ago)
Author:
muemart
Message:

Avoid using the system path variables on windows (also gets rid of two MSVC warnings)
The altered search path already includes the dll's directory, but it didn't work with forward slashes

Location:
code/trunk/src/libraries/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/DynLib.cc

    r8858 r10295  
    5656    {
    5757        mName = name;
     58#if defined(ORXONOX_PLATFORM_WINDOWS)
     59        //altered search path doesn't work with paths with forward slashes
     60        std::replace(mName.begin(), mName.end(), '/', '\\');
     61#endif
    5862        m_hInst = NULL;
    5963    }
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r10268 r10295  
    267267#  endif
    268268        }
    269 #endif
    270 
    271 #ifdef ORXONOX_PLATFORM_WINDOWS
    272         // Add OGRE plugin path to the environment. That way one plugin could
    273         // also depend on another without problems on Windows
    274         const char* currentPATH = getenv("PATH");
    275         std::string newPATH = pluginPath;
    276         if (currentPATH != NULL)
    277             newPATH = std::string(currentPATH) + ';' + newPATH;
    278         putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
    279269#endif
    280270
  • code/trunk/src/libraries/core/PathConfig.cc

    r9667 r10295  
    260260        size_t moduleextensionlength = moduleextension.size();
    261261
    262 #ifdef ORXONOX_PLATFORM_WINDOWS
    263         // Add that path to the PATH variable in case a module depends on another one
    264         const char* currentPATH = getenv("PATH");
    265         std::string newPATH = modulePath_.BF_NATIVE_STRING();
    266         if (currentPATH != NULL)
    267             newPATH = std::string(currentPATH) + ';' + newPATH;
    268         putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
    269 #endif
    270 
    271262        // Make sure the path exists, otherwise don't load modules
    272263        if (!boost::filesystem::exists(modulePath_))
Note: See TracChangeset for help on using the changeset viewer.