How to bundle Python with a Blenderplayer game? (2.57)

Hello everyone,

I’ve been trying to figure this out for quite a while and I still can’t get the Blenderplayer to use the ‘bundled’ Python directory.

I copied the /lib/ Python directory to the directory where my blenderplayer.exe for a game is located but the Blenderplayer doesn’t seem to be able to pick it up.

Anyone know why this is happening?

The directory structure is looking like this:

./blenderplayer.exe
./lib/

Kind regards,

- Christiaan

PS: Any news on the current SVN builds about the BGE and the Blenderplayer? Because it doesn’t play the OGG file that one of the .blends is using while it does in Blender itself (I checked the paths and they were relative and correctly referred to)

If you’re on Linux, copy the 2.57 folder from Blender to sit along side your runtime. While coping the lib folder is intended to work, it is currently broken. As for sound, there was a bug preventing audaspace from working correctly in the Blenderplayer. Newer builds should have this fixed.

Thanks, I should have added that I’m trying to get it working for Windows. So far I’ve only found threads in which they say you only need to include the /lib directory. I also tried using the /2.57/python/lib/ structure but that didn’t help much either.
The Blenderplayer console keeps on displaying the message that it can’t find a bundled version of Python.

Thanks for the information about the sound system. I tried downloading a Cucumber build but it still didn’t work. I couldn’t find another revision of Blender that included the Blenderplayer but I’ll keep on looking.

Does anyone else know anything about bundling Python with the Windows version of the Blenderplayer?

Kind regards.

You can find the bundled python files if you update blender from SVN. It’s located in the “lib/windows/release” folder. The full SVN link can be found here https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows/release/python32.tar.gz
Put the python32.tar.gz in the same directory as the blenderplayer and you should be good to go.

So far no success.
http://www.pasteall.org/pic/show.php?id=13593

Are you compiling the blenderplayer from SVN? If so, is it a debug build? (If it’s a debug build, then use this file).

PS: do not unzip the python32.tar.gz file.

I downloaded one of the recent builds from graphicall.org (extracting the blenderplayer to the game’s designated directory)
It wasn’t a debug build according to the description.

hmm… depending on how old the build is, maybe the blenderplayer is looking for “python31.tar.gz”. What revision is the build?

If it helps, here is a fresh build compiled from SVN a few hours ago (using revision 37422). It includes bundled python and it works well on my PC. (link).

I get the feeling Campbell broke bundling when he made changes so that the player could find the bundled 2.5x folder. I’ll look into it tomorrow.

Have you found anything yet? The Blenderplayer currently crashes for those who don’t have Python installed as well. Or at least I think that it’s crashing because of that. It’s displaying a generic Runtime Error message box.

Edit: By the way C-106 Delta, I did try the link you gave me but it didn’t fix it.

Okay, on Windows things work if you have the lib folder (ie, use the Copy Python option). You’ll still get the message about not finding the bundled Python, but your program will run. On Linux I know you have to copy the 2.57 folder, and I haven’t figured out why yet.