Index: /code/branches/buildsystem/bin/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem/bin/CMakeLists.txt	(revision 2243)
+++ /code/branches/buildsystem/bin/CMakeLists.txt	(revision 2244)
@@ -10,5 +10,5 @@
   SET(CONFIG_FILES ${CONFIG_FILES}
     linux/run-script
-	tardis/plugins.cfg
+	tardis/orxonox.ini
   )
 
@@ -16,5 +16,5 @@
   SET(CONFIG_FILES ${CONFIG_FILES}
     linux/run-script
-	linux/plugins.cfg
+	linux/orxonox.ini
   )
 ENDIF(IS_TARDIS)
@@ -22,5 +22,5 @@
 IF(MINGW)
   SET(CONFIG_FILES ${CONFIG_FILES}
-    "mingw/plugins.cfg"
+    "mingw/orxonox.ini"
     "mingw/orxonox.bat"
   )
Index: /code/branches/buildsystem/bin/linux/orxonox.ini
===================================================================
--- /code/branches/buildsystem/bin/linux/orxonox.ini	(revision 2244)
+++ /code/branches/buildsystem/bin/linux/orxonox.ini	(revision 2244)
@@ -0,0 +1,6 @@
+[Settings]
+dataPath_ = ../../../media/
+
+[GSGraphics]
+ogrePluginsFolder_ = /usr/lib/OGRE
+ogrePlugins_ = RenderSystem_GL, Plugin_ParticleFX, Plugin_CgProgramManager #,Plugin_BSPSceneManager, Plugin_OctreeSceneManager
Index: de/branches/buildsystem/bin/linux/plugins.cfg
===================================================================
--- /code/branches/buildsystem/bin/linux/plugins.cfg	(revision 2243)
+++ 	(revision )
@@ -1,14 +1,0 @@
-# Defines plugins to load
-
-# Define plugin folder
-PluginFolder=/usr/lib/OGRE
-
-# Define plugins
-#Plugin=RenderSystem_Direct3D9
-Plugin=RenderSystem_GL
-Plugin=Plugin_ParticleFX
-Plugin=Plugin_CgProgramManager
-#Plugin=Plugin_BSPSceneManager
-#Plugin=Plugin_OctreeSceneManager
-
-
Index: /code/branches/buildsystem/bin/mingw/orxonox.ini
===================================================================
--- /code/branches/buildsystem/bin/mingw/orxonox.ini	(revision 2244)
+++ /code/branches/buildsystem/bin/mingw/orxonox.ini	(revision 2244)
@@ -0,0 +1,6 @@
+[Settings]
+dataPath_ = ../../../media/
+
+[GSGraphics]
+ogrePluginsFolder_ = ..\..\libs\ogre\Samples\Common\bin\Release\
+ogrePlugins_ = RenderSystem_Direct3D9, RenderSystem_GL, Plugin_ParticleFX, Plugin_CgProgramManager #,Plugin_BSPSceneManager, Plugin_OctreeSceneManager
Index: de/branches/buildsystem/bin/mingw/plugins.cfg
===================================================================
--- /code/branches/buildsystem/bin/mingw/plugins.cfg	(revision 2243)
+++ 	(revision )
@@ -1,13 +1,0 @@
-# Defines plugins to load
-
-# Define plugin folder
-PluginFolder=..\..\libs\ogre\Samples\Common\bin\Release\
-
-# Define plugins
-Plugin=RenderSystem_Direct3D9
-Plugin=RenderSystem_GL
-Plugin=Plugin_ParticleFX
-Plugin=Plugin_CgProgramManager
-#Plugin=Plugin_BSPSceneManager
-#Plugin=Plugin_OctreeSceneManager
-
Index: /code/branches/buildsystem/bin/tardis/orxonox.ini
===================================================================
--- /code/branches/buildsystem/bin/tardis/orxonox.ini	(revision 2244)
+++ /code/branches/buildsystem/bin/tardis/orxonox.ini	(revision 2244)
@@ -0,0 +1,6 @@
+[Settings]
+dataPath_ = ../../../media/
+
+[GSGraphics]
+ogrePluginsFolder_ = /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/OGRE/
+ogrePlugins_ = RenderSystem_GL, Plugin_ParticleFX, Plugin_CgProgramManager #,Plugin_BSPSceneManager, Plugin_OctreeSceneManager
Index: de/branches/buildsystem/bin/tardis/plugins.cfg
===================================================================
--- /code/branches/buildsystem/bin/tardis/plugins.cfg	(revision 2243)
+++ 	(revision )
@@ -1,14 +1,0 @@
-# Defines plugins to load
-
-# Define plugin folder
-PluginFolder=/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/OGRE/
-
-# Define plugins
-#Plugin=RenderSystem_Direct3D9
-Plugin=RenderSystem_GL
-Plugin=Plugin_ParticleFX
-Plugin=Plugin_CgProgramManager
-#Plugin=Plugin_BSPSceneManager
-#Plugin=Plugin_OctreeSceneManager
-
-
Index: /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc	(revision 2243)
+++ /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc	(revision 2244)
@@ -43,4 +43,6 @@
 #include "util/Debug.h"
 #include "util/Exception.h"
