Did anybody manage to write a scriptable plugin for linux ?
Eric Robert <[email protected]> Mon, 19 May 2003 11:51:54 +0200
| Newsgroups | gmane.comp.mozilla.devel.plugins,gmane.comp.mozilla.devel.xpcom |
|---|---|
| Organization | Guest of TISCALI - FRANCE |
| Message-ID | <[email protected]> |
I all As stated in the subject , i want to write a scriptable plugin for linux. Like all beginners in that matter, i pulled down the mozilla source tree edited the allmakefiles.sh to add a line telling configure to write a makefile for mozilla-1.3/modules/plugin/tools/sdk/samples/scriptable/unix It did it. I build the whole tree with gmake and whatched tv for a while waiting for the process to finish.. cd to the scriptable plugin directory and tried to build the stuff as it wasn't already built (contrarily to the simple plugin). But then came out errors (npapi.h and nupp.h headers not found, plus no rules to make libplugingate_s.a) Fixed it creating an "../../../include" directory with npapi.h and nupp.h inside and replacing this line: SHARED_LIBRARY_LIBS = $(DIST)/lib/libplugingate_s.$(LIB_SUFFIX) with: SHARED_LIBRARY_LIBS = ../../common/libplugingate_s.$(LIB_SUFFIX) OK now i can compile the beast.... Placed the *.xpt files into the /usr/lib/mozilla-1.3/components directory. Put the libnpSDKscriptable.so file into the plugin directory: cp libnpSDKscriptable.so /usr/lib/mozilla-1-3/plugins backed up the xpti.dat file somewhere else and have it regenerated using /usr/lib/mozilla-1.3/regxpcom OK i can see the new lines in the new xpti.dat file... 126,npSDKscriptable.xpt,0,168,1053302295000 127,nsIScriptablePluginSample.xpt,0,168,1053302298000 The plugin is registered since in can see it in about:plugins It draws the nice little black rectangle inside the grey window under the text... But nothing happens when i click any of the two buttons under this rectangle... The big void... So several questions: Has anybody been able to build a scriptable plugin under and for linux, but any windows feedback could be helpful as well, with this sdk or is the old sdk ( unix-sdk-3.0b5.tar.Z) the one should use in the end (as i read in ONE post)? see: http://groups.google.fr/groups?q=plugin+mozilla+AFAIK&start= 10&hl=fr&lr=&ie=UTF-8&selm=aprsml%24q4v1%40ripley.netscape.com&rnum=20 Why do i have to fiddle with the Makefile to have it finally built or is it that the sdk isn't finished yet or will it never be ? Is there somewhere a working sample of scriptable plugin code (with methods callable from javascript) that works on linux (plus windows AND mac)? As i think it's a xpcom related pb, where should i look to have a thorough, clear, concise view about how xpcom works? Thanks Rico