this patch enables the compilation of the web plugin on linux platform only (I saw some interest on dev mailing list, so I released it).
The plugin compiles (using cmake) but it doesn't work (see details below).
WARNING: the web plugin can freeze your browser!
In order to build the web plugin, you need the Mozilla SDK, available at http://developer.mozilla.org/en/docs/Gecko_SDK
The patch enables all logging statement I've found and adds some new (if you want I can "clean" it); he writes debugging information both on /tmp/plugin_log and on console. Besides logging and build scripts, the actual change is rather small.
I made the following changes to the build scripts:
* created WITH_WEBPLUGIN option in order to enable/disable plugin compilation (enabled by default)
* created MOZILLA_DIR variable to point to the Mozilla SDK location (default to ../gecko-sdk)
* plugin is created as webplugin/blender_plugin.so
In order to apply the patch, please pass the -p1 option to GNU patch and do a
"cp ./source/gameengine/GamePlayer/common/load.blend ./source/gameengine/GamePlayer/common/main.blend"
(I'm using git, and git-diff can't make a working (GNU) binary patch, sorry).
I've used source/gameengine/GamePlayer/netscape/test/resource/test.html as test page (you need to change the path of the blend files inside the html file in order to match your absolute path)
This patch is not complete at all, they're the following problems:
* the web plugin doesn't work (and lock the browser) because there's a double lock on PR_Lock (there's a double call to PLA_acquire_gl_context@PLG_X11_windowing.c from KX_KetsjiEngine::Render@KX_KetsjiEngine.cpp; if you comment out the rendering section (applying the second patch attached) the plugin can write a simple banner (so it's correctly loaded by the browser), but it can't load the animation
* I've skipped the loading of the "loading animation" (the "loading animation" is played when the main animation is still downloading)
* the "loading" animation and the main animation must have different names and their paths must be absolute.
* I've to comment out the following line because it was always blocking (but the file is loaded correctly)
if (k->loading_anim->type != BLENFILETYPE_PUB) return false;
If you remove the PR_Lock(gl_lock) on function PLA_acquire_gl_context@PLG_X11_windowing.c (line 513) firefox segfault with the attached stacktrace (so the lock is really needed or there's a more deep problem)
My dev environment is FF3, Ubuntu x64 but I've tested it on FF2 x86 too.