-
Install python ogre. I recommend using this guide followed by this.
-
Download and install py2exe for your Python version.
-
Create setup.py:
# setup.py from distutils.core import setup import py2exe setup(console=['main.py'])
-
Copy the following Python DLL's to your Ogre project directory:
- C:\Python26\Lib\site-packages\ogre\renderer\OGRE\cg.dll
- C:\Python26\Lib\site-packages\ogre\renderer\OGRE\OgreMain.dll
- C:\Python26\Lib\site-packages\ogre\renderer\OGRE\boost_python-vc90-mt-1_42.dll
-
In the command line enter
python setup.py py2exe
. -
Copy Ogre plugins, the above DLL's, config files, and any media/resource files (basically anything not python code) to dist\ folder inside your project.
Congrats, you now have your Python Ogre executable! You may rename it to whatever you want. If you want to pack your dist folder into the executable, I recommend using UPX Tools. If you want to add an application icon, I recommend using Resource Hacker.