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

IRC Nick Time (GMT-7) Message
zmichl 07:01 Hi, with the latest Git version of FB I get Linux plugin depending on gtk even if FB_GUI_DISABLED se set to 1
Wolfmanfx 07:01 Hi does anybody know a good way to deploy an browser plugin so that the user just clicks an button an the install process starts like thhe
Google chrome install in ie
iaincollins 07:01 hey Wolfmanfx
Wolfmanfx 07:01 Hi
iaincollins 07:01 the trick to on-click installs in MSIE and FireFox on Windows is using Microsoft's ClickOnce deployment
Wolfmanfx 07:01 What i already did is to use a java applet to deploy a custom plugin
ClickOnce i know from the c# world
Can i do clickonce stuff with nsis?
iaincollins 07:01 Yeah, it is possible if you request partial trust, that's what I am doing at the moment (with a signed ClickOnce application)
video here, if you have quicktime installed: http://downloads.talktalk-labs.com/plugin-install-video/
it happens to run a Win32 exe which installs the msi by calling msiexec (but of course you could do that from C#)
Wolfmanfx 07:01 Thx will watch it... But is there also described how to sign the app
iaincollins 07:01 other ways for easy install are:
the signing is fortunately quite easy in Visual Studio for ClickOnce apps, once you done it once
(I use Comodo for my certs, as they are reasonably priced, great root certificate penetration (better than new Verisign certs infact), and they have great support articles for everything from Visual Studio to Apache SSL config)
Wolfmanfx 07:01 Ok then i will watch the vid thx for the info :)
What is the prcing for a certificate
iaincollins 07:01 ClickOnce also works in Firefox 3.6, if they have the Windows Presentation Foundation plug-in installed, which is installed 'sneakily' (but handily) by some .NET packages
I'm not sure, but I don't think it was much more than 100 GBP a year (might have paid 300 GBP for 3 years I think)
Wolfmanfx 07:01 Thats not that much
Super
iaincollins 07:01 I *think* the browser might refuse to allow users to run a ClickOnce application that requires partial trust (i.e. to run an app like an MSI) unless it's signed, but am not 100% sure of that.
Other ways that might be of interest are:
1) Firefoxes own packaging system (specific to Firefox). They have changed what they are using for that fairly recently (so Plug-ins are supposed to use the same installer API as Extentions/Add-Ons now).
2) For IE you can embed the active x control in a .cab file
(which will prompt showing up the yellow bar along the top of the Window on first run)
I think that's it though
Wolfmanfx 07:01 Plugin deployment is a really breoad area
iaincollins 07:01 I gather there is some sort of API for Google's similar "OneClick" plug-in, I am not sure if that's Google specific or open for other developers though
yeah!
I was thinking of using Java app to boot strap installation on Mac OS X actually
Wolfmanfx 07:01 Do not know if its better to use an applet for the install process
Every browser want another install process
iaincollins 07:01 yeah :-(
Wolfmanfx 07:01 Which will cumbersome to maintain
iaincollins 07:01 I have some trouble with ClickOnce on Firefox actually
Wolfmanfx 07:01 Does clickonce work with safari/ opera
iaincollins 07:01 looks like if you have some combination of .NET, you can have the Microsoft Plugin that makes ClickOnce work installed, but it doesn't work correctly
no :-( MS made it Forefox specific, for some weird reason
Wolfmanfx 07:01 That so typical
iaincollins 07:01 That's why I have C# call a win32 app (and present the win32 app for direct download in case its' not found)
indeed :/
demo here if you like: http://www.talktalk.co.uk/selfhelp/what-are-my-wireless-details.html
it's pretty basic, Windows only and we still have some issues with the install on Firefox with some odd systems (where it gets confused about .application files, due to that issue I mention above), but gives you some idea of the installation process
it just installs the MSI from Firebreath (with some slight changes listed here: http://www.firebreath.org/display/[email protected]/Potential+Installer+Improvements ) so can be removed via add/remove programs
th0b0r0 07:01 hello. anyone around?
currently trying to get rid of the black pane that is shown in chrome after embedding a newly created plugin (FB_GUI_DISABLE=1)
any ideas?
of course, doing a width="0" height="0" on the embed tag works fine but i don't want to have to do that
IsWindowless returns true
taxilian 08:01 th0b0r0: what platform?
th0b0r0 08:01 linux x86 chrome
or rather npapi ;)
taxilian 08:01 zmichl: you're correct, the gtk dependency still needs to be correctly fixed; I haven't had time to work on this in the last little bit
th0b0r0: hmm. To be honest, I've never tried it on linux; windowless support on linux may not work
I'm sure it could work with a little help, though; problem is I don't know much about linux gui development
zmichl 08:01 taxilian: ok, thanks. I returned to the Git version from Dec 2, which works fine :)
taxilian 08:01 zmichl: it only sorta works fine =] you realize that the dependency doesn't actually cause problems unless you don't have the libraries on your dev box, right?
th0b0r0 08:01 mh, well. i'm not linking against gtk or the like due to FB_GUI_DISABLE. i'm just confused as to why i still get that black box.
taxilian 08:01 zmichl: there isn't any increase in size, and any browser that this will run on will have those libs
th0b0r0: FB_GUI_DISABLE probably isn't fully functioning correctly right now, unfortunately
th0b0r0 08:01 well, it works when passed to genmake.sh
taxilian 08:01 these are things that can probably be fixed easily enough, just needs someone to take the time to do it; if you're interested I can try to help
th0b0r0 08:01 but yeah, i'll just wait for updates :)
taxilian 08:01 really? that's weird :-P
th0b0r0 08:01 :)
well, at least it stops linking against gtk etc. so i'd say it works.
some other question: how can i link against additional libraries?
taxilian 08:01 interesting. zmichl: there is a shorter term solution, then :-P Pass FB_GUI_DISABLED=1 on the command line to prepmake
th0b0r0 08:01 -DFB_GUI_DISABLED=1
taxilian 08:01 th0b0r0: http://www.firebreath.org/display/documentation/Using+Libraries
th0b0r0 08:01 thanks, overlooked that apparently :)
taxilian 08:01 too much to do… I need to reorganize the documentation on the website and write some new docs in addition to all the dev work
zmichl 08:01 yes, I'll try it :)
taxilian 08:01 if anyone is willing to help on the website docs, please let me know =] I can direct traffic, but I just don't have time to do everything that really ought to be done
th0b0r0 08:01 :)
zmichl 08:01 th0b0r0: I guess that the black pane is made by the browser (it's just area defined by the embed or object tag). I have white pane in Firefox ;)
taxilian 08:01 well, I think the windowless stuff just hasn't been implemented in linux
th0b0r0 08:01 mh ok, zmichl
taxilian 08:01 for the simple reason that we don't know how to do windowless plugins in linux because none of the currently active developers (really just me in the last month or so) are any good at linux gui stuff
so even FB_GUI_DISABLED doesn't put it in windowless mode
th0b0r0 08:01 mh ok :)
taxilian 08:01 I might be able to fix that, though
just need to find time
zmichl 08:01 th0b0r0: so defining width="0" height="0" should be fine
taxilian 08:01 that's what I'd do
th0b0r0 08:01 yeah.
taxilian 08:01 I'm just hoping eventually someone will come along who knows linux gui and is willing to help a bit
interestingly, most people who want to do plugins on linux don't care about gui, it seems
th0b0r0 08:01 i see no real reason for doing any gui in a browser plugin at all tbh. other than wanting to add opengl features... but webgl takes part of that these days
taxilian 08:01 that's the main thing; games and video
if you do those, you need to draw
if you don't, you can use html and a hidden plugin =]
th0b0r0 08:01 nowadays there's canvas though, solving all your problems :)
taxilian 08:01 hehe. the video I've done would not be possible on Canvas
th0b0r0 08:01 true.
taxilian 08:01 nor I suspect the level of 3d games that most game plugin devs work on
but yeah, it's definitely improving
th0b0r0 08:01 mmh, that's true, too.
taxilian 08:01 I really don't think video will ever stop needing plugins. Little things like youtube can probably use html5 video okay, but full-length video? Definitely not with the current standards
zmichl 08:01 th0b0r0: Hmm, so I was wrong. When I remove type attribute from the object tag, the white pane disappear in the Firefox.
taxilian 08:01 but then, the plugin I used to work on let me watch near-DVD quality video over my cell phone connection without buffering
th0b0r0 08:01 taxilian: why not? there is mp4 and whatnot. still, I'll always prefer a native player to anything plugin-based.
that's neat.
taxilian 08:01 zmichl: if you remove the type attribute, the plugin won't load
th0b0r0: it isn't the format, it's the delivery. the only technology that can currently deliver a good reliable video stream wtihout buffering on any connection is Adaptive Streaming, which changes profiles (bitrates) depending on your network latency, etc
th0b0r0 08:01 mh k
zmichl 08:01 taxilian: sure, I know ;) I just tried if the white pane is caused by the object tag itself or by the inserted plugin
taxilian 08:01 yeah, it's the plugin :-P
th0b0r0 08:01 is there any documentation on creating a custom js class?
taxilian 08:01 there are 4 types of adaptive streaming right now that I know of, and only one works in html5 — Safari on Mac OS 10.6
th0b0r0 08:01 eeh custom js object
taxilian 08:01 you mean for working with FireBreath plugins? install / detection / etc?
th0b0r0 08:01 no
taxilian 08:01 you mean a custom JS object *with* firebreath?
th0b0r0 08:01 calling myPlugin.createObject(1); <- returns new object, managed from c++
taxilian 08:01 that's easy
this isn't a question of "has there been discussion about", that is what firebreath *does*
just return a JSAPI object
th0b0r0 08:01 i know.
ok
taxilian 08:01 there is an example in FBTestPlugin
th0b0r0 08:01 oh, so i just do the same that the factory does? mkay
taxilian 08:01 pretty much, yeah
that's the root JS object
but you can return as many as you want
th0b0r0 08:01 sweet…
taxilian 08:01 from anything that you can return from — methods, properties
https://github.com/firebreath/indexeddb <— this project has a ton of JSAPI objects
like, 10-20
th0b0r0 08:01 yeah
taxilian 08:01 if you're using the latest dev from github you can even just return a boost::shared_ptr<yourapitype>
th0b0r0 08:01 i am.
taxilian 08:01 excelent. =]
well, I gotta go take a shower and get ready for school. just wanted to drop in and see how everyone is doing
I'll be back on in a couple hours
th0b0r0 08:01 haha, cya.
glad that my school only starts next monday
taxilian 08:01 glad that this is my last semester
th0b0r0 08:01 :)
th0b0r0_ 08:01 what're you studying in uhm, dresden?
bye
th0b0r0 09:01 wb
and bye again ;)
th0b0r0 10:01 yay. my javascript joystick interface is done. firebreath really rocks :)
and it just took me ~3h :D
taxilian 10:01 th0b0r0: it's hard to argue with your logic
=]
th0b0r0: also, if you're interested, there are some as-of-yet undocumented JSAPI/FB::variant features in the dev branch, such as optional parameters
and boost::variant support
jtojanen 12:01 Taxilian, you had problems applying the patch?
taxilian 12:01 I think I got it; I just had to do it manually
I've seen some occasional errors, though, since I changed to Appartment
trying to remember the exact error
something about handling a synchronous input request couldn't handle output
when trying to call Invoke
jtojanen 12:01 we may need to use mutex here and there to serialize access; for example if reentrant is possible
taxilian 12:01 well, there is a case where the browser calls into us and we may call back to the browser while handling that call; is that not okay?
jtojanen 12:01 or use the ugly IMessageFilter to check inbound calls
taxilian 12:01 for example we want to call a JS function to find info that we need to know in order to respond to a method call on our interface
we already serialize all calls from us into the browser so it all happens on the main thread
th0br0_ 12:01 btw, should the error msg from a FB::script_error be printed in the js console?
on chrome i only get a "error calling method on NPObject" message
jtojanen 12:01 Normally all those calls in and out should work..
taxilian 12:01 that's not from FB::script_error
I gotta take care of some things at school; I'll be back later
th0br0_ 12:01 i know, that's why i was asking :(
jtojanen 12:01 th0br0_, you should get Javascript exception when FB::script_error is thrown from plugin
th0br0_ 12:01 mh, looks as if chrome doesn't like FB then.
i get a javascript exception, yes. but not my error message
(chrome 10 that is)
jtojanen 12:01 * have to test that Chrome exception *
taxilian 12:01 th0br0_: error calling method on NPObject probably means an exception that wasn't caught
but I could be wrong
I'd have to see an example
does it happen in FBTestPlugin?
th0br0_ 12:01 let me ask the other way round: how can i report a custom error message back to the browser?
taxilian 12:01 by throwing FB::script_error("message")
th0br0_ 12:01 right. that's what i'm doing. however, that results in said "error calling method on NPObject"
taxilian 12:01 does it work in Firefox?
th0br0_ 12:01 haven't tested there yet tbh
1 sec
taxilian 12:01 there are two possibilities; it could be that there is something extra going on that you don't realize. it could also be that Chrome isn't correctly implementing NPN_SetException
th0br0_ 12:01 http://code.google.com/p/chromium/issues/detail?id=26764
that answers the question
but it says fixed
taxilian 12:01 well, that sounds like it
so I don't know
if it's a chrome issue, there probably isn't much I can do to help
th0br0_ 12:01 nope, ff4b9 does the same.
1 sec, looking up some code to paste
JoystickPtr thJoyAPI::getJoystick(int index) { if(!(index >= 0 && index <= numJoysticks())) throw FB::script_error("getJoystick: index out of range.");
ops
http://pastebin.ca/2039751
jtojanen 12:01 interesting because same kind of exceptions work perfectly with ff 3.6
th0br0_ 12:01 :(
right. g2g now, cya.
taxilian 13:01 huh. my work laptop has a touchscreen
that's weird
jtojanen: back on the earlier issue I mentioned, I've only seen it for sure when using a debugger, so it's possible it doesn't come up in the "real world"
just makes me nervous
jtojanen 13:01 might be some kind of timing issue; everything works with debug build and crashes with release :)
taxilian 13:01 hmm. I haven't tried a release build in awhile
I'll try it
jtojanen 13:01 sent you email; patch attached
taxilian 13:01 I got it; I actually just finished committing the patch, I hope, to my personal repo; can you take a look at it and test it? http://github.com/taxilian/FireBreath
does your release crash happen in FBTestPlugin as well?
jtojanen 13:01 I havent' had crashes that would be FB related in release version
taxilian 13:01 ahh, okay
jtojanen 13:01 My crash usually is related to some kernel event (e.g PnP device events)
taxilian 13:01 I'll double check anyway, though =]
ahh
jtojanen 14:01 took some time, but ~FbPerUserRegistration isn't patches
it should contain if (m_mapping) ::RegOverridePredefKey(HKEY_CLASSES_ROOT, NULL);
taxilian 14:01 ahh, you're right, I missed that
try it now
pushed change
jtojanen 14:01 are you using this Sleep(10000) to have time to attach debugger in DllRegisterServer?
taxilian 14:01 yeah; it actually interrupts the sleep when the debugger attaches
jtojanen 14:01 DebugBreak()
taxilian 14:01 Guess that's an option too :-P I always forget about that one
jtojanen 14:01 During these tests I got pissed by who Visual Studio debug regsvr32
taxilian 14:01 ?
don't understand
I didn't leave that in, did I?
jtojanen 14:01 no no.. i replace sleep with debugbreak before i start
it works now
taxilian 14:01 hehe. okay
jtojanen 14:01 by full truth we will get tomorrow (Finnish time) when I test it with Vista that had problems
taxilian 14:01 cool
jtojanen 14:01 old code had problems with error checking too; it used FAILED(hr) macro, but functions return Win32 error codes like E_ACCESSDENIED
taxilian 14:01 what version of visual studio are you using?
jtojanen 14:01 2005
taxilian 14:01 ahh
I use 2008 or 2010, so I haven't tested the workaround real heavily
jtojanen 14:01 but i checked 2008 what happens with AtlSetPerUserRegistration
as that is THE alternative to these fixes
it seems to set a global flag but i could not found where the flag is used during the registration
this whole per-user versus per-machine installation still needs work
we should find a way to define HKCU in case per-user and HKLM when per-machine installation in .rgs
somehow pass the info to replacement map
taxilian 14:01 I'd really rather just write our own .rgs parser, etc. I don't trust the ATL one... too much varies between versions, too little documentation, etc
but I don't know if that's really worthwhile or not
jtojanen 14:01 have you ever tried to ditch the whole ATL?
Visual Studio Express versions lack ATL; okey you can use WDK
taxilian 15:01 I would like to
it has long been a dream of mine
however, I lack the experience with COM to do it all myself
currently it's set up to allow you to use the DDK to get ATL and MFC and build that way
if you use vs express
well ,I think I better go get some lunch; I'll be back later
jtojanen 15:01 for starters you could start using boost::intrusive_ptr instead of CComPtr
template<typename T> inline typename boost::enable_if<boost::is_base_of<IUnknown, T> >::type intrusive_ptr_add_ref(T * pObject) { pObject->AddRef(); }
template<typename T> inline typename boost::enable_if<boost::is_base_of<IUnknown, T> >::type intrusive_ptr_release(T * pObject) { pObject->Release(); }
i am using intrusive_ptr instead of CComPtr because it allows to refcount class instead of single interface
mainly used to implement pimpl
taxilian 16:01 jtojanen (when you get back): if you have any time, I'd be interested in seeing what suggestions you'd have in that direciton; I'm perfectly okay with using boost::intrusive_ptr, I just don't know the insides of everything involved well enough to do it quickly, so that reduces the options to what I have time for. If you set up a fork on github (you can even use subversion to access it, tested this today and it works fine) you could send me changes/patches/suggestions easier
taxilian 16:01 darn peer is resetting your connection again, _neilg_... you should sock 'im a good one