|IRC Nick||Time (GMT-7)||Message|
I have a question about FB plugins, is anybody here who can help me ?
|reichi||05:01||AndreyOsipov: just ask
someone will answer sooner or later
|AndreyOsipov||06:01||I'm trying to call .NET assembly from FB plugin. I've created 3 dlls - native c++ dll (FB plugin), managed c++ dll (proxy between native and managed worlds), c# dll (contains main logic). All 3 dlls copied to a user directory (c:\windows\users\<user>\app data\roaming\company\product\188.8.131.52. Browser loads plugin correctly but when it call a C# function via managed c++ proxy plugins fails because browser can't load c# assembly.
Browser search dlls in the application directory c:\Program Files\Mozilla\... but dlls in the user directory. I tried to use manifest to declare paths to search but looks like it doesn't help, probaly where is another way to load dependent class libraries?
I've read about using managed code in browser plugins, I know it's not recommended but I have not another option. Interface between browser and managed code is relatively simple and managed logic is already completed and it would be very difficult to port it to native code.
|mkoch||06:01||what's the handle object I should use on Mac to refer to the pluginwindow (on linux it's Window hwnd; and on win it's HWND hwnd; )?
I found WindowRef so far, is that the one I'm supposed to store?
|taxilian||09:01||FireBreathBot: tell andrewyosipov you could try using the SetDllDirectory windows API to add to the search path and delayload the DLLs; dunno if that'd work with managed code or not.|
|FireBreathBot||09:01||taxilian: I'll pass that on when andrewyosipov is around.|
|taxilian||09:01||mkoch: Mac drawing it depends on what drawing model you're using
CoreGraphics it's the CGContextRef
yes, that I found in the meanwhile too
my problem is that atm it appers to be a NULL pointer
I tried to get it with getDrawingPrimitive()
|taxilian||09:01||mkoch: it is only valid during the duration of a CoreGraphicsDraw event|
|mkoch||09:01||then I'm still confused... what's the proper way to periodically redraw a cg layer?|
|taxilian||09:01||to draw when you get a CoreGraphicsDraw event, and when you need one call InvalidateWindow|
|mkoch||09:01||how can I invalidate the window? with the sendEvent method?|
|taxilian||09:01||with the InvalidateWindow method
|FireBreathBot||09:01||Found 4 possible matches. Displaying 4
/^void PluginWindowWin::InvalidateWindow() const$/ (f) found in src/PluginAuto/Win/PluginWindowWin.cpp: http://goo.gl/NdqTe
/^void FB::PluginWindowlessWin::InvalidateWindow() const$/ (f) found in src/PluginAuto/Win/PluginWindowlessWin.cpp: http://goo.gl/pMsj1
/^void PluginWindowX11::InvalidateWindow() const$/ (f) found in src/PluginAuto/X11/PluginWindowX11.cpp: http://goo.gl/dkUR9
/^ typedef boost::function<void (uint32_t, uint32_t, uint32_t, uint32_t)> InvalidateWindowFunc;$/ (t) found in src/PluginAuto/Win/PluginWindowlessWin.h: http://goo.gl/UqJZ9
|taxilian||09:01||heh. well, despite what ctags thinks there is one on PluginWindowMac as well|
|mkoch||09:01||so, I have to map the FB::Rect bounds(evt->bounds);
return redraw(bounds, cgContext);
|taxilian||09:01||take a look at the BasicMediaPlayer example; it has code that draws with CoreGraphics|
|mkoch||09:01||yes, but it doesn't animates it
it draws a still image when the window is attached
|FireBreathBot||09:01||Found 1 matching file(s) in the master branch. First 1 are:
|taxilian||09:01||another thing you can do is use StartAutoInvalidate on the PluginWindowMac
which starts a timer to run at the rate you specify (say 1.0/30.0) and calls InvalidateWindow for you
|mkoch||09:01||just like the invalidating CA in the basicmediaplayer example?|
|mkoch||09:01||I thought it will work only on CA|
|taxilian||09:01||nah, it's on the base class
check that next time ;-)
|linearray||10:01||any simple examples for a custom logger?|
|taxilian||10:01||hmm. not that I can release
it's not real hard, though
basically you just have to implement all the functions defined in logger.h
and set a cmake variable in your PluginConfig.cmake
second, not the first =]\
|FireBreathBot||10:01||Found 1 matching file(s) in the master branch. First 1 are:
|taxilian||10:01||yeah; you need functions for trace, debug, info, warn, error, and fatal; you need initLogging and stopLogging. that's it|
|linearray||10:01||I'll just copy log4cplus.cpp for a start|
what logger are you using?
|linearray||10:01||the default one|
|taxilian||10:01||I mean what do you plan to use when you do your custom logger|
|linearray||10:01||I want to remove the filename from the output|
|taxilian||10:01||you could just add something to the abstraction to control that
though I guess that could be a bit trickier
|linearray||10:01||add another layer of abstraction :)|
|taxilian||10:01||heh. don't need another layer, just another customization point =]|
|linearray||10:01||how about getting rid of NullLogger at the same time?|
|linearray||10:01||ok, if we use PatternLayout instead of TTCCLayout we can let the user choose his preferred layout (while providing a sensible default)
furthermore we could let the user customize FB::Log::trace/debug/... e.g. register a callback for these functions, with the existing functions as default
|taxilian||10:01||hmm. I'm a little concerned about the customize idea simply because log statements get called a lot and the more function calls you're making the more of a performance hit they end up being; I'm certainly open to adjusting the pattern stuff
particularly if it doesn't break backwards compatibility
|linearray||10:01||I'll put it on the list
now back to more fun with sqlite
|taxilian||10:01||I will warn you that I probably won't find time to do that myself anytime soon; I just don't have time|
|linearray||10:01||of course not, I meant I would do it|
I thought you meant add it to jira
which is also fine, of coures
|FireBreathBot||12:01||JIRA issue http://jira.firebreath.org/browse/FIREBREATH-157 issue created by colinblake
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-157 issue resolved by richard "Unfortunately, I don't know of a fix for this; simply use GetProperty without HasProperty and che..."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-157 issue commented by colinblake "So you're saying that with IE HasProperty will *always* return true?"
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-157 issue commented by richard "under certain circumstances, on certain configurations, in certain doctype modes, yes; it depends..."
|jpteasdale||15:01||Can I complie for ppc, i386 and x86_64 while still supporting os x 10.4? I've gotten it to work on ppc, i386 but when I try to support x86_64 too I can no longer use the 10.4u SDK and my plugins won't load on 10.4|
|taxilian||15:01||correct; you can't build both ppc and x86_64 with the same SDK
however, do you really need x86_64?
because 64 bit browsers on mac will still use 32 bit plugins
|jpteasdale||15:01||Firefox makes me restart in 32 bit mode|
|taxilian||15:01||it's never made me do that
and I have a ppc/x86 plugin that I maintain
I'll look into that more
I have to use 10.4u then?
|taxilian||15:01||to do ppc, yes|
|jpteasdale||15:01||tax, are you sure your version on firefox is not automatically starting in 32-bit mode?|
|taxilian||15:01||well, does firefox 9 on mac os 10.7 do that by default?
'cause I certainly haven't changed any of the default settings relating to the launch mode
|jpteasdale||16:01||I can't find a conclusive statement. If you go to 'Get Info' you can see if 'Start in 32-bit mode' is checked. Having to restart does seem to be a common issue with plugins.|
|taxilian||16:01||well, it's possible there is something new that I haven't seen that keeps 32 bit plugins from working nicely; if that is the case, then you'll have to build two different versions; one for ppc, one for i386/x86_64; I don't know of any way to put all three in one|
I'll go with the double plugin for now. If I find out why FF-64 bit can't load it (it's pretty simple) I'll update here/
|taxilian||16:01||I would appreciate that|
|taxilian||16:01||if you say so
but as a general policy?
|FireBreathBot||16:01||If you need help, just ask your question and wait for people to come back.|
|hyrey||16:01||Fine then, sorry, was just trying to be cordial. My firebreath project seems to break intellisense in VS2010. It takes absolute ages to parse, and when it has it only lasts for 30 secondsish until I make a change, and then it begins to reparse, I assume. I'm wondering if this is a common thing for projects this size as I've never really tackled a solution that has 10 projects in it.|
|taxilian||16:01||no worries, just trying to help you know how to get help =]
I think part of the problem is that vs2010 doesn't seem to handle large numbers of includes well; unfortunately, one problem with boost is that it has a *lot* of includes. all large projects have this issue to some extent, but boost seems to agrivate it a *lot*
unfortunately, boost provides too many benefits for us to consider removing it just because it slows down intellisense :-/
|linearray||16:01||for me it works ok-ish, and I run it in a VM|
|taxilian||16:01||it might be possible to somehow make better use of precompiled headers to speed that up; I have wanted to try it for awhile, but it's not a real simple problem to tackle :-(
you can build from the command-line; many use that approach particularly when running vs in a VM
gotta run; need to go get a shot. be back in 30-35 min
|hyrey||16:01||Understandable, definitely. So boost is the culprit, eh. Firebreath is an incredible platform and I intend to use its every capability one day, but I am trying to write a plugin that will use my own libraries, so I don't really much need boost/FB core. The main advantage of trying to get a plugin written using Firebreath is that it's compatible with all the major browsers, whereas when I've been trying to build a plugin from scratc
compatibility issues between most of the browsers.
That's not really a question. Just frusterating to not be able to get it to function for me.
|taxilian||16:01||honestly I think you'd be silly not to use it… granted I'm a bit biassed. However, I've also written such a platform from scratch, and I can tell you that the (relatively) minor inconveniences of dealing with cmake and boost are far less expensive in terms of development and maintenance time than doing it all from scratch|
|hyrey||16:01||I can absolutely see that ;)|
|taxilian||16:01||anyway, I gotta run. be back in awhile|
|hyrey||16:01||Cheers, thank you|
|trenton||20:01||can't i use static libraries those end with .a (mac osx) with firebreath? what i saw from documentation is, i need a dynamic library|
|taxilian||21:01||FireBreathBot: tell trenton you can use static libraries; just put the path to the library in your target_link_libraries command|