fix [#26951] blenderplayer and runtimes will not load

blenderplayer wasn't finding bundled python, eg: ./2.57/python/lib
This commit is contained in:
2011-04-18 08:27:50 +00:00
parent 75e1104d92
commit 0814cdf54e
4 changed files with 52 additions and 47 deletions

View File

@@ -1758,6 +1758,7 @@ static struct _inittab bge_internal_modules[]= {
/**
* Python is not initialised.
* see bpy_interface.c's BPY_python_start() which shares the same functionality in blender.
*/
PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecurityLevel level, Main *maggie, int argc, char** argv)
{
@@ -1779,6 +1780,9 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
/* must run before python initializes */
PyImport_ExtendInittab(bge_internal_modules);
/* find local python installation */
PyC_SetHomePath(BLI_get_folder(BLENDER_PYTHON, NULL));
Py_Initialize();
if(argv && first_time) { /* browser plugins dont currently set this */