Skip to main content

History: PyOgreExecutable

Source of version: 2 (current)

Copy to clipboard
            {{Out of date}}

{{PythonVersion|Dagon(1.3)|None}}

That is what you normally would do using py2exe:

0.) first please install python 2.4, pyogre and py2exe
* [http://www.python.org/download/|Python 2.4]
* [https://developer.berlios.de/projects/pyogre/|PyOgre (Media + PyOgre)]
* [http://www.py2exe.org/|Py2exe]

1.) the pyOgre example to turn into a running executbale is: 
C:\Python24\pyogre\demos\TextureFXDemo.py

2.) content of setup.py, which must be placed at C:\Python24\pyogre\demos\setup.py: 
~pp~ from distutils.core import setup 
 import py2exe 
 setup(console=["TextureFXDemo.py"]) 
~/pp~
3.) execute this command in console: 
~pp~ cd C:\Python24\pyogre\demos python setup.py py2exe
~/pp~
4.) py2exe generates a "built" and "dist" folder; the "dist" folder contains the executable "TextureFXDemo.exe"

5.) Copy C:\Python24\pyogre\demos\Media to C:\Python24\pyogre\demos\dist\Media

6.) starting the executable: 
~pp~ C:\Python24\pyogre\demos>cd dist
 C:\Python24\pyogre\demos\dist>TextureFXDemo 
    Traceback (most recent call last): 
    File "TextureFXDemo.py", line 46, in ? 
    File "SampleFramework.pyc", line 23, in go 
    File "SampleFramework.pyc", line 33, in _setUp 
    File "pyogre\ogre.pyc", line 10230, in __init__ 
    TypeError: argument number 1: null reference of type 'Ogre::String' was received~/pp~
''__Remark: Some files are missing and must be copied manually to the distribution folder C:\Python24\pyogre\demos\dist\__''

7.) copy all __*.pkg, *.dll and *.cfg__ from following folders into the distribution folder C:\Python24\pyogre\demos\dist* C:\Python24\pyogre\demos => C:\Python24\pyogre\demos\dist* C:\Python24\Lib\site-packages\pyogre => C:\Python24\pyogre\demos\dist
8.) goto C:\Python24\pyogre\demos\dist\ and start the executable, it should run now
~pp~ C:\Python24\pyogre\demos\dist>TextureFXDemo
~/pp~