SettingUpAnApplication
From PyWiki
To run you first PythonOgre application you need at least 3 files. It would recommend you to create for every project an own directory. The following files are all copied from the demos folder.
plugins.cfg
Here you have to write down the path to your "plugins" folder. There are the dynamic libraries for rendering.
This is an example for Windows (note: path is relative)
# Defines plugins to load # Define plugin folder PluginFolder=../../plugins # Define D3D rendering implementation plugin Plugin=RenderSystem_GL.dll Plugin=RenderSystem_Direct3D9.dll Plugin=Plugin_ParticleFX.dll Plugin=Plugin_BSPSceneManager.dll Plugin=Plugin_OctreeSceneManager.dll Plugin=Plugin_CgProgramManager.dll
This is an example for mac os x/linux (note: path is absolute)
# Defines plugins to load #Define plugin folder PluginFolder=/home/andy/development/root/usr/lib/OGRE # Define D3D rendering implementation plugin Plugin=RenderSystem_GL Plugin=Plugin_ParticleFX Plugin=Plugin_BSPSceneManager Plugin=Plugin_OctreeSceneManager Plugin=Plugin_CgProgramManager
resources.cfg
Here you define the path to the sounds, fonts, 3d models, textures and other resources you use in your program.
This is an example for all OS (note: path is relative)
[Bootstrap] Zip=../media/packs/OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=../media FileSystem=../media/fonts FileSystem=../media/sounds FileSystem=../media/Audio FileSystem=../media/materials/programs FileSystem=../media/materials/scripts FileSystem=../media/materials/textures FileSystem=../media/models FileSystem=../media/overlays FileSystem=../media/particle FileSystem=../media/gui Zip=../media/packs/cubemap.zip Zip=../media/packs/cubemapsJS.zip Zip=../media/packs/dragon.zip Zip=../media/packs/fresneldemo.zip Zip=../media/packs/ogretestmap.zip Zip=../media/packs/skybox.zip #Zip=../media/packs/chiropteraDM.pk3
script.py
At least you need a python file in which you write your code. If you got all these files you can run your project. Important: If you do the tutorial you have to copy the "SampleFramework.py" from the "demos" directory in your project folder.