How can I build a user installable game?

RandomGamer

09-03-2008 00:18:41

Hey, all

I'm really excited by what I see in Python-Ogre - just working through tutorials now. However, before I get too far, I want to make sure that I'll be able to do what I need to do at the end of the road.

Is it easy/possible to build an install package (using InstallShield or something similar) so that users can install my game on a computer that doesn't have C++ or Ogre or Python on it?

I've looked at py2exe, briefly - but I'm not sure how adding Ogre on top of that would complicate matters. I understand that we'll definitely need the Visual C++ Runtimes, which is fine - installing those is a solvable problem.

Thoughts on this? Is this something that people have done?

Thanks so much
-RG

bharling

09-03-2008 09:34:10

Hi,

Yes you can definitely do this. py2exe works fine with python-ogre ( I've done it myself, you might need to manually copy a couple of DLLs into the right folder before you make an install package but thats all ). You will need to include the VC++ runtime installer, along with the installer for the latest directX, but both of those are pretty simple. I've not tried installshield myself, but I know it works with NSIS install creator, so I imagine installshield will work just as well.

py2exe does exactly what it says on the tin, your end user will not need python or ogre installed to run your application. The only downside is that people will probably be able to access your .pyc files ( note, not your original .py files ). While these are not human-readable, i think there are ways to reverse engineer them, its not easy, but it is perhaps easier than reverse engineering a c++ executable.

As i said, i've been through this process for a project i'm doing at work, and all in all it was very pain free, on windows at least :)

scriptkid

09-03-2008 11:09:43

I can also confirm that py2exe works nicely, also on windows that is. For the installer i'm using Inno Setup.

Good luck.

RandomGamer

09-03-2008 12:12:14

I can also confirm that py2exe works nicely, also on windows that is. For the installer i'm using Inno Setup.

Good luck.


Sweet! It is a problem for way down the road (I just got through the tutorials, after all - at least until they stopped by python and reverted to C++:) ), but I really wanted to know that there was a solution before I poured effort into this direction.

Thanks so much, both of you.

fpois

09-03-2008 14:41:28

I can confirm that bbfreeze also work to pack a relatively large project with quite a few dependencies where python-ogre binaries is somewhere around 40% of the whole package. I'm using NSIS as installer.

scriptkid

10-03-2008 08:59:43

It is a problem for way down the road (I just got through the tutorials, but I really wanted to know that there was a solution before I poured effort into this direction.

Well, IMO that's the correct apprauch to take. "Better safe then sorry", and phrases like that.. :)

geegee

29-05-2008 16:12:20

- If any module appears missing at compile import them in setup.py or whatever file you created for py2exe.
- Copy missing dlls in same directory where setup.py is located.
- If exe fails loading a dll which is present, eg.
' OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library c:/pythonogre12/plugins\Plugin_CgProgramManager.dll. System Error: The specified module could not be found.
in DynLib::load at ..\src\OgreDynLib.cpp (line 80)'
even if Plugin_CgProgramManager.dll is present in plugins directory, use any tool available to spy IO activity - eg. Process Monitor from sysinternals - to see what other dll is searched after Plugin_CgProgramManager.dll. In my case it was cg.dll. Some other people reported in other threads issues with loading RenderSystem_Direct3D9.dll. The same approach can be used to solve their dependency issue instead of droping D3D render.
It may not be valuable information for those used with PythonOgre, but for newbies (as me :) ) it's valuable.

ethankennerly

02-06-2008 18:57:02

As noted above, I also used py2exe and InnoSetup, which had hiccups until I automated inclusion of the necessary files. Here are the py2exe and installation scripts.

setup.py: Works with Python-Ogre and PythonCard. Automatically copies gotcha-files that py2exe needs. http://runesinger.com/source/setup.py

install.py: The base functions are usable for any installation program, not just InnoSetup. http://runesinger.com/source/install.py

Want to collaborate on Python-Ogre tools?

-- Ethan
http://runesinger.com

Swinely

12-03-2010 19:28:21

Thanks for this thread guys (I know its a bit late to add to it now but it really saved me some work) Anyone else whos trying to use py2exe.. use these pages:

Bloody annoying message where it says cant find plugin_cgProgramManager when its actually looking for cg.dll!!

http://www.ogre3d.org/wiki/index.php/Py ... ctorySetup
http://www.ogre3d.org/addonforums/viewt ... f=3&t=7611
http://www.ogre3d.org/addonforums/viewt ... f=3&t=7498