mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Conflict fix
This commit is contained in:
parent
254dd1df4f
commit
8fd5a5147d
@ -160,6 +160,7 @@ def WriteFile(wfile,data):
|
|||||||
dsthandle = open(wfile, "wb")
|
dsthandle = open(wfile, "wb")
|
||||||
dsthandle.write(data)
|
dsthandle.write(data)
|
||||||
dsthandle.close()
|
dsthandle.close()
|
||||||
|
updatefiledate(wfile)
|
||||||
except: sys.exit("Cannot write "+wfile)
|
except: sys.exit("Cannot write "+wfile)
|
||||||
|
|
||||||
def prettyTime(t):
|
def prettyTime(t):
|
||||||
@ -183,7 +184,8 @@ def MakeDirectory(path):
|
|||||||
##
|
##
|
||||||
## You might be tempted to change the defaults by editing them
|
## You might be tempted to change the defaults by editing them
|
||||||
## here. Don't do it. Instead, create a script that compiles
|
## here. Don't do it. Instead, create a script that compiles
|
||||||
## panda with your preferred options.
|
## panda with your preferred options. Or, create
|
||||||
|
## a 'makepandaPreferences' file and put it into your python path.
|
||||||
##
|
##
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
@ -199,7 +201,7 @@ THIRDPARTY="thirdparty"
|
|||||||
VERSION="0.0.0"
|
VERSION="0.0.0"
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
COMPRESSOR="zlib"
|
COMPRESSOR="zlib"
|
||||||
PACKAGES=["ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","NVIDIACG","HELIX","NSPR",
|
PACKAGES=["PYTHON","ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","NVIDIACG","HELIX","NSPR",
|
||||||
"SSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAX5","MAX6","MAX7"]
|
"SSL","FREETYPE","FFTW","MILES","MAYA5","MAYA6","MAYA65","MAX5","MAX6","MAX7"]
|
||||||
OMIT=PACKAGES[:]
|
OMIT=PACKAGES[:]
|
||||||
WARNINGS=[]
|
WARNINGS=[]
|
||||||
@ -207,6 +209,8 @@ DIRECTXSDK = None
|
|||||||
MAYASDK = {}
|
MAYASDK = {}
|
||||||
MAXSDK = {}
|
MAXSDK = {}
|
||||||
MAXSDKCS = {}
|
MAXSDKCS = {}
|
||||||
|
PYTHONSDK=0
|
||||||
|
STARTTIME=time.time()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# If there is a makepandaPreferences.py, import it:
|
# If there is a makepandaPreferences.py, import it:
|
||||||
@ -215,8 +219,6 @@ except ImportError:
|
|||||||
# If it's not there, no problem:
|
# If it's not there, no problem:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
STARTTIME=time.time()
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
#
|
#
|
||||||
# Read the default version number out of dtool/PandaVersion.pp
|
# Read the default version number out of dtool/PandaVersion.pp
|
||||||
@ -503,7 +505,7 @@ def parseopts(args):
|
|||||||
longopts = [
|
longopts = [
|
||||||
"help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=",
|
"help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=",
|
||||||
"optimize=","everything","nothing","installer","ppgame=","quiet","verbose",
|
"optimize=","everything","nothing","installer","ppgame=","quiet","verbose",
|
||||||
"version=","lzma"]
|
"version=","lzma","no-python"]
|
||||||
anything = 0
|
anything = 0
|
||||||
for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
|
for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
|
||||||
for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
|
for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
|
||||||
@ -569,6 +571,8 @@ if (PREFIX.count(" ") or THIRDPARTY.count(" ")):
|
|||||||
sys.exit("The --prefix and --thirdparty may not contain spaces")
|
sys.exit("The --prefix and --thirdparty may not contain spaces")
|
||||||
if (PREFIX.count('"') or THIRDPARTY.count('"')):
|
if (PREFIX.count('"') or THIRDPARTY.count('"')):
|
||||||
sys.exit("The --prefix and --thirdparty may not contain quotation marks")
|
sys.exit("The --prefix and --thirdparty may not contain quotation marks")
|
||||||
|
if (INSTALLER) and (OMIT.count("PYTHON")):
|
||||||
|
sys.exit("Cannot build installer without python")
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
@ -691,21 +695,12 @@ for version,key1,key2,subdir in MAXVERSIONS:
|
|||||||
##
|
##
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
if sys.platform == "win32":
|
if (OMIT.count("PYTHON")==0):
|
||||||
PythonSDK="python2.2"
|
if (os.path.isdir("/usr/include/python2.5")): PYTHONSDK = "/usr/include/python2.5"
|
||||||
if 0: # Needs testing:
|
elif (os.path.isdir("/usr/include/python2.4")): PYTHONSDK = "/usr/include/python2.4"
|
||||||
if (os.path.isdir("C:/Python22")): PythonSDK = "C:/Python22"
|
elif (os.path.isdir("/usr/include/python2.3")): PYTHONSDK = "/usr/include/python2.3"
|
||||||
elif (os.path.isdir("C:/Python23")): PythonSDK = "C:/Python23"
|
elif (os.path.isdir("/usr/include/python2.2")): PYTHONSDK = "/usr/include/python2.2"
|
||||||
elif (os.path.isdir("C:/Python24")): PythonSDK = "C:/Python24"
|
|
||||||
elif (os.path.isdir("C:/Python25")): PythonSDK = "C:/Python25"
|
|
||||||
else: sys.exit("Cannot find the python SDK")
|
else: sys.exit("Cannot find the python SDK")
|
||||||
else:
|
|
||||||
if (os.path.isdir("/usr/include/python2.5")): PythonSDK = "/usr/include/python2.5"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.4")): PythonSDK = "/usr/include/python2.4"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.3")): PythonSDK = "/usr/include/python2.3"
|
|
||||||
elif (os.path.isdir("/usr/include/python2.2")): PythonSDK = "/usr/include/python2.2"
|
|
||||||
else: sys.exit("Cannot find the python SDK")
|
|
||||||
# this is so that the user can find out which version of python was used.
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
@ -872,16 +867,18 @@ MakeDirectory(PREFIX+"/bin")
|
|||||||
MakeDirectory(PREFIX+"/lib")
|
MakeDirectory(PREFIX+"/lib")
|
||||||
MakeDirectory(PREFIX+"/etc")
|
MakeDirectory(PREFIX+"/etc")
|
||||||
MakeDirectory(PREFIX+"/plugins")
|
MakeDirectory(PREFIX+"/plugins")
|
||||||
MakeDirectory(PREFIX+"/pandac")
|
|
||||||
MakeDirectory(PREFIX+"/pandac/input")
|
|
||||||
MakeDirectory(PREFIX+"/include")
|
MakeDirectory(PREFIX+"/include")
|
||||||
MakeDirectory(PREFIX+"/include/parser-inc")
|
MakeDirectory(PREFIX+"/include/parser-inc")
|
||||||
MakeDirectory(PREFIX+"/include/parser-inc/openssl")
|
MakeDirectory(PREFIX+"/include/parser-inc/openssl")
|
||||||
MakeDirectory(PREFIX+"/include/parser-inc/Cg")
|
MakeDirectory(PREFIX+"/include/parser-inc/Cg")
|
||||||
MakeDirectory(PREFIX+"/include/openssl")
|
MakeDirectory(PREFIX+"/include/openssl")
|
||||||
MakeDirectory(PREFIX+"/direct")
|
|
||||||
MakeDirectory(PREFIX+"/tmp")
|
MakeDirectory(PREFIX+"/tmp")
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
|
MakeDirectory(PREFIX+"/direct")
|
||||||
|
MakeDirectory(PREFIX+"/pandac")
|
||||||
|
MakeDirectory(PREFIX+"/pandac/input")
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
## PkgSelected(package-list,package)
|
## PkgSelected(package-list,package)
|
||||||
@ -1092,7 +1089,6 @@ def CopyFile(dstfile,srcfile):
|
|||||||
if VERBOSE >= 1:
|
if VERBOSE >= 1:
|
||||||
print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
|
print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
|
||||||
WriteFile(dstfile,ReadFile(srcfile))
|
WriteFile(dstfile,ReadFile(srcfile))
|
||||||
updatefiledate(dstfile)
|
|
||||||
ALLTARGETS.append(dstfile)
|
ALLTARGETS.append(dstfile)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -1183,13 +1179,13 @@ def checkIfNewDir(path):
|
|||||||
print "\nStarting compile in \"%s\" (%s):\n"%(path,prettyTime(time.time()-STARTTIME),)
|
print "\nStarting compile in \"%s\" (%s):\n"%(path,prettyTime(time.time()-STARTTIME),)
|
||||||
priorIPath=path
|
priorIPath=path
|
||||||
|
|
||||||
def CompileC(obj=0,src=0,ipath=[],opts=[]):
|
def CompileC(obj=0,src=0,ipath=[],opts=[],xdep=[]):
|
||||||
global VERBOSE
|
global VERBOSE
|
||||||
if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive")
|
if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive")
|
||||||
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
|
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
|
||||||
fullsrc = CxxFindSource(src, ipath)
|
fullsrc = CxxFindSource(src, ipath)
|
||||||
if (fullsrc == 0): sys.exit("Cannot find source file "+src)
|
if (fullsrc == 0): sys.exit("Cannot find source file "+src)
|
||||||
dep = CxxCalcDependencies(fullsrc, ipath, [])
|
dep = CxxCalcDependencies(fullsrc, ipath, []) + xdep
|
||||||
|
|
||||||
if (COMPILER=="MSVC7"):
|
if (COMPILER=="MSVC7"):
|
||||||
wobj = PREFIX+"/tmp/"+obj
|
wobj = PREFIX+"/tmp/"+obj
|
||||||
@ -1197,7 +1193,7 @@ def CompileC(obj=0,src=0,ipath=[],opts=[]):
|
|||||||
if VERBOSE >= 0:
|
if VERBOSE >= 0:
|
||||||
checkIfNewDir(ipath[1])
|
checkIfNewDir(ipath[1])
|
||||||
cmd = "cl.exe /Fo" + wobj + " /nologo /c"
|
cmd = "cl.exe /Fo" + wobj + " /nologo /c"
|
||||||
cmd = cmd + " /I" + PREFIX + "/python/include"
|
if (OMIT.count("PYTHON")==0): cmd = cmd + " /I" + PREFIX + "/python/include"
|
||||||
if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"'
|
if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"'
|
||||||
for ver in ["MAYA5","MAYA6","MAYA65"]:
|
for ver in ["MAYA5","MAYA6","MAYA65"]:
|
||||||
if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"'
|
if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"'
|
||||||
@ -1228,7 +1224,7 @@ def CompileC(obj=0,src=0,ipath=[],opts=[]):
|
|||||||
checkIfNewDir(ipath[1])
|
checkIfNewDir(ipath[1])
|
||||||
if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
|
if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
|
||||||
else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
|
else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
|
||||||
cmd = cmd + ' -I"' + PythonSDK + '"'
|
if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"'
|
||||||
if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include'
|
if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include'
|
||||||
if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include'
|
if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include'
|
||||||
if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include'
|
if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include'
|
||||||
@ -1286,11 +1282,15 @@ def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, fil
|
|||||||
if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)):
|
if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)):
|
||||||
sys.exit("syntax error in Interrogate directive")
|
sys.exit("syntax error in Interrogate directive")
|
||||||
ALLIN.append(outd)
|
ALLIN.append(outd)
|
||||||
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
|
|
||||||
outd = PREFIX+"/pandac/input/"+outd
|
outd = PREFIX+"/pandac/input/"+outd
|
||||||
outc = PREFIX+"/tmp/"+outc
|
outc = PREFIX+"/tmp/"+outc
|
||||||
|
if (OMIT.count("PYTHON")):
|
||||||
|
ConditionalWriteFile(outc,"")
|
||||||
|
return
|
||||||
|
ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"]
|
||||||
paths = xpaths(src+"/",files,"")
|
paths = xpaths(src+"/",files,"")
|
||||||
dep = CxxCalcDependenciesAll(paths, ipath)
|
dep = CxxCalcDependenciesAll(paths, ipath)
|
||||||
|
dep.append(PREFIX+"/tmp/dtool_have_python.dat")
|
||||||
dotdots = ""
|
dotdots = ""
|
||||||
for i in range(0,src.count("/")+1): dotdots = dotdots + "../"
|
for i in range(0,src.count("/")+1): dotdots = dotdots + "../"
|
||||||
building = 0
|
building = 0
|
||||||
@ -1348,8 +1348,12 @@ def InterrogateModule(outc=0, module=0, library=0, files=0):
|
|||||||
if ((outc==0)|(module==0)|(library==0)|(files==0)):
|
if ((outc==0)|(module==0)|(library==0)|(files==0)):
|
||||||
sys.exit("syntax error in InterrogateModule directive")
|
sys.exit("syntax error in InterrogateModule directive")
|
||||||
outc = PREFIX+"/tmp/"+outc
|
outc = PREFIX+"/tmp/"+outc
|
||||||
|
if (OMIT.count("PYTHON")):
|
||||||
|
ConditionalWriteFile(outc,"")
|
||||||
|
return
|
||||||
files = xpaths(PREFIX+"/pandac/input/",files,"")
|
files = xpaths(PREFIX+"/pandac/input/",files,"")
|
||||||
if (older(outc, files)):
|
dep = files + [PREFIX+"/tmp/dtool_have_python.dat"]
|
||||||
|
if (older(outc, dep)):
|
||||||
global VERBOSE
|
global VERBOSE
|
||||||
if VERBOSE >= 1:
|
if VERBOSE >= 1:
|
||||||
print "Generating Python-stub cxx file for %s"%(library,)
|
print "Generating Python-stub cxx file for %s"%(library,)
|
||||||
@ -1434,7 +1438,7 @@ def CompileLink(dll=0, obj=[], opts=[], xdep=[]):
|
|||||||
if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB "
|
if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB "
|
||||||
if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def'
|
if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def'
|
||||||
cmd = cmd + ' /OUT:' + dll + ' /IMPLIB:' + lib + ' /MAP:NUL'
|
cmd = cmd + ' /OUT:' + dll + ' /IMPLIB:' + lib + ' /MAP:NUL'
|
||||||
cmd = cmd + ' /LIBPATH:' + PREFIX + '/python/libs '
|
if (OMIT.count("PYTHON")==0): cmd = cmd + ' /LIBPATH:' + PREFIX + '/python/libs '
|
||||||
for x in wobj: cmd = cmd + ' ' + x
|
for x in wobj: cmd = cmd + ' ' + x
|
||||||
if (dll[-4:]==".exe"): cmd = cmd + ' ' + PREFIX + '/tmp/pandaIcon.res'
|
if (dll[-4:]==".exe"): cmd = cmd + ' ' + PREFIX + '/tmp/pandaIcon.res'
|
||||||
if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")):
|
if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")):
|
||||||
@ -1616,7 +1620,7 @@ CxxIgnoreHeader["afxres.h"] = 1
|
|||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
#
|
#
|
||||||
# Generate pandaVersion.h
|
# Generate pandaVersion.h, pythonversion, null.cxx
|
||||||
#
|
#
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
@ -1673,7 +1677,10 @@ conf = conf.replace("NVERSION",str(NVERSION))
|
|||||||
|
|
||||||
ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.h',conf)
|
ConditionalWriteFile(PREFIX+'/include/checkPandaVersion.h',conf)
|
||||||
|
|
||||||
ConditionalWriteFile(PREFIX + "/tmp/pythonversion", os.path.basename(PythonSDK))
|
if (OMIT.count("PYTHON")==0):
|
||||||
|
ConditionalWriteFile(PREFIX + "/tmp/pythonversion", os.path.basename(PYTHONSDK))
|
||||||
|
|
||||||
|
ConditionalWriteFile(PREFIX+"/tmp/null.cxx","")
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
#
|
#
|
||||||
@ -1700,6 +1707,7 @@ if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
|
|||||||
elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
|
elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
|
||||||
else: sys.exit("Cannot find the 'direct' tree")
|
else: sys.exit("Cannot find the 'direct' tree")
|
||||||
"""
|
"""
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
ConditionalWriteFile(PREFIX+'/direct/__init__.py', DIRECTINIT)
|
ConditionalWriteFile(PREFIX+'/direct/__init__.py', DIRECTINIT)
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
@ -1915,8 +1923,9 @@ for pkg in (PACKAGES + ["extras"]):
|
|||||||
CopyAllFiles(PREFIX+"/lib/",THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib/")
|
CopyAllFiles(PREFIX+"/lib/",THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib/")
|
||||||
|
|
||||||
if (sys.platform == "win32"):
|
if (sys.platform == "win32"):
|
||||||
CopyTree(PREFIX+'/python', 'thirdparty/win-python')
|
|
||||||
CopyFile(PREFIX+'/bin/', 'thirdparty/win-python/python22.dll')
|
CopyFile(PREFIX+'/bin/', 'thirdparty/win-python/python22.dll')
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
|
CopyTree(PREFIX+'/python', 'thirdparty/win-python')
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
@ -1926,11 +1935,12 @@ if (sys.platform == "win32"):
|
|||||||
|
|
||||||
CopyFile(PREFIX+"/", "doc/LICENSE")
|
CopyFile(PREFIX+"/", "doc/LICENSE")
|
||||||
CopyFile(PREFIX+"/", "doc/ReleaseNotes")
|
CopyFile(PREFIX+"/", "doc/ReleaseNotes")
|
||||||
|
CopyAllFiles(PREFIX+"/plugins/", "pandatool/src/scripts/", ".mel")
|
||||||
|
CopyAllFiles(PREFIX+"/plugins/", "pandatool/src/scripts/", ".ms")
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
CopyTree(PREFIX+'/Pmw', 'thirdparty/Pmw')
|
CopyTree(PREFIX+'/Pmw', 'thirdparty/Pmw')
|
||||||
CopyTree(PREFIX+'/epydoc', 'thirdparty/epydoc')
|
CopyTree(PREFIX+'/epydoc', 'thirdparty/epydoc')
|
||||||
CopyTree(PREFIX+'/SceneEditor', 'SceneEditor')
|
CopyTree(PREFIX+'/SceneEditor', 'SceneEditor')
|
||||||
CopyAllFiles(PREFIX+"/plugins/", "pandatool/src/scripts/", ".mel")
|
|
||||||
CopyAllFiles(PREFIX+"/plugins/", "pandatool/src/scripts/", ".ms")
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
@ -1938,10 +1948,10 @@ CopyAllFiles(PREFIX+"/plugins/", "pandatool/src/scripts/", ".ms")
|
|||||||
##
|
##
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/directbase']
|
IPATH=['direct/src/directbase']
|
||||||
CompileC(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
|
CompileC(ipath=IPATH, opts=['BUILDING_PPYTHON'], src='ppython.cxx', obj='ppython.obj')
|
||||||
CompileLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
|
CompileLink(opts=['WINUSER'], dll='ppython.exe', obj=['ppython.obj'])
|
||||||
|
|
||||||
IPATH=['direct/src/directbase']
|
IPATH=['direct/src/directbase']
|
||||||
CompileC(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
|
CompileC(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
|
||||||
CompileLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
|
CompileLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
|
||||||
@ -3698,10 +3708,12 @@ CompileC(ipath=IPATH, opts=OPTS, src='interrogatedb_composite2.cxx', obj='interr
|
|||||||
# DIRECTORY: dtool/metalibs/dtoolconfig/
|
# DIRECTORY: dtool/metalibs/dtoolconfig/
|
||||||
#
|
#
|
||||||
|
|
||||||
IPATH=['dtool/metalibs/dtoolconfig']
|
IPATH=['dtool/metalibs/dtoolconfig', PREFIX+"/tmp"]
|
||||||
OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
|
OPTS=['BUILDING_DTOOLCONFIG', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='pydtool.cxx', obj='dtoolconfig_pydtool.obj')
|
SRCFILE="pydtool.cxx"
|
||||||
|
if (OMIT.count("PYTHON")): SRCFILE="null.cxx"
|
||||||
|
CompileC(ipath=IPATH, opts=OPTS, src=SRCFILE, obj='dtoolconfig_pydtool.obj', xdep=[PREFIX+"/tmp/dtool_have_python.dat"])
|
||||||
CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='libdtoolconfig.dll', obj=[
|
CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='libdtoolconfig.dll', obj=[
|
||||||
'dtoolconfig_dtoolconfig.obj',
|
'dtoolconfig_dtoolconfig.obj',
|
||||||
'dtoolconfig_pydtool.obj',
|
'dtoolconfig_pydtool.obj',
|
||||||
@ -4874,6 +4886,7 @@ CompileLink(dll='pview.exe', opts=['ADVAPI', 'NSPR'], obj=[
|
|||||||
# DIRECTORY: direct/src/directbase/
|
# DIRECTORY: direct/src/directbase/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/directbase']
|
IPATH=['direct/src/directbase']
|
||||||
OPTS=['BUILDING_DIRECT', 'NSPR']
|
OPTS=['BUILDING_DIRECT', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
|
||||||
@ -4882,6 +4895,7 @@ CompileC(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbas
|
|||||||
# DIRECTORY: direct/src/dcparser/
|
# DIRECTORY: direct/src/dcparser/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
CompileBison(pre='dcyy', dstc='dcParser.cxx', dsth='dcParser.h', src='direct/src/dcparser/dcParser.yxx')
|
CompileBison(pre='dcyy', dstc='dcParser.cxx', dsth='dcParser.h', src='direct/src/dcparser/dcParser.yxx')
|
||||||
CompileFlex(pre='dcyy', dst='dcLexer.cxx', src='direct/src/dcparser/dcLexer.lxx', dashi=0)
|
CompileFlex(pre='dcyy', dst='dcLexer.cxx', src='direct/src/dcparser/dcLexer.lxx', dashi=0)
|
||||||
IPATH=['direct/src/dcparser']
|
IPATH=['direct/src/dcparser']
|
||||||
@ -4905,6 +4919,7 @@ CompileC(ipath=IPATH, opts=OPTS, src='libdcparser_igate.cxx', obj='libdcparser_i
|
|||||||
# DIRECTORY: direct/src/deadrec/
|
# DIRECTORY: direct/src/deadrec/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/deadrec']
|
IPATH=['direct/src/deadrec']
|
||||||
OPTS=['BUILDING_DIRECT', 'NSPR']
|
OPTS=['BUILDING_DIRECT', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='deadrec_composite1.cxx', obj='deadrec_composite1.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='deadrec_composite1.cxx', obj='deadrec_composite1.obj')
|
||||||
@ -4917,6 +4932,7 @@ CompileC(ipath=IPATH, opts=OPTS, src='libdeadrec_igate.cxx', obj='libdeadrec_iga
|
|||||||
# DIRECTORY: direct/src/distributed/
|
# DIRECTORY: direct/src/distributed/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/distributed', 'direct/src/dcparser']
|
IPATH=['direct/src/distributed', 'direct/src/dcparser']
|
||||||
OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'SSL', 'NSPR']
|
OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'SSL', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
|
||||||
@ -4932,18 +4948,9 @@ CompileC(ipath=IPATH, opts=OPTS, src='libdistributed_igate.cxx', obj='libdistrib
|
|||||||
# DIRECTORY: direct/src/interval/
|
# DIRECTORY: direct/src/interval/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/interval']
|
IPATH=['direct/src/interval']
|
||||||
OPTS=['BUILDING_DIRECT', 'NSPR']
|
OPTS=['BUILDING_DIRECT', 'NSPR']
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='config_interval.cxx', obj='interval_config_interval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cInterval.cxx', obj='interval_cInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cIntervalManager.cxx', obj='interval_cIntervalManager.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cLerpInterval.cxx', obj='interval_cLerpInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cLerpNodePathInterval.cxx', obj='interval_cLerpNodePathInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cLerpAnimEffectInterval.cxx', obj='interval_cLerpAnimEffectInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='cMetaInterval.cxx', obj='interval_cMetaInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='hideInterval.cxx', obj='interval_hideInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='showInterval.cxx', obj='interval_showInterval.obj')
|
|
||||||
#CompileC(ipath=IPATH, opts=OPTS, src='waitInterval.cxx', obj='interval_waitInterval.obj')
|
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='interval_composite1.cxx', obj='interval_composite1.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='interval_composite1.cxx', obj='interval_composite1.obj')
|
||||||
Interrogate(ipath=IPATH, opts=OPTS, outd='libinterval.in', outc='libinterval_igate.cxx',
|
Interrogate(ipath=IPATH, opts=OPTS, outd='libinterval.in', outc='libinterval_igate.cxx',
|
||||||
src='direct/src/interval', module='direct', library='libinterval',
|
src='direct/src/interval', module='direct', library='libinterval',
|
||||||
@ -4959,6 +4966,7 @@ CompileC(ipath=IPATH, opts=OPTS, src='libinterval_igate.cxx', obj='libinterval_i
|
|||||||
# DIRECTORY: direct/src/showbase/
|
# DIRECTORY: direct/src/showbase/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/showbase']
|
IPATH=['direct/src/showbase']
|
||||||
OPTS=['BUILDING_DIRECT', 'NSPR']
|
OPTS=['BUILDING_DIRECT', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
|
||||||
@ -4972,6 +4980,7 @@ CompileC(ipath=IPATH, opts=OPTS, src='libshowbase_igate.cxx', obj='libshowbase_i
|
|||||||
# DIRECTORY: direct/metalibs/direct/
|
# DIRECTORY: direct/metalibs/direct/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/metalibs/direct']
|
IPATH=['direct/metalibs/direct']
|
||||||
OPTS=['BUILDING_DIRECT', 'NSPR']
|
OPTS=['BUILDING_DIRECT', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
|
||||||
@ -5008,6 +5017,7 @@ CompileLink(dll='libdirect.dll', opts=['ADVAPI', 'NSPR', 'SSL'], obj=[
|
|||||||
# DIRECTORY: direct/src/dcparse/
|
# DIRECTORY: direct/src/dcparse/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/dcparse', 'direct/src/dcparser']
|
IPATH=['direct/src/dcparse', 'direct/src/dcparser']
|
||||||
OPTS=['WITHINPANDA', 'NSPR']
|
OPTS=['WITHINPANDA', 'NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
|
||||||
@ -5024,6 +5034,7 @@ CompileLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[
|
|||||||
# DIRECTORY: direct/src/heapq/
|
# DIRECTORY: direct/src/heapq/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
IPATH=['direct/src/heapq']
|
IPATH=['direct/src/heapq']
|
||||||
OPTS=['NSPR']
|
OPTS=['NSPR']
|
||||||
CompileC(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
|
CompileC(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
|
||||||
@ -6221,6 +6232,7 @@ CompileBAM("../=", PREFIX+"/models/misc/Spotlight.bam", "dmodels/src/misc/S
|
|||||||
#
|
#
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
|
if (OMIT.count("PYTHON")==0):
|
||||||
if (older(PREFIX+'/pandac/PandaModules.pyz',xpaths(PREFIX+"/pandac/input/",ALLIN,""))):
|
if (older(PREFIX+'/pandac/PandaModules.pyz',xpaths(PREFIX+"/pandac/input/",ALLIN,""))):
|
||||||
ALLTARGETS.append(PREFIX+'/pandac/PandaModules.pyz')
|
ALLTARGETS.append(PREFIX+'/pandac/PandaModules.pyz')
|
||||||
if (sys.platform=="win32"):
|
if (sys.platform=="win32"):
|
||||||
@ -6247,15 +6259,13 @@ if (icache!=0):
|
|||||||
#
|
#
|
||||||
# The Installers
|
# The Installers
|
||||||
#
|
#
|
||||||
# Under windows, the installer is built using NSIS
|
# Under windows, we can build an 'exe' package using NSIS
|
||||||
# Under linux, the installer is a Debian DEB archive
|
# Under linux, we can build an 'deb' package using dpkg-deb
|
||||||
# Makepanda does not build RPMs. To do that, use 'rpm -tb' on the source tarball.
|
# Makepanda does not build RPMs. To do that, use 'rpm -tb' on the source tarball.
|
||||||
#
|
#
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
if (sys.platform == "win32"):
|
def MakeInstallerNSIS(file,fullname,smdirectory,uninstallkey,installdir,ppgame):
|
||||||
|
|
||||||
def MakeInstaller(file,fullname,smdirectory,uninstallkey,installdir,ppgame):
|
|
||||||
if (older(file, ALLTARGETS)):
|
if (older(file, ALLTARGETS)):
|
||||||
print "Building "+fullname+" installer. This can take up to an hour."
|
print "Building "+fullname+" installer. This can take up to an hour."
|
||||||
if (COMPRESSOR != "lzma"):
|
if (COMPRESSOR != "lzma"):
|
||||||
@ -6274,17 +6284,86 @@ if (sys.platform == "win32"):
|
|||||||
oscmd("thirdparty/win-nsis/makensis.exe /V2 "+def0+def1+def2+def3+def4+def5+" makepanda/panda.nsi")
|
oscmd("thirdparty/win-nsis/makensis.exe /V2 "+def0+def1+def2+def3+def4+def5+" makepanda/panda.nsi")
|
||||||
os.rename("nsis-output.exe", file)
|
os.rename("nsis-output.exe", file)
|
||||||
|
|
||||||
|
def MakeInstallerDPKG(file):
|
||||||
|
if (older(file,ALLTARGETS)):
|
||||||
|
DEB="""
|
||||||
|
Package: panda3d
|
||||||
|
Version: VERSION
|
||||||
|
Section: libdevel
|
||||||
|
Priority: optional
|
||||||
|
Architecture: i386
|
||||||
|
Essential: no
|
||||||
|
Depends: PYTHONV
|
||||||
|
Provides: panda3d
|
||||||
|
Maintainer: etc-panda3d@lists.andrew.cmu.edu
|
||||||
|
Description: The panda3D free 3D engine
|
||||||
|
"""
|
||||||
|
import compileall
|
||||||
|
PYTHONV=os.path.basename(PYTHONSDK)
|
||||||
|
if (os.path.isdir("debtmp")): oscmd("chmod -R 755 debtmp")
|
||||||
|
oscmd("rm -rf debtmp data.tar.gz control.tar.gz ")
|
||||||
|
oscmd("mkdir -p debtmp/usr/bin")
|
||||||
|
oscmd("mkdir -p debtmp/usr/include")
|
||||||
|
oscmd("mkdir -p debtmp/usr/share/panda3d")
|
||||||
|
oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/lib-dynload")
|
||||||
|
oscmd("mkdir -p debtmp/usr/lib/"+PYTHONV+"/site-packages")
|
||||||
|
oscmd("mkdir -p debtmp/etc")
|
||||||
|
oscmd("mkdir -p debtmp/DEBIAN")
|
||||||
|
oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > debtmp/etc/Config.prc")
|
||||||
|
oscmd("cp built/etc/Confauto.prc debtmp/etc/Confauto.prc")
|
||||||
|
oscmd("cp --recursive built/include debtmp/usr/include/panda3d")
|
||||||
|
oscmd("cp --recursive direct debtmp/usr/share/panda3d/direct")
|
||||||
|
oscmd("cp --recursive built/pandac debtmp/usr/share/panda3d/pandac")
|
||||||
|
oscmd("cp --recursive built/Pmw debtmp/usr/share/panda3d/Pmw")
|
||||||
|
oscmd("cp --recursive built/epydoc debtmp/usr/share/panda3d/epydoc")
|
||||||
|
oscmd("cp built/direct/__init__.py debtmp/usr/share/panda3d/direct/__init__.py")
|
||||||
|
oscmd("cp --recursive SceneEditor debtmp/usr/share/panda3d/SceneEditor")
|
||||||
|
oscmd("cp --recursive built/models debtmp/usr/share/panda3d/models")
|
||||||
|
oscmd("cp --recursive samples debtmp/usr/share/panda3d/samples")
|
||||||
|
oscmd("cp doc/LICENSE debtmp/usr/share/panda3d/LICENSE")
|
||||||
|
oscmd("cp doc/LICENSE debtmp/usr/include/panda3d/LICENSE")
|
||||||
|
oscmd("cp doc/ReleaseNotes debtmp/usr/share/panda3d/ReleaseNotes")
|
||||||
|
oscmd("echo '/usr/share/panda3d' > debtmp/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
|
||||||
|
oscmd("cp built/bin/* debtmp/usr/bin/")
|
||||||
|
for base in os.listdir("built/lib"):
|
||||||
|
oscmd("ln -sf /usr/lib/"+base+" debtmp/usr/lib/"+PYTHONV+"/lib-dynload/"+base)
|
||||||
|
oscmd("cp built/lib/"+base+" debtmp/usr/lib/"+base)
|
||||||
|
for base in os.listdir("debtmp/usr/share/panda3d/direct/src"):
|
||||||
|
if (base != "extensions"):
|
||||||
|
compileall.compile_dir("debtmp/usr/share/panda3d/direct/src/"+base)
|
||||||
|
compileall.compile_dir("debtmp/usr/share/panda3d/Pmw")
|
||||||
|
compileall.compile_dir("debtmp/usr/share/panda3d/epydoc")
|
||||||
|
compileall.compile_dir("debtmp/usr/share/panda3d/SceneEditor")
|
||||||
|
oscmd("chmod -R 555 debtmp/usr/share/panda3d")
|
||||||
|
oslocalcmd("debtmp","(find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
|
||||||
|
oslocalcmd("debtmp","(find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
|
||||||
|
WriteFile("debtmp/DEBIAN/conffiles","/etc/Config.prc\n")
|
||||||
|
WriteFile("debtmp/DEBIAN/control",DEB[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV))
|
||||||
|
oscmd("dpkg-deb -b debtmp "+file)
|
||||||
|
oscmd("chmod -R 755 debtmp/usr/share/panda3d")
|
||||||
|
oscmd("rm -rf debtmp")
|
||||||
|
|
||||||
|
|
||||||
if (INSTALLER != 0):
|
if (INSTALLER != 0):
|
||||||
MakeInstaller("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION,
|
if (sys.platform == "win32"):
|
||||||
|
MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION,
|
||||||
"Panda3D "+VERSION, "C:\\Panda3D-"+VERSION, 0)
|
"Panda3D "+VERSION, "C:\\Panda3D-"+VERSION, 0)
|
||||||
|
elif (sys.platform == "linux2") and (os.path.isfile("/usr/bin/dpkg-deb")):
|
||||||
|
MakeInstallerDPKG("panda3d_"+VERSION+"_i386.deb")
|
||||||
|
else:
|
||||||
|
sys.exit("Do not know how to make an installer for this platform")
|
||||||
|
|
||||||
|
|
||||||
if (PPGAME!=0):
|
if (PPGAME!=0):
|
||||||
if (os.path.isdir(PPGAME)==0):
|
if (os.path.isdir(PPGAME)==0):
|
||||||
sys.exit("No such directory "+PPGAME)
|
sys.exit("No such directory "+PPGAME)
|
||||||
if (os.path.exists(os.path.join(PPGAME,PPGAME+".py"))==0):
|
if (os.path.exists(os.path.join(PPGAME,PPGAME+".py"))==0):
|
||||||
sys.exit("No such file "+PPGAME+"/"+PPGAME+".py")
|
sys.exit("No such file "+PPGAME+"/"+PPGAME+".py")
|
||||||
MakeInstaller(PPGAME+"-"+VERSION+".exe", PPGAME, PPGAME+" "+VERSION,
|
if (sys.platform == "win32"):
|
||||||
|
MakeInstallerNSIS(PPGAME+"-"+VERSION+".exe", PPGAME, PPGAME+" "+VERSION,
|
||||||
PPGAME+" "+VERSION, "C:\\"+PPGAME+"-"+VERSION, PPGAME)
|
PPGAME+" "+VERSION, "C:\\"+PPGAME+"-"+VERSION, PPGAME)
|
||||||
|
else:
|
||||||
|
sys.exit("Do not know how to make a prepackaged game for this platform")
|
||||||
|
|
||||||
|
|
||||||
DEB="""
|
DEB="""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user