|
@@ -21,6 +21,7 @@ try:
|
|
|
import threading
|
|
import threading
|
|
|
import signal
|
|
import signal
|
|
|
import shutil
|
|
import shutil
|
|
|
|
|
+ import sysconfig
|
|
|
import plistlib
|
|
import plistlib
|
|
|
import queue
|
|
import queue
|
|
|
except KeyboardInterrupt:
|
|
except KeyboardInterrupt:
|
|
@@ -30,7 +31,10 @@ except:
|
|
|
print("Please install the development package of Python and try again.")
|
|
print("Please install the development package of Python and try again.")
|
|
|
exit(1)
|
|
exit(1)
|
|
|
|
|
|
|
|
-from distutils.util import get_platform
|
|
|
|
|
|
|
+if sys.version_info >= (3, 10):
|
|
|
|
|
+ from sysconfig import get_platform
|
|
|
|
|
+else:
|
|
|
|
|
+ from distutils.util import get_platform
|
|
|
from makepandacore import *
|
|
from makepandacore import *
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -63,6 +67,7 @@ DISTRIBUTOR=""
|
|
|
VERSION=None
|
|
VERSION=None
|
|
|
DEBVERSION=None
|
|
DEBVERSION=None
|
|
|
WHLVERSION=None
|
|
WHLVERSION=None
|
|
|
|
|
+RPMVERSION=None
|
|
|
RPMRELEASE="1"
|
|
RPMRELEASE="1"
|
|
|
GIT_COMMIT=None
|
|
GIT_COMMIT=None
|
|
|
MAJOR_VERSION=None
|
|
MAJOR_VERSION=None
|
|
@@ -152,8 +157,8 @@ def usage(problem):
|
|
|
print(" --nothing (disable every third-party lib)")
|
|
print(" --nothing (disable every third-party lib)")
|
|
|
print(" --everything (enable every third-party lib)")
|
|
print(" --everything (enable every third-party lib)")
|
|
|
print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009)")
|
|
print(" --directx-sdk=X (specify version of DirectX SDK to use: jun2010, aug2009)")
|
|
|
- print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1 or 10. Default is 8.1)")
|
|
|
|
|
- print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14, 14.1, 14.2. Default is 14)")
|
|
|
|
|
|
|
+ print(" --windows-sdk=X (specify Windows SDK version, eg. 7.1, 8.1, 10 or 11. Default is 8.1)")
|
|
|
|
|
+ print(" --msvc-version=X (specify Visual C++ version, eg. 10, 11, 12, 14, 14.1, 14.2, 14.3. Default is 14)")
|
|
|
print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)")
|
|
print(" --use-icl (experimental setting to use an intel compiler instead of MSVC on Windows)")
|
|
|
print("")
|
|
print("")
|
|
|
print("The simplest way to compile panda is to just type:")
|
|
print("The simplest way to compile panda is to just type:")
|
|
@@ -165,7 +170,7 @@ def usage(problem):
|
|
|
def parseopts(args):
|
|
def parseopts(args):
|
|
|
global INSTALLER,WHEEL,RUNTESTS,GENMAN,DISTRIBUTOR,VERSION
|
|
global INSTALLER,WHEEL,RUNTESTS,GENMAN,DISTRIBUTOR,VERSION
|
|
|
global COMPRESSOR,THREADCOUNT,OSX_ARCHS
|
|
global COMPRESSOR,THREADCOUNT,OSX_ARCHS
|
|
|
- global DEBVERSION,WHLVERSION,RPMRELEASE,GIT_COMMIT
|
|
|
|
|
|
|
+ global DEBVERSION,WHLVERSION,RPMVERSION,RPMRELEASE,GIT_COMMIT
|
|
|
global STRDXSDKVERSION, WINDOWS_SDK, MSVC_VERSION, BOOUSEINTELCOMPILER
|
|
global STRDXSDKVERSION, WINDOWS_SDK, MSVC_VERSION, BOOUSEINTELCOMPILER
|
|
|
global COPY_PYTHON
|
|
global COPY_PYTHON
|
|
|
|
|
|
|
@@ -181,7 +186,7 @@ def parseopts(args):
|
|
|
"help","distributor=","verbose","tests",
|
|
"help","distributor=","verbose","tests",
|
|
|
"optimize=","everything","nothing","installer","wheel","rtdist","nocolor",
|
|
"optimize=","everything","nothing","installer","wheel","rtdist","nocolor",
|
|
|
"version=","lzma","no-python","threads=","outputdir=","override=",
|
|
"version=","lzma","no-python","threads=","outputdir=","override=",
|
|
|
- "static","debversion=","rpmrelease=","p3dsuffix=","rtdist-version=",
|
|
|
|
|
|
|
+ "static","debversion=","rpmversion=","rpmrelease=","p3dsuffix=","rtdist-version=",
|
|
|
"directx-sdk=", "windows-sdk=", "msvc-version=", "clean", "use-icl",
|
|
"directx-sdk=", "windows-sdk=", "msvc-version=", "clean", "use-icl",
|
|
|
"universal", "target=", "arch=", "git-commit=", "no-copy-python",
|
|
"universal", "target=", "arch=", "git-commit=", "no-copy-python",
|
|
|
"glslang-incdir=", "glslang-libdir=",
|
|
"glslang-incdir=", "glslang-libdir=",
|
|
@@ -230,6 +235,7 @@ def parseopts(args):
|
|
|
elif (option=="--override"): AddOverride(value.strip())
|
|
elif (option=="--override"): AddOverride(value.strip())
|
|
|
elif (option=="--static"): SetLinkAllStatic(True)
|
|
elif (option=="--static"): SetLinkAllStatic(True)
|
|
|
elif (option=="--debversion"): DEBVERSION=value
|
|
elif (option=="--debversion"): DEBVERSION=value
|
|
|
|
|
+ elif (option=="--rpmversion"): RPMVERSION=value
|
|
|
elif (option=="--rpmrelease"): RPMRELEASE=value
|
|
elif (option=="--rpmrelease"): RPMRELEASE=value
|
|
|
elif (option=="--git-commit"): GIT_COMMIT=value
|
|
elif (option=="--git-commit"): GIT_COMMIT=value
|
|
|
# Backward compatibility, OPENGL was renamed to GL
|
|
# Backward compatibility, OPENGL was renamed to GL
|
|
@@ -380,6 +386,9 @@ print("Version: %s" % VERSION)
|
|
|
if DEBVERSION is None:
|
|
if DEBVERSION is None:
|
|
|
DEBVERSION = VERSION
|
|
DEBVERSION = VERSION
|
|
|
|
|
|
|
|
|
|
+if RPMVERSION is None:
|
|
|
|
|
+ RPMVERSION = VERSION
|
|
|
|
|
+
|
|
|
MAJOR_VERSION = '.'.join(VERSION.split('.')[:2])
|
|
MAJOR_VERSION = '.'.join(VERSION.split('.')[:2])
|
|
|
|
|
|
|
|
# Now determine the distutils-style platform tag for the target system.
|
|
# Now determine the distutils-style platform tag for the target system.
|
|
@@ -437,6 +446,13 @@ elif target == 'linux' and (os.path.isfile("/lib/libc-2.17.so") or os.path.isfil
|
|
|
else:
|
|
else:
|
|
|
PLATFORM = 'manylinux2014-i686'
|
|
PLATFORM = 'manylinux2014-i686'
|
|
|
|
|
|
|
|
|
|
+elif target == 'linux' and (os.path.isfile("/lib/i386-linux-gnu/libc-2.24.so") or os.path.isfile("/lib/x86_64/libc-2.24.so")) and os.path.isdir("/opt/python"):
|
|
|
|
|
+ # Same sloppy check for manylinux_2_24.
|
|
|
|
|
+ if GetTargetArch() in ('x86_64', 'amd64'):
|
|
|
|
|
+ PLATFORM = 'manylinux_2_24-x86_64'
|
|
|
|
|
+ else:
|
|
|
|
|
+ PLATFORM = 'manylinux_2_24-i686'
|
|
|
|
|
+
|
|
|
elif not CrossCompiling():
|
|
elif not CrossCompiling():
|
|
|
if HasTargetArch():
|
|
if HasTargetArch():
|
|
|
# Replace the architecture in the platform string.
|
|
# Replace the architecture in the platform string.
|
|
@@ -991,8 +1007,11 @@ if (COMPILER=="GCC"):
|
|
|
LibName("OPENSSL", "-Wl,--exclude-libs,libssl.a")
|
|
LibName("OPENSSL", "-Wl,--exclude-libs,libssl.a")
|
|
|
LibName("OPENSSL", "-Wl,--exclude-libs,libcrypto.a")
|
|
LibName("OPENSSL", "-Wl,--exclude-libs,libcrypto.a")
|
|
|
|
|
|
|
|
- if GetTarget() not in ('darwin', 'android'):
|
|
|
|
|
- SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h", "X11/XKBlib.h"))
|
|
|
|
|
|
|
+ if GetTarget() != 'darwin':
|
|
|
|
|
+ if GetTarget() != "android":
|
|
|
|
|
+ SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h", "X11/XKBlib.h"))
|
|
|
|
|
+ else:
|
|
|
|
|
+ PkgDisable("X11")
|
|
|
|
|
|
|
|
if GetHost() != "darwin":
|
|
if GetHost() != "darwin":
|
|
|
# Workaround for an issue where pkg-config does not include this path
|
|
# Workaround for an issue where pkg-config does not include this path
|
|
@@ -1056,6 +1075,7 @@ if (COMPILER=="GCC"):
|
|
|
LibName("ALWAYS", '-llog')
|
|
LibName("ALWAYS", '-llog')
|
|
|
LibName("ANDROID", '-landroid')
|
|
LibName("ANDROID", '-landroid')
|
|
|
LibName("JNIGRAPHICS", '-ljnigraphics')
|
|
LibName("JNIGRAPHICS", '-ljnigraphics')
|
|
|
|
|
+ LibName("OPENSLES", '-lOpenSLES')
|
|
|
|
|
|
|
|
for pkg in MAYAVERSIONS:
|
|
for pkg in MAYAVERSIONS:
|
|
|
if (PkgSkip(pkg)==0 and (pkg in SDK)):
|
|
if (PkgSkip(pkg)==0 and (pkg in SDK)):
|
|
@@ -1084,7 +1104,7 @@ if (COMPILER=="GCC"):
|
|
|
LibName(pkg, "-lDependEngine")
|
|
LibName(pkg, "-lDependEngine")
|
|
|
LibName(pkg, "-lCommandEngine")
|
|
LibName(pkg, "-lCommandEngine")
|
|
|
LibName(pkg, "-lFoundation")
|
|
LibName(pkg, "-lFoundation")
|
|
|
- if pkg != "MAYA2020":
|
|
|
|
|
|
|
+ if pkg not in ("MAYA2020", "MAYA2022"):
|
|
|
LibName(pkg, "-lIMFbase")
|
|
LibName(pkg, "-lIMFbase")
|
|
|
if GetTarget() != 'darwin':
|
|
if GetTarget() != 'darwin':
|
|
|
LibName(pkg, "-lOpenMayalib")
|
|
LibName(pkg, "-lOpenMayalib")
|
|
@@ -1352,10 +1372,6 @@ def CompileCxx(obj,src,opts):
|
|
|
if "SYSROOT" in SDK:
|
|
if "SYSROOT" in SDK:
|
|
|
if GetTarget() != "android":
|
|
if GetTarget() != "android":
|
|
|
cmd += ' --sysroot=%s' % (SDK["SYSROOT"])
|
|
cmd += ' --sysroot=%s' % (SDK["SYSROOT"])
|
|
|
- else:
|
|
|
|
|
- ndk_dir = SDK["ANDROID_NDK"].replace('\\', '/')
|
|
|
|
|
- cmd += ' -isystem %s/sysroot/usr/include' % (ndk_dir)
|
|
|
|
|
- cmd += ' -isystem %s/sysroot/usr/include/%s' % (ndk_dir, SDK["ANDROID_TRIPLE"])
|
|
|
|
|
cmd += ' -no-canonical-prefixes'
|
|
cmd += ' -no-canonical-prefixes'
|
|
|
|
|
|
|
|
# Android-specific flags.
|
|
# Android-specific flags.
|
|
@@ -1364,46 +1380,35 @@ def CompileCxx(obj,src,opts):
|
|
|
if GetTarget() == "android":
|
|
if GetTarget() == "android":
|
|
|
# Most of the specific optimization flags here were
|
|
# Most of the specific optimization flags here were
|
|
|
# just copied from the default Android Makefiles.
|
|
# just copied from the default Android Makefiles.
|
|
|
- if "ANDROID_API" in SDK:
|
|
|
|
|
- cmd += ' -D__ANDROID_API__=' + str(SDK["ANDROID_API"])
|
|
|
|
|
if "ANDROID_GCC_TOOLCHAIN" in SDK:
|
|
if "ANDROID_GCC_TOOLCHAIN" in SDK:
|
|
|
cmd += ' -gcc-toolchain ' + SDK["ANDROID_GCC_TOOLCHAIN"].replace('\\', '/')
|
|
cmd += ' -gcc-toolchain ' + SDK["ANDROID_GCC_TOOLCHAIN"].replace('\\', '/')
|
|
|
cmd += ' -ffunction-sections -funwind-tables'
|
|
cmd += ' -ffunction-sections -funwind-tables'
|
|
|
|
|
+ cmd += ' -target ' + SDK["ANDROID_TRIPLE"]
|
|
|
if arch == 'armv7a':
|
|
if arch == 'armv7a':
|
|
|
- cmd += ' -target armv7-none-linux-androideabi'
|
|
|
|
|
cmd += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16'
|
|
cmd += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16'
|
|
|
- cmd += ' -fno-integrated-as'
|
|
|
|
|
elif arch == 'arm':
|
|
elif arch == 'arm':
|
|
|
- cmd += ' -target armv5te-none-linux-androideabi'
|
|
|
|
|
cmd += ' -march=armv5te -mtune=xscale -msoft-float'
|
|
cmd += ' -march=armv5te -mtune=xscale -msoft-float'
|
|
|
- cmd += ' -fno-integrated-as'
|
|
|
|
|
- elif arch == 'aarch64':
|
|
|
|
|
- cmd += ' -target aarch64-none-linux-android'
|
|
|
|
|
elif arch == 'mips':
|
|
elif arch == 'mips':
|
|
|
- cmd += ' -target mipsel-none-linux-android'
|
|
|
|
|
cmd += ' -mips32'
|
|
cmd += ' -mips32'
|
|
|
elif arch == 'mips64':
|
|
elif arch == 'mips64':
|
|
|
- cmd += ' -target mips64el-none-linux-android'
|
|
|
|
|
cmd += ' -fintegrated-as'
|
|
cmd += ' -fintegrated-as'
|
|
|
elif arch == 'x86':
|
|
elif arch == 'x86':
|
|
|
- cmd += ' -target i686-none-linux-android'
|
|
|
|
|
- cmd += ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
|
|
|
|
|
|
|
+ cmd += ' -march=i686 -mssse3 -mfpmath=sse -m32'
|
|
|
cmd += ' -mstackrealign'
|
|
cmd += ' -mstackrealign'
|
|
|
elif arch == 'x86_64':
|
|
elif arch == 'x86_64':
|
|
|
- cmd += ' -target x86_64-none-linux-android'
|
|
|
|
|
- cmd += ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
|
|
|
|
|
|
|
+ cmd += ' -march=x86-64 -msse4.2 -mpopcnt -m64'
|
|
|
|
|
|
|
|
cmd += " -Wa,--noexecstack"
|
|
cmd += " -Wa,--noexecstack"
|
|
|
|
|
|
|
|
# Do we want thumb or arm instructions?
|
|
# Do we want thumb or arm instructions?
|
|
|
- if arch.startswith('arm'):
|
|
|
|
|
|
|
+ if arch != 'arm64' and arch.startswith('arm'):
|
|
|
if optlevel >= 3:
|
|
if optlevel >= 3:
|
|
|
cmd += ' -mthumb'
|
|
cmd += ' -mthumb'
|
|
|
else:
|
|
else:
|
|
|
cmd += ' -marm'
|
|
cmd += ' -marm'
|
|
|
|
|
|
|
|
# Enable SIMD instructions if requested
|
|
# Enable SIMD instructions if requested
|
|
|
- if arch.startswith('arm') and PkgSkip("NEON") == 0:
|
|
|
|
|
|
|
+ if arch != 'arm64' and arch.startswith('arm') and PkgSkip("NEON") == 0:
|
|
|
cmd += ' -mfpu=neon'
|
|
cmd += ' -mfpu=neon'
|
|
|
|
|
|
|
|
else:
|
|
else:
|
|
@@ -1432,14 +1437,17 @@ def CompileCxx(obj,src,opts):
|
|
|
# Needed by both Python, Panda, Eigen, all of which break aliasing rules.
|
|
# Needed by both Python, Panda, Eigen, all of which break aliasing rules.
|
|
|
cmd += " -fno-strict-aliasing"
|
|
cmd += " -fno-strict-aliasing"
|
|
|
|
|
|
|
|
- if optlevel >= 3:
|
|
|
|
|
- cmd += " -ffast-math -fno-stack-protector"
|
|
|
|
|
- if optlevel == 3:
|
|
|
|
|
- # Fast math is nice, but we'd like to see NaN in dev builds.
|
|
|
|
|
- cmd += " -fno-finite-math-only"
|
|
|
|
|
|
|
+ # Certain clang versions crash when passing these math flags while
|
|
|
|
|
+ # compiling Objective-C++ code
|
|
|
|
|
+ if not src.endswith(".m") and not src.endswith(".mm"):
|
|
|
|
|
+ if optlevel >= 3:
|
|
|
|
|
+ cmd += " -ffast-math -fno-stack-protector"
|
|
|
|
|
+ if optlevel == 3:
|
|
|
|
|
+ # Fast math is nice, but we'd like to see NaN in dev builds.
|
|
|
|
|
+ cmd += " -fno-finite-math-only"
|
|
|
|
|
|
|
|
- # Make sure this is off to avoid GCC/Eigen bug (see GitHub #228)
|
|
|
|
|
- cmd += " -fno-unsafe-math-optimizations"
|
|
|
|
|
|
|
+ # Make sure this is off to avoid GCC/Eigen bug (see GitHub #228)
|
|
|
|
|
+ cmd += " -fno-unsafe-math-optimizations"
|
|
|
|
|
|
|
|
if (optlevel==1): cmd += " -ggdb -D_DEBUG"
|
|
if (optlevel==1): cmd += " -ggdb -D_DEBUG"
|
|
|
if (optlevel==2): cmd += " -O1 -D_DEBUG"
|
|
if (optlevel==2): cmd += " -O1 -D_DEBUG"
|
|
@@ -1892,28 +1900,16 @@ def CompileLink(dll, obj, opts):
|
|
|
if "ANDROID_GCC_TOOLCHAIN" in SDK:
|
|
if "ANDROID_GCC_TOOLCHAIN" in SDK:
|
|
|
cmd += ' -gcc-toolchain ' + SDK["ANDROID_GCC_TOOLCHAIN"].replace('\\', '/')
|
|
cmd += ' -gcc-toolchain ' + SDK["ANDROID_GCC_TOOLCHAIN"].replace('\\', '/')
|
|
|
cmd += " -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now"
|
|
cmd += " -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now"
|
|
|
|
|
+ cmd += ' -target ' + SDK["ANDROID_TRIPLE"]
|
|
|
if arch == 'armv7a':
|
|
if arch == 'armv7a':
|
|
|
- cmd += ' -target armv7-none-linux-androideabi'
|
|
|
|
|
cmd += " -march=armv7-a -Wl,--fix-cortex-a8"
|
|
cmd += " -march=armv7-a -Wl,--fix-cortex-a8"
|
|
|
- elif arch == 'arm':
|
|
|
|
|
- cmd += ' -target armv5te-none-linux-androideabi'
|
|
|
|
|
- elif arch == 'aarch64':
|
|
|
|
|
- cmd += ' -target aarch64-none-linux-android'
|
|
|
|
|
elif arch == 'mips':
|
|
elif arch == 'mips':
|
|
|
- cmd += ' -target mipsel-none-linux-android'
|
|
|
|
|
cmd += ' -mips32'
|
|
cmd += ' -mips32'
|
|
|
- elif arch == 'mips64':
|
|
|
|
|
- cmd += ' -target mips64el-none-linux-android'
|
|
|
|
|
- elif arch == 'x86':
|
|
|
|
|
- cmd += ' -target i686-none-linux-android'
|
|
|
|
|
- elif arch == 'x86_64':
|
|
|
|
|
- cmd += ' -target x86_64-none-linux-android'
|
|
|
|
|
cmd += ' -lc -lm'
|
|
cmd += ' -lc -lm'
|
|
|
else:
|
|
else:
|
|
|
cmd += " -pthread"
|
|
cmd += " -pthread"
|
|
|
-
|
|
|
|
|
- if "SYSROOT" in SDK:
|
|
|
|
|
- cmd += " --sysroot=%s -no-canonical-prefixes" % (SDK["SYSROOT"])
|
|
|
|
|
|
|
+ if "SYSROOT" in SDK:
|
|
|
|
|
+ cmd += " --sysroot=%s -no-canonical-prefixes" % (SDK["SYSROOT"])
|
|
|
|
|
|
|
|
if LDFLAGS != "":
|
|
if LDFLAGS != "":
|
|
|
cmd += " " + LDFLAGS
|
|
cmd += " " + LDFLAGS
|
|
@@ -2177,6 +2173,31 @@ def CompileMIDL(target, src, opts):
|
|
|
|
|
|
|
|
oscmd(cmd)
|
|
oscmd(cmd)
|
|
|
|
|
|
|
|
|
|
+##########################################################################################
|
|
|
|
|
+#
|
|
|
|
|
+# CompileDalvik
|
|
|
|
|
+#
|
|
|
|
|
+##########################################################################################
|
|
|
|
|
+
|
|
|
|
|
+def CompileDalvik(target, inputs, opts):
|
|
|
|
|
+ cmd = "d8 --output " + os.path.dirname(target)
|
|
|
|
|
+
|
|
|
|
|
+ if GetOptimize() <= 2:
|
|
|
|
|
+ cmd += " --debug"
|
|
|
|
|
+ else:
|
|
|
|
|
+ cmd += " --release"
|
|
|
|
|
+
|
|
|
|
|
+ if "ANDROID_API" in SDK:
|
|
|
|
|
+ cmd += " --min-api %d" % (SDK["ANDROID_API"])
|
|
|
|
|
+
|
|
|
|
|
+ if "ANDROID_JAR" in SDK:
|
|
|
|
|
+ cmd += " --lib %s" % (SDK["ANDROID_JAR"])
|
|
|
|
|
+
|
|
|
|
|
+ for i in inputs:
|
|
|
|
|
+ cmd += " " + BracketNameWithQuotes(i)
|
|
|
|
|
+
|
|
|
|
|
+ oscmd(cmd)
|
|
|
|
|
+
|
|
|
##########################################################################################
|
|
##########################################################################################
|
|
|
#
|
|
#
|
|
|
# CompileAnything
|
|
# CompileAnything
|
|
@@ -2288,6 +2309,9 @@ def CompileAnything(target, inputs, opts, progress = None):
|
|
|
elif infile.endswith(".r"):
|
|
elif infile.endswith(".r"):
|
|
|
ProgressOutput(progress, "Building resource object", target)
|
|
ProgressOutput(progress, "Building resource object", target)
|
|
|
return CompileRsrc(target, infile, opts)
|
|
return CompileRsrc(target, infile, opts)
|
|
|
|
|
+ elif origsuffix == ".dex":
|
|
|
|
|
+ ProgressOutput(progress, "Building Dalvik object", target)
|
|
|
|
|
+ return CompileDalvik(target, inputs, opts)
|
|
|
exit("Don't know how to compile: %s from %s" % (target, inputs))
|
|
exit("Don't know how to compile: %s from %s" % (target, inputs))
|
|
|
|
|
|
|
|
##########################################################################################
|
|
##########################################################################################
|
|
@@ -2882,7 +2906,12 @@ if PkgSkip("GL") or GetLinkAllStatic():
|
|
|
configprc = configprc.replace("\nload-display pandagl", "\n#load-display pandagl")
|
|
configprc = configprc.replace("\nload-display pandagl", "\n#load-display pandagl")
|
|
|
|
|
|
|
|
if PkgSkip("GLES") or GetLinkAllStatic():
|
|
if PkgSkip("GLES") or GetLinkAllStatic():
|
|
|
- configprc = configprc.replace("\n#load-display pandagles", "")
|
|
|
|
|
|
|
+ configprc = configprc.replace("\n#load-display pandagles\n", "\n")
|
|
|
|
|
+
|
|
|
|
|
+if PkgSkip("GL") and not PkgSkip("GLES2") and not GetLinkAllStatic():
|
|
|
|
|
+ configprc = configprc.replace("\n#load-display pandagles2", "\nload-display pandagles2")
|
|
|
|
|
+elif PkgSkip("GLES2") or GetLinkAllStatic():
|
|
|
|
|
+ configprc = configprc.replace("\n#load-display pandagles2", "")
|
|
|
|
|
|
|
|
if PkgSkip("DX9") or GetLinkAllStatic():
|
|
if PkgSkip("DX9") or GetLinkAllStatic():
|
|
|
configprc = configprc.replace("\n#load-display pandadx9", "")
|
|
configprc = configprc.replace("\n#load-display pandadx9", "")
|
|
@@ -3100,8 +3129,10 @@ else:
|
|
|
if not PkgSkip("PANDATOOL"):
|
|
if not PkgSkip("PANDATOOL"):
|
|
|
CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".mel")
|
|
CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".mel")
|
|
|
CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".ms")
|
|
CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".ms")
|
|
|
-if not PkgSkip("PYTHON") and os.path.isdir(GetThirdpartyBase()+"/Pmw"):
|
|
|
|
|
- CopyTree(GetOutputDir()+'/Pmw', GetThirdpartyBase()+'/Pmw')
|
|
|
|
|
|
|
+
|
|
|
|
|
+if not PkgSkip("PYTHON") and os.path.isdir(GetThirdpartyBase() + "/Pmw"):
|
|
|
|
|
+ CopyTree(GetOutputDir() + "/Pmw", GetThirdpartyBase() + "/Pmw", exclude=["Pmw_1_3", "Pmw_1_3_3"])
|
|
|
|
|
+
|
|
|
ConditionalWriteFile(GetOutputDir()+'/include/ctl3d.h', '/* dummy file to make MAX happy */')
|
|
ConditionalWriteFile(GetOutputDir()+'/include/ctl3d.h', '/* dummy file to make MAX happy */')
|
|
|
|
|
|
|
|
# Since Eigen is included by all sorts of core headers, as a convenience
|
|
# Since Eigen is included by all sorts of core headers, as a convenience
|
|
@@ -4394,7 +4425,7 @@ if PkgSkip("OPENAL") == 0:
|
|
|
TargetAdd('openal_audio_openal_audio_composite1.obj', opts=OPTS, input='openal_audio_composite1.cxx')
|
|
TargetAdd('openal_audio_openal_audio_composite1.obj', opts=OPTS, input='openal_audio_composite1.cxx')
|
|
|
TargetAdd('libp3openal_audio.dll', input='openal_audio_openal_audio_composite1.obj')
|
|
TargetAdd('libp3openal_audio.dll', input='openal_audio_openal_audio_composite1.obj')
|
|
|
TargetAdd('libp3openal_audio.dll', input=COMMON_PANDA_LIBS)
|
|
TargetAdd('libp3openal_audio.dll', input=COMMON_PANDA_LIBS)
|
|
|
- TargetAdd('libp3openal_audio.dll', opts=['MODULE', 'ADVAPI', 'WINUSER', 'WINMM', 'WINSHELL', 'WINOLE', 'OPENAL'])
|
|
|
|
|
|
|
+ TargetAdd('libp3openal_audio.dll', opts=['MODULE', 'ADVAPI', 'WINUSER', 'WINMM', 'WINSHELL', 'WINOLE', 'OPENAL', 'OPENSLES'])
|
|
|
|
|
|
|
|
#
|
|
#
|
|
|
# DIRECTORY: panda/src/downloadertools/
|
|
# DIRECTORY: panda/src/downloadertools/
|
|
@@ -4679,7 +4710,7 @@ elif not PkgSkip("EGL") and not PkgSkip("GL") and GetTarget() not in ('windows',
|
|
|
# DIRECTORY: panda/src/egldisplay/
|
|
# DIRECTORY: panda/src/egldisplay/
|
|
|
#
|
|
#
|
|
|
|
|
|
|
|
-if not PkgSkip("EGL") and not PkgSkip("GLES"):
|
|
|
|
|
|
|
+if GetTarget() != 'android' and not PkgSkip("EGL") and not PkgSkip("GLES"):
|
|
|
DefSymbol('GLES', 'OPENGLES_1', '')
|
|
DefSymbol('GLES', 'OPENGLES_1', '')
|
|
|
OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES', 'GLES', 'EGL', 'X11']
|
|
OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES', 'GLES', 'EGL', 'X11']
|
|
|
TargetAdd('pandagles_egldisplay_composite1.obj', opts=OPTS, input='p3egldisplay_composite1.cxx')
|
|
TargetAdd('pandagles_egldisplay_composite1.obj', opts=OPTS, input='p3egldisplay_composite1.cxx')
|
|
@@ -4698,7 +4729,7 @@ if not PkgSkip("EGL") and not PkgSkip("GLES"):
|
|
|
# DIRECTORY: panda/src/egldisplay/
|
|
# DIRECTORY: panda/src/egldisplay/
|
|
|
#
|
|
#
|
|
|
|
|
|
|
|
-if not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
|
|
|
|
|
|
+if GetTarget() != 'android' and not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
|
|
DefSymbol('GLES2', 'OPENGLES_2', '')
|
|
DefSymbol('GLES2', 'OPENGLES_2', '')
|
|
|
OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL', 'X11']
|
|
OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL', 'X11']
|
|
|
TargetAdd('pandagles2_egldisplay_composite1.obj', opts=OPTS, input='p3egldisplay_composite1.cxx')
|
|
TargetAdd('pandagles2_egldisplay_composite1.obj', opts=OPTS, input='p3egldisplay_composite1.cxx')
|
|
@@ -4904,12 +4935,17 @@ if not PkgSkip("PVIEW"):
|
|
|
#
|
|
#
|
|
|
|
|
|
|
|
if GetTarget() == 'android':
|
|
if GetTarget() == 'android':
|
|
|
- OPTS=['DIR:panda/src/android']
|
|
|
|
|
|
|
+ OPTS=['DIR:panda/src/android', 'PNG']
|
|
|
TargetAdd('org/panda3d/android/NativeIStream.class', opts=OPTS, input='NativeIStream.java')
|
|
TargetAdd('org/panda3d/android/NativeIStream.class', opts=OPTS, input='NativeIStream.java')
|
|
|
TargetAdd('org/panda3d/android/NativeOStream.class', opts=OPTS, input='NativeOStream.java')
|
|
TargetAdd('org/panda3d/android/NativeOStream.class', opts=OPTS, input='NativeOStream.java')
|
|
|
TargetAdd('org/panda3d/android/PandaActivity.class', opts=OPTS, input='PandaActivity.java')
|
|
TargetAdd('org/panda3d/android/PandaActivity.class', opts=OPTS, input='PandaActivity.java')
|
|
|
TargetAdd('org/panda3d/android/PythonActivity.class', opts=OPTS, input='PythonActivity.java')
|
|
TargetAdd('org/panda3d/android/PythonActivity.class', opts=OPTS, input='PythonActivity.java')
|
|
|
|
|
|
|
|
|
|
+ TargetAdd('classes.dex', input='org/panda3d/android/NativeIStream.class')
|
|
|
|
|
+ TargetAdd('classes.dex', input='org/panda3d/android/NativeOStream.class')
|
|
|
|
|
+ TargetAdd('classes.dex', input='org/panda3d/android/PandaActivity.class')
|
|
|
|
|
+ TargetAdd('classes.dex', input='org/panda3d/android/PythonActivity.class')
|
|
|
|
|
+
|
|
|
TargetAdd('p3android_composite1.obj', opts=OPTS, input='p3android_composite1.cxx')
|
|
TargetAdd('p3android_composite1.obj', opts=OPTS, input='p3android_composite1.cxx')
|
|
|
TargetAdd('libp3android.dll', input='p3android_composite1.obj')
|
|
TargetAdd('libp3android.dll', input='p3android_composite1.obj')
|
|
|
TargetAdd('libp3android.dll', input=COMMON_PANDA_LIBS)
|
|
TargetAdd('libp3android.dll', input=COMMON_PANDA_LIBS)
|
|
@@ -4959,6 +4995,20 @@ if GetTarget() == 'android' and not PkgSkip("EGL") and not PkgSkip("GLES"):
|
|
|
TargetAdd('libpandagles.dll', input=COMMON_PANDA_LIBS)
|
|
TargetAdd('libpandagles.dll', input=COMMON_PANDA_LIBS)
|
|
|
TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL'])
|
|
TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL'])
|
|
|
|
|
|
|
|
|
|
+if GetTarget() == 'android' and not PkgSkip("EGL") and not PkgSkip("GLES2"):
|
|
|
|
|
+ DefSymbol('GLES2', 'OPENGLES_2', '')
|
|
|
|
|
+ OPTS=['DIR:panda/src/androiddisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
|
|
|
|
|
+ TargetAdd('pandagles2_androiddisplay_composite1.obj', opts=OPTS, input='p3androiddisplay_composite1.cxx')
|
|
|
|
|
+ OPTS=['DIR:panda/metalibs/pandagles2', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
|
|
|
|
|
+ TargetAdd('pandagles2_pandagles2.obj', opts=OPTS, input='pandagles2.cxx')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input='pandagles2_pandagles2.obj')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input='p3gles2gsg_config_gles2gsg.obj')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input='p3gles2gsg_gles2gsg.obj')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input='pandagles2_androiddisplay_composite1.obj')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input='libp3android.dll')
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', input=COMMON_PANDA_LIBS)
|
|
|
|
|
+ TargetAdd('libpandagles2.dll', opts=['MODULE', 'GLES2', 'EGL'])
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# DIRECTORY: panda/src/tinydisplay/
|
|
# DIRECTORY: panda/src/tinydisplay/
|
|
|
#
|
|
#
|
|
@@ -6055,10 +6105,11 @@ if PkgSkip("PYTHON") == 0:
|
|
|
LibName('DEPLOYSTUB', "-Wl,-rpath,\\$ORIGIN")
|
|
LibName('DEPLOYSTUB', "-Wl,-rpath,\\$ORIGIN")
|
|
|
LibName('DEPLOYSTUB', "-Wl,-z,origin")
|
|
LibName('DEPLOYSTUB', "-Wl,-z,origin")
|
|
|
LibName('DEPLOYSTUB', "-rdynamic")
|
|
LibName('DEPLOYSTUB', "-rdynamic")
|
|
|
|
|
+
|
|
|
PyTargetAdd('deploy-stub.exe', input='deploy-stub.obj')
|
|
PyTargetAdd('deploy-stub.exe', input='deploy-stub.obj')
|
|
|
if GetTarget() == 'windows':
|
|
if GetTarget() == 'windows':
|
|
|
PyTargetAdd('deploy-stub.exe', input='frozen_dllmain.obj')
|
|
PyTargetAdd('deploy-stub.exe', input='frozen_dllmain.obj')
|
|
|
- PyTargetAdd('deploy-stub.exe', opts=['WINSHELL', 'DEPLOYSTUB', 'NOICON'])
|
|
|
|
|
|
|
+ PyTargetAdd('deploy-stub.exe', opts=['WINSHELL', 'DEPLOYSTUB', 'NOICON', 'ANDROID'])
|
|
|
|
|
|
|
|
if GetTarget() == 'windows':
|
|
if GetTarget() == 'windows':
|
|
|
PyTargetAdd('deploy-stubw.exe', input='deploy-stub.obj')
|
|
PyTargetAdd('deploy-stubw.exe', input='deploy-stub.obj')
|
|
@@ -6070,6 +6121,15 @@ if PkgSkip("PYTHON") == 0:
|
|
|
PyTargetAdd('deploy-stubw.obj', opts=OPTS, input='deploy-stub.c')
|
|
PyTargetAdd('deploy-stubw.obj', opts=OPTS, input='deploy-stub.c')
|
|
|
PyTargetAdd('deploy-stubw.exe', input='deploy-stubw.obj')
|
|
PyTargetAdd('deploy-stubw.exe', input='deploy-stubw.obj')
|
|
|
PyTargetAdd('deploy-stubw.exe', opts=['MACOS_APP_BUNDLE', 'DEPLOYSTUB', 'NOICON'])
|
|
PyTargetAdd('deploy-stubw.exe', opts=['MACOS_APP_BUNDLE', 'DEPLOYSTUB', 'NOICON'])
|
|
|
|
|
+ elif GetTarget() == 'android':
|
|
|
|
|
+ PyTargetAdd('deploy-stubw_android_main.obj', opts=OPTS, input='android_main.cxx')
|
|
|
|
|
+ PyTargetAdd('deploy-stubw_android_log.obj', opts=OPTS, input='android_log.c')
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', input='android_native_app_glue.obj')
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', input='deploy-stubw_android_main.obj')
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', input='deploy-stubw_android_log.obj')
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', input=COMMON_PANDA_LIBS)
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', input='libp3android.dll')
|
|
|
|
|
+ PyTargetAdd('libdeploy-stubw.dll', opts=['DEPLOYSTUB', 'ANDROID'])
|
|
|
|
|
|
|
|
#
|
|
#
|
|
|
# Generate the models directory and samples directory
|
|
# Generate the models directory and samples directory
|
|
@@ -6170,7 +6230,7 @@ def ParallelMake(tasklist):
|
|
|
# Create the workers
|
|
# Create the workers
|
|
|
for slave in range(THREADCOUNT):
|
|
for slave in range(THREADCOUNT):
|
|
|
th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue])
|
|
th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue])
|
|
|
- th.setDaemon(1)
|
|
|
|
|
|
|
+ th.daemon = True
|
|
|
th.start()
|
|
th.start()
|
|
|
# Feed tasks to the workers.
|
|
# Feed tasks to the workers.
|
|
|
tasksqueued = 0
|
|
tasksqueued = 0
|
|
@@ -6261,8 +6321,8 @@ if INSTALLER:
|
|
|
|
|
|
|
|
MakeInstaller(version=VERSION, outputdir=GetOutputDir(),
|
|
MakeInstaller(version=VERSION, outputdir=GetOutputDir(),
|
|
|
optimize=GetOptimize(), compressor=COMPRESSOR,
|
|
optimize=GetOptimize(), compressor=COMPRESSOR,
|
|
|
- debversion=DEBVERSION, rpmrelease=RPMRELEASE,
|
|
|
|
|
- python_versions=python_versions)
|
|
|
|
|
|
|
+ debversion=DEBVERSION, rpmversion=RPMVERSION,
|
|
|
|
|
+ rpmrelease=RPMRELEASE, python_versions=python_versions)
|
|
|
|
|
|
|
|
if WHEEL:
|
|
if WHEEL:
|
|
|
ProgressOutput(100.0, "Building wheel")
|
|
ProgressOutput(100.0, "Building wheel")
|