Fix issues building the plugin on Linux

This commit is contained in:
rdb 2014-03-27 12:56:59 +00:00
parent 904ed200b8
commit 44b4afe898
6 changed files with 14 additions and 9 deletions

View File

@ -22,6 +22,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#endif // _WIN32
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__)

View File

@ -24,10 +24,9 @@
#include <sys/stat.h> // for mkdir()
#include <errno.h>
#include <string.h> // strerror()
#include <unistd.h>
#endif
////////////////////////////////////////////////////////////////////
// Function: get_dirname
// Description: Returns the directory component of the indicated

View File

@ -28,6 +28,7 @@
#include <sys/select.h>
#include <signal.h>
#include <dlfcn.h>
#include <unistd.h>
#endif
////////////////////////////////////////////////////////////////////

View File

@ -22,6 +22,10 @@
#include <algorithm>
#ifndef _WIN32
#include <unistd.h>
#endif
////////////////////////////////////////////////////////////////////
// Function: P3DHost::Constructor
// Access: Private

View File

@ -204,15 +204,15 @@ def InstallRuntime(destdir="", prefix="/usr", outputdir="built"):
if sys.platform.startswith("freebsd"):
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/browser_plugins/symlinks/gecko19")
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/libxul/plugins")
oscmd("ln -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/browser_plugins/symlinks/gecko19/nppanda3d.so")
oscmd("ln -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/libxul/plugins/nppanda3d.so")
oscmd("ln -f -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/browser_plugins/symlinks/gecko19/nppanda3d.so")
oscmd("ln -f -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/libxul/plugins/nppanda3d.so")
else:
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/mozilla/plugins")
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/mozilla-firefox/plugins")
oscmd("mkdir -m 0755 -p "+destdir+libdir+"/xulrunner-addons/plugins")
oscmd("ln -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/mozilla/plugins/nppanda3d.so")
oscmd("ln -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/mozilla-firefox/plugins/nppanda3d.so")
oscmd("ln -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/xulrunner-addons/plugins/nppanda3d.so")
oscmd("ln -f -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/mozilla/plugins/nppanda3d.so")
oscmd("ln -f -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/mozilla-firefox/plugins/nppanda3d.so")
oscmd("ln -f -s "+libdir+"/nppanda3d.so "+destdir+libdir+"/xulrunner-addons/plugins/nppanda3d.so")
WriteMimeFile(destdir+prefix+"/share/mime-info/panda3d-runtime.mime", MIME_INFO_PLUGIN)
WriteKeysFile(destdir+prefix+"/share/mime-info/panda3d-runtime.keys", MIME_INFO_PLUGIN)
WriteMimeXMLFile(destdir+prefix+"/share/mime/packages/panda3d-runtime.xml", MIME_INFO_PLUGIN)

View File

@ -715,12 +715,12 @@ if (COMPILER=="GCC"):
# We use a statically linked libboost_python on OSX
rocket_libs += ("boost_python",)
SmartPkgEnable("ROCKET", "", rocket_libs, "Rocket/Core.h")
SmartPkgEnable("GTK2", "gtk+-2.0")
SmartPkgEnable("JPEG", "", ("jpeg"), "jpeglib.h")
SmartPkgEnable("OPENSSL", "openssl", ("ssl", "crypto"), ("openssl/ssl.h", "openssl/crypto.h"))
SmartPkgEnable("PNG", "libpng", ("png"), "png.h", tool = "libpng-config")
SmartPkgEnable("ZLIB", "zlib", ("z"), "zlib.h")
SmartPkgEnable("GTK2", "gtk+-2.0")
if (RTDIST and GetHost() == "darwin" and "PYTHONVERSION" in SDK):
# Don't use the framework for the OSX rtdist build. I'm afraid it gives problems somewhere.
@ -4721,7 +4721,7 @@ if (RTDIST or RUNTIME):
#
if (RUNTIME and PkgSkip("NPAPI")==0):
OPTS=['DIR:direct/src/plugin_npapi', 'RUNTIME']
OPTS=['DIR:direct/src/plugin_npapi', 'RUNTIME', 'GTK2']
if GetTarget() == 'windows':
nppanda3d_rc = {"name" : "Panda3D Game Engine Plug-in",
"version" : VERSION,