rem
stringlengths 0
322k
| add
stringlengths 0
2.05M
| context
stringlengths 8
228k
|
---|---|---|
groupBp = bp(*(args), **kArgs)
|
def bpGroup(*args, **kArgs): groupBp = bp(*(args), **kArgs) argsCopy = args[:] def functor(*cArgs, **ckArgs): return bp(*(cArgs), **kArgs) return functor
|
|
return bp(*(cArgs), **kArgs)
|
kArgs.update(ckArgs) return bp(*(cArgs), **kArgs).maybeBreak(frameCount=kArgs.get('frameCount',1)+1)
|
def functor(*cArgs, **ckArgs): return bp(*(cArgs), **kArgs)
|
TargetAdd('plugin_standalone_panda3dBase.obj', opts=OPTS, input='panda3dBase.cxx')
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
|
error = "requested %s while FSM is in transition from %s to %s." % (request, self.oldState, self.newState)
|
error = "FSM cannot determine current filter while in transition (%s -> %s)." % (self.oldState, self.newState)
|
def getCurrentFilter(self): if not self.state: error = "requested %s while FSM is in transition from %s to %s." % (request, self.oldState, self.newState) raise AlreadyInTransition, error
|
oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, VERSION, GetOutputDir()), True)
|
oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, GetOutputDir()), True)
|
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm -f Panda3D-%s.dmg" % VERSION) if (os.path.exists("dstroot")): oscmd("rm -rf dstroot") if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg') #TODO: add postflight script #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib") oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc") oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir()) oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir()) oscmd("cp -R %s/models dstroot/base/Developer/Panda3D/models" % GetOutputDir()) oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE") oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes") if os.path.isdir(GetOutputDir()+"/plugins"): oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir()) for base in os.listdir(GetOutputDir()+"/lib"): if (not base.endswith(".a")): libname = "dstroot/base/Developer/Panda3D/lib/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname) # Execute install_name_tool to make them reference an absolute path if (libname.endswith(".dylib") and not os.path.islink(libname)): oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True) oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, VERSION, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) # Scripts to configure this version of Panda3D (in environment.plist) oscmd("mkdir -p dstroot/scripts/base/") postinstall = open("dstroot/scripts/base/postinstall", "w") print >>postinstall, "#!/usr/bin/python" print >>postinstall, "import os, plistlib" print >>postinstall, "home = os.environ['HOME']" print >>postinstall, "if not os.path.isdir(os.path.join(home, '.MacOSX')):" print >>postinstall, " os.mkdir(os.path.join(home, '.MacOSX'))" print >>postinstall, "plist = dict()" print >>postinstall, "envfile = os.path.join(home, '.MacOSX', 'environment.plist')" print >>postinstall, "if os.path.exists(envfile):" print >>postinstall, " plist = plistlib.readPlist(envfile)" print >>postinstall, "paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib'," print >>postinstall, " 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'}" print >>postinstall, "for env, path in paths.items():" print >>postinstall, " if env not in plist:" print >>postinstall, " plist[env] = path" print >>postinstall, " elif path not in plist[env]:" print >>postinstall, " plist[env] = '%s:%s' % (path, plist[env])" print >>postinstall, "plistlib.writePlist(plist, envfile)" postinstall.close() postflight = open("dstroot/scripts/base/postflight", "w") print >>postflight, "#!/usr/bin/env bash\n" print >>postflight, "RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`" print >>postflight, "\nexit 0" postflight.close() oscmd("chmod +x dstroot/scripts/base/postinstall") oscmd("chmod +x dstroot/scripts/base/postflight") oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D") oscmd("mkdir -p dstroot/tools/Developer/Panda3D") oscmd("ln -s /Developer/Tools/Panda3D dstroot/tools/Developer/Panda3D/bin") for base in os.listdir(GetOutputDir()+"/bin"): binname = "dstroot/tools/Developer/Tools/Panda3D/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/bin/" + base + " " + binname) # Execute install_name_tool to make the binaries reference an absolute path if (not os.path.islink(binname)): oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, VERSION, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) if PkgSkip("PYTHON")==0: oscmd("mkdir -p dstroot/pythoncode/usr/bin") oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/lib/pandac" % GetOutputDir()) oscmd("cp -R direct/src/* dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp direct/src/ffi/panda3d.py dstroot/pythoncode/Developer/Panda3D/lib/panda3d.py") oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"]) if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/lib/Pmw" % GetOutputDir()) compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/Pmw") WriteFile("dstroot/pythoncode/Developer/Panda3D/lib/direct/__init__.py", "") for base in os.listdir("dstroot/pythoncode/Developer/Panda3D/lib/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/direct/"+base) oscmd("mkdir -p dstroot/headers/Developer/Panda3D") oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir()) if os.path.isdir("samples"): oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D") oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/") # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ . oscmd("mkdir -p dstroot/scripts/uninstall16/") preflight = open("dstroot/scripts/uninstall16/preflight", "w") print >>preflight, "#!/usr/bin/python" print >>preflight, "import os, re, sys, shutil" print >>preflight, "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')" print >>preflight, "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')" print >>preflight, "if not os.path.isfile(bash_profile): sys.exit(0)" print >>preflight, "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]" print >>preflight, "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+" print >>preflight, "if \[ -d \$PANDA_PATH \]" print >>preflight, "then(.+?)fi" print >>preflight, "''', flags = re.DOTALL | re.MULTILINE)" print >>preflight, "bpfile = open(bash_profile, 'r')" print >>preflight, "bpdata = bpfile.read()" print >>preflight, "bpfile.close()" print >>preflight, "newbpdata = pattern.sub('', bpdata)" print >>preflight, "if newbpdata == bpdata: sys.exit(0)" print >>preflight, "bpfile = open(bash_profile, 'w')" print >>preflight, "bpfile.write(newbpdata)" print >>preflight, "bpfile.close()" preflight.close() oscmd("chmod +x dstroot/scripts/uninstall16/preflight") oscmd("chmod -R 0775 dstroot/*") # We need to be root to perform a chown. Bleh. # Fortunately PackageMaker does it for us, on 10.5 and above. #oscmd("chown -R root:admin dstroot/*", True) oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/") oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/") pkgs = ["base", "tools", "headers", "uninstall16"] if PkgSkip("PYTHON")==0: pkgs.append("pythoncode") if os.path.isdir("samples"): pkgs.append("samples") for pkg in pkgs: plist = open("/tmp/Info_plist", "w") plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION }) plist.close() if not os.path.isdir("dstroot/" + pkg): os.makedirs("dstroot/" + pkg) if os.path.exists("/Developer/usr/bin/packagemaker"): cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' elif os.path.exists("/Developer/Tools/packagemaker"): cmd = '/Developer/usr/bin/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist' else: exit("PackageMaker could not be found!") if os.path.isdir("dstroot/scripts/" + pkg): cmd += ' --scripts dstroot/scripts/' + pkg oscmd(cmd) if os.path.isfile("/tmp/Info_plist"): oscmd("rm -f /tmp/Info_plist") dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w") print >>dist, '<?xml version="1.0" encoding="utf-8"?>' print >>dist, '<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">' print >>dist, ' <title>Panda3D</title>' print >>dist, ' <options customize="always" allow-external-scripts="no" rootVolumeOnly="false"/>' # The following script is to enable the "Uninstall 1.6.x" option only when Panda3D 1.6.x is actually installed. print >>dist, ''' <script>
|
oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, VERSION, GetOutputDir()), True)
|
oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, GetOutputDir()), True)
|
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm -f Panda3D-%s.dmg" % VERSION) if (os.path.exists("dstroot")): oscmd("rm -rf dstroot") if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg') #TODO: add postflight script #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib") oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc") oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir()) oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir()) oscmd("cp -R %s/models dstroot/base/Developer/Panda3D/models" % GetOutputDir()) oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE") oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes") if os.path.isdir(GetOutputDir()+"/plugins"): oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir()) for base in os.listdir(GetOutputDir()+"/lib"): if (not base.endswith(".a")): libname = "dstroot/base/Developer/Panda3D/lib/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname) # Execute install_name_tool to make them reference an absolute path if (libname.endswith(".dylib") and not os.path.islink(libname)): oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True) oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, VERSION, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) # Scripts to configure this version of Panda3D (in environment.plist) oscmd("mkdir -p dstroot/scripts/base/") postinstall = open("dstroot/scripts/base/postinstall", "w") print >>postinstall, "#!/usr/bin/python" print >>postinstall, "import os, plistlib" print >>postinstall, "home = os.environ['HOME']" print >>postinstall, "if not os.path.isdir(os.path.join(home, '.MacOSX')):" print >>postinstall, " os.mkdir(os.path.join(home, '.MacOSX'))" print >>postinstall, "plist = dict()" print >>postinstall, "envfile = os.path.join(home, '.MacOSX', 'environment.plist')" print >>postinstall, "if os.path.exists(envfile):" print >>postinstall, " plist = plistlib.readPlist(envfile)" print >>postinstall, "paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib'," print >>postinstall, " 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'}" print >>postinstall, "for env, path in paths.items():" print >>postinstall, " if env not in plist:" print >>postinstall, " plist[env] = path" print >>postinstall, " elif path not in plist[env]:" print >>postinstall, " plist[env] = '%s:%s' % (path, plist[env])" print >>postinstall, "plistlib.writePlist(plist, envfile)" postinstall.close() postflight = open("dstroot/scripts/base/postflight", "w") print >>postflight, "#!/usr/bin/env bash\n" print >>postflight, "RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`" print >>postflight, "\nexit 0" postflight.close() oscmd("chmod +x dstroot/scripts/base/postinstall") oscmd("chmod +x dstroot/scripts/base/postflight") oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D") oscmd("mkdir -p dstroot/tools/Developer/Panda3D") oscmd("ln -s /Developer/Tools/Panda3D dstroot/tools/Developer/Panda3D/bin") for base in os.listdir(GetOutputDir()+"/bin"): binname = "dstroot/tools/Developer/Tools/Panda3D/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/bin/" + base + " " + binname) # Execute install_name_tool to make the binaries reference an absolute path if (not os.path.islink(binname)): oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, VERSION, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if "/" not in libdep: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) if PkgSkip("PYTHON")==0: oscmd("mkdir -p dstroot/pythoncode/usr/bin") oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/lib/pandac" % GetOutputDir()) oscmd("cp -R direct/src/* dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp direct/src/ffi/panda3d.py dstroot/pythoncode/Developer/Panda3D/lib/panda3d.py") oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"]) if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/lib/Pmw" % GetOutputDir()) compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/Pmw") WriteFile("dstroot/pythoncode/Developer/Panda3D/lib/direct/__init__.py", "") for base in os.listdir("dstroot/pythoncode/Developer/Panda3D/lib/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/direct/"+base) oscmd("mkdir -p dstroot/headers/Developer/Panda3D") oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir()) if os.path.isdir("samples"): oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D") oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/") # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ . oscmd("mkdir -p dstroot/scripts/uninstall16/") preflight = open("dstroot/scripts/uninstall16/preflight", "w") print >>preflight, "#!/usr/bin/python" print >>preflight, "import os, re, sys, shutil" print >>preflight, "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')" print >>preflight, "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')" print >>preflight, "if not os.path.isfile(bash_profile): sys.exit(0)" print >>preflight, "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]" print >>preflight, "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+" print >>preflight, "if \[ -d \$PANDA_PATH \]" print >>preflight, "then(.+?)fi" print >>preflight, "''', flags = re.DOTALL | re.MULTILINE)" print >>preflight, "bpfile = open(bash_profile, 'r')" print >>preflight, "bpdata = bpfile.read()" print >>preflight, "bpfile.close()" print >>preflight, "newbpdata = pattern.sub('', bpdata)" print >>preflight, "if newbpdata == bpdata: sys.exit(0)" print >>preflight, "bpfile = open(bash_profile, 'w')" print >>preflight, "bpfile.write(newbpdata)" print >>preflight, "bpfile.close()" preflight.close() oscmd("chmod +x dstroot/scripts/uninstall16/preflight") oscmd("chmod -R 0775 dstroot/*") # We need to be root to perform a chown. Bleh. # Fortunately PackageMaker does it for us, on 10.5 and above. #oscmd("chown -R root:admin dstroot/*", True) oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/") oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/") pkgs = ["base", "tools", "headers", "uninstall16"] if PkgSkip("PYTHON")==0: pkgs.append("pythoncode") if os.path.isdir("samples"): pkgs.append("samples") for pkg in pkgs: plist = open("/tmp/Info_plist", "w") plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION }) plist.close() if not os.path.isdir("dstroot/" + pkg): os.makedirs("dstroot/" + pkg) if os.path.exists("/Developer/usr/bin/packagemaker"): cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' elif os.path.exists("/Developer/Tools/packagemaker"): cmd = '/Developer/usr/bin/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist' else: exit("PackageMaker could not be found!") if os.path.isdir("dstroot/scripts/" + pkg): cmd += ' --scripts dstroot/scripts/' + pkg oscmd(cmd) if os.path.isfile("/tmp/Info_plist"): oscmd("rm -f /tmp/Info_plist") dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w") print >>dist, '<?xml version="1.0" encoding="utf-8"?>' print >>dist, '<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">' print >>dist, ' <title>Panda3D</title>' print >>dist, ' <options customize="always" allow-external-scripts="no" rootVolumeOnly="false"/>' # The following script is to enable the "Uninstall 1.6.x" option only when Panda3D 1.6.x is actually installed. print >>dist, ''' <script>
|
OPTS=['DIR:direct/src/plugin', 'RUNTIME', 'TINYXML', 'OPENSSL']
|
OPTS=['DIR:direct/src/plugin', 'BUILDING:P3D_PLUGIN', 'RUNTIME', 'TINYXML', 'OPENSSL']
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
OPTS=['DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'TINYXML', 'OPENSSL', 'JPEG', 'PNG', 'ZLIB'] DefSymbol("P3DEMBED", "BUILDING_P3D_PLUGIN", "")
|
OPTS=['BUILDING:P3D_PLUGIN', 'DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'TINYXML', 'OPENSSL', 'JPEG', 'PNG', 'ZLIB']
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
def flatten(self, newobjModel, objDef, uid):
|
def flatten(self, newobjModel, model, objDef, uid):
|
def flatten(self, newobjModel, objDef, uid): # override this to flatten models pass
|
self.objects[id][OG.OBJ_NP].removeNode()
|
try: self.objects[id][OG.OBJ_NP].removeNode() except: pass
|
def reset(self): base.direct.deselectAllCB()
|
self.ui.sceneGraphUI.delete(obj[OG.OBJ_UID])
|
oldUIDs.append(obj[OG.OBJ_UID])
|
def handleDelete(self): oldSelectedNPs = base.direct.selected.getSelectedAsList() for oldNP in oldSelectedNPs: obj = self.objectMgr.findObjectByNodePath(oldNP) if obj: self.ui.sceneGraphUI.delete(obj[OG.OBJ_UID]) action = ActionDeleteObj(self) self.actionMgr.push(action) action()
|
if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit"):
|
if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit" or sys.platform=="darwin"):
|
def CompileIgate(woutd,wsrc,opts): outbase = os.path.basename(woutd)[:-3] woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" wobj = FindLocation(outbase + "_igate.obj", []) srcdir = GetValueOption(opts, "SRCDIR:") module = GetValueOption(opts, "IMOD:") library = GetValueOption(opts, "ILIB:") ipath = GetListOption(opts, "DIR:") if (PkgSkip("PYTHON")): WriteFile(woutc,"") WriteFile(woutd,"") CompileCxx(wobj,woutc,opts) ConditionalWriteFile(woutd,"") return cmd = GetOutputDir()+"/bin/interrogate -srcdir "+srcdir+" -I"+srcdir cmd += ' -Dvolatile -Dmutable' if (COMPILER=="MSVC"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' #NOTE: this 1500 value is the version number for VC2008. cmd += ' -D_MSC_VER=1500 -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' #FIXME: allow 64-bits on OSX if (COMPILER=="LINUX") and (platform.architecture()[0]=="64bit") and (sys.platform!="darwin"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64' if (COMPILER=="LINUX") and (platform.architecture()[0]=="32bit"): cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D__i386__' optlevel=GetOptimizeOption(opts) if (optlevel==1): cmd += ' -D_DEBUG' if (optlevel==2): cmd += ' -D_DEBUG' if (optlevel==3): cmd += ' -DFORCE_INLINING' if (optlevel==4): cmd += ' -DNDEBUG -DFORCE_INLINING' cmd += ' -oc ' + woutc + ' -od ' + woutd cmd += ' -fnames -string -refcount -assert -python-native' cmd += ' -S' + GetOutputDir() + '/include/parser-inc' for x in ipath: cmd += ' -I' + BracketNameWithQuotes(x) for (opt,dir) in INCDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' -S' + BracketNameWithQuotes(dir) for (opt,var,val) in DEFSYMBOLS: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' -D' + var + '=' + val building = GetValueOption(opts, "BUILDING:") if (building): cmd += " -DBUILDING_"+building cmd += ' -module ' + module + ' -library ' + library for x in wsrc: if (x.startswith("/")): cmd += ' ' + BracketNameWithQuotes(x) else: cmd += ' ' + BracketNameWithQuotes(os.path.basename(x)) oscmd(cmd) CompileCxx(wobj,woutc,opts) return
|
if (sys.platform.startswith("freebsd")): IncDirectory("ALWAYS", "/usr/local/include") LibDirectory("ALWAYS", "/usr/local/lib")
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
|
SmartPkgEnable("NPAPI", "", (), ("xulrunner-*/stable", "xulrunner-*/stable/npapi.h", "nspr*/prtypes.h", "nspr*"))
|
if (sys.platform.startswith("freebsd")): SmartPkgEnable("NPAPI", "", (), ("xulrunner", "nspr*/prtypes.h", "nspr*")) else: SmartPkgEnable("NPAPI", "", (), ("xulrunner-*/stable", "xulrunner-*/stable/npapi.h", "nspr*/prtypes.h", "nspr*"))
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
TargetAdd('pview.exe', opts=['ADVAPI'])
|
TargetAdd('pview.exe', opts=['ADVAPI', 'WINSOCK2', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
if (GetOptimize() <= 2): dllext = "_d"
|
if (GetOptimize() <= 2 and sys.platform.startswith("win")): dllext = "_d"
|
def CalcLocation(fn, ipath): if (fn.count("/")): return fn dllext = "" if (GetOptimize() <= 2): dllext = "_d" if (fn == "PandaModules.py"): return "pandac/" + fn if (fn.endswith(".cxx")): return CxxFindSource(fn, ipath) if (fn.endswith(".I")): return CxxFindSource(fn, ipath) if (fn.endswith(".h")): return CxxFindSource(fn, ipath) if (fn.endswith(".c")): return CxxFindSource(fn, ipath) if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath) if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath) if (fn.endswith(".pdef")):return CxxFindSource(fn, ipath) if (sys.platform.startswith("win")): if (fn.endswith(".def")): return CxxFindSource(fn, ipath) if (fn.endswith(".rc")): return CxxFindSource(fn, ipath) if (fn.endswith(".idl")): return CxxFindSource(fn, ipath) if (fn.endswith(".obj")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".res")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".tlb")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".dll")): return OUTPUTDIR+"/bin/"+fn[:-4]+dllext+".dll" if (fn.endswith(".pyd")): return OUTPUTDIR+"/bin/"+fn[:-4]+dllext+".pyd" if (fn.endswith(".ocx")): return OUTPUTDIR+"/plugins/"+fn[:-4]+dllext+".ocx" if (fn.endswith(".mll")): return OUTPUTDIR+"/plugins/"+fn[:-4]+dllext+".mll" if (fn.endswith(".dlo")): return OUTPUTDIR+"/plugins/"+fn[:-4]+dllext+".dlo" if (fn.endswith(".dli")): return OUTPUTDIR+"/plugins/"+fn[:-4]+dllext+".dli" if (fn.endswith(".dle")): return OUTPUTDIR+"/plugins/"+fn[:-4]+dllext+".dle" if (fn.endswith(".plugin")):return OUTPUTDIR+"/plugins/"+fn[:-7]+dllext+".dll" if (fn.endswith(".exe")): return OUTPUTDIR+"/bin/"+fn if (fn.endswith(".lib")): return OUTPUTDIR+"/lib/"+fn[:-4]+dllext+".lib" if (fn.endswith(".ilb")): return OUTPUTDIR+"/tmp/"+fn[:-4]+dllext+".lib" if (fn.endswith(".dat")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".in")): return OUTPUTDIR+"/pandac/input/"+fn elif (sys.platform == "darwin"): if (fn.endswith(".mm")): return CxxFindSource(fn, ipath) if (fn.endswith(".r")): return CxxFindSource(fn, ipath) if (fn.endswith(".plist")): return CxxFindSource(fn, ipath) if (fn.endswith(".obj")): return OUTPUTDIR+"/tmp/"+fn[:-4]+".o" if (fn.endswith(".dll")): return OUTPUTDIR+"/lib/"+fn[:-4]+".dylib" if (fn.endswith(".pyd")): return OUTPUTDIR+"/lib/"+fn[:-4]+".dylib" if (fn.endswith(".mll")): return OUTPUTDIR+"/plugins/"+fn if (fn.endswith(".exe")): return OUTPUTDIR+"/bin/"+fn[:-4] if (fn.endswith(".lib")): return OUTPUTDIR+"/lib/"+fn[:-4]+".a" if (fn.endswith(".ilb")): return OUTPUTDIR+"/tmp/"+fn[:-4]+".a" if (fn.endswith(".dat")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".rsrc")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".plugin")):return OUTPUTDIR+"/plugins/"+fn if (fn.endswith(".app")): return OUTPUTDIR+"/bin/"+fn if (fn.endswith(".in")): return OUTPUTDIR+"/pandac/input/"+fn else: if (fn.endswith(".obj")): return OUTPUTDIR+"/tmp/"+fn[:-4]+".o" if (fn.endswith(".dll")): return OUTPUTDIR+"/lib/"+fn[:-4]+".so" if (fn.endswith(".pyd")): return OUTPUTDIR+"/lib/"+fn[:-4]+".so" if (fn.endswith(".mll")): return OUTPUTDIR+"/plugins/"+fn if (fn.endswith(".plugin")):return OUTPUTDIR+"/plugins/"+fn[:-7]+dllext+".so" if (fn.endswith(".exe")): return OUTPUTDIR+"/bin/"+fn[:-4] if (fn.endswith(".lib")): return OUTPUTDIR+"/lib/"+fn[:-4]+".a" if (fn.endswith(".ilb")): return OUTPUTDIR+"/tmp/"+fn[:-4]+".a" if (fn.endswith(".dat")): return OUTPUTDIR+"/tmp/"+fn if (fn.endswith(".in")): return OUTPUTDIR+"/pandac/input/"+fn return fn
|
if ("MODULE" not in opts): " -Wl,-soname=" + os.path.basename(dll)
|
if ("MODULE" not in opts): cmd += " -Wl,-soname=" + os.path.basename(dll)
|
def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = "link /nologo" if (platform.architecture()[0] == "64bit"): cmd += " /MACHINE:X64" 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" 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" if (optlevel==2): cmd += " /MAP:NUL /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB" if (optlevel==3): cmd += " /MAP:NUL /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if (optlevel==4): cmd += " /MAP:NUL /LTCG /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if ("MFC" in opts): if (optlevel<=2): cmd += " /NOD:MSVCRTD.LIB /NOD:mfcs90d.lib mfcs90d.lib MSVCRTD.lib" else: cmd += " /NOD:MSVCRT.LIB /NOD:mfcs90.lib mfcs90.lib MSVCRT.lib" cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd += ' /OUT:' + BracketNameWithQuotes(dll) subsystem = GetValueOption(opts, "SUBSYSTEM:") if (subsystem): cmd += " /SUBSYSTEM:" + subsystem if (dll.endswith(".dll")): cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir) for x in obj: if (x.endswith(".dll")): cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib" elif (x.endswith(".lib")): dname = os.path.splitext(dll)[0]+".dll" if (GetOrigExt(x) != ".ilb" and os.path.exists(GetOutputDir()+"/bin/" + os.path.splitext(os.path.basename(x))[0] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd += ' ' + BracketNameWithQuotes(x) elif (x.endswith(".def")): cmd += ' /DEF:' + BracketNameWithQuotes(x) elif (x.endswith(".dat")): pass else: cmd += ' ' + BracketNameWithQuotes(x) if (GetOrigExt(dll)==".exe" and "NOICON" not in opts): cmd += " " + GetOutputDir() + "/tmp/pandaIcon.res" for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += " " + BracketNameWithQuotes(name) oscmd(cmd) SetVC90CRTVersion(dll+".manifest") mtcmd = "mt -manifest " + dll + ".manifest -outputresource:" + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ";2" else: mtcmd = mtcmd + ";1" oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup' if ("BUNDLE" in opts): cmd += ' -bundle ' else: cmd += ' -dynamiclib -install_name ' + os.path.basename(dll) cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' else: cmd = 'g++ -shared' if ("MODULE" not in opts): " -Wl,-soname=" + os.path.basename(dll) cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd += ' -l' + base[3:-3] elif (base[-2:]==".a") and (base[:3]=="lib"): cmd += ' -l' + base[3:-2] else: cmd += ' ' + x if (sys.platform == "darwin"): if (OSXTARGET != None): cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] cmd += " -mmacosx-version-min=" + OSXTARGET if int(platform.mac_ver()[0][3]) >= 6: cmd += " -arch x86_64 -arch i386" else: cmd += " -arch i386" if ("NOPPC" not in opts): cmd += " -arch ppc" if (LDFLAGS !=""): cmd += " " + LDFLAGS for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opt in opts): cmd += ' -L' + BracketNameWithQuotes(dir) for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opt in opts): cmd += ' ' + BracketNameWithQuotes(name) cmd += " -lpthread" if (not sys.platform.startswith("freebsd")): cmd += " -ldl" oscmd(cmd) if (GetOrigExt(dll)==".exe" and GetOptimizeOption(opts)==4 and "NOSTRIP" not in opts): oscmd("strip " + BracketNameWithQuotes(dll)) os.system("chmod +x " + BracketNameWithQuotes(dll)) if dll.endswith("." + VERSION + ".dylib"): newdll = dll[:-6-len(VERSION)] + "dylib" if (os.path.isfile(newdll)): os.remove(newdll) oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll)) elif dll.endswith("." + VERSION): newdll = dll[:-len(VERSION)-1] if (os.path.isfile(newdll)): os.remove(newdll) oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
|
Description: The Panda3D free 3D engine Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface. This is the package for the developers, install panda3d-runtime for the runtime files.
|
Description: The Panda3D free 3D engine SDK Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface. . This package contains the SDK for development with Panda3D, install panda3d-runtime for the runtime files.
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
Description: The Panda3D free 3D engine This package contains the Panda3D runtime, which is necessary to run p3d files, and the mozilla browser plugin.
|
Description: Runtime binary and browser plugin for the Panda3D Game Engine This package contains the runtime distribution and browser plugin of the Panda3D engine. It allows you view webpages that contain Panda3D content and to run games created with Panda3D that are packaged as .p3d file.
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
Summary: The Panda3D free 3D engine
|
Summary: The Panda3D free 3D engine SDK
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
AutoReqProv: no
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
|
The Panda3D engine.
|
Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface. This package contains the SDK for development with Panda3D, install panda3d-runtime for the runtime files.
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
/usr/%_lib
|
/usr/%_lib/panda3d
|
def MakeInstallerNSIS(file, fullname, smdirectory, installdir): if (os.path.isfile(file)): os.remove(file) elif (os.path.isdir(file)): shutil.rmtree(file) if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("PATH", GetOutputDir() + "\\bin") AddToPathEnv("PATH", GetOutputDir() + "\\plugins") oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION) shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file) return print "Building "+fullname+" installer. This can take up to an hour." if (COMPRESSOR != "lzma"): print("Note: you are using zlib, which is faster, but lzma gives better compression.") if (os.path.exists("nsis-output.exe")): os.remove("nsis-output.exe") WriteFile(GetOutputDir()+"/tmp/__init__.py", "") psource=os.path.abspath(".") panda=os.path.abspath(GetOutputDir()) cmd="thirdparty/win-nsis/makensis /V2 " cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" ' cmd=cmd+'/DNAME="'+fullname+'" ' cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" ' cmd=cmd+'/DINSTALLDIR="'+installdir+'" ' cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" ' cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" ' cmd=cmd+'/DLANGUAGE="English" ' cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" ' cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" ' cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"' oscmd(cmd) os.rename("nsis-output.exe", file)
|
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV).replace("PV",PV)
|
if (RUNTIME): txt = RUNTIME_INSTALLER_SPEC_FILE[1:] else: txt = INSTALLER_SPEC_FILE[1:] txt = txt.replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV).replace("PV",PV)
|
def MakeInstallerLinux(): import compileall if RUNTIME: # No worries, it won't be used PYTHONV="python" else: PYTHONV=SDK["PYTHONVERSION"] PV=PYTHONV.replace("python", "") if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") oscmd("mkdir linuxroot") # Invoke installpanda.py to install it into a temporary dir if RUNTIME: InstallRuntime(destdir = "linuxroot", outputdir = GetOutputDir()) else: InstallPanda(destdir = "linuxroot", outputdir = GetOutputDir()) oscmd("chmod -R 755 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")): oscmd("rm -rf linuxroot/DEBIAN") oscmd("rpm -E '%_target_cpu' > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() pandasource = os.path.abspath(os.getcwd()) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV).replace("PV",PV) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+pandasource+"' --root "+pandasource+" --buildroot linuxroot -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") oscmd("rmdir "+ARCH, True) if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() if RUNTIME: txt = RUNTIME_INSTALLER_DEB_FILE[1:] else: txt = INSTALLER_DEB_FILE[1:] txt = txt.replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PV) oscmd("mkdir --mode=0755 -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") if (not RUNTIME): oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") oscmd("chmod -R 755 linuxroot/DEBIAN") if (RUNTIME): oscmd("dpkg-deb -b linuxroot panda3d-runtime_"+VERSION+"_"+ARCH+".deb") else: oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") if not(os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")): exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!")
|
oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .")
|
if (RUNTIME): oscmd("mv "+ARCH+"/panda3d-runtime-"+VERSION+"-1."+ARCH+".rpm .") else: oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .")
|
def MakeInstallerLinux(): import compileall if RUNTIME: # No worries, it won't be used PYTHONV="python" else: PYTHONV=SDK["PYTHONVERSION"] PV=PYTHONV.replace("python", "") if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") oscmd("mkdir linuxroot") # Invoke installpanda.py to install it into a temporary dir if RUNTIME: InstallRuntime(destdir = "linuxroot", outputdir = GetOutputDir()) else: InstallPanda(destdir = "linuxroot", outputdir = GetOutputDir()) oscmd("chmod -R 755 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")): oscmd("rm -rf linuxroot/DEBIAN") oscmd("rpm -E '%_target_cpu' > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() pandasource = os.path.abspath(os.getcwd()) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV).replace("PV",PV) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+pandasource+"' --root "+pandasource+" --buildroot linuxroot -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") oscmd("rmdir "+ARCH, True) if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() if RUNTIME: txt = RUNTIME_INSTALLER_DEB_FILE[1:] else: txt = INSTALLER_DEB_FILE[1:] txt = txt.replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PV) oscmd("mkdir --mode=0755 -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") if (not RUNTIME): oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") oscmd("chmod -R 755 linuxroot/DEBIAN") if (RUNTIME): oscmd("dpkg-deb -b linuxroot panda3d-runtime_"+VERSION+"_"+ARCH+".deb") else: oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") if not(os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")): exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!")
|
ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() if RUNTIME:
|
ARCH = ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() if (RUNTIME):
|
def MakeInstallerLinux(): import compileall if RUNTIME: # No worries, it won't be used PYTHONV="python" else: PYTHONV=SDK["PYTHONVERSION"] PV=PYTHONV.replace("python", "") if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") oscmd("mkdir linuxroot") # Invoke installpanda.py to install it into a temporary dir if RUNTIME: InstallRuntime(destdir = "linuxroot", outputdir = GetOutputDir()) else: InstallPanda(destdir = "linuxroot", outputdir = GetOutputDir()) oscmd("chmod -R 755 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")): oscmd("rm -rf linuxroot/DEBIAN") oscmd("rpm -E '%_target_cpu' > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() pandasource = os.path.abspath(os.getcwd()) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV).replace("PV",PV) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+pandasource+"' --root "+pandasource+" --buildroot linuxroot -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") oscmd("rmdir "+ARCH, True) if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() if RUNTIME: txt = RUNTIME_INSTALLER_DEB_FILE[1:] else: txt = INSTALLER_DEB_FILE[1:] txt = txt.replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PV) oscmd("mkdir --mode=0755 -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") if (not RUNTIME): oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") oscmd("chmod -R 755 linuxroot/DEBIAN") if (RUNTIME): oscmd("dpkg-deb -b linuxroot panda3d-runtime_"+VERSION+"_"+ARCH+".deb") else: oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") if not(os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")): exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!")
|
configprc = configprc.replace(".panda3d","Panda3D-%s" % VERSION)
|
configprc = configprc.replace("$HOME/.panda3d", "$USER_APPDATA/Panda3D-%s" % MAJOR_VERSION)
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
configprc = configprc.replace(".panda3d","Library/Caches/Panda3D-%s" % VERSION)
|
configprc = configprc.replace(".panda3d/cache", "Library/Caches/Panda3D-%s" % MAJOR_VERSION)
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
ckArgs.update(kArgs) ckArgs.pop('static', None) ckArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **ckArgs)
|
kwArgs = kArgs kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **kwArgs)
|
def functor(*cArgs, **ckArgs): ckArgs.update(kArgs) ckArgs.pop('static', None) ckArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **ckArgs)
|
if callingModule.__name__ != '__main__':
|
if callingModule and callingModule.__name__ != '__main__':
|
def __init__(self, id=None, grp=None, cfg=None, iff=True, frameCount=1): #check early out conditions self.disabled = False if not bpdb.enabled: self.disabled = True return moduleName = None callingModule = inspect.getmodule(inspect.stack()[frameCount][0]) if callingModule.__name__ != '__main__': #get only leaf module name moduleName = callingModule.__name__.split()[-1]
|
def __init__(self, parent, colourData=None, style=CCD_SHOW_ALPHA, alpha = 255, callback=None): self.callback=callback
|
def __init__(self, parent, colourData=None, style=CCD_SHOW_ALPHA, alpha = 255, updateCB=None, exitCB=None): self.updateCB=updateCB
|
def __init__(self, parent, colourData=None, style=CCD_SHOW_ALPHA, alpha = 255, callback=None): self.callback=callback CubeColourDialog.__init__(self, parent, colourData, style) self.okButton.Hide() self.cancelButton.Hide() self._colour.alpha = alpha self.alphaSpin.SetValue(self._colour.alpha) self.DrawAlpha()
|
if self.callback: self.callback(self._colour.r, self._colour.g, self._colour.b, self._colour.alpha)
|
if self.updateCB: self.updateCB(self._colour.r, self._colour.g, self._colour.b, self._colour.alpha)
|
def SetPanelColours(self): self.oldColourPanel.RefreshColour(self._oldColour) self.newColourPanel.RefreshColour(self._colour) if self.callback: self.callback(self._colour.r, self._colour.g, self._colour.b, self._colour.alpha)
|
def colorPickerCB(self, rr, gg, bb, aa):
|
def colorPickerExitCB(self, evt=None): self.lastColorPickerPos = self.colorPicker.GetPosition() self.colorPicker.Destroy() self.colorPicker = None def colorPickerUpdateCB(self, rr, gg, bb, aa):
|
def colorPickerCB(self, rr, gg, bb, aa): r = rr / 255.0 g = gg / 255.0 b = bb / 255.0 a = aa / 255.0 self.propCR.setValue(r) self.propCG.setValue(g) self.propCB.setValue(b) self.propCA.setValue(a)
|
self.colorPicker = ColorPicker(self, colourData, alpha=alpha, callback=self.colorPickerCB)
|
self.colorPicker = ColorPicker(self, colourData, alpha=alpha, updateCB=self.colorPickerUpdateCB, exitCB=self.colorPickerExitCB)
|
def openColorPicker(self, evt, colourData, alpha): if self.colorPicker: self.colorPicker.Destroy()
|
obj = self.editor.objectMgr.findObjectByNodePath(self.result)
|
if self.uid: obj = self.editor.objectMgr.findObjectById(self.uid) else: obj = self.editor.objectMgr.findObjectByNodePath(self.result)
|
def undo(self): if self.result is None: print "Can't undo this add" else: print "Undo: addNewObject" obj = self.editor.objectMgr.findObjectByNodePath(self.result) if obj: self.uid = obj[OG.OBJ_UID] self.editor.ui.sceneGraphUI.delete(self.uid) base.direct.deselect(self.result) base.direct.removeNodePath(self.result) self.result = None else: print "Can't undo this add"
|
base.direct.deselect(self.result) base.direct.removeNodePath(self.result)
|
base.direct.deselect(obj[OG.OBJ_NP]) base.direct.removeNodePath(obj[OG.OBJ_NP])
|
def undo(self): if self.result is None: print "Can't undo this add" else: print "Undo: addNewObject" obj = self.editor.objectMgr.findObjectByNodePath(self.result) if obj: self.uid = obj[OG.OBJ_UID] self.editor.ui.sceneGraphUI.delete(self.uid) base.direct.deselect(self.result) base.direct.removeNodePath(self.result) self.result = None else: print "Can't undo this add"
|
if name.startswith("thirdparty"):
|
if name.startswith(GetThirdpartyDir()):
|
def LibName(opt, name): # Check to see if the lib file actually exists for the thirdparty library given # Are we a thirdparty library? if name.startswith("thirdparty"): # Does this lib exist? if not os.path.exists(name): PkgDisable(opt) WARNINGS.append(name + " not found. Skipping Package " + opt) return LIBNAMES.append((opt, name))
|
PkgDisable(opt)
|
def LibName(opt, name): # Check to see if the lib file actually exists for the thirdparty library given # Are we a thirdparty library? if name.startswith("thirdparty"): # Does this lib exist? if not os.path.exists(name): PkgDisable(opt) WARNINGS.append(name + " not found. Skipping Package " + opt) return LIBNAMES.append((opt, name))
|
|
return
|
if (opt in PkgListGet()): print "%sWARNING:%s Could not locate thirdparty package %s, excluding from build" % (GetColor("red"), GetColor(), opt.lower()) PkgDisable(opt) return else: print "%sERROR:%s Could not locate thirdparty package %s, aborting build" % (GetColor("red"), GetColor(), opt.lower()) exit()
|
def LibName(opt, name): # Check to see if the lib file actually exists for the thirdparty library given # Are we a thirdparty library? if name.startswith("thirdparty"): # Does this lib exist? if not os.path.exists(name): PkgDisable(opt) WARNINGS.append(name + " not found. Skipping Package " + opt) return LIBNAMES.append((opt, name))
|
if shortname == '': shortname = appFilename.getBasenameWoExtension()
|
def usage(code, msg = ''): print >> sys.stderr, usageText % {'prog' : os.path.split(sys.argv[0])[1]} print >> sys.stderr, msg sys.exit(code)
|
|
html = open(shortname + ".html", "w") html.write("<html>\n") html.write(" <head>\n") html.write(" <title>%s</title>\n" % fullname) html.write(" </head>\n") html.write(" <body>\n") html.write(" <object data=\"%s\" type=\"application/x-panda3d\"></object>\n" % appFilename.getBasename()) html.write(" </body>\n") html.write("</html>\n")
|
html = open(Filename(outputDir, shortname + ".html").toOsSpecific(), "w") print >>html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" print >>html, "<html xmlns=\"http://www.w3.org/1999/xhtml\">" print >>html, " <head>" print >>html, " <title>%s</title>" % fullname print >>html, " <meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />" if authorname: print >>html, " <meta name=\"Author\" content=\"%s\" />" % authorname.replace('"', '\\"') print >>html, " </head>" print >>html, " <body>" print >>html, " <object", for key, value in tokens.items(): print >>html, "%s=\"%s\"" % (key, value.replace('"', '\\"')), if "width" not in tokens: print >>html, "width=\"%s\"" % w, if "height" not in tokens: print >>html, "height=\"%s\"" % h, print >>html, "type=\"application/x-panda3d\">" print >>html, " <object width=\"%s\" height=\"%s\" classid=\"CLSID:924B4927-D3BA-41EA-9F7E-8A89194AB3AC\">" % (w, h) for key, value in tokens.items(): print >>html, " <param name=\"%s\" value=\"%s\" />" % (key, value.replace('"', '\\"')) print >>html, " </object>" print >>html, " </object>" print >>html, " </body>" print >>html, "</html>"
|
def usage(code, msg = ''): print >> sys.stderr, usageText % {'prog' : os.path.split(sys.argv[0])[1]} print >> sys.stderr, msg sys.exit(code)
|
LibcDirectory(pkg, SDK[pkg] + "/lib")
|
LibDirectory(pkg, SDK[pkg] + "/lib")
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) elif (option=="--host"): HOST_URL=value else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
MoveAwayConflictingFiles()
|
MoveBackConflictingFiles()
|
def exit(msg = ""): sys.stdout.flush() sys.stderr.flush() if (threading.currentThread() == MAINTHREAD): SaveDependencyCache() MoveAwayConflictingFiles() print "Elapsed Time: "+PrettyTime(time.time() - STARTTIME) print msg print GetColor("red") + "Build terminated." + GetColor() sys.stdout.flush() sys.stderr.flush() os._exit(1) else: print msg raise "initiate-exit"
|
if (res == 11):
|
sig = res & 0x7F if (GetVerbose() and res != 0): print GetColor("red") + "Process exited with exit status %d and signal code %d" % ((res & 0xFF00) >> 8, sig) + GetColor() if (sig == signal.SIGINT): raise KeyboardInterrupt if (sig == signal.SIGSEGV or res == 35584 or res == 34304):
|
def oscmd(cmd, ignoreError = False): if VERBOSE: print GetColor("blue") + cmd.split(" ", 1)[0] + " " + GetColor("magenta") + cmd.split(" ", 1)[1] + GetColor() sys.stdout.flush() if sys.platform == "win32": exe = cmd.split()[0] if not (len(exe) > 4 and exe[-4:] == ".exe"): exe += ".exe" if os.path.isfile(exe)==0: for i in os.environ["PATH"].split(";"): if os.path.isfile(os.path.join(i, exe)): exe = os.path.join(i, exe) break if os.path.isfile(exe)==0: exit("Cannot find "+exe+" on search path") res = os.spawnl(os.P_WAIT, exe, cmd) else: res = os.system(cmd) if (res == 11): if (LocateBinary("gdb") and GetVerbose()): print GetColor("red") + "Received SIGSEGV, retrieving traceback..." + GetColor() os.system("gdb -batch -ex 'handle SIG33 pass nostop noprint' -ex 'set pagination 0' -ex 'run' -ex 'bt full' -ex 'info registers' -ex 'thread apply all backtrace' -ex 'quit' --args %s < /dev/null" % cmd) else: print GetColor("red") + "Received SIGSEGV" + GetColor() if res != 0 and not ignoreError: if "interrogate" in cmd.split(" ", 1)[0] and GetVerbose(): print GetColor("red") + "Interrogate failed, retrieving debug output..." + GetColor() os.system(cmd.split(" ", 1)[0] + " -v " + cmd.split(" ", 1)[1]) exit("")
|
SmartPkgEnable("NPAPI", "", (), ("xulrunner", "nspr*/prtypes.h", "nspr*"))
|
SmartPkgEnable("NPAPI", "mozilla-plugin", (), ("xulrunner", "nspr*/prtypes.h", "nspr*"))
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
SmartPkgEnable("NPAPI", "", (), ("xulrunner-*/stable", "xulrunner-*/stable/npapi.h", "nspr*/prtypes.h", "nspr*"))
|
SmartPkgEnable("NPAPI", "mozilla-plugin", (), ("xulrunner-*/stable", "xulrunner-*/stable/npapi.h", "nspr*/prtypes.h", "nspr*"))
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
CopyFile(GetOutputDir()+'/lib/panda3d.py', 'direct/src/ffi/panda3d.py')
|
if (sys.platform.startswith("win")): CopyFile(GetOutputDir()+'/bin/panda3d.py', 'direct/src/ffi/panda3d.py') else: CopyFile(GetOutputDir()+'/lib/panda3d.py', 'direct/src/ffi/panda3d.py')
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
if (RUNTIME and sys.platform.startswith("linux")):
|
if (RUNTIME and sys.platform != "darwin" and not sys.platform.startswith("win")):
|
def WriteConfigSettings(): dtool_config={} prc_parameters={} speedtree_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = unix for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = unix for x in PkgListGet(): if ("HAVE_"+x in dtool_config): if (PkgSkip(x)==0): dtool_config["HAVE_"+x] = '1' else: dtool_config["HAVE_"+x] = 'UNDEF' dtool_config["HAVE_NET"] = '1' if (PkgSkip("NVIDIACG")==0): dtool_config["HAVE_CG"] = '1' dtool_config["HAVE_CGGL"] = '1' dtool_config["HAVE_CGDX9"] = '1' if (not sys.platform.startswith("linux")): dtool_config["HAVE_PROC_SELF_EXE"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_MAPS"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_CMDLINE"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_ENVIRON"] = 'UNDEF' if (sys.platform == "darwin"): dtool_config["PYTHON_FRAMEWORK"] = 'Python' dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' 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_XRANDR"] = 'UNDEF' dtool_config["HAVE_XF86DGA"] = 'UNDEF' dtool_config["HAVE_GLX"] = 'UNDEF' dtool_config["IS_LINUX"] = 'UNDEF' dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF' dtool_config["IS_OSX"] = '1' if (sys.platform.startswith("freebsd")): dtool_config["IS_LINUX"] = 'UNDEF' dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF' dtool_config["IS_FREEBSD"] = '1' dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF' dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' dtool_config["PHAVE_LINUX_INPUT_H"] = 'UNDEF' dtool_config["HAVE_PROC_CURPROC_FILE"] = '1' dtool_config["HAVE_PROC_CURPROC_MAP"] = '1' dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1' if (GetOptimize() <= 2 and sys.platform.startswith("win")): dtool_config["USE_DEBUG_PYTHON"] = '1' if (GetOptimize() <= 3): if (dtool_config["HAVE_NET"] != 'UNDEF'): dtool_config["DO_PSTATS"] = '1' if (GetOptimize() <= 3): dtool_config["DO_COLLISION_RECORDING"] = '1' #if (GetOptimize() <= 2): # dtool_config["TRACK_IN_INTERPRETER"] = '1' if (GetOptimize() <= 3): dtool_config["DO_MEMORY_USAGE"] = '1' #if (GetOptimize() <= 1): # dtool_config["DO_PIPELINING"] = '1' if (GetOptimize() <= 3): dtool_config["NOTIFY_DEBUG"] = '1' # Now that we have OS_SIMPLE_THREADS, we can support # SIMPLE_THREADS on exotic architectures like win64, so we no # longer need to disable it for this platform.
|
if (os.path.exists("/usr/PCBSD")):
|
if (os.path.isdir("/usr/PCBSD")):
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
if (os.path.exists("/usr/lib64")):
|
if (os.path.isdir("/usr/lib64/glib-2.0/include")):
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static"] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
VC80CRTASSEMBLYRE=re.compile("<dependency>[\t \n]*<dependentAssembly>[\t \n]*<assemblyIdentity[\t \na-zA-Z0-9.'\"=]*name=['\"]Microsoft[.]VC80[.]CRT['\"][\t \na-zA-Z0-9.'\"=/]*>[\t \n]*(</assemblyIdentity>)?[\t \n]*</dependentAssembly>[\t \n]*</dependency>[\t \n]*")
|
VC80CRTASSEMBLYRE=re.compile("<dependency>[\t \r\n]*<dependentAssembly>[\t \r\n]*<assemblyIdentity[\t \r\na-zA-Z0-9.'\"=]*name=['\"]Microsoft[.]VC80[.]CRT['\"][\t \r\na-zA-Z0-9.'\"=/]*>[\t \r\n]*(</assemblyIdentity>)?[\t \r\n]*</dependentAssembly>[\t \r\n]*</dependency>[\t \r\n]*")
|
def GetThirdpartyDir(): global THIRDPARTYDIR if (THIRDPARTYDIR != None): return THIRDPARTYDIR if (sys.platform.startswith("win")): if (platform.architecture()[0] == "64bit"): THIRDPARTYDIR="thirdparty/win-libs-vc9-x64/" else: THIRDPARTYDIR="thirdparty/win-libs-vc9/" if not os.path.isdir(THIRDPARTYDIR): THIRDPARTYDIR="thirdparty/win-libs-vc9/" elif (sys.platform == "darwin"): THIRDPARTYDIR="thirdparty/darwin-libs-a/" elif (sys.platform.startswith("linux")): if (platform.architecture()[0] == "64bit"): THIRDPARTYDIR="thirdparty/linux-libs-x64/" else: THIRDPARTYDIR="thirdparty/linux-libs-a/" elif (sys.platform.startswith("freebsd")): if (platform.architecture()[0] == "64bit"): THIRDPARTYDIR="thirdparty/freebsd-libs-x64/" else: THIRDPARTYDIR="thirdparty/freebsd-libs-a/" else: print GetColor("red") + "WARNING:" + GetColor("Unsupported platform: " + sys.platform) return THIRDPARTYDIR
|
self.pixel2d.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
|
if xsize > 0 and ysize > 0: self.pixel2d.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
|
def setupRender2d(self): """ Creates the render2d scene graph, the primary scene graph for 2-d objects and gui elements that are superimposed over the 3-d geometry in the window. """ self.render2d = NodePath('render2d')
|
self.pixel2dp.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
|
if xsize > 0 and ysize > 0: self.pixel2dp.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
|
def setupRender2dp(self): """ Creates a render2d scene graph, the secondary scene graph for 2-d objects and gui elements that are superimposed over the 2-d and 3-d geometry in the window. """ self.render2dp = NodePath('render2dp')
|
self.pixel2d.setScale(2.0 / win.getXSize(), 1.0, 2.0 / win.getYSize()) self.pixel2dp.setScale(2.0 / win.getXSize(), 1.0, 2.0 / win.getYSize())
|
if win.getXSize() > 0 and win.getYSize() > 0: self.pixel2d.setScale(2.0 / win.getXSize(), 1.0, 2.0 / win.getYSize()) self.pixel2dp.setScale(2.0 / win.getXSize(), 1.0, 2.0 / win.getYSize())
|
def windowEvent(self, win): if win == self.win: properties = win.getProperties() self.notify.info("Got window event: %s" % (repr(properties))) if not properties.getOpen(): # If the user closes the main window, we should exit. self.notify.info("User closed main window.") if __dev__ and (not config.GetBool('disable-garbage-logging', 1)): GarbageReport.b_checkForGarbageLeaks() self.userExit()
|
objNP = obj[OG.OBJ_NP]
|
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objNP = obj[OG.OBJ_NP] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp) objNP.setMat(self.objTransforms[uid])
|
|
self.editor.objectMgr.addNewObject(objDef.name,
|
objNP = self.editor.objectMgr.addNewObject(objDef.name,
|
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objNP = obj[OG.OBJ_NP] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp) objNP.setMat(self.objTransforms[uid])
|
print file.filename, filenames
|
def __addImplicitDependenciesWindows(self): """ Walks through the list of files, looking for dll's and exe's that might include implicit dependencies on other dll's and assembly manifests. Tries to determine those dependencies, and adds them back into the filelist. """
|
|
def bp(id=None, grp=None, cfg=None, iff=True, frameCount=1):
|
def bp(id=None, grp=None, cfg=None, iff=True, test=None, frameCount=1):
|
def bp(id=None, grp=None, cfg=None, iff=True, frameCount=1): if not bpdb.enabled or not bpdb.verifyEnabled(): return bpi = bp(id=id, grp=grp, cfg=cfg, iff=iff,frameCount=frameCount+1) bpi.maybeBreak(frameCount=frameCount+1)
|
bpi = bp(id=id, grp=grp, cfg=cfg, iff=iff,frameCount=frameCount+1) bpi.maybeBreak(frameCount=frameCount+1)
|
bpi = bp(id=id, grp=grp, cfg=cfg, iff=iff, frameCount=frameCount+1) bpi.maybeBreak(test=test, frameCount=frameCount+1)
|
def bp(id=None, grp=None, cfg=None, iff=True, frameCount=1): if not bpdb.enabled or not bpdb.verifyEnabled(): return bpi = bp(id=id, grp=grp, cfg=cfg, iff=iff,frameCount=frameCount+1) bpi.maybeBreak(frameCount=frameCount+1)
|
def bpCall(id=None,grp=None,cfg=None,iff=True,frameCount=1,onEnter=1,onExit=0):
|
def bpCall(id=None,grp=None,cfg=None,iff=True,test=None,frameCount=1,onEnter=1,onExit=0):
|
def bpCall(id=None,grp=None,cfg=None,iff=True,frameCount=1,onEnter=1,onExit=0): def decorator(f): return f
|
dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Calling ')
|
dbp.maybeBreak(iff=iff,test=test,frameCount=frameCount+1,displayPrefix='Calling ')
|
def wrap(*args, **kwds): #create our bp object dbp = bp(id=id or f.__name__, grp=bpi.grp, cfg=bpi.cfg, iff=iff, frameCount=frameCount+1) if onEnter: dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Calling ') f_result = f(*args, **kwds) if onExit: dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Exited ') return f_result
|
dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Exited ')
|
dbp.maybeBreak(iff=iff,test=test,frameCount=frameCount+1,displayPrefix='Exited ')
|
def wrap(*args, **kwds): #create our bp object dbp = bp(id=id or f.__name__, grp=bpi.grp, cfg=bpi.cfg, iff=iff, frameCount=frameCount+1) if onEnter: dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Calling ') f_result = f(*args, **kwds) if onExit: dbp.maybeBreak(iff=iff,frameCount=frameCount+1,displayPrefix='Exited ') return f_result
|
if not bpdb.enabled or not bpdb.verifyEnabled():
|
def functor(*cArgs, **ckArgs): return if bpdb.enabled and bpdb.verifyEnabled(): argsCopy = args[:]
|
def bpGroup(*args, **kArgs): if not bpdb.enabled or not bpdb.verifyEnabled(): def functor(*cArgs, **ckArgs): return return functor argsCopy = args[:] def functor(*cArgs, **ckArgs): kwArgs = kArgs kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **kwArgs) if kArgs.get('static'): return staticmethod(functor) else: return functor
|
return return functor argsCopy = args[:] def functor(*cArgs, **ckArgs): kwArgs = kArgs kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **kwArgs)
|
kwArgs = kArgs kwArgs.update(ckArgs) kwArgs.pop('static', None) kwArgs['frameCount'] = ckArgs.get('frameCount',1)+1 return bpdb.bp(*(cArgs), **kwArgs)
|
def functor(*cArgs, **ckArgs): return
|
def maybeBreak(self, iff=True, frameCount=1,displayPrefix=''): if self.shouldBreak(iff):
|
def maybeBreak(self, iff=True, test=None, frameCount=1, displayPrefix=''): if self.shouldBreak(iff=iff, test=test):
|
def maybeBreak(self, iff=True, frameCount=1,displayPrefix=''): if self.shouldBreak(iff): self.doBreak(frameCount=frameCount+1,displayPrefix=displayPrefix)
|
def shouldBreak(self,iff=True):
|
def shouldBreak(self,iff=True, test=None):
|
def shouldBreak(self,iff=True): #check easy early out if self.disabled: return False if not self.iff or not iff: return False
|
OPTS=['DIR:panda/src/downloadertools', 'OPENSSL', 'ZLIB', 'ADVAPI']
|
OPTS=['DIR:panda/src/downloadertools', 'OPENSSL', 'ZLIB', 'ADVAPI', 'WINSOCK2', 'WINSHELL']
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
OPTS=['DIR:panda/src/downloadertools', 'ZLIB', 'OPENSSL', 'ADVAPI']
|
OPTS=['DIR:panda/src/downloadertools', 'ZLIB', 'OPENSSL', 'ADVAPI', 'WINSOCK2', 'WINSHELL']
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable
|
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): SDK["PYTHON"] += "-x64" SDK["PYTHONEXEC"] = SDK["PYTHON"] + "/python" if (GetOptimize() <= 2): SDK["PYTHONEXEC"] += "_d.exe" else: SDK["PYTHONEXEC"] += ".exe" if (not os.path.isfile(SDK["PYTHONEXEC"])): exit("Could not find %s!" % SDK["PYTHONEXEC"]) os.system(SDK["PYTHONEXEC"].replace("/", "\\") + " -V > "+OUTPUTDIR+"/tmp/pythonversion 2>&1") pv=ReadFile(OUTPUTDIR+"/tmp/pythonversion") if (pv.startswith("Python ")==0): exit("python -V did not produce the expected output") pv = pv[7:10] SDK["PYTHONVERSION"]="python"+pv elif (sys.platform == "win32"): SDK["PYTHON"] = os.path.dirname(sysconfig.get_python_inc()) SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) elif (sys.platform == "darwin"): SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
|
SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
if (os.path.islink(sys.executable)): SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) else: SDK["PYTHONEXEC"] = sys.executable
|
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): SDK["PYTHON"] += "-x64" SDK["PYTHONEXEC"] = SDK["PYTHON"] + "/python" if (GetOptimize() <= 2): SDK["PYTHONEXEC"] += "_d.exe" else: SDK["PYTHONEXEC"] += ".exe" if (not os.path.isfile(SDK["PYTHONEXEC"])): exit("Could not find %s!" % SDK["PYTHONEXEC"]) os.system(SDK["PYTHONEXEC"].replace("/", "\\") + " -V > "+OUTPUTDIR+"/tmp/pythonversion 2>&1") pv=ReadFile(OUTPUTDIR+"/tmp/pythonversion") if (pv.startswith("Python ")==0): exit("python -V did not produce the expected output") pv = pv[7:10] SDK["PYTHONVERSION"]="python"+pv elif (sys.platform == "win32"): SDK["PYTHON"] = os.path.dirname(sysconfig.get_python_inc()) SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) elif (sys.platform == "darwin"): SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
|
TargetAdd('interrogate.exe', opts=['ADVAPI', 'OPENSSL'])
|
TargetAdd('interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('interrogate_module.exe', opts=['ADVAPI', 'OPENSSL'])
|
TargetAdd('interrogate_module.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('parse_file.exe', opts=['ADVAPI', 'OPENSSL'])
|
TargetAdd('parse_file.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('make-prc-key.exe', opts=['ADVAPI', 'OPENSSL'])
|
TargetAdd('make-prc-key.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL'])
|
TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('p3dWrapper.exe', opts=OPTS, input='p3dWrapper.c')
|
TargetAdd('p3dWrapper.obj', opts=OPTS, input='p3dWrapper.c') TargetAdd('p3dWrapper.exe', input='p3dWrapper.obj')
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
WriteFile("dstroot/pythoncode/Library/Python/%s/Panda3D.pth" % PV, "/Developer/Panda3D/lib")
|
WriteFile("dstroot/pythoncode/Library/Python/%s/site-packages/Panda3D.pth" % PV, "/Developer/Panda3D/lib")
|
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm -f Panda3D-%s.dmg" % VERSION) if (os.path.exists("dstroot")): oscmd("rm -rf dstroot") if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg') #TODO: add postflight script #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib") oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc") oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir()) oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir()) oscmd("cp -R %s/models dstroot/base/Developer/Panda3D/models" % GetOutputDir()) oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE") oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes") if os.path.isdir(GetOutputDir()+"/plugins"): oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir()) for base in os.listdir(GetOutputDir()+"/lib"): if (not base.endswith(".a")): libname = "dstroot/base/Developer/Panda3D/lib/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname) # Execute install_name_tool to make them reference an absolute path if (libname.endswith(".dylib") and not os.path.islink(libname)): oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True) oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True) # Temporary script that should clean up the poison that the early 1.7.0 builds injected into environment.plist oscmd("mkdir -p dstroot/scripts/base/") postinstall = open("dstroot/scripts/base/postinstall", "w") print >>postinstall, "#!/usr/bin/python" print >>postinstall, "import os, sys, plistlib" print >>postinstall, "home = os.environ['HOME']" print >>postinstall, "if not os.path.isdir(os.path.join(home, '.MacOSX')):" print >>postinstall, " sys.exit()" print >>postinstall, "plist = dict()" print >>postinstall, "envfile = os.path.join(home, '.MacOSX', 'environment.plist')" print >>postinstall, "if os.path.exists(envfile):" print >>postinstall, " try:" print >>postinstall, " plist = plistlib.readPlist(envfile)" print >>postinstall, " except: sys.exit(0)" print >>postinstall, "else:" print >>postinstall, " sys.exit(0)" print >>postinstall, "paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib'," print >>postinstall, " 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'}" print >>postinstall, "for env, path in paths.items():" print >>postinstall, " if env in plist:" print >>postinstall, " paths = plist[env].split(':')" print >>postinstall, " if '' in paths: paths.remove('')" print >>postinstall, " if path in paths: paths.remove(path)" print >>postinstall, " if len(paths) == 0:" print >>postinstall, " del plist[env]" print >>postinstall, " else:" print >>postinstall, " plist[env] = ':'.join(paths)" print >>postinstall, "if len(plist) == 0:" print >>postinstall, " os.remove(envfile)" print >>postinstall, "else:" print >>postinstall, " plistlib.writePlist(plist, envfile)" postinstall.close() postflight = open("dstroot/scripts/base/postflight", "w") print >>postflight, "#!/usr/bin/env bash\n" print >>postflight, "RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`" print >>postflight, "\nexit 0" postflight.close() oscmd("chmod +x dstroot/scripts/base/postinstall") oscmd("chmod +x dstroot/scripts/base/postflight") oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D") oscmd("mkdir -p dstroot/tools/Developer/Panda3D") oscmd("mkdir -p dstroot/tools/etc/paths.d") WriteFile("dstroot/tools/etc/paths.d/Panda3D", "/Developer/Tools/Panda3D") for base in os.listdir(GetOutputDir()+"/bin"): binname = "dstroot/tools/Developer/Tools/Panda3D/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/bin/" + base + " " + binname) # Execute install_name_tool to make the binaries reference an absolute path if (not os.path.islink(binname)): oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), binname), True) if PkgSkip("PYTHON")==0: PV = SDK["PYTHONVERSION"].replace("python", "") oscmd("mkdir -p dstroot/pythoncode/usr/bin") oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("mkdir -p dstroot/pythoncode/Library/Python/%s/site-packages" % PV) WriteFile("dstroot/pythoncode/Library/Python/%s/Panda3D.pth" % PV, "/Developer/Panda3D/lib") oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/lib/pandac" % GetOutputDir()) oscmd("cp -R direct/src/* dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp direct/src/ffi/panda3d.py dstroot/pythoncode/Developer/Panda3D/lib/panda3d.py") oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"]) if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/lib/Pmw" % GetOutputDir()) compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/Pmw") WriteFile("dstroot/pythoncode/Developer/Panda3D/lib/direct/__init__.py", "") for base in os.listdir("dstroot/pythoncode/Developer/Panda3D/lib/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/direct/"+base) oscmd("mkdir -p dstroot/headers/Developer/Panda3D") oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir()) if os.path.isdir("samples"): oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D") oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/") # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ . oscmd("mkdir -p dstroot/scripts/uninstall16/") preflight = open("dstroot/scripts/uninstall16/preflight", "w") print >>preflight, "#!/usr/bin/python" print >>preflight, "import os, re, sys, shutil" print >>preflight, "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')" print >>preflight, "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')" print >>preflight, "if not os.path.isfile(bash_profile): sys.exit(0)" print >>preflight, "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]" print >>preflight, "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+" print >>preflight, "if \[ -d \$PANDA_PATH \]" print >>preflight, "then(.+?)fi" print >>preflight, "''', flags = re.DOTALL | re.MULTILINE)" print >>preflight, "bpfile = open(bash_profile, 'r')" print >>preflight, "bpdata = bpfile.read()" print >>preflight, "bpfile.close()" print >>preflight, "newbpdata = pattern.sub('', bpdata)" print >>preflight, "if newbpdata == bpdata: sys.exit(0)" print >>preflight, "bpfile = open(bash_profile, 'w')" print >>preflight, "bpfile.write(newbpdata)" print >>preflight, "bpfile.close()" preflight.close() oscmd("chmod +x dstroot/scripts/uninstall16/preflight") oscmd("chmod -R 0775 dstroot/*") # We need to be root to perform a chown. Bleh. # Fortunately PackageMaker does it for us, on 10.5 and above. #oscmd("chown -R root:admin dstroot/*", True) oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/") oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/") pkgs = ["base", "tools", "headers", "uninstall16"] if PkgSkip("PYTHON")==0: pkgs.append("pythoncode") if os.path.isdir("samples"): pkgs.append("samples") for pkg in pkgs: plist = open("/tmp/Info_plist", "w") plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION }) plist.close() if not os.path.isdir("dstroot/" + pkg): os.makedirs("dstroot/" + pkg) if os.path.exists("/Developer/usr/bin/packagemaker"): cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' elif os.path.exists("/Developer/Tools/packagemaker"): cmd = '/Developer/usr/bin/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist' else: exit("PackageMaker could not be found!") if os.path.isdir("dstroot/scripts/" + pkg): cmd += ' --scripts dstroot/scripts/' + pkg oscmd(cmd) if os.path.isfile("/tmp/Info_plist"): oscmd("rm -f /tmp/Info_plist") dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w") print >>dist, '<?xml version="1.0" encoding="utf-8"?>' print >>dist, '<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">' print >>dist, ' <title>Panda3D</title>' print >>dist, ' <options customize="always" allow-external-scripts="no" rootVolumeOnly="false"/>' # The following script is to enable the "Uninstall 1.6.x" option only when Panda3D 1.6.x is actually installed. print >>dist, ''' <script>
|
deleteTemp = True, explicit = True, extract = True)
|
explicit = True, extract = True)
|
def do_mainModule(self, moduleName, newName = None, filename = None): """ Names the indicated module as the "main" module of the application or exe. """
|
if (PkgSkip("PYTHON")==0):
|
if (PkgSkip("PYTHON")==0 and not RUNTIME):
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
TargetAdd('PandaModules.py', input='libp3awesomium.dll')
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
|
print >>controlfile, "Depends: libc6, libgcc1, libstdc++6, libx11-6 libssl0.9.8"
|
print >>controlfile, "Depends: libc6, libgcc1, libstdc++6, libx11-6, libssl0.9.8"
|
def buildDEB(self, output, platform): """ Builds a .deb archive and stores it in the path indicated by the 'output' argument. It will be built for the architecture specified by the 'arch' argument. If 'output' is a directory, the deb file will be stored in it. """ arch = platform.rsplit("_", 1)[-1] output = Filename(output) if output.isDirectory(): output = Filename(output, "%s_%s_%s.deb" % (self.shortname.lower(), self.version, arch)) Installer.notify.info("Creating %s..." % output)
|
TargetAdd('PandaModules.py', input='libp3direct.dll')
|
if (PkgSkip("DIRECT")==0): TargetAdd('PandaModules.py', input='libp3direct.dll')
|
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
|
if (DEBVERSION is None): DEBVERSION = VERSION
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host=","debversion="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) elif (option=="--host"): HOST_URL=value elif (option=="--debversion"): DEBVERSION=value else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (DEBVERSION is None): DEBVERSION = VERSION if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
|
if (VERSION == None):
|
if (VERSION is None):
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host=","debversion="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) elif (option=="--host"): HOST_URL=value elif (option=="--debversion"): DEBVERSION=value else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (DEBVERSION is None): DEBVERSION = VERSION if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
if (COREAPI_VERSION == None):
|
if (COREAPI_VERSION is None):
|
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=", "static","host=","debversion="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) elif (option=="--static"): SetLinkAllStatic(True) elif (option=="--host"): HOST_URL=value elif (option=="--debversion"): DEBVERSION=value else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break if (option=="--everything" or option.startswith("--use-") or option=="--nothing" or option.startswith("--no-")): anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (DEBVERSION is None): DEBVERSION = VERSION if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
|
base.direct.widget.disableModeColor()
|
base.direct.widget.disabledModeColor()
|
def disableWidgetMove(self): self.fMovable = 0 if hasattr(base.direct, 'widget'): base.direct.widget.disableModeColor() else: self.objectHandles.disabledModeColor()
|
for item in parseManualTOC("manual/index.html"):
|
for item in parseManualTOC(dirname + "/index.html"):
|
def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm", "") if os.path.isfile(base + ".chm"): os.remove(base + ".chm") # Create the hhp file hhp = open(base + ".hhp", "w") hhp.write("[OPTIONS]\n") hhp.write(OPTIONBLOCK % (base + ".chm", base, urldecode(os.path.join(dirname, "index.html")), base, title)) hhp.write("\n[FILES]\n") # Create the TOC file and Index file hhk = open(base + ".hhk", "w") hhc = open(base + ".hhc", "w") hhk.write(HTMLBLOCK) hhc.write(HTMLBLOCK) # The manual should be treated as a special case. if manual: hhc.write(" <li><object type=\"text/sitemap\">\n") hhc.write(" <param name=\"Name\" value=\"Main Page\">\n") hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, "index.html"))) hhc.write(" </object>\n") for item in parseManualTOC("manual/index.html"): hhc.write(treeToHTML(item, dirname, " ")) for i in os.listdir(dirname): hhp.write(os.path.join(dirname, i) + "\n") if i != "index.html": hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", "").replace("_", " ").replace("CXX", "C++"), ".html", "").replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") else: idt = " " # If we are writing out the reference, write some extra stuff. if reference: idt = " " for i, desc in REFERENCEITEMS: hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % desc.replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") hhc.write(" <li><object type=\"text/sitemap\">\n") hhc.write(" <param name=\"Name\" value=\"%s\">\n" % desc.replace("\"", """)) hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhc.write(" </object>\n") hhc.write(" <ul>\n") # Loop through the directories and write out relevant data. for i in os.listdir(dirname): hhp.write(os.path.join(dirname, i) + "\n") if i != "index.html" and ((not reference) or (not i in ["classes.html", "methods.html", "functions.html"])): hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", ""), ".html", "").replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") hhc.write(idt + "<li><object type=\"text/sitemap\">\n") hhc.write(idt + " <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", ""), ".html", "").replace("\"", """)) hhc.write(idt + " <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhc.write(idt + "</object>\n") # Close the files. if reference: hhc.write(" </ul>\n") hhk.write(" </ul>\n </body>\n</html>") hhc.write(" </ul>\n </body>\n</html>") hhk.close() hhc.close() hhp.close() # Now, execute the command to compile the files. if os.path.isdir("C:\Program Files\HTML Help Workshop"): cmd = "\"C:\Program Files\HTML Help Workshop\hhc.exe\" %s.hhp" % base else: cmd = "hhc \"%s.hhp\"" % base print cmd os.system(cmd) if not KEEPTEMP: if os.path.isfile("%s.hhp" % base): os.remove("%s.hhp" % base) if os.path.isfile("%s.hhc" % base): os.remove("%s.hhc" % base) if os.path.isfile("%s.hhk" % base): os.remove("%s.hhk" % base) if os.path.isfile("%s.chw" % base): os.remove("%s.chw" % base) if not os.path.isfile(base + ".chm"): print "An error has occurred!" if __name__ == "__main__": exit(1) else: return False if __name__ != "__main__": return True
|
if os.path.isdir("C:\Program Files\HTML Help Workshop"): cmd = "\"C:\Program Files\HTML Help Workshop\hhc.exe\" %s.hhp" % base
|
if "PROGRAMFILES" in os.environ and os.path.isdir("%s\\HTML Help Workshop" % os.environ["PROGRAMFILES"]): cmd = "\"%s\\HTML Help Workshop\\hhc.exe\" %s.hhp" % (os.environ["PROGRAMFILES"], base) elif os.path.isdir("C:\Program Files\HTML Help Workshop"): cmd = "\"C:\\Program Files\\HTML Help Workshop\\hhc.exe\" %s.hhp" % base
|
def makeCHM(outputfile, dirname, title, special = None): """Creates a CHM file based on a directory of HTML files. See the top of this file for more info.""" assert special == None or special in ["manual", "reference"] reference = (special == "reference") manual = (special == "manual") base = ireplace(outputfile, ".chm", "") if os.path.isfile(base + ".chm"): os.remove(base + ".chm") # Create the hhp file hhp = open(base + ".hhp", "w") hhp.write("[OPTIONS]\n") hhp.write(OPTIONBLOCK % (base + ".chm", base, urldecode(os.path.join(dirname, "index.html")), base, title)) hhp.write("\n[FILES]\n") # Create the TOC file and Index file hhk = open(base + ".hhk", "w") hhc = open(base + ".hhc", "w") hhk.write(HTMLBLOCK) hhc.write(HTMLBLOCK) # The manual should be treated as a special case. if manual: hhc.write(" <li><object type=\"text/sitemap\">\n") hhc.write(" <param name=\"Name\" value=\"Main Page\">\n") hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, "index.html"))) hhc.write(" </object>\n") for item in parseManualTOC("manual/index.html"): hhc.write(treeToHTML(item, dirname, " ")) for i in os.listdir(dirname): hhp.write(os.path.join(dirname, i) + "\n") if i != "index.html": hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", "").replace("_", " ").replace("CXX", "C++"), ".html", "").replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") else: idt = " " # If we are writing out the reference, write some extra stuff. if reference: idt = " " for i, desc in REFERENCEITEMS: hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % desc.replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") hhc.write(" <li><object type=\"text/sitemap\">\n") hhc.write(" <param name=\"Name\" value=\"%s\">\n" % desc.replace("\"", """)) hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhc.write(" </object>\n") hhc.write(" <ul>\n") # Loop through the directories and write out relevant data. for i in os.listdir(dirname): hhp.write(os.path.join(dirname, i) + "\n") if i != "index.html" and ((not reference) or (not i in ["classes.html", "methods.html", "functions.html"])): hhk.write(" <li><object type=\"text/sitemap\">\n") hhk.write(" <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", ""), ".html", "").replace("\"", """)) hhk.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhk.write(" </object>\n") hhc.write(idt + "<li><object type=\"text/sitemap\">\n") hhc.write(idt + " <param name=\"Name\" value=\"%s\">\n" % ireplace(urldecode(i).replace(".1", ""), ".html", "").replace("\"", """)) hhc.write(idt + " <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, i))) hhc.write(idt + "</object>\n") # Close the files. if reference: hhc.write(" </ul>\n") hhk.write(" </ul>\n </body>\n</html>") hhc.write(" </ul>\n </body>\n</html>") hhk.close() hhc.close() hhp.close() # Now, execute the command to compile the files. if os.path.isdir("C:\Program Files\HTML Help Workshop"): cmd = "\"C:\Program Files\HTML Help Workshop\hhc.exe\" %s.hhp" % base else: cmd = "hhc \"%s.hhp\"" % base print cmd os.system(cmd) if not KEEPTEMP: if os.path.isfile("%s.hhp" % base): os.remove("%s.hhp" % base) if os.path.isfile("%s.hhc" % base): os.remove("%s.hhc" % base) if os.path.isfile("%s.hhk" % base): os.remove("%s.hhk" % base) if os.path.isfile("%s.chw" % base): os.remove("%s.chw" % base) if not os.path.isfile(base + ".chm"): print "An error has occurred!" if __name__ == "__main__": exit(1) else: return False if __name__ != "__main__": return True
|
if not os.path.isdir("manual"): print "No directory named 'manual' found" else: print "Making CHM file for manual..." if VERSION == None: makeManualCHM("manual.chm", "manual", "Panda3D Manual")
|
for lang in ["python", "cxx"]: if not os.path.isdir("manual-" + lang): print "No directory named 'manual-%s' found" % lang
|
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference")
|
makeManualCHM("manual-%s.chm" % VERSION, "manual", "Panda3D %s Manual" % VERSION) if not os.path.isdir("reference"): print "No directory named 'reference' found" else: print "Making CHM file for API reference..." if VERSION == None: makeReferenceCHM("reference.chm", "reference", "Panda3D Reference")
|
print "Making CHM file for manual-%s..." % lang if VERSION == None: makeManualCHM("manual-%s.chm" % lang, "manual-" + lang, "Panda3D Manual") else: makeManualCHM("manual-%s-%s.chm" % (VERSION, lang), "manual-" + lang, "Panda3D %s Manual" % VERSION) if not os.path.isdir("reference-" + lang): print "No directory named 'reference-%s' found" % lang
|
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference")
|
makeReferenceCHM("reference-%s.chm" % VERSION, "reference", "Panda3D %s Reference" % VERSION)
|
print "Making CHM file for reference-%s..." % lang if VERSION == None: makeReferenceCHM("reference-%s.chm" % lang, "reference-" + lang, "Panda3D Reference") else: makeReferenceCHM("reference-%s-%s.chm" % (VERSION, lang), "reference-" + lang, "Panda3D %s Reference" % VERSION)
|
def makeReferenceCHM(outputfile, dirname, title): """Same as makeCHM, but converts a structure resembling that of the Panda3D reference.""" return makeCHM(outputfile, dirname, title, special = "reference")
|
cmd = '/Developer/usr/bin/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist'
|
cmd = '/Developer/Tools/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist'
|
def MakeInstallerOSX(): if (RUNTIME): # Invoke the make_installer script. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins") oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION) return import compileall if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm -f Panda3D-%s.dmg" % VERSION) if (os.path.exists("dstroot")): oscmd("rm -rf dstroot") if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg') #TODO: add postflight script #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib") oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc") oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir()) oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir()) oscmd("cp -R %s/models dstroot/base/Developer/Panda3D/models" % GetOutputDir()) oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE") oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes") if os.path.isdir(GetOutputDir()+"/plugins"): oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir()) for base in os.listdir(GetOutputDir()+"/lib"): if (not base.endswith(".a")): libname = "dstroot/base/Developer/Panda3D/lib/" + base # We really need to specify -R in order not to follow symlinks # On OSX, just specifying -P is not enough to do that. oscmd("cp -R -P " + GetOutputDir() + "/lib/" + base + " " + libname) # Execute install_name_tool to make them reference an absolute path if (libname.endswith(".dylib") and not os.path.islink(libname)): oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True) oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True) # Temporary script that should clean up the poison that the early 1.7.0 builds injected into environment.plist oscmd("mkdir -p dstroot/scripts/base/") postinstall = open("dstroot/scripts/base/postinstall", "w") print >>postinstall, "#!/usr/bin/python" print >>postinstall, "import os, sys, plistlib" print >>postinstall, "home = os.environ['HOME']" print >>postinstall, "if not os.path.isdir(os.path.join(home, '.MacOSX')):" print >>postinstall, " sys.exit()" print >>postinstall, "plist = dict()" print >>postinstall, "envfile = os.path.join(home, '.MacOSX', 'environment.plist')" print >>postinstall, "if os.path.exists(envfile):" print >>postinstall, " try:" print >>postinstall, " plist = plistlib.readPlist(envfile)" print >>postinstall, " except: sys.exit(0)" print >>postinstall, "else:" print >>postinstall, " sys.exit(0)" print >>postinstall, "paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib'," print >>postinstall, " 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'}" print >>postinstall, "for env, path in paths.items():" print >>postinstall, " if env in plist:" print >>postinstall, " paths = plist[env].split(':')" print >>postinstall, " if '' in paths: paths.remove('')" print >>postinstall, " if path in paths: paths.remove(path)" print >>postinstall, " if len(paths) == 0:" print >>postinstall, " del plist[env]" print >>postinstall, " else:" print >>postinstall, " plist[env] = ':'.join(paths)" print >>postinstall, "if len(plist) == 0:" print >>postinstall, " os.remove(envfile)" print >>postinstall, "else:" print >>postinstall, " plistlib.writePlist(plist, envfile)" postinstall.close() postflight = open("dstroot/scripts/base/postflight", "w") print >>postflight, "#!/usr/bin/env bash\n" print >>postflight, "RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`" print >>postflight, "\nexit 0" postflight.close() oscmd("chmod +x dstroot/scripts/base/postinstall") oscmd("chmod +x dstroot/scripts/base/postflight") oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D") oscmd("mkdir -p dstroot/tools/Developer/Panda3D") oscmd("mkdir -p dstroot/tools/etc/paths.d") WriteFile("dstroot/tools/etc/paths.d/Panda3D", "/Developer/Tools/Panda3D") for base in os.listdir(GetOutputDir()+"/bin"): binname = "dstroot/tools/Developer/Tools/Panda3D/" + base # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird. oscmd("cp -R " + GetOutputDir() + "/bin/" + base + " " + binname) # Execute install_name_tool to make the binaries reference an absolute path if (not os.path.islink(binname)): oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, GetOutputDir()), True) for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): if len(line.strip()) > 0 and not line.strip().endswith(":"): libdep = line.strip().split(" ", 1)[0] if not libdep.startswith("/"): oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), binname), True) if PkgSkip("PYTHON")==0: PV = SDK["PYTHONVERSION"].replace("python", "") oscmd("mkdir -p dstroot/pythoncode/usr/bin") oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("mkdir -p dstroot/pythoncode/Library/Python/%s/site-packages" % PV) WriteFile("dstroot/pythoncode/Library/Python/%s/site-packages/Panda3D.pth" % PV, "/Developer/Panda3D/lib") oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/lib/pandac" % GetOutputDir()) oscmd("cp -R direct/src/* dstroot/pythoncode/Developer/Panda3D/lib/direct") oscmd("cp direct/src/ffi/panda3d.py dstroot/pythoncode/Developer/Panda3D/lib/panda3d.py") oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"]) if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/lib/Pmw" % GetOutputDir()) compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/Pmw") WriteFile("dstroot/pythoncode/Developer/Panda3D/lib/direct/__init__.py", "") for base in os.listdir("dstroot/pythoncode/Developer/Panda3D/lib/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/direct/"+base) oscmd("mkdir -p dstroot/headers/Developer/Panda3D") oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir()) if os.path.isdir("samples"): oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D") oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/") # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ . oscmd("mkdir -p dstroot/scripts/uninstall16/") preflight = open("dstroot/scripts/uninstall16/preflight", "w") print >>preflight, "#!/usr/bin/python" print >>preflight, "import os, re, sys, shutil" print >>preflight, "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')" print >>preflight, "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')" print >>preflight, "if not os.path.isfile(bash_profile): sys.exit(0)" print >>preflight, "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]" print >>preflight, "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+" print >>preflight, "if \[ -d \$PANDA_PATH \]" print >>preflight, "then(.+?)fi" print >>preflight, "''', flags = re.DOTALL | re.MULTILINE)" print >>preflight, "bpfile = open(bash_profile, 'r')" print >>preflight, "bpdata = bpfile.read()" print >>preflight, "bpfile.close()" print >>preflight, "newbpdata = pattern.sub('', bpdata)" print >>preflight, "if newbpdata == bpdata: sys.exit(0)" print >>preflight, "bpfile = open(bash_profile, 'w')" print >>preflight, "bpfile.write(newbpdata)" print >>preflight, "bpfile.close()" preflight.close() oscmd("chmod +x dstroot/scripts/uninstall16/preflight") oscmd("chmod -R 0775 dstroot/*") # We need to be root to perform a chown. Bleh. # Fortunately PackageMaker does it for us, on 10.5 and above. #oscmd("chown -R root:admin dstroot/*", True) oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/") oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/") pkgs = ["base", "tools", "headers", "uninstall16"] if PkgSkip("PYTHON")==0: pkgs.append("pythoncode") if os.path.isdir("samples"): pkgs.append("samples") for pkg in pkgs: plist = open("/tmp/Info_plist", "w") plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION }) plist.close() if not os.path.isdir("dstroot/" + pkg): os.makedirs("dstroot/" + pkg) if os.path.exists("/Developer/usr/bin/packagemaker"): cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' elif os.path.exists("/Developer/Tools/packagemaker"): cmd = '/Developer/usr/bin/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist' else: exit("PackageMaker could not be found!") if os.path.isdir("dstroot/scripts/" + pkg): cmd += ' --scripts dstroot/scripts/' + pkg oscmd(cmd) if os.path.isfile("/tmp/Info_plist"): oscmd("rm -f /tmp/Info_plist") dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w") print >>dist, '<?xml version="1.0" encoding="utf-8"?>' print >>dist, '<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">' print >>dist, ' <title>Panda3D</title>' print >>dist, ' <options customize="always" allow-external-scripts="no" rootVolumeOnly="false"/>' # The following script is to enable the "Uninstall 1.6.x" option only when Panda3D 1.6.x is actually installed. print >>dist, ''' <script>
|
itemId = itemText[1]
|
itemId = itemText[-1]
|
def changeHierarchy(self, data, x, y): itemText = data.split('_') itemId = itemText[1] parent = self.tree.GetRootItem() item = self.traverse(parent, itemId) if item is None: return
|
self.Bind(wx.EVT_MENU, lambda p0=None, p1=2:self.onViewChage(p0, p1), menuItem)
|
self.Bind(wx.EVT_MENU, lambda p0=None, p1=2:self.onViewChange(p0, p1), menuItem)
|
def createMenu(self): menuItem = self.menuFile.Insert(0, ID_NEW, self.MENU_TEXTS[ID_NEW][0]) self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, ID_OPEN, self.MENU_TEXTS[ID_OPEN][0]) self.Bind(wx.EVT_MENU, self.onOpen, menuItem)
|
if not depassembly: continue
|
if depassembly: ident = assembly.FirstChildElement("assemblyIdentity") if ident: name = ident.Attribute("name") if name: filenames.append(name + ".manifest")
|
def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """
|
ident = assembly.FirstChildElement("assemblyIdentity") if ident: name = ident.Attribute("name") if name: filenames.append(name + ".manifest")
|
def __parseManifest(self, tempFile): """ Reads the indicated application manifest file, to determine the list of dependent assemblies this executable file depends on. """
|
|
Window.close(self)
|
wx.Window.Close(self) base.closeWindow(self.win)
|
def close(self): """Closes the viewport.""" if self.initialized: Window.close(self) ViewportManager.viewports.remove(self)
|
self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp)
|
self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], objNP) self.editor.objectMgr.updateObjectProperties(objNP, objProp)
|
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp) objNP.setMat(self.objTransforms[uid])
|
print os.popen("ps -o pid,command").read()
|
print os.popen("ps -o pid,command 2> /dev/null").read()
|
def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!') import os print os.getpid() print os.popen("ps -o pid,command").read() """) lines = filter(None, rv.splitlines()) pid = lines.pop(0) pids = dict([r.strip().split(None, 1) for r in lines])
|
snowman = u'\u2603' sm2 = r'\M-b\M^X\M^C'
|
snowmen = [ u'\u2603', r'\M-b\M^X\M^C', r'M-bM^XM^C', ]
|
def test_unicode(self): """Title can contain unicode characters.""" if 'utf-8' != sys.getdefaultencoding(): raise SkipTest("encoding '%s' can't deal with snowmen" % sys.getdefaultencoding())
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.