IRC Log Viewer » #firebreath » 2011-09-29

IRC Nick Time (GMT-7) Message
glock45 01:09 hi guys :)
it somebody online, right now ?
dougma 01:09 right now?
glock45 02:09 dougma: do you have 10 min. for me ?
dougma 02:09 maybe
what's up?
glock45 02:09 do I want to build NPAPI plugin fro Chrome+FF
so*
for*
the plugin has to listen for UDP broadcasts
and forward them to javascript
dougma 02:09 nice
glock45 02:09 it would be a part of chrome extension
and I installed Visual Studio C++
( Express edition )
from the docs I know, I have to attach meta data to DLL
but I have only Visual Studio express edition
dougma 02:09 what docs? what meta data?
glock45 02:09 which doesn't have resource editor.
moziila dev docs
dougma 02:09 are you building this plugin with firebreath?
glock45 02:09 meta data with: version, mime type, authro name etc.
no
dougma 02:09 well...
use firebreath. :)
glock45 02:09 I wanted to ask if it is really needed or I can miss this step
dougma 02:09 try skipping it
glock45 02:09 firebreath is too big
for my needs
dougma 02:09 you can always write a resource file by hand anyway
glock45 02:09 a how to build-in it into .dll ?
and*
dougma 02:09 the resource compiler
glock45 02:09 is it free ?
dougma 02:09 presumably it comes with vsexpress
because vs express can be used to build firebreath plugins
glock45 02:09 ok
well, maybe I just put raw .rc file into resource directory
and vs express will build it
dougma 02:09 yeah
glock45 02:09 I just don't have fancy editor
I tried to use JNEXT plugin
but it doesn't work
dougma 02:09 it's a text file
glock45 02:09 ok
ok, se when I will have ready .dll
I have to copy it to "plugins" directory and run test HTML page ?
dougma 02:09 ok then
yep, you need to isntall your plugin which is usually a matter of putting it in the right place
and write yourself a test page
glock45 02:09 yeah, just <object type="..../>
dougma 02:09 yep
glock45 02:09 I took headers from here: http://code.google.com/p/npapi-sdk/
is it ok ?
dougma 02:09 probably
firebreath takes care of the npapi headers for me
glock45 02:09 I spent a lot of time on research
Maybe I should switch to FireBReath
...but I always want to learn something
and write it from scratch
so in that case I know more and more...
guys from FireBereath make all this shit very easy
dougma 02:09 yes, especially if you want to target activex too
and mac
if you are just doing npapi on windows firebreath could still be useful if your plugin's api is complicated
because it takes a lot of the hard work out of interacting with javascript
glock45 02:09 I just need startListenet() / stopListene()
and getData()
that is all
dougma 02:09 why not use a callback?
glock45 02:09 plugin just listen for UDP packets and notify javascript about new packets
dougma 02:09 startListener(callback)
what's getData do?
glock45 02:09 yeah, that is right
I agree
it is how it should bne
be*
dougma 02:09 it's possible. :)
glock45 02:09 Right now, I worry about this meta data
in DLL
I am in work and I will check it later
dougma 02:09 ok, i'm off now anyway. good luck
glock45 02:09 thanks see you
glock45 13:09 dougma: hi, are you there ?
taxilian 13:09 I think he's usually asleep around this time
glock45 13:09 well, I am from Europe
I just want say to him thank you
I've just installed my first npapi plugin :)
I can even debug it in Visual Studio
taxilian 13:09 congratulations
and I still think you're crazy for doing it by hand
at least for anything other than just a quick "understand how this works" project
glock45 13:09 hahahah
taxilian 13:09 I should mention that I wrote most of FireBreath, as well as the tutorials at http://npapi.com/tutorial
so I know of which I speak =]
glock45 13:09 yes dude
big "THANKS" to you
I read them
many times :)
to get know what is going on
You made amazing work
taxilian 13:09 heh. there are a lot of things that I didn't cover well enough, but with FireBreath as a living example it's hard to find the motivation to do it
glock45 13:09 well, because of you I will make a coll chrome extansion
I could not do it without yout tutorials
btw. FireBreath is ok, but "first step" is heavy
taxilian 13:09 what do you mean?
glock45 13:09 python + cmake
a lot of thnigs to install
I would like to have all-in package
taxilian 13:09 python is just for the initial project generation
cmake is a build tool; trust me, it saves you a *lot* of work
you don't have to install python if you dont' want to; you'd just have to fill out the template by hand
glock45 13:09 ok
taxilian 13:09 compared to the work you just did to write it all yourself, it's really not that much to set up
glock45 13:09 can be true, but I was reading all this stuff
and I started to think "well, I just need DLL"
maybe I will switch to FireBreath
taxilian 13:09 heh. I would at least try it
glock45 13:09 when I start to implement own JavaScript objects
taxilian 13:09 after installing cmake and python, you can literally have a working plugin up in 20 minutes
glock45 13:09 and, why I need WDK ?
taxilian 13:09 it has ATL
Visual Studio full version comes with ATL, but express edition doesn't
glock45 13:09 ok, it looks like I have pro right now.
one question
taxilian 13:09 if you have pro, then you don't need WDK
glock45 13:09 are there many browser specific thnigs ?
things*
taxilian 13:09 in FireBreath? or that you have to worry about if you do it yourself?
glock45 13:09 and you have to do "if chrome ... else if fireboc"
firefox*
?
taxilian 13:09 not a ton, but there are some; not usually that cut and dried
but as an example, Safari 5.1 no longer supports NPN_PluginThreadAsyncCall
no idea why or what possessed them to make that decision
and on Mac that call doesn't work about 1/2 the time and you can't tell when it will or won't, so we had to build a workaround
glock45 13:09 Steve Jobs made decision
taxilian 13:09 heh. I'm sure he doesn't even know that it happened =]\
anyway, IE of course *everything* is browser specific, compared to any NPAPI
but most of hte NPAPI browsers and mostly the same
glock45 13:09 well I wont't to listen for UDP broadcast
I am going to start reading thread
and when UDP packet comes, I will send event to javascript object
kylehuff 13:09 are you asking if, someone making a plugin *USING* FireBreath needs those browser checks, or are you asking if those are within the framework of FireBreath?
glock45 13:09 is it possible ?
taxilian 13:09 glock45: sure
start a thread, listen to the UDP broadcasts, and then fire an event when they come
glock45 13:09 taxilian: do you have twitter ?
or google+
?
taxilian 13:09 glock45: I am thefirebreath and/or nailixat (first project, second personal) on twitter, and I am on google+ as [email protected]
glock45 13:09 kylehuff: well, I want to know if there are any critical things that "should" work but they won't
taxilian 13:09 but your best bet to get ahold of me is either here, the google group, or the forums
glock45 13:09 ok
taxilian 13:09 glock45: not critical things, generally; FireBreath works around anything like that
cross-thread calls are the main thing that we've had to do things to fix
kylehuff 13:09 yes, and I've have not seen any place in plugin development using FireBreath where I have had to make a distinction in my code between browsers. (granted, mine is a fairly limited use case, as it doesn't do any kind of screen drawing)
taxilian 13:09 glock45: if you don't use FireBreath, remember that all NPN_ calls *must* be made on the main thread (except NPN_PluginThreadAsyncCall)
if you do use FireBreath, most calls it'll proxy to the main thread for you
glock45 13:09 how do you do it :) ?
"proxing"
taxilian 13:09 NPN_PluginThreadAsyncCall, when it works, otherwise various other OS-specific methods
on windows we send a message to a message HWND, on Mac we use performSelectorOnMainThread
linux so far it's always worked
glock45 13:09 ...
cool :/
taxilian 14:09 to make a synchronous call, we basically just use a boost condition variable to indicate when the call has finished
it's a lot more complicated than that, of course, but that's the basics
glock45 14:09 ok, it looks like tehere is HWND here https://developer.mozilla.org/en/NPWindow
taxilian 14:09 yes; however, I don't use that one for cross-thread messaging
because then it wouldn't work if you use a windowless plugin
!find MessagingWindow
FireBreathBot 14:09 Could not find any tags matching MessagingWindow
taxilian 14:09 !find MessageWindow
FireBreathBot 14:09 Could not find any tags matching MessageWindow
taxilian 14:09 !findfile WinMessage
FireBreathBot 14:09 Found 2 matching file(s) in the master branch. First 2 are:
glock45 14:09 maybe this one : BOOL APIENTRY DllMain( HMODULE hModule, ?
FireBreathBot 14:09 src/PluginCore/Win/WinMessageWindow.cpp http://goo.gl/EsGu6
taxilian 14:09 there it is
FireBreathBot 14:09 src/PluginCore/Win/WinMessageWindow.h http://goo.gl/SKXEU
taxilian 14:09 tha'ts what I use
but you're still crazy if you try to implement this all yourself
it has taken us months of troubleshooting to get all that cross-thread stuff really solid
glock45 14:09 I can just make javascript setTimeout('''); :]
and reading function
which is dirty
taxilian 14:09 okay
have fun with that =]
I really, really, really suggest you at least try firebreath before you do that, though
glock45 14:09 xD
taxilian 14:09 but it's your call
kylehuff 14:09 wait, didn't you say you are in the UK? I didn't think you could have a handgun nick. or is it not registered? =c p
glock45 14:09 ahahhah xD
kylehuff 14:09 you are walking contradiction. your nick references a Glock, but you keep constantly mention the Springfield XD. what gives? =c )
taxilian 14:09 lol
glock45 14:09 ok, I go :) see you
taxilian 14:09 gl