Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2534 for code


Ignore:
Timestamp:
Dec 28, 2008, 7:12:44 PM (16 years ago)
Author:
rgrieder
Message:
  • Removed ugly hack with windows/unix file path conversion.
  • Removed obsolete entries in msvc files (tolua_bind.h)
Location:
code/branches/buildsystem2
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc

    r2512 r2534  
    3131
    3232#include <fstream>
     33#include <boost/filesystem.hpp>
     34
    3335#include <OgreConfigFile.h>
    3436#include <OgreFrameListener.h>
     
    371373            ogrePluginsFolder_ = ".";
    372374
    373 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
    374         convertToWindowsPath(&ogrePluginsFolder_);
    375 #else
    376         convertToUnixPath(&ogrePluginsFolder_);
    377 #endif
    378 
     375        boost::filesystem::path folder(ogrePluginsFolder_);
    379376        // Do some SubString magic to get the comma separated list of plugins
    380377        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
    381378        for (unsigned int i = 0; i < plugins.size(); ++i)
    382             ogreRoot_->loadPlugin(ogrePluginsFolder_ + plugins[i]);
     379            ogreRoot_->loadPlugin((folder / plugins[i]).native_file_string());
    383380    }
    384381
  • code/branches/buildsystem2/src/util/String.cc

    r2509 r2534  
    493493    }
    494494}
    495 
    496 /**
    497     @brief Converts a path string to windows with "\" instead of "/".
    498     @param str String pointer to be manipulated
    499 */
    500 void convertToWindowsPath(std::string* str)
    501 {
    502     std::string& path = *str;
    503     // replace all occurences of "/" with "\"
    504     for (unsigned int i = 0; i < path.length(); ++i)
    505     {
    506         if (path[i] == '/')
    507             path[i] = '\\';
    508     }
    509     // add an extra '\\' at the end to make it a complete path
    510     if (path != "" && path[path.length() - 1] != '\\')
    511         path.append("\\");
    512 }
    513 
    514 /**
    515     @brief Converts a path string to unix with "/" instead of "\".
    516     @param str String pointer to be manipulated
    517 */
    518 void convertToUnixPath(std::string* str)
    519 {
    520     std::string& path = *str;
    521     // replace all occurences of "\" with "/"
    522     for (unsigned int i = 0; i < path.length(); ++i)
    523     {
    524         if (path[i] == '\\')
    525             path[i] = '/';
    526     }
    527     // add an extra '\\' at the end to make it a complete path
    528     if (path != "" && path[path.length() - 1] != '/')
    529         path.append("/");
    530 }
  • code/branches/buildsystem2/src/util/String.h

    r2509 r2534  
    8181}
    8282
    83 _UtilExport void         convertToWindowsPath(std::string* str);
    84 _UtilExport void         convertToUnixPath(std::string* str);
    85 
    8683#endif /* _Util_String_H__ */
  • code/branches/buildsystem2/visual_studio/vc8/core.vcproj

    r2520 r2534  
    441441                        </File>
    442442                        <File
    443                                 RelativePath="..\..\src\core\tolua_bind.h"
    444                                 >
    445                         </File>
    446                         <File
    447443                                RelativePath="$(IntDir)\ToluaBindCore.h"
    448444                                >
  • code/branches/buildsystem2/visual_studio/vc8/orxonox.vcproj

    r2520 r2534  
    843843                        </File>
    844844                        <File
    845                                 RelativePath="..\..\src\orxonox\tolua_bind.h"
    846                                 >
    847                         </File>
    848                         <File
    849845                                RelativePath="$(IntDir)\ToluaBindOrxonox.h"
    850846                                >
Note: See TracChangeset for help on using the changeset viewer.