Fix issues with the rtdist build in 1.10

This commit is contained in:
rdb 2015-07-28 15:40:04 +02:00
parent 2db003a1c2
commit 0cecab3124
6 changed files with 20 additions and 17 deletions

View File

@ -3341,7 +3341,7 @@ class Packager:
self.do_module('VFSImporter', filename = filename)
self.do_freeze('_vfsimporter', compileToExe = False)
self.do_file('panda3d/core.pyd');
self.do_file('panda3d/_core.pyd');
# Now that we're done freezing, explicitly add 'direct' to
# counteract the previous explicit excludeModule().

View File

@ -236,29 +236,37 @@ run_python() {
}
Py_DECREF(app_runner_class);
// Import the JavaScript module.
PyObject *javascript_module = PyImport_ImportModule("direct.p3d.JavaScript");
if (javascript_module == NULL) {
nout << "Failed to import direct.p3d.JavaScript\n";
PyErr_Print();
return false;
}
// Get the UndefinedObject class.
_undefined_object_class = PyObject_GetAttrString(app_runner_module, "UndefinedObject");
_undefined_object_class = PyObject_GetAttrString(javascript_module, "UndefinedObject");
if (_undefined_object_class == NULL) {
PyErr_Print();
return false;
}
// And the "Undefined" instance.
_undefined = PyObject_GetAttrString(app_runner_module, "Undefined");
_undefined = PyObject_GetAttrString(javascript_module, "Undefined");
if (_undefined == NULL) {
PyErr_Print();
return false;
}
// Get the ConcreteStruct class.
_concrete_struct_class = PyObject_GetAttrString(app_runner_module, "ConcreteStruct");
_concrete_struct_class = PyObject_GetAttrString(javascript_module, "ConcreteStruct");
if (_concrete_struct_class == NULL) {
PyErr_Print();
return false;
}
// Get the BrowserObject class.
_browser_object_class = PyObject_GetAttrString(app_runner_module, "BrowserObject");
_browser_object_class = PyObject_GetAttrString(javascript_module, "BrowserObject");
if (_browser_object_class == NULL) {
PyErr_Print();
return false;
@ -272,7 +280,7 @@ run_python() {
}
Py_DECREF(app_runner_module);
Py_DECREF(javascript_module);
// Construct a Python wrapper around our methods we need to expose to Python.
static PyMethodDef p3dpython_methods[] = {

View File

@ -1,7 +1,7 @@
__all__ = ['register', 'sharedPackages',
'reloadSharedPackage', 'reloadSharedPackages']
from panda3d.core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream
from panda3d._core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream
import sys
import marshal
import imp

View File

@ -17,7 +17,6 @@ except ImportError:
p3extend_frozen = None
from panda3d.core import *
from pandac.extension_native_helpers import dll_suffix, dll_ext
# Check to see if we are running python_d, which implies we have a
# debug build, and we have to build the module with debug options.
@ -1394,15 +1393,6 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
# It's a frozen module.
return (None, name, ('', '', imp.PY_FROZEN))
# Look for a dtool extension. This loop is roughly lifted
# from extension_native_helpers.Dtool_PreloadDLL().
filename = name + dll_suffix + dll_ext
for dir in sys.path + [sys.prefix]:
lib = os.path.join(dir, filename)
if os.path.exists(lib):
file = open(lib, 'rb')
return (file, lib, (dll_ext, 'rb', imp.C_EXTENSION))
message = "DLL loader cannot find %s." % (name)
raise ImportError, message

View File

@ -5026,11 +5026,13 @@ if (RTDIST or RUNTIME):
TargetAdd('p3dpython.exe', input='p3dpython_p3dPythonMain.obj')
TargetAdd('p3dpython.exe', input=COMMON_PANDA_LIBS)
TargetAdd('p3dpython.exe', input='libp3tinyxml.ilb')
TargetAdd('p3dpython.exe', input='libp3interrogatedb.dll')
TargetAdd('p3dpython.exe', opts=['PYTHON', 'WINUSER'])
TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj')
TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS)
TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb')
TargetAdd('libp3dpython.dll', input='libp3interrogatedb.dll')
TargetAdd('libp3dpython.dll', opts=['PYTHON', 'WINUSER'])
if GetTarget() == 'windows':
@ -5042,6 +5044,7 @@ if (RTDIST or RUNTIME):
TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj')
TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS)
TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb')
TargetAdd('p3dpythonw.exe', input='libp3interrogatedb.dll')
TargetAdd('p3dpythonw.exe', opts=['SUBSYSTEM:WINDOWS', 'PYTHON', 'WINUSER'])
if (PkgSkip("OPENSSL")==0 and RTDIST):

View File

@ -8799,6 +8799,7 @@ get_usage(Geom::UsageHint usage_hint) {
return GL_STATIC_DRAW;
}
#ifndef NDEBUG
////////////////////////////////////////////////////////////////////
// Function: GLGraphicsStateGuardian::get_compressed_format_string
// Access: Public, Static
@ -8917,6 +8918,7 @@ get_compressed_format_string(GLenum format) {
return NULL;
}
}
#endif
////////////////////////////////////////////////////////////////////
// Function: GLGraphicsStateGuardian::get_light_color