Some compile fixes. Also, the linux debs & rpms now register egg, bam, egg.pz, bam.pz and p3d mimetypes

This commit is contained in:
rdb 2009-07-21 13:07:38 +00:00
parent 31f2ce467d
commit de3dd23409
8 changed files with 132 additions and 6 deletions

View File

@ -28,6 +28,10 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
oscmd("mkdir -p "+destdir+prefix+"/include")
oscmd("mkdir -p "+destdir+prefix+"/share/panda3d")
oscmd("mkdir -p "+destdir+prefix+"/share/panda3d/direct")
oscmd("mkdir -p "+destdir+prefix+"/share/mime-info")
oscmd("mkdir -p "+destdir+prefix+"/share/mime/packages")
oscmd("mkdir -p "+destdir+prefix+"/share/application-registry")
oscmd("mkdir -p "+destdir+prefix+"/share/applications")
oscmd("mkdir -p "+destdir+prefix+libdir+"/panda3d")
oscmd("mkdir -p "+destdir+PPATH)
oscmd("mkdir -p "+destdir+"/etc/ld.so.conf.d")
@ -41,6 +45,12 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/samples")
if os.path.isdir(outputdir+"/Pmw"): oscmd("cp -R "+outputdir+"/Pmw "+destdir+prefix+"/share/panda3d/Pmw")
if os.path.isdir(outputdir+"/plugins"): oscmd("cp -R "+outputdir+"/plugins "+destdir+prefix+"/share/panda3d/plugins")
oscmd("cp makepanda/panda3d.mime "+destdir+prefix+"/share/mime-info/panda3d.mime")
oscmd("cp makepanda/panda3d.keys "+destdir+prefix+"/share/mime-info/panda3d.keys")
oscmd("cp makepanda/mime.xml "+destdir+prefix+"/share/mime/packages/panda3d.xml")
oscmd("cp makepanda/panda3d.applications "+destdir+prefix+"/share/application-registry/panda3d.applications")
oscmd("cp makepanda/panda3d.desktop "+destdir+prefix+"/share/applications/panda3d.desktop")
oscmd("cp makepanda/pview.desktop "+destdir+prefix+"/share/applications/pview.desktop")
oscmd("cp doc/LICENSE "+destdir+prefix+"/share/panda3d/LICENSE")
oscmd("cp doc/LICENSE "+destdir+prefix+"/include/panda3d/LICENSE")
oscmd("cp doc/ReleaseNotes "+destdir+prefix+"/share/panda3d/ReleaseNotes")

View File

