diff --git a/makepanda/installpanda.py b/makepanda/installpanda.py index 04a498f31d..27fdd75fd0 100644 --- a/makepanda/installpanda.py +++ b/makepanda/installpanda.py @@ -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") diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index d7d46c1f32..951bb778d1 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -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 diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 9290eab695..7300a34589 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -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"] diff --git a/makepanda/mime.xml b/makepanda/mime.xml new file mode 100644 index 0000000000..5d68851cd1 --- /dev/null +++ b/makepanda/mime.xml @@ -0,0 +1,28 @@ + + + + + EGG model file + + + + + Compressed EGG model file + + + + + Panda3D binary model file + + + + + Compressed Panda3D binary model file + + + + + Panda3D applet + + + diff --git a/makepanda/panda3d.applications b/makepanda/panda3d.applications new file mode 100644 index 0000000000..0baa6904cb --- /dev/null +++ b/makepanda/panda3d.applications @@ -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 + diff --git a/makepanda/panda3d.desktop b/makepanda/panda3d.desktop new file mode 100644 index 0000000000..873bfef491 --- /dev/null +++ b/makepanda/panda3d.desktop @@ -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; diff --git a/makepanda/panda3d.keys b/makepanda/panda3d.keys new file mode 100644 index 0000000000..7a174549bb --- /dev/null +++ b/makepanda/panda3d.keys @@ -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 + diff --git a/makepanda/panda3d.mime b/makepanda/panda3d.mime new file mode 100644 index 0000000000..2cc660b7d7 --- /dev/null +++ b/makepanda/panda3d.mime @@ -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 +