+#include "util/String.h"
+#include "util/SubString.h"
 #include "core/ConsoleCommand.h"
 #include "core/ConfigValueIncludes.h"
@@ -82,4 +84,6 @@
     {
         SetConfigValue(resourceFile_, "resources.cfg").description("Location of the resources file in the data path.");
+        SetConfigValue(ogrePluginsFolder_, ".").description("Folder where the Ogre plugins are located.");
+        SetConfigValue(ogrePlugins_, "RenderSystem_GL, Plugin_ParticleFX").description("Comma separated list of all plugins to load.");
         SetConfigValue(statisticsRefreshCycle_, 200000).description("Sets the time in microseconds interval at which average fps, etc. get updated.");
     }
@@ -93,6 +97,11 @@
         this->ogreRoot_ = getParent()->getOgreRoot();
 
+        // load all the required plugins for Ogre
+        loadOgrePlugins();
+        // read resource declaration file
         this->declareResources();
-        this->loadRenderer();    // creates the render window
+        // Reads ogre config and creates the render window
+        this->loadRenderer();
+
         // TODO: Spread this so that this call only initialises things needed for the Console and GUI
         this->initialiseResources();
@@ -232,4 +241,22 @@
 
         ++frameCount_;
+    }
+
+    void GSGraphics::loadOgrePlugins()
+    {
+        // just to make sure the next statement doesn't segfault
+        if (ogrePluginsFolder_ == "")
+            ogrePluginsFolder_ = ".";
+
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+        convertToWindowsPath(&ogrePluginsFolder_);
+#else
+        convertToUnixPath(&ogrePluginsFolder_);
+#endif
+
+        // Do some SubString magic to get the comma separated list of plugins
+        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
+        for (unsigned int i = 0; i < plugins.size(); ++i)
+            ogreRoot_->loadPlugin(ogrePluginsFolder_ + plugins[i]);
     }
 
Index: /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h	(revision 2243)
+++ /code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h	(revision 2244)
@@ -56,4 +56,5 @@
         void setConfigValues();
 
+        void loadOgrePlugins();
         void declareResources();
         void loadRenderer();
@@ -88,4 +89,6 @@
         // config values
         std::string           resourceFile_;          //!< resources file name
+        std::string           ogrePluginsFolder_;     //!< Folder where the Ogre plugins are located
+        std::string           ogrePlugins_;           //!< Comma separated list of all plugins to load
         unsigned int          detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
     };
Index: /code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- /code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc	(revision 2243)
+++ /code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc	(revision 2244)
@@ -286,5 +286,6 @@
             probe.close();
 
-        ogreRoot_ = new Ogre::Root(ogrePluginsFile_, ogreConfigFile_, ogreLogFile_);
+        // Leave plugins file empty. We're going to do that part manually later
+        ogreRoot_ = new Ogre::Root("", ogreConfigFile_, ogreLogFile_);
 
 #if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.)
Index: /code/branches/buildsystem/src/util/String.cc
===================================================================
--- /code/branches/buildsystem/src/util/String.cc	(revision 2243)
+++ /code/branches/buildsystem/src/util/String.cc	(revision 2244)
@@ -485,2 +485,38 @@
     return std::string::npos;
 }
+
+/**
+    @brief Converts a path string to windows with "\" instead of "/".
+    @param str String pointer to be manipulated
+*/
+void convertToWindowsPath(std::string* str)
+{
+    std::string& path = *str;
+    // replace all occurences of "/" with "\"
+    for (unsigned int i = 0; i < path.length(); ++i)
+    {
+        if (path[i] == '/')
+            path[i] = '\\';
+    }
+    // add an extra '\\' at the end to make it a complete path
+    if (path != "" && path[path.length() - 1] != '\\')
+        path.append("\\");
+}
+
+/**
+    @brief Converts a path string to unix with "/" instead of "\".
+    @param str String pointer to be manipulated
+*/
+void convertToUnixPath(std::string* str)
+{
+    std::string& path = *str;
+    // replace all occurences of "\" with "/"
+    for (unsigned int i = 0; i < path.length(); ++i)
+    {
+        if (path[i] == '\\')
+            path[i] = '/';
+    }
+    // add an extra '\\' at the end to make it a complete path
+    if (path != "" && path[path.length() - 1] != '/')
+        path.append("/");
+}
Index: /code/branches/buildsystem/src/util/String.h
===================================================================
--- /code/branches/buildsystem/src/util/String.h	(revision 2243)
+++ /code/branches/buildsystem/src/util/String.h	(revision 2244)
@@ -77,3 +77,6 @@
 _UtilExport unsigned int getNextCommentPosition(const std::string& str, unsigned int start = 0);
 
+_UtilExport void         convertToWindowsPath(std::string* str);
+_UtilExport void         convertToUnixPath(std::string* str);
+
 #endif /* _Util_String_H__ */
