Need help to building browser plugin demo

I tried to build the browser demo from the latest tip in Visual Studio 2010, but I get this error:

 

1>  juce_browser_plugin_wrapper.cpp
1>d:\myname\juce\juce\modules\juce_browser_plugin_client\wrapper/juce_NPAPI_GlueCode.cpp(743): error C2552: 'argStruct' : non-aggregates cannot be initialized with initializer list
1>          'juce::var::NativeFunctionArgs' : Types with user defined constructors are not aggregate
1>

which corresponds to this line

const var::NativeFunctionArgs argStruct = { object, params.params, (int) argCount };

 

I'm not familiar at all with the browser part of JUCE, or web programming at all, was just curious to see what it was, but I sadly cannot even get the demo to build,

 

any advice?

 

Ah, sorry, I changed that structure recently and hadn't checked the plugin build. Try again now!

trying now,

now I get this

1>RC : fatal error RC1110: could not open ..\..\..\..\modules\juce_browser_plugin\wrapper\juce_NPAPI_WinResource.rc

The folder is called juce_browser_plugin_client, but I don't know where to change it, I already changed it in JuceHeader.h for another include, so you might want yo update that one too

 

damn.. I guess you can see that I don't spend too much time on that project! Ok, have updated the paths now (but can't test a Windows build myself right now, so can't guarantee that covers every other problem!)

Thanks, I can build it now with some warnings,

But I'm not sure how to run it, I copied it to C:\Program Files\Mozilla Firefox\plugins (which did not exist), and also to "C:\Program Files (x86)\Mozilla Firefox\Plugins" which already existed, and opened test.html in FF Chrome and IE8, but I only got the buttons, and some empty space above it.

 

By the way here are the build warnings if you are interested

 

1>  juce_browser_plugin_wrapper.cpp
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(D:\myname\juce\JUCE\extras\browser plugin demo\build\win32\Release\JuceBrowserPluginDemo.dll) does not match the Linker's OutputFile property value (D:\myname\juce\JUCE\extras\browser plugin demo\build\win32\Release\npJuceBrowserPluginDemo.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(JuceBrowserPluginDemo) does not match the Linker's OutputFile property value (npJuceBrowserPluginDemo). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>juce_browser_plugin_wrapper.obj : warning LNK4104: export of symbol 'DllGetClassObject' should be PRIVATE
1>juce_browser_plugin_wrapper.obj : warning LNK4104: export of symbol 'DllCanUnloadNow' should be PRIVATE
1>juce_browser_plugin_wrapper.obj : warning LNK4104: export of symbol 'DllRegisterServer' should be PRIVATE
1>juce_browser_plugin_wrapper.obj : warning LNK4104: export of symbol 'DllUnregisterServer' should be PRIVATE

Oh wait, could this be an architecture problem? I'm running win7 64bits

Yeah, this is why I stopped maintaining the plugin build - when all the browsers went to 64-bit, they began sandboxing the plugins, which made it impossible to embed the plugin's window in the browser - hence the blank space. The only workaround would be to write a whole new rendering + mouse-event system that works via their sandboxed APIs, and would make it impossible to embed useful stuff like openGL, DirectShow, etc.

You can still write non-GUI plugins, so it's handy for audio, but you'd be better off writing the UI bit in javascript.

Ok thanks for the explanation, I didn't have a particular goal in mind, was just trying it out. I guess for making browser/webbased stuff there is other tools than JUCE,

 

Although one can dream of a HTML5 "build" option....

Although one can dream of a HTML5 "build" option....

Yeah, I'd love to have enough time to have a go at that!

This would also improve the usefulness of JUCE as a game engine/framework. I read in another topic some time ago you were also interested in that.

 

But yeah if you have to start from 0 I can imagine it's a lot of work.