From 5394d01ed615005560c3785e6a04efbe02776da3 Mon Sep 17 00:00:00 2001 From: Redmond Urbino Date: Mon, 19 Oct 2009 08:23:44 +0000 Subject: [PATCH] integrating awesomium with panda --- dtool/Config.pp | 12 +++++++++++- dtool/LocalSetup.pp | 8 ++++++++ dtool/Package.pp | 10 ++++++++++ dtool/pptempl/Global.pp | 7 +++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dtool/Config.pp b/dtool/Config.pp index 7444551a8b..20b4d7f3c4 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -321,7 +321,7 @@ // genPyCode. You may wish to add to this list to add your own // libraries, or if you want to use some of the more obscure // interfaces like libpandaegg and libpandafx. -#defer GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx $[if $[HAVE_ODE],libpandaode] +#defer GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx $[if $[HAVE_ODE],libpandaode] // Normally, Python source files are copied into the INSTALL_LIB_DIR // defined above, along with the compiled C++ library objects, when @@ -748,6 +748,16 @@ #define ODE_LIBS $[if $[WINDOWS_PLATFORM],ode.lib,ode] #defer HAVE_ODE $[libtest $[ODE_LPATH],$[ODE_LIBS]] +// Is Awesomium installed, and where? +#define AWESOMIUM_IPATH +#define AWESOMIUM_LPATH +#if $[OSX_PLATFORM] + #define AWESOMIUM_LIBS +#else + #define AWESOMIUM_LIBS $[if $[WINDOWS_PLATFORM],awesomium.lib,awesomium] +#endif +#defer HAVE_AWESOMIUM $[libtest $[AWESOMIUM_LPATH],$[AWESOMIUM_LIBS]] + // Mozilla's so-called Gecko SDK, a.k.a. Xulrunner SDK, implements // NPAPI, Mozilla's semi-standard API to build a web plugin for // Firefox and other Mozilla-based browsers. diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 7bcff60181..571aa50583 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -183,6 +183,11 @@ #else #print - Did not find ODE #endif +#if $[HAVE_AWESOMIUM] +#print + AWESOMIUM +#else +#print - Did not find AWESOMIUM +#endif #if $[HAVE_MAYA] #print + OpenMaya #else @@ -359,6 +364,9 @@ $[cdefine HAVE_SWSCALE] /* Define if we have ODE installed and want to build for ODE. */ $[cdefine HAVE_ODE] +/* Define if we have AWESOMIUM installed and want to build for AWESOMIUM. */ +$[cdefine HAVE_AWESOMIUM] + /* Define if we have Mesa installed and want to build mesadisplay. */ $[cdefine HAVE_MESA] $[cdefine MESA_MGL] diff --git a/dtool/Package.pp b/dtool/Package.pp index a8a42a7e73..097d3c1f14 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -268,6 +268,12 @@ #set ODE_LIBS $[ODE_LIBS] #set HAVE_ODE $[HAVE_ODE] +#set AWESOMIUM_IPATH $[unixfilename $[AWESOMIUM_IPATH]] +#set AWESOMIUM_LPATH $[unixfilename $[AWESOMIUM_LPATH]] +#set AWESOMIUM_LIBS $[AWESOMIUM_LIBS] +//#set AWESOMIUM_FRAMEWORK $[unixfilename $[AWESOMIUM_FRAMEWORK]] +#set HAVE_AWESOMIUM $[HAVE_AWESOMIUM] + #set NPAPI_IPATH $[unixfilename $[NPAPI_IPATH]] #set NPAPI_LPATH $[unixfilename $[NPAPI_LPATH]] #set NPAPI_LIBS $[NPAPI_LIBS] @@ -380,5 +386,9 @@ #define GENPYCODE_LIBS $[GENPYCODE_LIBS] libpandaphysx #endif +#if $[HAVE_AWESOMIUM] + #define GENPYCODE_LIBS $[GENPYCODE_LIBS] libpandaawesomium +#endif + // Finally, include the system configure file. #include $[THISDIRPREFIX]pptempl/System.pp diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index f4fa2415c0..0e4c40609a 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -220,6 +220,13 @@ #define ode_libs $[ODE_LIBS] #endif +#if $[HAVE_AWESOMIUM] + #define awesomium_ipath $[wildcard $[AWESOMIUM_IPATH]] + #define awesomium_lpath $[wildcard $[AWESOMIUM_LPATH]] + #define awesomium_libs $[AWESOMIUM_LIBS] + #define awesomium_framework $[AWESOMIUM_FRAMEWORK] +#endif + #if $[HAVE_NPAPI] #define npapi_ipath $[wildcard $[NPAPI_IPATH]] #define npapi_lpath $[wildcard $[NPAPI_LPATH]]