@ -434,6 +434,7 @@ if (COMPILER=="LINUX"):
if (PkgSkip("OPENCV")==0): LibName("OPENCV", "-lml")
if (PkgSkip("OPENCV")==0): LibName("OPENCV", "-lcxcore")
if (PkgSkip("TINYXML")==0): LibName("TINYXML", "-ltinyxml")
LibName("XF86DGA", "-lXxf86dga")
if (sys.platform == "darwin"):
LibName("ALWAYS", "-framework AppKit")
if (PkgSkip("OPENCV")==0): LibName("OPENCV", "-framework QuickTime")
@ -1349,7 +1350,7 @@ CopyAllHeaders('dtool/src/dtoolbase')
CopyAllHeaders('dtool/src/dtoolutil', skip=["pandaVersion.h", "checkPandaVersion.h"])
CopyAllHeaders('dtool/metalibs/dtool')
CopyAllHeaders('dtool/src/cppparser')
CopyAllHeaders('dtool/src/prc')
CopyAllHeaders('dtool/src/prc', skip=["prc_parameters.h"])
CopyAllHeaders('dtool/src/dconfig')
CopyAllHeaders('dtool/src/interrogatedb')
CopyAllHeaders('dtool/metalibs/dtoolconfig')
@ -1441,7 +1442,7 @@ CopyAllHeaders('direct/src/showbase')
CopyAllHeaders('direct/metalibs/direct')
CopyAllHeaders('direct/src/dcparse')
CopyAllHeaders('direct/src/heapq')
CopyAllHeaders('direct/src/plugin')
CopyAllHeaders('direct/src/plugin', skip=["p3d_plugin_config.h"])
CopyAllHeaders('direct/src/plugin_npapi')
CopyAllHeaders('direct/src/plugin_standalone')
@ -2552,7 +2553,7 @@ if (sys.platform != "win32" and sys.platform != "darwin"):
TargetAdd('libpandagl.dll', input='libp3glstuff.dll')
TargetAdd('libpandagl.dll', input='libpandafx.dll')
TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
TargetAdd('libpandagl.dll', opts=['GLUT', 'NVIDIACG', 'CGGL'])
TargetAdd('libpandagl.dll', opts=['GLUT', 'NVIDIACG', 'CGGL', 'XF86DGA'])
#
# DIRECTORY: panda/src/osxdisplay/
@ -3722,6 +3723,8 @@ if (PkgSkip("PYTHON")==0):
TargetAdd('packp3d.exe', input='direct/src/showutil/packp3d.py')
TargetAdd('packpanda.exe', input='direct/src/directscripts/packpanda.py')
TargetAdd('eggcacher.exe', input='direct/src/directscripts/eggcacher.py')
TargetAdd('runp3d_frozen.pyd', input='direct/src/showutil/runp3d.py')
#
# Generate the models directory and samples directory
@ -3884,13 +3887,14 @@ def MakeRuntime():
MakeDirectory(GetOutputDir()+"/stage/coreapi/"+RUNTIME_VERSION)
MakeDirectory(coreapidir)
# Copy the p3d_plugin file.
# Copy the p3d_plugin file to coreapi dir.
plugfile = CalcLocation("p3d_plugin.dll", None)
CopyFile(coreapidir + os.path.basename(plugfile), plugfile)
# Copy the important libraries to built/rlib/.
plugfile = CalcLocation("p3dpython.exe", None)
CopyFile(GetOutputDir()+"/rlib/"+os.path.basename(plugfile), plugfile)
plugfile = CalcLocation("runp3d_frozen.pyd", None)
CopyFile(GetOutputDir()+"/rlib/"+os.path.basename(plugfile), plugfile)
if (sys.platform.startswith("win")):
for base in os.listdir(GetOutputDir()+"/bin"):
@ -4012,6 +4016,11 @@ The Panda3D engine.
/etc/Confauto.prc
/etc/Config.prc
/usr/share/panda3d
/usr/share/mime-info/panda3d.mime
/usr/share/mime-info/panda3d.keys
/usr/share/mime/packages/panda3d.xml
/usr/share/application-registry/panda3d.applications
/usr/share/applications/*.desktop
/etc/ld.so.conf.d/panda3d.conf
/usr/bin
/usr/lib

View File

@ -190,7 +190,7 @@ def GetDirectoryContents(dir, filters="*", skip=[]):
########################################################################
def LocateBinary(binary):
if "PATH" not in environ or os.environ["PATH"] == "":
if "PATH" not in os.environ or os.environ["PATH"] == "":
p = os.defpath
else:
p = os.environ["PATH"]

28
makepanda/mime.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="model/x-egg">
<comment xml:lang="en">EGG model file</comment>
<glob pattern="*.egg"/>
</mime-type>
<mime-type type="model/x-compressed-egg">
<comment xml:lang="en">Compressed EGG model file</comment>
<glob pattern="*.egg.pz"/>
</mime-type>
<mime-type type="model/x-bam">
<comment xml:lang="en">Panda3D binary model file</comment>
<glob pattern="*.bam"/>
</mime-type>
<mime-type type="model/x-compressed-bam">
<comment xml:lang="en">Compressed Panda3D binary model file</comment>
<glob pattern="*.bam.pz"/>
</mime-type>
<mime-type type="application/x-panda3d">
<comment xml:lang="en">Panda3D applet</comment>
<glob pattern="*.p3d"/>
</mime-type>
</mime-info>

View File

@ -0,0 +1,16 @@
pview
command=pview
name=Panda3D Model Viewer
can_open_multiple_files=true
expects_uris=false
requires_terminal=false
mime_types=model/x-egg,model/x-bam,model/x-compressed-egg,model/x-compressed-bam
panda3d
command=panda3d
name=Panda3D
can_open_multiple_files=false
expects_uris=false
requires_terminal=false
mime_types=application/x-panda3d

11
makepanda/panda3d.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Panda3D
Comment=Runs 3-D games and interactive applets
TryExec=panda3d
Exec=panda3d %U
StartupNotify=true
NoDisplay=true
Terminal=false
Type=Application
Categories=Game;Viewer;
MimeType=application/x-panda3d;

35
makepanda/panda3d.keys Normal file
View File

@ -0,0 +1,35 @@
model/x-egg:
description=EGG model file
default_action_type=application
short_list_application_ids_for_novice_user_level=pview
open=pview %f
view=pview %f
model/x-compressed-egg:
description=Compressed EGG model file
default_action_type=application
short_list_application_ids_for_novice_user_level=pview
open=pview %f
view=pview %f
model/x-bam:
description=Panda3D binary model file
default_action_type=application
short_list_application_ids_for_novice_user_level=pview
open=pview %f
view=pview %f
model/x-compressed-bam:
description=Compressed Panda3D binary model file
default_action_type=application
short_list_application_ids_for_novice_user_level=pview
open=pview %f
view=pview %f
application/x-panda3d:
description=Panda3D applet
default_action_type=application
short_list_application_ids_for_novice_user_level=panda3d
open=panda3d %f
view=panda3d %f

17
makepanda/panda3d.mime Normal file
View File

@ -0,0 +1,17 @@
model/x-egg:
ext: egg
model/x-compressed-egg:
regex,2: egg\.pz$
ext: egg.pz
model/x-bam:
ext: bam
model/x-compressed-bam:
regex,2: bam\.pz$
ext: bam.pz
application/x-panda3d:
ext: p3d