Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2021-02-24 18:10:15 +01:00
commit ada74e3b0c
3 changed files with 40 additions and 19 deletions

View File

@ -420,6 +420,7 @@ Section "Python ${INCLUDE_PYVER}" SecPython
IfFileExists "$0\python.exe" AskRegPath RegPath
AskRegPath:
IfSilent SkipRegPath
MessageBox MB_YESNO|MB_ICONQUESTION \
"You already have a copy of Python ${INCLUDE_PYVER} installed in:$\r$\n$0$\r$\n$\r$\nPanda3D installs its own copy of Python ${INCLUDE_PYVER}, which will install alongside your existing copy. Would you like to make Panda's copy the default Python for your user account?" \
IDNO SkipRegPath
@ -568,6 +569,7 @@ Function ConfirmPythonSelection
; No compatible Python version found (that wasn't shipped as part
; of a different Panda3D build.) Ask the user if he's sure about this.
AskConfirmation:
IfSilent SkipCheck
MessageBox MB_YESNO|MB_ICONQUESTION \
"You do not appear to have a ${REGVIEW}-bit version of Python ${INCLUDE_PYVER} installed. Are you sure you don't want Panda to install a compatible copy of Python?$\r$\n$\r$\nIf you choose Yes, you will not be able to do Python development with Panda3D until you install a ${REGVIEW}-bit version of Python and install the bindings for this version." \
IDYES SkipCheck

View File

@ -2252,7 +2252,6 @@ DTOOL_CONFIG=[
("REPORT_OPENSSL_ERRORS", '1', '1'),
("USE_PANDAFILESTREAM", '1', '1'),
("USE_DELETED_CHAIN", '1', '1'),
("HAVE_GLX", 'UNDEF', '1'),
("HAVE_WGL", '1', 'UNDEF'),
("HAVE_DX9", 'UNDEF', 'UNDEF'),
("HAVE_THREADS", '1', '1'),
@ -2415,15 +2414,11 @@ def WriteConfigSettings():
dtool_config["PHAVE_SYS_MALLOC_H"] = '1'
dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1'
dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it.
dtool_config["HAVE_GLX"] = 'UNDEF'
dtool_config["IS_LINUX"] = 'UNDEF'
dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF'
dtool_config["PHAVE_LINUX_INPUT_H"] = 'UNDEF'
dtool_config["IS_OSX"] = '1'
if PkgSkip("X11"):
dtool_config["HAVE_GLX"] = 'UNDEF'
if (GetTarget() == "freebsd"):
dtool_config["IS_LINUX"] = 'UNDEF'
dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF'
@ -2605,7 +2600,12 @@ def CreatePandaVersionFiles():
if source_date:
# This matches the GCC / Clang format for __DATE__ __TIME__
source_date = time.gmtime(int(source_date))
source_date = time.strftime('%b %e %Y %H:%M:%S', source_date)
try:
source_date = time.strftime('%b %e %Y %H:%M:%S', source_date)
except ValueError:
source_date = time.strftime('%b %d %Y %H:%M:%S', source_date)
if source_date[3:5] == ' 0':
source_date = source_date[:3] + ' ' + source_date[5:]
pandaversion_h += "\n#define PANDA_BUILD_DATE_STR \"%s\"\n" % (source_date)
checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("$VERSION1",str(version1))
@ -4529,9 +4529,10 @@ if GetTarget() not in ['windows', 'darwin'] and not PkgSkip("X11"):
#
if GetTarget() not in ['windows', 'darwin'] and not PkgSkip("GL") and not PkgSkip("X11"):
OPTS=['DIR:panda/src/glxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
DefSymbol('GLX', 'HAVE_GLX', '')
OPTS=['DIR:panda/src/glxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL', 'GLX']
TargetAdd('p3glxdisplay_composite1.obj', opts=OPTS, input='p3glxdisplay_composite1.cxx')
OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL', 'GLX']
TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
TargetAdd('libpandagl.dll', input='p3x11display_composite1.obj')
TargetAdd('libpandagl.dll', input='pandagl_pandagl.obj')

View File

@ -49,6 +49,8 @@ eglGraphicsPipe() {
<< "EGL client extensions not supported.\n";
}
EGLint major, minor;
//NB. if the X11 display failed to open, _display will be 0, which is a valid
// input to eglGetDisplay - it means to open the default display.
#ifdef HAVE_X11
@ -56,6 +58,12 @@ eglGraphicsPipe() {
#else
_egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
#endif
if (_egl_display && !eglInitialize(_egl_display, &major, &minor)) {
egldisplay_cat.warning()
<< "Couldn't initialize the default EGL display: "
<< get_egl_error_string(eglGetError()) << "\n";
_egl_display = EGL_NO_DISPLAY;
}
if (!_egl_display &&
std::find(extensions.begin(), extensions.end(), "EGL_EXT_platform_device") != extensions.end() &&
@ -65,7 +73,9 @@ eglGraphicsPipe() {
(PFNEGLQUERYDEVICESEXTPROC)eglGetProcAddress("eglQueryDevicesEXT");
EGLint num_devices = 0;
if (eglQueryDevicesEXT(0, nullptr, &num_devices) && num_devices > 0) {
if (eglQueryDevicesEXT != nullptr &&
eglQueryDevicesEXT(0, nullptr, &num_devices) &&
num_devices > 0) {
EGLDeviceEXT *devices = (EGLDeviceEXT *)alloca(sizeof(EGLDeviceEXT) * num_devices);
eglQueryDevicesEXT(num_devices, devices, &num_devices);
@ -77,25 +87,33 @@ eglGraphicsPipe() {
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT =
(PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT");
for (EGLint i = 0; i < num_devices && !_egl_display; ++i) {
_egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, devices[i], nullptr);
}
}
if (eglGetPlatformDisplayEXT != nullptr) {
for (EGLint i = 0; i < num_devices && !_egl_display; ++i) {
_egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, devices[i], nullptr);
if (!_egl_display) {
egldisplay_cat.error()
<< "Couldn't find a suitable EGL platform device.\n";
if (_egl_display && !eglInitialize(_egl_display, &major, &minor)) {
egldisplay_cat.warning()
<< "Couldn't initialize EGL platform display " << i << ": "
<< get_egl_error_string(eglGetError()) << "\n";
_egl_display = EGL_NO_DISPLAY;
}
}
}
}
}
if (!eglInitialize(_egl_display, nullptr, nullptr)) {
if (!_egl_display) {
egldisplay_cat.error()
<< "Couldn't initialize the EGL display: "
<< get_egl_error_string(eglGetError()) << "\n";
<< "Failed to find or initialize a suitable EGL display connection.\n";
_is_valid = false;
return;
}
if (egldisplay_cat.is_debug()) {
egldisplay_cat.debug()
<< "Successfully initialized EGL display, got version " << major << "." << minor << "\n";
}
#if defined(OPENGLES_1) || defined(OPENGLES_2)
if (!eglBindAPI(EGL_OPENGL_ES_API)) {
egldisplay_cat.error()