IRC Log Viewer » #firebreath » 2012-10-08

IRC Nick Time (GMT-7) Message
adnan 07:10 Hello anyone there
I have just started to work with firebreath, I wish to do something() the moment plugin is loaded for particular mime-type, which function should i use and from which class, simplePluginAPI or simplePlugin
johannes 07:10 adnan: have you read http://www.firebreath.org/display/documentation/Plugin+Lifecycle ?
adnan 08:10 Hi, thanks for the link, I suppose I should read it first
adnan 08:10 OK so what i understood is that, the job of plugin object is to recive a Window, and then we can use PluginAPI class functions, in that window, am I right
JuanDaugherty 09:10 should a pluging the just works by registration in FF also "just work" similarly in Google Chrome on WIndows?
*that just
adnan 09:10 Yes it does, and not only in chrome but also in opera, irrespective of whether you are using Windows or Linux
taxilian 09:10 JuanDaugherty: also safari
good morning all
JuanDaugherty 09:10 Safari on Windows, I take it you mean.
well I definitely have a working fb FF plugin and it's definitely not working in Chrome
taxilian 09:10 define "not working"?
JuanDaugherty 09:10 not working is not working. I don't mean the conservative shibboleth.
appears not to invoke the plugin for the MIME type which it does show associated with the plugin
the only indication that it's installed for chrome
taxilian 09:10 okay, so it *is* detecting, but not instantiated
lists on about:plugins
JuanDaugherty 09:10 yes, though I was accessing the same list thru what used to be the wrenc
h
taxilian 09:10 most likely something going wrong during plugin initialization, then
easiest way to track it down would be to set a breakpoint on startup; possibly as early as dllmain, alternately in np_initialize or np_getentrypoints
then catch it in npp_new (NpapiPluginModule::New, I think)
JuanDaugherty 09:10 right, would have done that if it was starting up
taxilian 09:10 it is most likely starting up
if it can find hte .dll, which it obviously can, it is most likely starting up
but dieing early in the process
so that it doesn't seem to be
JuanDaugherty 09:10 well I set my dll so it traps on load. If it were being loaded I'd see it.
taxilian 09:10 where did you put the trap?
JuanDaugherty 09:10 dllmain
taxilian 09:10 hmm. interesting
do you have any external .dll depedencies?
JuanDaugherty 09:10 no. afk for a bit.
JuanDaugherty 09:10 i suspect it may be the mode in which chrome is installed, for a single user vs the other thing maybe
kylehuff 09:10 if I was more adventurous, I would attempt to add native client support to firebreath. I hate having a separate codebase for a NaCL version of my plugin.
taxilian 09:10 no, if chrome detects it then it should be loading
if it isn't loading, something odd is wrong
JuanDaugherty 09:10 does load in opera though
but messes up page number somehow
or otherwise doesn't feed data to the plugin
good to see opera loads though
JuanDaugherty 10:10 i suspect something in environment that fuddles chrome. When I reinstalled it installed in the expected place instead of per user but still picked up all the old bookmarks and stuff.
and my first install of it would have been about 2 years ago
JuanDaugherty 10:10 so there is another system, Kango
but not for plugins :)
or :(
taxilian 10:10 that's extensions
JuanDaugherty 10:10 your employer observes Columbus day?
taxilian 10:10 me? no
JuanDaugherty 10:10 I went to a local biz and was surprised they were closed then someone said it was a holiday.
taxilian 10:10 hehe
yeah, I didn't realize that columbus day is a federal / bank holiday until you ask
just looked it up
JuanDaugherty 10:10 always been, but few biz recognize
i suspect now something with the fact that the mime type is an image
taxilian 10:10 hmm; what mimetype?
JuanDaugherty 10:10 google and apple think alike
taxilian 10:10 if it's one that the browser normally handles itself they probably won't let you do it
JuanDaugherty 10:10 the one the plugin handles. No it's not.
taxilian 10:10 they are all big on not letting plugins hijack normal mimetype handling; I think it's viewed as a security concern
hmm.
JuanDaugherty 10:10 Opera, IE and FF don't though
prefer not mention the MIME type in this publicly logged channel, did do so by accident last week
taxilian 10:10 fair enough
JuanDaugherty 10:10 64 bit is working though. The plugin descriptor says it's 32 but it's not, I guess I'm going to have to change the name of the dll as well, right now the 32 and 64 have the same name.
taxilian 10:10 probably a good idea to name them differently
and you know Chrome only supports 32 bit unless you specially install 64 bit chrome, right? (pretty sure you know that, just verifying)
tfowler 11:10 hi there
apologies
taxilian 11:10 g'morning
tfowler 11:10 morning :)
so, I had a quick question about downloading files using FB
taxilian 11:10 ok
tfowler 11:10 BrowserStreams seem to be the way to go, yes?
taxilian 11:10 if they will work for what you need, that is recommended, yes
tfowler 11:10 ok
what I'm trying to do is download a java applet and run it once the FB plugin has downloaded it
I know there are a ton of security restrictions/concerns to take into consideration, but it is unfortunately what I have to do for this thing
taxilian 11:10 okay, I'll bite. *why* would you need to have an FB plugin download the java applet to run it?
tfowler 11:10 I work for a company that does web/audio conferencing and due to the recent security restrictions placed on Java w/in browsers, the 'business' has decided it would be best if we had a plugin to download our core installer as opposed to having an embedded java applet do all that work
make sense?
taxilian 11:10 umm, kinda, but only kinda
you know that the single worst problem known to the web is installing plugins, right?
users get confused by the whole "download this MSI and run it" thing
tfowler 11:10 so the core installer basically bootstraps itself and then loads up our native client (also written in Java)
taxilian 11:10 far too many steps, aparently
tfowler 11:10 agreed
taxilian 11:10 just making sure you understand
tfowler 11:10 no, believe me, I totally understand :)
adnan 11:10 I am creating a Gtk dialog in draw( FB::RefreshEvent *evt, FB::PluginWindow* win ) function, but compilation terminates with /usr/include/gtk-3.0/gtk/gtk.h:30:21: fatal error: gdk/gdk.h: No such file or directory
taxilian 11:10 lol.
kylehuff 11:10 lol
taxilian 11:10 sounds like you don't have your include directories set up correctly
is this linux only?
adnan 11:10 Yes
tfowler 11:10 haha
JuanDaugherty 11:10 also sounds like the x11 breakage from last week which I think was fixed
taxilian 11:10 hmm. that's possible
when did you last update?
JuanDaugherty 11:10 that was addressed to you adnan
adnan 11:10 I downloaded firebreath package yesterday only
taxilian 11:10 meaning you got it from github and downloaded the tarball? not git?
adnan 11:10 I downloaded the latest stable build firebreath-FireBreath-firebreath-1.7.0b1-8-g3a1d496.tar.gz
not git
taxilian 11:10 that's a shame
adnan 11:10 git is blocked in my college, i am behind a proxy server
taxilian 11:10 did you set FB_GUI_DISABLED 1 in your PluginConfig.cmake?
you can use git across https
adnan 11:10 no i didn't set
taxilian 11:10 double check in your pluginconfig.cmake
it would have been an option you set using fbgen
JuanDaugherty 11:10 prolly they just block everything except regular protocols, not git specifically
adnan 11:10 I just checked! it is commented
JuanDaugherty 11:10 *regular/mass
only developers use git
adnan 11:10 actually only 80/443 ports are allowed in my college
taxilian 11:10 adnan: you can clone things from git over 443, just FYI
from github, specifically in this case
JuanDaugherty 11:10 github also let's you use svn
taxilian 11:10 anyway, looks like your include dirs aren't set correctly; you'll have to look into it. I don't know what would cause that
adnan 11:10 In stackoverflow they give following solution gcc $(pkg-config gtk+-2.0 --cflags) $(pkg-config gtk+-2.0 --libs) project.c -o project for a similar problem
taxilian 11:10 pkg-config is already being run
by cmake
and should be added already
hmm
give me a few minutes and I'll glance around, see if I can find any ideas
adnan 11:10 thanks
adnan 11:10 Isn't it possible to add this line `pkg-config gtkmm-3.0 --cflags --libs` to makefile
taxilian 11:10 no
you need to use cmake
try adding:
include_directories(${GTK_INCLUDE_DIRS})
after add_x11_plugin
in your X11/projectDef.cmake file
then rerun the prep script and try again
adnan 12:10 This time a different error fatal error: gtk/gtkactionable.h: No such file or directory
taxilian 12:10 wel, is there such a file or directory?
adnan 12:10 yes there is, in the same folder
can't we use libgtkmm but it also faces somewhat similar peoblem
Hey the problem is fixed!
taxilian 12:10 oh, good
adnan 12:10 I used #include <gtk-2.0/gtk/gtk.h> instead of #include <gtk-3.0/gtk/gtk.h> when running prep script i noticed it display gtk+2.0 detected, even if my system has both installed
taxilian 12:10 that's because FireBreath uses gtk-2.09
2.0
honestly I didn't know there was a gtk-3.0
I'm not really a linux dev
adnan 12:10 Anyways thanks a lot! By the way FireBreath really rocks, you have made creating plugins a toy stuff. It supports all the linux browsers
taxilian 12:10 good luck
JuanDaugherty 13:10 "toy stuff" no doubt was "childs play"
the latter could be applied to the entire field of active developers in view of the attrition rate
tfowler 13:10 @JuanDaugherty: gotta love that
JuanDaugherty 13:10 well it leaves me wondering if the scheduled one will occur
godaddy sent me a SSL renewal saying it would expire in 30 days when in fact it's 60. I generally don't use CAs for my SSL and think I'm gonna do without completely.
the first year was like $10 then they want $70 for the same thing
reichi 14:10 certs became pretty affordable actually
taxilian 14:10 I use namecheap's; they've been pretty good
JuanDaugherty 14:10 for cert?
taxilian 14:10 yeah
for hamstudy.org
and examtools.org
those are the only two sites I have currently that need SSL
well, hamstudy doesn't really *need* it
:-P
JuanDaugherty 14:10 you've had for more than a year?
taxilian 14:10 yeah
couple of years now
first year was free =]
second went up to $10
(basic renewal price)
JuanDaugherty 14:10 because you bought something else I take it
taxilian 14:10 yeah, it was free with a domain registration
JuanDaugherty 14:10 since parsons sold it godaddy is not actually very competitive although their sales staff are very aggressive like most of those places
1&1 is selling something they call dedicated hosting which is about the most deceptive thing I've seen for an entity that size
taxilian 14:10 namecheap's are PositiveSSL certs
JuanDaugherty 14:10 it's not in fact a dedicated server but you don't realize that until you've bouht
it was very tedious to reverse the transaction and keep the name reg I had with them but should have caveat empted
went with server4you which had a real dedicated with 2-4X the machine at more than $10 less / month
at their german data center as mentioned before
taxilian 14:10 huh. those aren't bad prices
I'm currently on 888.net and I've been (slowly) working on getting off them
JuanDaugherty 14:10 you mean namecheap's, no
taxilian 14:10 I meant server4you
JuanDaugherty 14:10 or did you look at server4you?
ah
yeah and it checks out
reichi 14:10 server4you doesn't have the best reputation, though
JuanDaugherty 14:10 it makes sense economically, a typical lessee is going to stay at least 2 years
reichi 14:10 in terms of reliability and service
they're not "bad"
taxilian 14:10 what is their bandwidth prices?
reichi 14:10 more like "what the prices tells"
taxilian 14:10 not seeing that offhand
JuanDaugherty 14:10 unlimited
taxilian 14:10 really? connection speed decent?
JuanDaugherty 14:10 it seems faster that godaddy
taxilian 14:10 currently I'm hosting all of the firebreath sites from my house
JuanDaugherty 14:10 everything that was at my godaddy server is there now
taxilian 14:10 but after the setup fee those servers are cheaper than a decent VMS at rackspacecloud
JuanDaugherty 14:10 I also use AWS and linode, but most stuff is at s4y
i haven't seen anything better than s4y price wise that is operating a major data center
little no name guys yeah, but I don't want that
reichi 14:10 they're VERY popular in germany
taxilian 14:10 yeah; I'm fairly impressed; I shopped around a lot a year or two ago and didn't find anything near this nice price-wise
JuanDaugherty 14:10 wanna see the warehouse size data center
taxilian 14:10 makes me wonder if I could somehow talk them into setting up a vsphere box for me :-P
JuanDaugherty 14:10 http://meansofproduction.biz and my other stuff is mostly coming from there now. Still a few things broken.
probably not, entities that can offer such prices, short of the kind just mentioned, can only do so by economies of scale
taxilian 14:10 yeah
JuanDaugherty 14:10 so from me they'll make over $1K USD over two years for that slot
which is certainly enough for a decent profit
taxilian 14:10 can you get additional ip addresses?
JuanDaugherty 14:10 I was just livid when the guy started trying to explain to me how the 1&1 "dedicated" was a "managed" host
yeah at a price
taxilian 14:10 hehe
JuanDaugherty 14:10 go ipv6
taxilian 14:10 oh, I use ipv6 already
I have it set up at all my offices, house, etc
but that doesn't help much for providing services for everyone else
pretty sure firebreath.org works over ipv6 as well
JuanDaugherty 14:10 they say up to 4 ipv4
(with the pkg I got)
oh yeah forgot about the setup fee that's the distinctive thing about them
either you pay it monthly in which case their prices are still good or one time in which case they're outrageously good
I chose monthly and it's still like $15 less than the smaller and metered godaddy server
reichi 14:10 i think in germany only have metered offers left on either VERY big scale hostings
or on housings
JuanDaugherty 14:10 or maybe with a higher data rate
reichi 14:10 but the standard hosting offers are pretty much all unlimited now
yes
if you need gbit
possibly
JuanDaugherty 14:10 100MB is fine for my domains right now
as long as it's not metered
reichi 14:10 considering that you can get 100MBit at home now here
it's no more the same it was a few years ago
JuanDaugherty 14:10 the US lags on that, unfortunately, verizon FIOS was best you could do residentially last I checked
reichi 14:10 well
you can't get that everywhere
only in very few cities
and even there only in parts of the cities
IF you have the correct cable provider
JuanDaugherty 14:10 same with FIOS except it's pretty much every major city
reichi 14:10 (or you're one of the few households with fibre-to-the-house)
taxilian: I#ve finally fixed my SetWindow issues ;)
JuanDaugherty 14:10 i think FIOS is fibre to premis but not sure
SetWindow for what browser/os?
reichi 14:10 superspecialreichiedition ;)
The Browser ist QtWebkit on an embedde Linux Device
JuanDaugherty 14:10 ah
reichi 14:10 with custom Firebreath Platform classes
JuanDaugherty 14:10 i c
reichi 14:10 and as NPAPI does not define for linux without x11
i had to tear apart qt a bit ;)
but it does what i need now
JuanDaugherty 14:10 you mean the qt in fb
reichi 14:10 it calls SetWindow properly
and clears the area where the plugin resides
so i can move and resize the video behind the browser
and it's visible
(should be, haven't tested that on the actual device yet)
so i can finally get rid of all the ugly hacks ;)
JuanDaugherty 14:10 so I take it's just that this device doesn't have X11 drivers
reichi 14:10 nope
do you know any embedded device using X11?
i think they're incredibly rare ;)
JuanDaugherty 14:10 X11 was meant for desktops
reichi 14:10 well
JuanDaugherty 14:10 regular displays anyway
reichi 14:10 i think the npapi design is very poor there
it's totally X11-dependent
JuanDaugherty 14:10 that's norm on a given platform
an expectation of core GUI independence is not reasonable in this case
fb is struggling to have what platform independence it does have
reichi 14:10 well
wayland is coming
and it's coming quite fast
and npapi will break
JuanDaugherty 14:10 if it's linux specific it's impact in the wider world will be limited
linux has a neglible share of consumer markets outside android
in spite of it's dominance elsewhere
reichi 14:10 well, I'm only using it for development
Desktop-wise
my servers are all linux
JuanDaugherty 14:10 my main desktop has been linux for about 15 years
reichi 14:10 i like to play a game or two in the evenings
JuanDaugherty 14:10 transitioned from os/2 to it
reichi 14:10 an that's not where you want linux
i am probably younger than you are ;)
:)
man...
somehow this day is becoming a long one :/
(but i want to see this working on the box now)
JuanDaugherty 14:10 what time did you start?
kylehuff 14:10 I do all of my plugin development on linux, and then compile only on OSX and Windows.
*only compile
JuanDaugherty 14:10 what does the plugin do?
kylehuff 14:10 provides an API to GnuPG/PGP
JuanDaugherty 14:10 ah
you only get balled up if you have deep gui needs, that wouldn't
kylehuff 14:10 yeah, for the most part I don't even have to test in OSX or Windows
JuanDaugherty 14:10 luck bastard
y
at least I'm only supporting Windows
bsick7 14:10 has anybody successfully created a firebreath project using visual studio 2012?
JuanDaugherty 14:10 I used xpress in 64 hit a snag with AX, but sure it will work but you need to get a special cmake
(for express)
bsick7 14:10 i'm using ultimate
after following the video tutorials, when i build my project in VS2012, i get the error "'CAtlDllModuleT<T>' must be used with either _WINDLL or _USRDLL defined" in atlbase.h
any ideas?
JuanDaugherty 15:10 the snag could have been easily resolved
i didn't get such an error, the error I mentioned was the only one, at final link time
(picked up the 32bit atl lib instead of the 64)
so guessing you messed with the cmake stuff
bsick7 15:10 no, just followed the tutorial by the book
JuanDaugherty 15:10 you mean the videos?
bsick7 15:10 got past the error by adding /D "_WINDLL" to my FNA_PluginAuto project command line options
JuanDaugherty 15:10 FNA is your project?
taxilian 15:10 I dont' have vs2012, so I Can't test with it
JuanDaugherty 15:10 I used express, it's free
sorry taxilian I thought you were bsick7
so right now I only use 2012 to debug 64
bsick7 15:10 had to add that option to FNA_PluginAuto, UnitTest_ActiveXCore, and UnitTest_ScriptingCore and it built
JuanDaugherty 15:10 what's FNA stand for?
taxilian 15:10 FNA is the plugin prefix for his project
JuanDaugherty 15:10 yeah I know, no need to disclose if you'd rather not
bsick7 15:10 well if you guys hit any snags with 2012, i finally got my build working using that 1 step
taxilian 15:10 good to know
bsick7 15:10 thanks for the awesome utility
bsick7 16:10 can anybody point me to a good resource that helps me inherit from JSFunction
JuanDaugherty 16:10 google c++ inheritance?
the classic refs by stroustrup, hillis, etc.
taxilian 16:10 bsick7: there are examples in NPJavascriptObject.cpp in src/NpapiCore
JuanDaugherty 16:10 *ellis
bsick7 16:10 thanks
taxilian 16:10 what exactly are you trying to do?
JuanDaugherty 16:10 and don't say "inherit from JSFunction" that's been tried before
bsick7 16:10 so, i'm trying to take some code i wrote in javascript and make some of it native...
taxilian 16:10 okay
bsick7 16:10 function SomeObject() {
var so = new SomeObject()
i'm trying to create a native construct that will replace "function SomeObject() { }" in javascript with a native implementation
doesn't help that i'm really rusty on c++ :/
taxilian 16:10 you may want to consider whether or not that's really the best way to do it
bsick7 16:10 elaborate
taxilian 16:10 you could, for example, inject some javascript into the page
and then call the javascript from your plugin
bsick7 16:10 so the native layer would just take in this created object?
taxilian 16:10 well, I don't actually know what you're trying to do
but a javascript function in js world is just a JSObjectPtr in plugin land
that you can invoke("", …) with
bsick7 16:10 in javascript land, functions also have "prototype"
taxilian 16:10 true; plugin functions do not
the point, though, is that the plugin can create javascript
and then use it
if it makes sense to do so
bsick7 16:10 have you heard of silverlight
and for that matter used it
taxilian 16:10 yes, I have used it
and spoken with the guys who wrote the NPAPI bridge, actually
bsick7 16:10 so, i've been working on a project for 10 months now that makes a truly cross-browser/cross-platform silverlight
unfortunately, DependencyObject is very performance intensive, so i'm looking to build a small plugin that takes my javascript functionality and makes it native if the plugin exists
in other words, if you have this plugin, you go fast
taxilian 16:10 okay
bsick7 16:10 since DependencyObject can be "inherited", i have created a lot of mini-inventions to make inheritance work in javascript, it relies on DependencyObject being a function
taxilian 16:10 and you need to run something in javascript and have it call back to C++?
bsick7 16:10 ideally, i would like this...
in javascript: new DependencyObject()
that creates a native object that i can inherit from and add on to the prototype
taxilian 16:10 right; I'm familiar with javascript prototypal inheritance
bsick7 16:10 so is this something simple to do with Firebreath?
taxilian 16:10 it's not something that is possible to fully do wtih a plugin
you can do something like this:
var DependencyObject = getPlugin().DepObj;
var a = new DependencyObject()
and a can be an instance of a JSAPI object
however, it doesn't have a real prototype
and you won't be able to completely simulate prototypal inheritance with it
it might be possible to create a JSAPI prototype object to put on your created object and query it when you create a new object, I suppose
so you might be able to hack something together that will mostly work
but you won't be doing it using a JSFunction
a place to start is to create a JSAPI object and implement the Construct method
bsick7 16:10 k thanks
taxilian 16:10 the construct method on the object that you "new" will be called and should return another JSAPI object instance
bsick7 16:10 on a side note, if i call a native method from javascript like this...
equals(obj1, obj2)
if obj1 is the same object (in-memory) as obj2, will the pointers be the same in native code
basically, a way of doing reference equals since it can't be done in javascript
jakepetroules 17:10 it seems like FB::PluginWindowMacXXX classes are undocumentd
taxilian 17:10 not undocumented
but sometimes doxygen doesn't pick them up properly
read the source; there are docs in the .h files
well, I'm headed home for the day
good luck all
JuanDaugherty 19:10 besides that generated from the documentation, the video tutorial, and the web site, there's no expository documentation as such jakepetroules
jakepetroules 19:10 ok
JuanDaugherty 19:10 if you're going to seriously use this codeset you need to be able to read the code
jakepetroules 19:10 another question, following the media player example to draw on OS X
JuanDaugherty 19:10 and read between some lines too
I've only used FB on Windows
jakepetroules 19:10 it's a method with a CoreGraphicsDraw* and PluginWindowMacCG* for Cocoa/CoreGraphics
for Windows is it RefreshEvent* and PluginWindow[less]Win* ?
taxilian 21:10 jakepetroules CoreGraphicsDraw extends RefreshEvent
so it's always RefreshEvent, but you can get a little more platform specific if you want to
jakepetroules 21:10 right
taxilian 21:10 in the case of CoreGraphics you need to in order to get the CGContextRef
honestly we should have done the same with PluginWindowlessWin on windows, but we didn't
jakepetroules 21:10 right cause you get the hdc from the window itself