IRC Log Viewer » #firebreath » 2011-06-23

IRC Nick Time (GMT-7) Message
taxilian 00:06 Imran: I guess you could add 207.97.227.239 github.com to your hosts file
and see if that works
Imran 00:06 ok
thanks my system adminstrator solves the issue
taxilian 00:06 oh, good
g'night all
Imran 00:06 got another fatal: unable to overwrite old ref-pack file: is a directory Clone of git://github.com/firebreath/firebreath-boost.git into submodule path src/3rdparty/boost faild
got this error
referance is not a tree wat's that
Imran 00:06 git submodule update --recursive --init giving me fatal error of referance tree not found..:(
dougma 00:06 this may be caused by your first error
did you resolve your first error?
Imran 00:06 i solved that one
first 1
dougma 00:06 pass.
Imran 00:06 means i skip this step
dougma 00:06 no, meaning i can't help
Imran 00:06 ok
Imran 01:06 sorry for disturbance guys got the error when run the command prep2008.cmd projects build as cmake is not recongnized as internal or external cammand
dougma 01:06 !wiki Note that you must download and install CMake
FireBreathBot 01:06 2 results found. Note: Results limited to 8
"Creating a New Plugin Project": http://goo.gl/KXJBg
"Version History": http://goo.gl/lgWpo
dougma 01:06 Imran: you'll find this much easier if you read the instructions
Imran 01:06 i have already installed cmake 2.8
dougma 01:06 did you add it to your path?
you need to.
Imran 01:06 ok
FireBreathBot 03:06 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-106 issue created by eastmark
FireBreathBot 03:06 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-106 issue commented by eastmark "I've rolled back to 1.5.1 and is still occurs, but less frequent.
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-106 issue commented by eastmark "Could this be a problem when I upgraded my project from using FB 1.4 to 1.5, I read that if I'm u..."
Imran 04:06 the command "prep2008.cmd projects build " give me the error as cmake is notrecongnized as an internal or external command
i have installed cmake 2.8
Imran 04:06 the command "prep2008.cmd projects build " give me the error as cmake is notrecongnized as an internal or external command
i have installed cmake 2.8
imran 05:06 cmake is'nt working
any 1 there
i need help
Imran 06:06 getting Cmake error
help me
linearray 06:06 what's up
Imran 06:06 getting error of cmake when running the command prep2008.cmd projects build
cmake is not recongnized as internal or external comamnd
i have installed cmake 2.8
linearray 06:06 open a terminal and type "cmake"
does that work?
Imran 06:06 i don get what do u meant by terminal
linearray 06:06 command prompt
cmd.exe
Imran 06:06 same error
linearray 06:06 ok
that means cmake is not in your path
windows xp?
Imran 06:06 may be
yes
xp
linearray 06:06 find out where cmake is installed
and add it to the path like this: http://www.computerhope.com/issues/ch000549.htm
Imran 06:06 ok
thanks i m done with it
linearray 06:06 cool
Imran 06:06 1 more question how much space is required for building the project
linearray 06:06 my build directory has 350 MB
taxilian 08:06 !findfile NpapiPluginModule_NPP
FireBreathBot 08:06 Found 1 matching file(s) in the master branch. First 1 are:
src/NpapiCore/NpapiPluginModule_NPP.cpp http://goo.gl/vVU8D
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-106 issue resolved by richard "Couple of things here; first, this is not a crash; in fact, in a Release build it will do nothing..."
linearray 09:06 haha, just realized that cmake in fact asks you on windows, whether you want to add it to the path
taxilian 09:06 yeah
and on the wiki it tells you that you need to tell it to add it to the path
linearray 09:06 and it's already in the docs
yes
taxilian 09:06 but some people aparently don't pay attention to that
there is just only so much I can do =]
linearray 09:06 so i take it, when I need specialized code for win/mac, I should go ahead as in BasicMediaPlayer: Create derived plugins and let the factory have the only #ifdef
however, what I actually need is a specialized API, so it seems I should actually #ifdef in createJSAPI() and derive the API
something tells me that the "clean" way is to really only have the API for JS in the JSAPI (duh) class, and do everything else in the plugin
is this more or less correct?
taxilian 10:06 linearray: that's what I prefer
I would not derive the API, though
I would create an abstraction to do whatever I needed
and have a common class that the API calls
so say your intent is to interface with a USB device; I would create a USBDevice abstract class and a USBDeviceMac and USBDeviceWin
then I create a static method USBDevice::create that I implement in USBDeviceMac and USBDeviceWin that retruns the platform-specific version
there are no ifdefs in this scenario; it's very clean
and your code is easy to reuse
linearray 10:06 where is the point, where you decide whether to instantiate the Mac or Win class?
taxilian 10:06 in ::create
you implement it in the cpp file so it just gets linked to the correct version
zmichl 10:06 taxilian: hi, I have found this article: http://winapi.freetechsecrets.com/ole/OLEIDispatchInvoke.htm
taxilian: is it what I need to call FB methods?
taxilian 10:06 looks fairly decent; I would use IDispatchEx personally, but that should work
of course, all the code samples that you needed to call FB methods via COM was in the file I linked you
!findfile IDispatch
FireBreathBot 10:06 Found 3 matching file(s) in the master branch. First 3 are:
src/ActiveXCore/IDispatchAPI.cpp http://goo.gl/DX5Jt
src/ActiveXCore/IDispatchAPI.h http://goo.gl/uiDvB
src/ActiveXCore/JSAPI_IDispatchEx.h http://goo.gl/A5RKn
taxilian 10:06 the first one there
zmichl 10:06 taxilian: in the example there are 3 UUIDs (CLSID_CMyObject, IID_Unknown, and IID_IDispatch) but I don't know what to put there from PluginConfig.cmake
could you help me, please? :)
taxilian 10:06 I think I already answered this question
it's the FBControl GUID
zmichl 10:06 for all of them?
taxilian 10:06 for the first
to instantiate
IID_IDispatch is used to query an IDispatch*
you need to learn some basics of how COM works
before any of this will make sense
FireBreathBot 11:06 Commit df43e28 on master by Richard Bateman: "Wrappers for WebKit (browserhost, jsobject, javascript objec..." http://goo.gl/af8Cf
Commit ae8ed4b on master by Richard Bateman: "Misc fixes and improvements for WebView" http://goo.gl/HLiM2
Commit 6b40083 on master by Richard Bateman: "Fixed cocoa mousescrollevent and draw event
zmichl 12:06 taxilian: Should I'll be able to get valid property value, like in the FBControl.htm?
taxilian 12:06 zmichl: what do you mean?
query a property, such as valid?
zmichl 12:06 yes
taxilian 12:06 DISPATCH_PROPERTYGET
gotta run some errands; be back in an hour or so
taxilian 13:06 I am back
linearray 13:06 taxilian: so then you put one ::create for Mac in Mac/ and one ::create for Win in Win/, right?
taxilian 13:06 yeah
linearray 13:06 ok!
taxilian 13:06 but remember the ::create is the implementation of the base class's function
not the platform specific class
it's basically just a factory function
linearray 13:06 exactly
taxilian 13:06 and keep in mind — that's just my preferred way. you don't have to do it my way if you don't want =]
but I think it's a good clean way to do it
linearray 13:06 this sounds pretty awesome, I should write this up ;)
taxilian 13:06 you should ;-)
actually, if you wanted to and don't have a good place to put it you're welcome to post it on Colonelpanic
as long as you let me review it before you post
linearray 13:06 Oh, I'd write it in the wiki for now
unless that's bad
taxilian 13:06 that would work as well. This just seems like something that works better as a blog post format
but the important thing is to have the information somewhere
then if it doesn't work, just blame kylehuff
linearray 13:06 sure, will do
kylehuff 13:06 as the impostor author, I reserve the right to deflect any and all blame for missing or broken functionality of the FireBreast framework...
taxilian 13:06 lol
you should deflect the blame to neilg_
kylehuff 13:06 as a side note, google code refused to allow me to use the FireBreast logo stating some sexually explicit TOS lingo...
taxilian 13:06 it would be too suspicious if you deflected it to me
.....
lol
neilg_ 13:06 Wait, what?
lol
taxilian 13:06 hey, he is still around!
neilg_ 13:06 Um... No I'm not. I'm a tree in the background!
kylehuff 13:06 I should actually find a non-english speaking laborer to blame problems on. someone who weaves baskets or something completely unrelated.
taxilian 13:06 isn't that what Neilg_ does? I must have totally gotten him confused with someone else… ;-)
kylehuff 13:06 lol
neilg_ 13:06 Why, I oughta! ;)
taxilian 13:06 you oughta weave baskets?
neilg_ 13:06 And don't you forget it! lol
taxilian 13:06 so I'm trying to flesh out the keyboard events for cocoa
the cocoa abstraction should be pretty mature by the time I'm done
neilg_ 13:06 Oh, cool - that sounds good to me. What's changed?
taxilian 13:06 mousescroll event
linearray 13:06 taxilian: when is it a good idea to have separate plugin classes per OS, like BasicMediaPlayer does?
taxilian 13:06 oh, and the CoreGraphicsDraw event was passing bad bounds (I think that's my fault)
linearray: I think it depends on what you're doing
neilg_ 13:06 Aha! I admit I never tried that
linearray 13:06 it is the kind of abstraction you described, but it's on the plugin class
taxilian 13:06 for this webview class I actually created a webview class that extends PluginEventSink
like PluginCore does
and so when I create the webview class in AttachedEvent and give it a reference to the PluginCore object, it just pulls the window out and attaches itself ot the window
so it gets and handles all the window and ui events instead of doing it in the plugin
so I have one cross platform plugin class, but now I have a view controller class that does all my layout for me
I kinda like it
of course, most people dont' realize that in FireBreath the PluginCore object is actually an observer (PluginEventSink) of the PluginWindow (PluginEventSource) subject
or that you can have multiple observers attached to the same subject
so in this case, I call WebView::create and pass in the PluginCore object and the BrowserHost and it does all the rest
I can make calls to it to tell it to load html, pass objects into its page, etc, but I don't have to worry about any drawing; that's all done in a platform specific way
linearray 14:06 hehe, in fact i even had to get a drink
neilg_ 14:06 That actually sounds very cool :)
taxilian 14:06 hehe
linearray 14:06 definitely the former
taxilian 14:06 lol. of course, when you expect to need help from someone it's not really politic to call them crazy, so...
linearray 14:06 :D
taxilian 14:06 hmm. there doesn't seem to be anything in the current keyboard abstraction to support modifier keys
that's weird
taxilian 14:06 hmm. I guess NPAPI doesn't give us modifiers
so it makes sense =]
hmm again; it does, but only sorta. this is confusing
… or maybe it does
grr
neilg_ 15:06 We get modifiers (if you're talking about Cocoa)
taxilian 15:06 yeah, we do
looks like carbon we do too
neilg_ 15:06 I... used to log them. ;)
taxilian 15:06 it was just documented funny is all
well, now I need to figure out how best to handle them and pass them through
because I need them on the other side :-/
neilg_ 15:06 You've just describe the NPAPI documentation to me!
taxilian 15:06 lol
true
hence FireBreath
neilg_ 15:06 :)
taxilian 15:06 and yes, I do remember your experiments in logging…. ;-)
FireBreathBot 15:06 Commit e85338b on master by Richard Bateman: "Improved Cocoa key events" http://goo.gl/4LxgY
taxilian 16:06 anyone want to play with the WebView? I just got permission to put it into FireBreath
linearray 16:06 what exactly does it do?
taxilian 16:06 gives you an html interface
it actually embeds a web browser in your plugin
and you can expose arbitrary JSAPI objects (or any variant, really) to its DOM
linearray 16:06 this is starting to feel like inception
taxilian 16:06 lol
well, the advantage is that the HTML could live inside your plugin
and is isolated from the outside DOM
so it isn't vulnerable to XSS attacks
kylehuff 16:06 hmm, this could be useful
taxilian 16:06 or, you could load the HTML page from a remote HTTPS server
but you control where it comes from
and it could have access to APIs that aren't accessible to the page
linearray 16:06 this definitely sounds interesting
FireBreathBot 16:06 Commit f151bd7 on master by Richard Bateman: "Added the WebView FireBreath Library" http://goo.gl/xCAv0
taxilian 16:06 doesn't it, though?
does not work on linux
I invite anyone who wishes to to fix that
it's still incomplete on Mac
but useable
linearray 16:06 ok, so this helps against reflected XSS
but persistent XSS can still occur
taxilian 16:06 define persistent XSS?
('cause I'm pretty sure we can cover it.. ;-))
linearray 16:06 when an attacker manages to store malicious JS on the server
which is then served to clients
taxilian 16:06 yes, that is true; I don't consider that XSS, I guess, I consider that having your server hacked
linearray 16:06 well,
taxilian 16:06 I use a static page with no external JS dependencies for the internal UI
that way there is very very little that can go wrong… other than somehow your server being hacked and that file replaced
linearray 16:06 sure
classic example is message board
when you don't sanitize HTML input
taxilian 16:06 right… you *never* use dynamic html inside this
and that solves that issue
linearray 16:06 :)
taxilian 16:06 you still have to be intelligent
but the point is that outside your plugin where you *do* have dyanmic content if there was some form of XSS and you had sensitive APIs on your plugin (scanning hardware, accessing webcam, loading file data, etc) you could really be hosed
this lets you provide a controlled environment for that
linearray 16:06 I see
Feeling 19:06 hi all~
how to Implement MFC Dialog(Modal) in firebreath?
taxilian 19:06 be back later
busy now
Feeling 19:06 ok
taxilian 19:06 I don't know of any way to use any MFC things in firebreath, however
you should be able to use ATL calls, though
and anythign modal *must* be on another thread
DanielX 19:06 I have a question about packaging a FireBreath plugin as a Chrome extension. In the manifest I have "plugins": [{ "path": "npBoomstickJavaScriptJoystickSupport.dll", "public": true }, { "path": "npBoomstickJavaScriptJoystickSupport.so", "public": true } ], these work for Linux and Windows, but I'm not sure how to add the OSX .so file or even if such a file exists.
Good news, it's been answered: http://stackoverflow.com/questions/6462023/packaging-an-npapi-plugin-for-chrome-using-firebreath/6462351#6462351
{ "path": "plugin-mac.plugin" }
taxilian 20:06 lol. I've even read that question; totally forgot
glad you found it
taxilian 22:06 Feeling: did you figure anything out?
FireBreathBot 22:06 Commit 8653800 on master by Richard Bateman: "Further fix for bounds w/ CocoaDrawEvent" http://goo.gl/X85yc
Commit ad37ef3 on master by Richard Bateman: "Fixed misc namespacing issues w/ HttpClient" http://goo.gl/7FK3t
Commit 584e312 on master by Richard Bateman: "WebView fixes on mac: mousemove, scrollbar colors" http://goo.gl/LLP3q
taxilian 22:06 neilg_: so I finally got mousemove events working iwth the webview on mac… I had to send them through as draggedEvents
....
?
Feeling 22:06 taxilian: i use WTL make Modal dialog
that is no problem.
taxilian 22:06 sounds like it should work
Feeling 22:06 yes
taxilian 22:06 just *make sure* you are doing it on a secondary thread
not the main thread
Feeling 22:06 interesting, could i ask why?
taxilian 22:06 because if you don't you will lock up the entire browser
not only is that extremely rude, but it will also cause ff4 and chrome to decide to ask the user if they'd like to kill your plugin
rule #1 of plugin development: NEVER (ever) under any circumstances should you ever (ever! No, seriously, EVER!) block the main thread
Feeling 22:06 but, there is no problem when i was develping Activex
taxilian 22:06 ActiveX works differently than NPAPI
don't expect them to be identical just because FireBreath abstracts a lot of the differences away
even on ActiveX it's not a good idea to block that thread
it's just slightly less problematic
with ActiveX you're using COM thread apartments
so your control is running in it's own thread
so it won't block the rest of the browser
NPAPI loads the plugin and does all javascript on the main plugin thread
and if that thread ever blocks it assumes the plugin has hung (if it's smart enough to, like chrome and ff4+) and kills it
Feeling 22:06 your mean IE hang when use modal dialog in npapi? because does all javascript on the main plugin thread?
taxilian 22:06 IE and npapi have nothing to do with each other
Feeling 22:06 oh ok, thanks very much
taxilian 22:06 but firefox, chrome, safari, and opera all do all javascript on the main thread
they are NPAPI
Feeling 22:06 ok i see
dougma 22:06 mmm... ie does javascript on the main thread too..
just don't block on your jsapi.
:)
Feeling 22:06 : ) my question is wrong, i mean browser hang when use modal dialog in napapi.
anyways, i know for that thanks
taxilian 23:06 hmm. my son set weird colors on my chat window
dougma: Actually, with the way we have things set up IE ends up doing javascript on a different thread (COM apartment), but it likely does blocking calls to it, so it amounts to the same thing
rather does calls to our plugin
Feeling 23:06 lol, what color?
dougma 23:06 right... apartments.
but yeah, same result.
taxilian 23:06 hmm. gone now, strangely.
it was a weird orange background color
taxilian 23:06 !findfile WebViewMac