IRC Log Viewer » #firebreath » 2011-02-14

IRC Nick Time (GMT-7) Message
saiaman 03:02 hello
i'm trying to use fb now on an xp with VC++ 2010 express
i've installed DDK but still have some problems
-- Visual Studio dir: C:/Program Files/Microsoft Visual Studio 10.0 CMake Error at cmake/Win.cmake:112 (message): FireBreath on windows requires ATL/MFC libs to be installed. Please download the Microsoft DDK and install the build environments in C:\WinDDK Call Stack (most recent call first):
iaincollins 03:02 Hi saiaman
saiaman 03:02 hi iaincollins
iaincollins 03:02 I am not sure about using Visual Studio Express, but know about the ATL dependancy
saiaman 03:02 any idea ?
iaincollins 03:02 Did you use this version? http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx
saiaman 03:02 yeah
iaincollins 03:02 I am not sure if you need to select a specific option as part of the install process, but there seems to be a note about that here:
http://www.firebreath.org/display/documentation/Building+with+Visual+Studio+Express
saiaman 03:02 yeah the build environment checkbox
it's done
iaincollins 03:02 Had to install the DDK for a collegue still on VS2005 recently to get ATL libs, although we didn't seem to need to do anything special
Hmm this might help:
http://groups.google.com/group/firebreath-dev/browse_thread/thread/b5d7817a236b1e84
saiaman 03:02 i'll try
the only thing i've changed is that i installed wdk on another location
it's not C:\WinDDK but D:\WinDDK
iaincollins 03:02 hmm Hmm you could try making a symbolic link, seeing if that helps
e.g. cmd>mklink /J C:\WinDDK D:\WinDDK
(I *think* that works fine across drives on Windows...)
saiaman 03:02 unable to fin mlink :s
iaincollins 03:02 oh are you on XP?
saiaman 04:02 yep
iaincollins 04:02 heh, then maybe no joy :) not sure if there is anything for that for XP
saiaman 04:02 :(
i'll try installing on default location
iaincollins 04:02 Oh maybe you are in luck :)
http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx
(I was thinking it's an NTFS thing so their might be a tool for that for XP)
if that does resolve it let me know and I'll update the FAQ to stress that
saiaman 04:02 ok thanks
neilg_ 09:02 Morning/afternoon all!
I need to get better at setting my away status... lol
taxilian 09:02 =]
swingburner 09:02 hey guys
taxilian 09:02 morning
FB_GitHubBot 09:02 FireBreath: firebreath-1.4 Richard Bateman * 941c96c (1 files in 1 dirs): Added support for DDK_PATH env var - http://bit.ly/g48VZu
swingburner 09:02 could do with a little advice on firebreath
taxilian 09:02 saiaman: update to the latest 1.4 branch and then set environment variable DDK_DIR to the path of your DDK (D:\WINDDK)
should fix your issue
swingburner: go for it
I'm about to eat breakfast, so I might answer slowly
but I'll be back in 20 min and if nobody else has been able to help I will help you then
swingburner 09:02 we've recently built a web based application using reporting services. one aspect of the software is printing labels. however we're using an activeX PrintControl, which is causing all sorts of permission issues. After searching around the net, we've come across firebreath... I'm wondering how difficult it is to build a print control in firebreath for all browsers, so we can replace the printcontrol class in reporting ser
taxilian 09:02 well, you'll have the same permissions issues
but it would be possible to make it work on all browsers
FireBreath plugins work on IE as an activex control still
so the permissions issues would be the same
swingburner 09:02 i see... but on other browsers, such as chrome and firefox, is there a work around? we don't like printing from browsers, but we don't have the knowledge to create client application to receive data from the server in order to print the label.
our developer would look at using firebreath to create a print plugin if we could simplify printing from other browsers.
taxilian 09:02 so a lot depends on how you are doing the printing
if you are just using javascript to send data to a plugin that knows how to print, that sounds totally doable
if you're actually printing the page using the browser print function and you need your plugin to be "printable" that's harder, because nobody has gotten around to adding support for that to FireBreath yet
but still doable, since NPAPI supports it
swingburner 09:02 i see... i've just spoke to our developer, he says that we just use the PRINTCONTROL class to extract html data from reporting services and format it to a printable page in the label size. it then opens standard print dialogue box.
taxilian 09:02 okay; that would probably work across browsers
swingburner 09:02 what we need is a plugin to talk to reporting services, get the HTML and format a page to print and send the information directly to a printer in a certain size (i.e. orientation, margins, etc) depending on label size
now, the final thing is that darren (the developer) does not know enough about c++ to write the plugin. We would be willing to donate to firebreath and pay someone to help assist in building the plugin...
taxilian 09:02 what is your timeframe?
swingburner 09:02 as soon as possible really, but it depends on the timeframe to write the plugin i suppose? we have the software working through I.E. It's just not perfect and how we want tyhe
the print element to work..
taxilian 09:02 well, you're welcome to ask if anyone in here has time to work on it for you; I am completely swamped for at least the next month
iaincollins 09:02 One option is to just use printable CSS (which is very flexible, but need propritaory markup to handle in IE)
or just to generate a PDF server side (from HTML) that people can print
Printing CSS is very under-used but super powerful
taxilian 09:02 agreed; a PDF is how I'd probably tackle the problem
swingburner 09:02 yes, a PDF is an option, however, the users print many types of labels, probably 50 a day, so downloading 50 PDFs is a bit messy. Darren thinks the report is too complicated to use printable CSS?
taxilian 09:02 well, as a general rule of thumb
iaincollins 09:02 Hmm, you can do text tranforms (e.g. rotation) and stuff, so it's fairly flexible
taxilian 09:02 don't ever use a plugin (or activex control) when something lighter weight will do
in my experience downloading PDFs isn't really that bad
as for CSS? I dont' know. it depends on what you need. what type of data are you displaying?
swingburner 09:02 if u don't mind, i can give you the website and demo login for you to look at the problem... www.chemsoftware.co.uk/sdsonline.
company: demo, user:demo, pass:test
iaincollins 09:02 swingburner: I'll take a look
swingburner 09:02 in the menu, if you go to "labelling", then "print label"
you can type in product code F5001 and search
you put batch, weight and quantity then BUILD LABEL
iaincollins 09:02 Hmm I get nothing when searching for that prodcut code
swingburner 09:02 at that point is where we need to replace the PRINTCONTROL Active X
sorry
001
f code is a customers product...
iaincollins 09:02 kk
swingburner 09:02 :)
the final label designs and sizes haven't been determined yet, but you get the idea of what needs to happen
taxilian 09:02 this all looks totally doable with CSS
iaincollins 09:02 yeah
taxilian 09:02 granted, I haven't seen the actual label the activex control uses
it won't load for me
iaincollins 09:02 you'd probably need to test a bit in different browsers, but with fluid markup CSS should be able to do it fine
taxilian 09:02 if it has to look exactly the same each time on all browsers I'd use a PDF still
swingburner 09:02 the print control is activex and only works in i.e.
taxilian 09:02 but that's really not as heavy as you might think; PDF is a pretty lightweight file format when you generate it properly
yeah, doesn't seem to work for me on windows 7 ie 8
iaincollins 09:02 you can trigger the printing from JS so can do it pretty automagically
swingburner 09:02 yeah, i meant from a user point of view
taxilian 09:02 so either of those options would probably work; I think you'd be crazy to use a plugin or activex control for this
swingburner 09:02 i see
so u definitely think pdf is the best way forward?
taxilian 09:02 that's how I'd do it; CSS isn't a bad way to go either, though. it just depends on how specific your labels need to be
iaincollins 09:02 I would say PDF or printable CSS (which I really suspect would be fine for that) would be easier
taxilian 09:02 how precise, I guess
iaincollins 09:02 yeah, the CSS might vary a little
(i.e. not pixel perfect in all browsers, but very similar)
taxilian 09:02 I've never generated a PDF with ASP, but I'm sure it's doable; I've done it on web systems written in PHP and Python and it worked great
iaincollins 09:02 You might even be able to display the PDF automatically embedded in a document and then call a JS function to bring up a print dialog
so users would not need to download it first, but I am not 100% sure if that's possible
taxilian 09:02 hmm. you could probably do it in an iframe, but it wouldn't work correctly on most mac browsers
swingburner 09:02 the problem is that it would bring up the print dialogue for IE and not for the pdf, also printing headers and footers on the page.
through IE printing.
taxilian 09:02 no
you tell the iframe document to print
then it brings up the print dialog just for the pdf
iaincollins 09:02 taxilian: interesting to note, didn't know there issues with that on mac
swingburner 09:02 how do you tell the Iframe to print the document?
taxilian 09:02 for some reason adobe reader won't open a pdf in-browser on the mac
on firefox, anyway
swingburner: well, you know how you can do window.print()? You can get the window of the iframe as well
iaincollins 09:02 taxilian: by the way, the spotify gus used FB for their hack :-)
taxilian 09:02 awesome =]
swingburner: I'd have to tinker, but it's probably something like document.getElementById("iframe").print()
can't do it cross-site, but this would be inside your own site
swingburner 10:02 yes, i've just passed that on to darren. he doesn't have experience this far. the rest of the site works perfectly, just struggling with the printing of labels.
taxilian 10:02 well, that's what I'd do; plugin is overkill for this
iaincollins 10:02 their hack used motion tracking of a users eyes (on a macbook camera) and based on where they were looking on a webpage, play specific songs (with areas, like DIV's, set to play specific songs when viewed)
taxilian 10:02 iaincollins: awesome! is there a web page about it or anything? and could we link to it from firebreath.org? =]
swingburner 10:02 wow! that's amazing!
iaincollins 10:02 hmm their might be actually! there was definately video
http://rewiredstate.org/projects/gazify
swingburner 10:02 we're looking at doing some work with the kinnect to promote our software at exhibitions.
i'll read what they have done
taxilian 10:02 iaincollins: *sigh*, no mention on the page that they used firebreath :-(
iaincollins 10:02 doh! :(
they source is open though
taxilian 10:02 I would really like to see more blog posts talking about FireBreath
ooh, that's cool
iaincollins 10:02 yeah, I think they just did that for the hack presentation
they seemed to get to grips with it super quick (pretty awesome)
taxilian 10:02 definitely should link to this as a firebreath example
iaincollins 10:02 I'll see if there is a video
going to head home a bit early now
laters!
taxilian 10:02 see you
I'm totally adding that to the firebreath users / examples pages =]
swingburner 10:02 thank you for your advice! yes, that's quality!!! sorry, just back on the print issue.... darren seems to think that generating the pdf may cause problems with margins, orientation, etc. is using the iframe and embedding pdf totally customizable?
taxilian 10:02 you can control all of that when you generate the pdf
all a pdf is is a full representation of what something would look like printed
so you set the page size however you want, margins whatever, etc
and it prints exactly what is in the pdf
it's possible some print drivers may try to mess wtih margins or something, I suppose
but I'd try it before you assume it won't work
you really don't want to write a plugin until you've exhausted other possibilities
http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx
swingburner 10:02 yeah, we'd seem to exhausted what darren knows so far... i'll pass that link on to him now. many thanks....
taxilian 10:02 good luck
don't get me wrong, of course; if you still decide you want to figure out how to do a firebreath plugin, we're happy to answer questions; I just don't think that's really what you need
swingburner 10:02 yeah, i totally appreciate what you're saying.
one question darren asked. do u have a link to somewhere explaining how to use JS to call a print dialogue just for that pdf and not the IE print dialogue?
taxilian 10:02 you just call it on the iframe that has a pdf in it
it's no different from the normal print dialog
just play with it
swingburner 10:02 ah ok... cool... i'll let him know
thank you!
taxilian 10:02 good luck!
FB_GitHubBot 12:02 FireBreath: master Richard Bateman * 941c96c (1 files in 1 dirs): Added support for DDK_PATH env var - http://bit.ly/g48VZu
taxilian 12:02 anyone here using mac drawing classes?
drawing on mac?
jshanab_wcw 13:02 Is ther any difference between order of init of a plugin on IE vs the rest of the browser world? My plugin is working on FF,Saf,Chrome but crashes in onPluginReady() when it hits my second getParam call. (oh, unless it is that case issue...BRB)
taxilian 13:02 it is possible that there might be some difference
but if you're using the latest you should be okay to get params
jshanab_wcw 13:02 naw case is ok. but it finds first param and not second one :-(
taxilian 13:02 what is the second param called?
jshanab_wcw 13:02 width
taxilian 13:02 hmm. it is conceivable that's reserved, but I wouldn't think so
jshanab_wcw 13:02 it has worked ok until recently, but I have changed a lot!
taxilian 13:02 hmm
taxilian 13:02 I can tell you where to look to try to debug it if you want
jshanab_wcw 13:02 I am stepping through my code now...
WTF, OnPluginReady is called twice? Ok first time thru, crash on second time thru
taxilian 13:02 ? that shouldn't be happening...
look at FBControl.h and see if you can figure out where the second one is coming from
jshanab_wcw 13:02 callstack shows setSite(269) and SetReady(411) in CFBControl
taxilian 13:02 SetSite is getting called??
that shouldn't be called when you instantiate it in the page...
jshanab_wcw 13:02 setSite is calling setReady, my bad. Missread callstack
Gotta rerun the test...
taxilian 13:02 hmm. either SetSite or SetClientSite should be called
but not both
need to know which gets called first?
jshanab_wcw 13:02 ok
SetClientSite, then SetReady then my plugin ready, then setSite, then set ready then my plinready and a crash
taxilian 13:02 okay
try this, then
add a bool flag to the class
initialize it to false in the constructor
in SetClientSite set it to true
(after the first if statement)
in setSite add an if statement after the first line that returns hr if that flag is true
jshanab_wcw 14:02 ok
as soon as I Find the CTOR
There it is :-)
jshanab_wcw 14:02 uh, I created a private var called siteSet_ as suggeseted and the problem persists, but since the value is false, i am guessing the plugin is loaded twice for one "object" somehow
taxilian 14:02 if that's the case then you have something funny going on
are you instantiating it somewhere using new ActiveXObject?
jshanab_wcw 14:02 Unless there is a copy constructor I need to add that too
taxilian 14:02 no
no copy constructor
are you instantiating it from javascript as part of your detection?
jshanab_wcw 14:02 Sometimes i wonder why anyone bothers with IE...
taxilian 14:02 =]
jshanab_wcw 14:02 I am attaching to all sessions in the debugger, I wonder if something is crashing the plugin and I am seeing a recovered tab attempt
taxilian 14:02 is that a no to my questions?
because the only time setsite should get called is if you instantiate it from javascript instead of in the DOM
and that's a common detection method
jshanab_wcw 14:02 Sorry, missed the Q. Need to ponder on that one. BTW if i have 2 videos in a page, can I have two objects of this mime tyoe in there?
taxilian 14:02 yes
jshanab_wcw 14:02 whew. Well my detection just enables or disables a div. once installed, it just always displays the page.
I did notice that the address of the pointer passed intot he two functions is different, if that means anything
taxilian 14:02 no, doesn't mean anything
but find out if it is the same object
sounds like not
jshanab_wcw 14:02 My test page dragged intot the browser has but one object tag at the moment
taxilian 14:02 okay… but is it one instance of the plugin object or two different ones?
check the address of the this pointer
rather check the value of this
jshanab_wcw 14:02 ok
taxilian 14:02 what it poitns to
if they are the same both times
sabotaged|wk 14:02 so this SimpleStreamHelper: will it download in the context of a session in the browser? like if the user is logged into some website (i guess via cookies)
jshanab_wcw 14:02 well since the variable I added magically resets, I am gonna guess different, I will breakpoint the ctor this time :-)
taxilian 14:02 yes, I believe that cookies are preserved
sabotaged|wk 14:02 ok
taxilian 14:02 hmm. nobody here using drawing on mac?
sabotaged|wk 14:02 not yet, i'll be using it in the future though
taxilian 14:02 I have a patch that I want to put in that is a complete refactor of the pluginwindow classes on mac
I think it's a great improvement; improves the object structure
was hoping to find someone using it to look at it and give a second opinion, though =]
FB_GitHubBot 14:02 FireBreath: newmacwindows Eric Herrmann * 05a66df (8 files in 3 dirs): Refactored PluginWindowMac and stuff
FireBreath: newmacwindows Eric Herrmann * 8d4db96 (414 files in 60 dirs): Refactored PluginWindowMac and stuff ...
FireBreath: newmacwindows Eric Herrmann * 4c80fa3 (3 files in 2 dirs): Fixed bad merges
FireBreath: newmacwindows Richard Bateman * 25e2f11 (8 files in 3 dirs): Merge remote branch 'fb/master'
FireBreath: newmacwindows Richard Bateman * abf1ed6 (13 files in 4 dirs): Fixed some issues with new plugin windows in 64 bit
FireBreath: newmacwindows commits 0000000...abf1ed6 - http://bit.ly/e8v6gm
taxilian 14:02 well, gotta run
jshanab_wcw 14:02 ok, see you tomarrow, this is differnt
taxilian 16:02 jshanab_wcw: any luck?
sabotaged|wk 16:02 any way to get browsers to unlock a plugin for easier upgrades?
taxilian 16:02 no
the way I get around that
is I install the new version in it's own directory with the version # in both the filename and directoryname
which solves several browserbugs at the same time
sabotaged|wk 16:02 so how do you tell the browser which plugin to use if it has multiple loaded
taxilian 16:02 two options
the first (and most explicit) is to use a different mimetype with each
sabotaged|wk 16:02 i think i've seen some mime type with version info for adobe flash?
taxilian 16:02 I personally am not a huge fan of that
sabotaged|wk 16:02 different*
taxilian 16:02 the second option is to keep your description, name, and mimetypes the same with each version of the plugin and then the browser will load the most recent that it finds (file access time-wise) when it refreshes
sabotaged|wk 16:02 is that reliable?
taxilian 16:02 if you use the latter method, make sure you use a version directory as well as version in the filename, since the directory keeps it from getting confused by older versions (at least in some browsers) and the filename tells you which version is there
it has been for me
sabotaged|wk 16:02 hmm
and do you clean up the old binaries ever?
taxilian 16:02 of course
I flag them to be deleted on the next system restart
sabotaged|wk 16:02 with the plugin itself?
oh
taxilian 16:02 in the installer
sabotaged|wk 16:02 i see, interesting approach
taxilian 16:02 on IE I use new ActiveXObject("progid") and then query a .version attribute
sabotaged|wk 16:02 just to check the version? without locking it?
FB_GitHubBot 16:02 FireBreath: firebreath-1.4 Richard Bateman * 26b2b7b (1 files in 1 dirs): Fixed issue #144 - http://bit.ly/fYcG0Y
FireBreath: master Richard Bateman * 26b2b7b (1 files in 1 dirs): Fixed issue #144 - http://bit.ly/fYcG0Y
taxilian 16:02 it will lock it, but it will tell me the version
and I don't care if it is locked or not, since I'm not replacing it
if I have to flag it to be deleted later I don't really care
I just need to know when the new version becomes available
sabotaged|wk 16:02 ok and what about mac
same thing?
taxilian 16:02 similar
you can delete the old one
but using the version number in the .plugin filename is a good solution
you have to put the new one as a different name or it won't detect the change
sabotaged|wk 16:02 ah
taxilian 16:02 even if that just means the old one was MyPlugin.plugin and the new is MyPlugin~.plugin
and you can rotate between those two
but if you have the version in the filename it's consistent and you've done that automatically
sabotaged|wk 16:02 yeah
good info, thanks
taxilian 16:02 for more info, search the logs
there are tons of install-related conversions on there
mital 23:02 taxilian: hey...
taxilian: the object deletion works perfectly on windows/firefox... when I dereference the JS object it gets GCed. :) nice work
taxilian 23:02 =]
awesome
glad to hear it
taxilian 23:02 I think as soon as I can fix the init/deinit problem on linux I'll release RC1
mital 23:02 taxilian: I want to learn about firebreath framework. .. is there any documentation which gets me started ?
taxilian 23:02 well, what do you want to learn specifically?
mital 23:02 framework design
taxilian 23:02 overall design? there are no docs, per se; however, I could give you kinda a guided self-tour =]
mital 23:02 then will go to specific parts...
taxilian 23:02 you'd have to do some reading to understand, but I can tell you where to look
so that it makes sense
and you could take notes and put it on the wiki =]
mital 23:02 ok
taxilian 23:02 do you want to start now?
mital 23:02 yeah
if u r ok
taxilian 23:02 yeah, I'm just working on homework
okay, the first thing to understand is the framework from the plugin developer's point of view
do you understand what PluginCore is?
mital 23:02 various event related stuff
taxilian 23:02 more than that
mital 23:02 not looked at the files specifically
taxilian 23:02 PluginCore is the base class which must be implemented for a plugin instance
so when a plugin instance is created on the page, it creates an instance of a plugincore class to handle that instnace
this is what your plugin class extends
so in FBTestPlugin, FBTestPlugin extends FB::PluginCore
you can see the class reference here: http://npapi.com/x/m44T
mital 23:02 ok... plugin core contains the pluginwindow
taxilian 23:02 yes
mital 23:02 and what is jsapiptr
taxilian 23:02 and PluginWindow is the source of most events
mital 23:02 m_api
taxilian 23:02 excelent question
that's the next "core class"
JSAPI
JSAPI is basically the brains of anything that javascript can talk to
mital 23:02 the window related events right...