|
|
@@ -30,8 +30,8 @@ import time
|
|
|
import os
|
|
|
import sys
|
|
|
|
|
|
-## jGenPyCode tries to get the directory for Direct from the sys.path. This only works if you
|
|
|
-## have installed the sdk using a installer. This would not work if the installer was
|
|
|
+## jGenPyCode tries to get the directory for Direct from the sys.path. This only works if you
|
|
|
+## have installed the sdk using a installer. This would not work if the installer was
|
|
|
## never used and everything was grabbed into a virgin environment using cvs.
|
|
|
sys.path.append(os.getcwd())
|
|
|
|
|
|
@@ -88,14 +88,14 @@ PkgListSet(["PYTHON", "DIRECT", # Python support
|
|
|
"VRPN", "OPENSSL", # Transport
|
|
|
"FFTW", # Algorithm helpers
|
|
|
"ARTOOLKIT", "OPENCV", "DIRECTCAM", "VISION", # Augmented Reality
|
|
|
- "NPAPI", "AWESOMIUM", # Browser embedding
|
|
|
- "GTK2", "WX", "FLTK", # Toolkit support
|
|
|
- "ROCKET", # GUI libraries
|
|
|
+ "GTK2", # GTK2 is used for PStats on Unix
|
|
|
+ "NPAPI", "MFC", "WX", "FLTK", # Used for web plug-in only
|
|
|
+ "ROCKET", "AWESOMIUM", # GUI libraries
|
|
|
"CARBON", "COCOA", # Mac OS X toolkits
|
|
|
"X11", "XF86DGA", "XRANDR", "XCURSOR", # Unix platform support
|
|
|
"PANDATOOL", "PVIEW", "DEPLOYTOOLS", # Toolchain
|
|
|
"SKEL", # Example SKEL project
|
|
|
- "PANDAFX", # Some distortion special lenses
|
|
|
+ "PANDAFX", # Some distortion special lenses
|
|
|
"PANDAPARTICLESYSTEM", # Built in particle system
|
|
|
"CONTRIB", # Experimental
|
|
|
"SSE2", "NEON", # Compiler features
|
|
|
@@ -216,7 +216,7 @@ def parseopts(args):
|
|
|
if STRDXSDKVERSION == '':
|
|
|
print("No DirectX SDK version specified. Using 'default' DirectX SDK search")
|
|
|
STRDXSDKVERSION = 'default'
|
|
|
- elif (option=="--platform-sdk"):
|
|
|
+ elif (option=="--platform-sdk"):
|
|
|
STRMSPLATFORMVERSION = value.strip().lower()
|
|
|
if STRMSPLATFORMVERSION == '':
|
|
|
print("No MS Platform SDK version specified. Using 'default' MS Platform SDK search")
|
|
|
@@ -234,7 +234,7 @@ def parseopts(args):
|
|
|
if (option=="--everything" or option.startswith("--use-")
|
|
|
or option=="--nothing" or option.startswith("--no-")):
|
|
|
anything = 1
|
|
|
- except:
|
|
|
+ except:
|
|
|
usage(0)
|
|
|
print("Exception while parsing commandline:", sys.exc_info()[0])
|
|
|
if (anything==0): usage(0)
|
|
|
@@ -536,7 +536,6 @@ if (COMPILER == "MSVC"):
|
|
|
if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/fftw.lib")
|
|
|
if (PkgSkip("ARTOOLKIT")==0):LibName("ARTOOLKIT",GetThirdpartyDir() + "artoolkit/lib/libAR.lib")
|
|
|
if (PkgSkip("FCOLLADA")==0): LibName("FCOLLADA", GetThirdpartyDir() + "fcollada/lib/FCollada.lib")
|
|
|
- if (PkgSkip("SQUISH")==0): LibName("SQUISH", GetThirdpartyDir() + "squish/lib/squish.lib")
|
|
|
if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/cv.lib")
|
|
|
if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/highgui.lib")
|
|
|
if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/cvaux.lib")
|
|
|
@@ -548,6 +547,11 @@ if (COMPILER == "MSVC"):
|
|
|
if (PkgSkip("FFMPEG")==0): LibName("FFMPEG", GetThirdpartyDir() + "ffmpeg/lib/avutil.lib")
|
|
|
if (PkgSkip("SWSCALE")==0): LibName("SWSCALE", GetThirdpartyDir() + "ffmpeg/lib/swscale.lib")
|
|
|
if (PkgSkip("SWRESAMPLE")==0):LibName("SWRESAMPLE",GetThirdpartyDir() + "ffmpeg/lib/swresample.lib")
|
|
|
+ if (PkgSkip("SQUISH")==0):
|
|
|
+ if GetOptimize() <= 2:
|
|
|
+ LibName("SQUISH", GetThirdpartyDir() + "squish/lib/squishd.lib")
|
|
|
+ else:
|
|
|
+ LibName("SQUISH", GetThirdpartyDir() + "squish/lib/squish.lib")
|
|
|
if (PkgSkip("ROCKET")==0):
|
|
|
LibName("ROCKET", GetThirdpartyDir() + "rocket/lib/RocketCore.lib")
|
|
|
LibName("ROCKET", GetThirdpartyDir() + "rocket/lib/RocketControls.lib")
|
|
|
@@ -925,7 +929,7 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd += "/DWINVER=0x601 "
|
|
|
cmd += "/Fo" + obj + " /nologo /c"
|
|
|
if (GetTargetArch() != 'x64' and PkgSkip("SSE2") == 0):
|
|
|
- cmd += " /arch:SSE2"
|
|
|
+ cmd += " /arch:SSE2"
|
|
|
for x in ipath: cmd += " /I" + x
|
|
|
for (opt,dir) in INCDIRECTORIES:
|
|
|
if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)
|
|
|
@@ -937,7 +941,7 @@ def CompileCxx(obj,src,opts):
|
|
|
if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS"
|
|
|
if (optlevel==2): cmd += " /MDd /Zi"
|
|
|
if (optlevel==3): cmd += " /MD /Zi /O2 /Ob2 /Oi /Ot /fp:fast /DFORCE_INLINING"
|
|
|
- if (optlevel==4):
|
|
|
+ if (optlevel==4):
|
|
|
cmd += " /MD /Zi /Ox /Ob2 /Oi /Ot /fp:fast /DFORCE_INLINING /DNDEBUG /GL"
|
|
|
cmd += " /Oy /Zp16" # jean-claude add /Zp16 insures correct static alignment for SSEx
|
|
|
|
|
|
@@ -983,11 +987,11 @@ def CompileCxx(obj,src,opts):
|
|
|
if (optlevel==3):
|
|
|
cmd += " /MD /Zi /O2 /Oi /Ot /arch:SSE3"
|
|
|
cmd += " /Ob0"
|
|
|
- cmd += " /Qipo-" # beware of IPO !!!
|
|
|
+ cmd += " /Qipo-" # beware of IPO !!!
|
|
|
## Lesson learned: Don't use /GL flag -> end result is MESSY
|
|
|
## ----------------------------------------------------------------
|
|
|
if (optlevel==4):
|
|
|
- cmd += " /MD /Zi /O3 /Oi /Ot /Ob0 /Yc /DNDEBUG" # /Ob0 a ete rajoute en cours de route a 47%
|
|
|
+ cmd += " /MD /Zi /O3 /Oi /Ot /Ob0 /Yc /DNDEBUG" # /Ob0 a ete rajoute en cours de route a 47%
|
|
|
cmd += " /Qipo" # optimization multi file
|
|
|
|
|
|
# for 3 & 4 optimization levels
|
|
|
@@ -999,7 +1003,7 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd += " /Qopt-matmul" # needs /O2 or /O3
|
|
|
cmd += " /Qprec-div-"
|
|
|
cmd += " /Qsimd"
|
|
|
-
|
|
|
+
|
|
|
cmd += " /QxHost" # compile for target host; Compiling for distribs should probably strictly enforce /arch:..
|
|
|
cmd += " /Quse-intel-optimized-headers" # use intel optimized headers
|
|
|
cmd += " /Qparallel" # enable parallelization
|
|
|
@@ -1007,7 +1011,7 @@ def CompileCxx(obj,src,opts):
|
|
|
|
|
|
## PCH files coexistence: the /Qpchi option causes the Intel C++ Compiler to name its
|
|
|
## PCH files with a .pchi filename suffix and reduce build time.
|
|
|
- ## The /Qpchi option is on by default but interferes with Microsoft libs; so use /Qpchi- to turn it off.
|
|
|
+ ## The /Qpchi option is on by default but interferes with Microsoft libs; so use /Qpchi- to turn it off.
|
|
|
## I need to have a deeper look at this since the compile time is quite influenced by this setting !!!
|
|
|
cmd += " /Qpchi-" # keep it this way!
|
|
|
|
|
|
@@ -1025,7 +1029,7 @@ def CompileCxx(obj,src,opts):
|
|
|
## Use this option if you always define a class before you declare a pointer to a member of the class.
|
|
|
## The compiler will issue an error if it encounters a pointer declaration before the class is defined.
|
|
|
## Alternate: #pragma pointers_to_members
|
|
|
-
|
|
|
+
|
|
|
cmd += " /Fd" + os.path.splitext(obj)[0] + ".pdb"
|
|
|
building = GetValueOption(opts, "BUILDING:")
|
|
|
if (building): cmd += " /DBUILDING_" + building
|
|
|
@@ -1033,10 +1037,10 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd += " /bigobj"
|
|
|
|
|
|
# level of warnings and optimization reports
|
|
|
- if GetVerbose():
|
|
|
+ if GetVerbose():
|
|
|
cmd += " /W3 " # or /W4 or /Wall
|
|
|
cmd += " /Qopt-report:2 /Qopt-report-phase:hlo /Qopt-report-phase:hpo" # some optimization reports
|
|
|
- else:
|
|
|
+ else:
|
|
|
cmd += " /W1 "
|
|
|
cmd += " /EHa /Zm300 /DWIN32_VC /DWIN32"
|
|
|
if GetTargetArch() == 'x64':
|
|
|
@@ -1044,7 +1048,7 @@ def CompileCxx(obj,src,opts):
|
|
|
cmd += " " + BracketNameWithQuotes(src)
|
|
|
|
|
|
oscmd(cmd)
|
|
|
-
|
|
|
+
|
|
|
if (COMPILER=="GCC"):
|
|
|
if (src.endswith(".c")): cmd = GetCC() +' -fPIC -c -o ' + obj
|
|
|
else: cmd = GetCXX()+' -ftemplate-depth-50 -fPIC -c -o ' + obj
|
|
|
@@ -1117,7 +1121,7 @@ def CompileCxx(obj,src,opts):
|
|
|
|
|
|
if PkgSkip("SSE2") == 0 and not arch.startswith("arm"):
|
|
|
cmd += " -msse2"
|
|
|
-
|
|
|
+
|
|
|
if (optlevel==1): cmd += " -ggdb -D_DEBUG"
|
|
|
if (optlevel==2): cmd += " -O1 -D_DEBUG"
|
|
|
if (optlevel==3): cmd += " -O2"
|
|
|
@@ -1343,7 +1347,7 @@ def CompileLink(dll, obj, opts):
|
|
|
if ("MFC" not in opts):
|
|
|
cmd += " /NOD:MFC90.LIB /NOD:MFC80.LIB /NOD:LIBCMT"
|
|
|
cmd += " /NOD:LIBCI.LIB /DEBUG"
|
|
|
- cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls"
|
|
|
+ cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls /nod:atlsd"
|
|
|
if (GetOrigExt(dll) != ".exe"): cmd += " /DLL"
|
|
|
optlevel = GetOptimizeOption(opts)
|
|
|
if (optlevel==1): cmd += " /MAP /MAPINFO:EXPORTS /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB"
|
|
|
@@ -1394,7 +1398,7 @@ def CompileLink(dll, obj, opts):
|
|
|
oscmd(cmd)
|
|
|
else:
|
|
|
cmd = "xilink"
|
|
|
- if GetVerbose(): cmd += " /verbose:lib"
|
|
|
+ if GetVerbose(): cmd += " /verbose:lib"
|
|
|
if HasTargetArch():
|
|
|
cmd += " /MACHINE:" + GetTargetArch().upper()
|
|
|
if ("MFC" not in opts):
|
|
|
@@ -2134,7 +2138,7 @@ def WriteConfigSettings():
|
|
|
|
|
|
if (PkgSkip("TOUCHINPUT") == 0 and GetTarget() == "windows"):
|
|
|
dtool_config["HAVE_WIN_TOUCHINPUT"] = '1'
|
|
|
-
|
|
|
+
|
|
|
if (GetOptimize() <= 3):
|
|
|
dtool_config["HAVE_ROCKET_DEBUGGER"] = '1'
|
|
|
|
|
|
@@ -4475,7 +4479,7 @@ if (PkgSkip("DIRECT")==0):
|
|
|
TargetAdd('packpanda.obj', opts=OPTS+['BUILDING:PACKPANDA'], input='ppython.cxx')
|
|
|
TargetAdd('packpanda.exe', input='packpanda.obj')
|
|
|
TargetAdd('packpanda.exe', opts=['PYTHON'])
|
|
|
-
|
|
|
+
|
|
|
DefSymbol("BUILDING:EGGCACHER", "IMPORT_MODULE", "direct.directscripts.eggcacher")
|
|
|
TargetAdd('eggcacher.obj', opts=OPTS+['BUILDING:EGGCACHER'], input='ppython.cxx')
|
|
|
TargetAdd('eggcacher.exe', input='eggcacher.obj')
|
|
|
@@ -4743,7 +4747,7 @@ if (RUNTIME and PkgSkip("NPAPI")==0):
|
|
|
# DIRECTORY: direct/src/plugin_activex/
|
|
|
#
|
|
|
|
|
|
-if (RUNTIME and GetTarget() == 'windows'):
|
|
|
+if (RUNTIME and GetTarget() == 'windows' and PkgSkip("MFC")==0):
|
|
|
OPTS=['DIR:direct/src/plugin_activex', 'RUNTIME', 'ACTIVEX', 'MFC']
|
|
|
DefSymbol('ACTIVEX', '_USRDLL', '')
|
|
|
DefSymbol('ACTIVEX', '_WINDLL', '')
|
|
|
@@ -5810,7 +5814,7 @@ if (PkgSkip("PYTHON")==0 and not RUNTIME):
|
|
|
TargetAdd('PandaModules.py', input='fx.pyd')
|
|
|
if (PkgSkip("DIRECT")==0):
|
|
|
TargetAdd('PandaModules.py', input='direct.pyd')
|
|
|
- if (PkgSkip("VISION")==0):
|
|
|
+ if (PkgSkip("VISION")==0):
|
|
|
TargetAdd('PandaModules.py', input='vision.pyd')
|
|
|
if (PkgSkip("SKEL")==0):
|
|
|
TargetAdd('PandaModules.py', input='skel.pyd')
|
|
|
@@ -6047,11 +6051,25 @@ def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
|
|
|
elif (os.path.isdir(file)):
|
|
|
shutil.rmtree(file)
|
|
|
|
|
|
+ if GetTargetArch() == 'x64':
|
|
|
+ regview = '64'
|
|
|
+ else:
|
|
|
+ regview = '32'
|
|
|
+
|
|
|
if (RUNTIME):
|
|
|
# Invoke the make_installer script.
|
|
|
AddToPathEnv("PATH", GetOutputDir() + "\\bin")
|
|
|
AddToPathEnv("PATH", GetOutputDir() + "\\plugins")
|
|
|
- oscmd(sys.executable + " -B direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION)
|
|
|
+
|
|
|
+ cmd = sys.executable + " -B -u direct\\src\\plugin_installer\\make_installer.py"
|
|
|
+ cmd += " --version %s --regview %s" % (VERSION, regview)
|
|
|
+
|
|
|
+ if GetTargetArch() == 'x64':
|
|
|
+ cmd += " --install \"$PROGRAMFILES64\\Panda3D\" "
|
|
|
+ else:
|
|
|
+ cmd += " --install \"$PROGRAMFILES32\\Panda3D\" "
|
|
|
+
|
|
|
+ oscmd(cmd)
|
|
|
shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file)
|
|
|
return
|
|
|
|
|
|
@@ -6064,11 +6082,6 @@ def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
|
|
|
psource = os.path.abspath(".")
|
|
|
panda = os.path.abspath(GetOutputDir())
|
|
|
|
|
|
- if GetTargetArch() == 'x64':
|
|
|
- regview = '64'
|
|
|
- else:
|
|
|
- regview = '32'
|
|
|
-
|
|
|
nsis_defs = {
|
|
|
'COMPRESSOR' : COMPRESSOR,
|
|
|
'NAME' : fullname,
|