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

IRC Nick Time (GMT-7) Message
_pq_ 01:06 Is that a way I can deduce plugin position in screen coordinates?
dougma 01:06 i am trying to do that myself right now
and failing
_pq_ 02:06 you mean I'm screwed?
Felling 02:06 is anybody here?
_pq_ 02:06 Me
Felling 03:06 oh.
i want develop firebreath with mfc
but any document doesn't find on google or firebreath forum
anyways, do you know how to embed mfc on the firebreath?
_pq_ 03:06 You mean you want to use mfc in a firebreath plugin?
Felling 03:06 yes
_pq_ 03:06 Is your problem how to link mfc libraries to your plugin or how to obtain the HWND for plugin window?
Felling 03:06 both
_pq_ 03:06 For first one you'd like to look for "link cmake mfc" on google which I'm currently doing
Felling 03:06 you mean is, will i change cmake code?
_pq_ 03:06 You should change cmake project files for your plugin
Felling 03:06 oh.. i see thanks
_pq_ 03:06 Changing directly the visual studio project would be a bad idea
however I think firebreath already uses mfc
and ATL
Felling 03:06 but, when i include afxinet.h
_pq_ 03:06 so you'll probably find project already links against it
Felling 03:06 i know the firebreath uses mfc and atl
but when i include afxinet.h that occurs error for libcmdtd.lib
_pq_ 03:06 it can't find headers?
Felling 03:06 LNK2005
_pq_ 03:06 oh unresolved symbols?
Felling 03:06 no, already defines
and i already know how to remove that error.
_pq_ 03:06 Which is it?
Felling 03:06 LNK2005 about libcmtd.lib
but i can't fix last error
that is
LNK2001 : dllCanunloadNow unresolbed symbols
in FireBreathWin.def
_pq_ 03:06 you changed some link options in vc project to solve previous issues?
Felling 03:06 yes
but last issues is didn't solving, yet :(
_pq_ 03:06 Could that issue have been raised after you changed settings to fix libcmtd.lib?
Felling 03:06 yes
_pq_ 03:06 you probably removed the atl library which defines those symbols
Felling 03:06 like this URL ->
_pq_ 03:06 which file did you include afxinet.h?
Felling 03:06 inherit FB::JSAPIAuto class
i mean
class MyProjectNameAPI : public FB::JSAPIAuto
_pq_ 03:06 Does it uses precompiled headers?
Felling 03:06 no
_pq_ 03:06 can you try and add include Afx.h at the beginning of that file?
Felling 03:06 yes
_pq_ 03:06 As first header
And revert the fix you did for the other problem
Felling 03:06 i don'y know that is first header
because, the firebreath dependency
so, i just found windows.h
_pq_ 03:06 Put it in the .cpp files which end up including that header
At the beginning
Felling 03:06 and realized that include in winMessageWindows.cpp in PlluginCore Project
_pq_ 03:06 You probably shouldn't change files in plugincore and similar projects
Felling 03:06 oh. really?
_pq_ 03:06 yeh unless you want to fix a bug in firebreath that's it
_pq__ 03:06 how are you building your plugin?
Felling 03:06 before i found document for same issue
using visual sutdio
_pq_ 03:06 Substitute windows.h with afxwin.h should work
But it's last year discussion it couldn't apply to current firebreath
Oh shit
Felling 03:06 why?
_pq__ 03:06 looks like it's more complicated
Felling 03:06 sure;
_pq__ 03:06 are you using firebreath 1.5 for starting?
Felling 03:06 yes
_pq_ 03:06 Which visual studio version are you using?
Felling 03:06 2008
_pq_ 03:06 First thing I got including that is an error at afx.h:24 saying I should define afxdll
Felling 03:06 really? i didn't see that error.
Ok. i try to once again
_pq_ 03:06 Om fixed that one
Ok found solution
Go to firebreath generated foldere
Open project
look for file firebreathwin.cpp
Felling 03:06 wait
_pq_ 03:06 In windowatl folder
Felling 03:06 pluginauto\win\firebreathwin.cpp?
is right?
_pq_ 03:06 Yep
Felling 03:06 and then?
_pq_ 03:06 Change conflicting functions names to "myDllGetClassObject" or similar
Felling 03:06 oh.
_pq_ 04:06 Then fix FireBreathWin.def
Felling 04:06 is it any problem? when loading plugin in IE or other browser?
_pq_ 04:06 Change DllGetClassObject to "DllGetClassObject = myDllGetclassobject" without quotes
and so on for other symbols
Felling 04:06 Ok wait
where did you put afx.h?
_pq_ 04:06 I didnt
I just included afxinet.h
Felling 04:06 i think the golbalPlugindeinitialize is not call if you rename dllcanunloadnow
_pq_ 04:06 You can fix it by changing the .def file
so that it points to the right function name
Felling 04:06 wow i did it
thanks, very much
i have another question
is it wrong way if i modify resource in visualsutdio.
the mimetpye, or string stable or version.. etc
Felling 04:06 probably, you are sleep... thanks very much _pq_.
linearray 07:06 does the IRC Log search support searching for phrases or boolean operations?
kylehuff 08:06 sorry taxilian; I queried you yesterday and then promptly got distracted by the guitar... hit me up when you are around/have time.
linearray 09:06 funny, logging to a file works for me, logging to console does not
_pq_ 09:06 safari?
linearray 09:06 chrome
_pq_ 09:06 anyway Mac os ?
linearray 09:06 yes
_pq_ 09:06 Check syslog
linearray 09:06 lol
no idea why I thought "LogMethod_Console" would mean logging to JS console
_pq_ 09:06 firebreath actually spam in system console
no it mean printf
Same as nslog
linearray 09:06 interesting
_pq_ 09:06 which in turns equals to writing to sys log for GUI apps
linearray 09:06 do you know where it ends up on win/linux?
_pq_ 10:06 Linux is on stdin
I mean stdout
linearray 10:06 is this somehow captured when you start a browser from a GUI?
guess not :)
_pq_ 10:06 if you launch firefox from terminal you get it in the terminal
yeah I think it goes to some kind of system log
it depends on the system
linearray 10:06 there is: virtual FB::Log::LogLevel getLogLevel();
Called by the logger to discover what loglevel to use
how do I log with this "default" log level? I use the FBLOG_* macros directly
where I specify the log level explicitly
taxilian 10:06 linearray: you need to override getLogLevel in your factory
linearray 10:06 yes
taxilian 10:06 _pq_: renaming those symbols in FireBreathWin may make it compile, but I would be completely shocked if it actually made it work
linearray 10:06 what I wonder is: what's the effect, besides that FB's own log messages will have a different level
taxilian 10:06 those are the entrypoints for a COM module, which means if you rename them ActiveX will most likely not work
linearray: The intent is that you can have log messages that are "trace" or "info" that aren't normally seen
but if you're debugging something really tricky you can turn them on
linearray 10:06 aha!
taxilian 10:06 the logging abstraction still needs work, to be honest
_pq_ 10:06 you can know where stout goes to in a Linux app using ls -l /proc/APP_PID/fd/1
taxilian 10:06 nobody has actually documented it, so it's not yet widely used
_pq_ 10:06 std err is 2
taxilian 10:06 you can also implement your own logger for FireBreath to use if the log4cplus one doesn't meet your requirements
kylehuff: no problem, we're all busy =] I'm back now
kylehuff 10:06 taxilian: I added some text effects and bevels/shading; is this closer to what you had/want?
taxilian 10:06 kylehuff: I like it! lol… now it looks fantastic larger, but scaled down to the old size it doesn't look at good :-P
that's a tricky thing; perhaps I need to have two versions, one for when it needs to be larger, one for "icon size" when it's 100x100 or smaller
kylehuff 10:06 how did you scale it?
taxilian 10:06 er… by resizing the browser window? =]
linearray 10:06 taxilian: don't know if you get mails on new pages, anyway, please make sure everything is factual :)
taxilian 10:06 linearray: I just say it; I'll look over it in a second
thank you for doing that! That has needed to be done for a long time
linearray 10:06 i know
I saw logs on this going back for the better part of a year ;)
taxilian 10:06 actually lately a lot more people (yourself high on that list) have been updating the wiki
someone even updated the object diagram today
linearray 10:06 yeah I don't mind, it takes me maybe three minutes to write something up
doing the 'research' is the tricky part :)
taxilian 10:06 it's really not that hard to do, but most just don't take the time
and if I try to do it all myself I don't get anything else done
linearray 10:06 sure
kylehuff 10:06 taxilian: oh, yeah, it will look horrible that way most of the time. doing an actual scale will do interpolation. having said that, what I linked was a PNG version, I also have an SVG version which should scale even better most sizes.
taxilian 10:06 awesome; would it be a pain to throw up a quick 100x100 version for me?
kylehuff 10:06 no, not all. I am already in the process
taxilian 10:06 thanks
this is awesome
kylehuff 10:06 taxilian:
taxilian 10:06 not bad… the yellow at the top is almost invisible, though; what do you think about darkening the background a bit?
kylehuff 10:06 taxilian: like this?
(larger version)
taxilian 10:06 yeah, I like that
let me try throwing it onto one of my pages and see what it looks like in place of the other
hmm. probably need to go darker still
the text that sits next to it on my site is white
so as it is it kinda blends with the border and the background
kylehuff 10:06 ok, no problem
kylehuff 10:06 taxilian:
(larger version)
taxilian 10:06 would it be hard to make the border a little less abrupt?
kylehuff 10:06 not at all
kylehuff 11:06 taxilian: I might have gone overboard on lightening the edge.. lol
(larger version)
taxilian 11:06 hehe. yeah, that is a bit too much. is it possible to just have the same color as the background but fade to transparent?
kylehuff 11:06 yeah, no problem. that is only there because I thought you wanted bevels and shadows
taxilian 11:06 unforutnately I don't know exactly what I want :-/
kylehuff 11:06 taxilian:
(larger version)
(screenshot of in place on the website):
taxilian 11:06 lol. how did you do that? charles?
I think that looks great
now I just need to figure out how to pull off a wide version of the logo
but this is certainly enough for now; I know you're busy
I really appreciate the help
kylehuff 11:06 charles? I just used the chrome console to edit-in-place
taxilian 11:06 ahh
never tried that; I guess that'd work
charles is a web proxy that I use sometimes for debugging javascript sdks on a live site
you can basically say "redirect all requests to this URL to this local directory on my hard drive"
very useful
kylehuff 11:06 ahh, okay. I see
so, now that you have settled on a color, I will work on a banner version
taxilian 11:06 lol. thanks, man
I really appreciate it
kylehuff 11:06 is the octagon part of the design? or just a backdrop? I only ask, because it might not integrate in a banner format well
but I have some ideas either way...
taxilian 11:06 just a backdrop
the main reason I'd like to have a wider version of the logo is to make the callsign more visible
though you've done a good job of that even in the square version
jshanab_wcw 15:06 I am having a new issue when i build my plugin. heat.exe just hangs indefinitly. Anyone run across this?
taxilian 15:06 sure havne't
what happens when you just try to run regsvr32 on it?
jshanab_wcw 15:06 drivng me nuts
taxilian 15:06 short trip
jshanab_wcw 15:06 I'll try that
Nothing. No error, but no plugin
but I would need to do some file coping, duh brb
No dice
zahary 15:06 hey guys, I'm not a very seasoned mac developer, but as far as understand what I've red so far developing NPAPI plugins seems to be strictly dependent ot Xcode, right?
that's because I must create a specific CFBundlePackageType project with the BRPL type
is this correct? can I you different toolchain?
can I use *
taxilian 15:06 zahary: you can do it with gcc
I've done it with a patch I added that is in cmake 2.8.5rc1 and FireBreath
but it's a lot simpler with XCode
easier to debug
and all around less hassle
zahary 15:06 this CFBundlePackageType is just a form of packaging? there is still a normal dynamic link library somewhere in there?
taxilian 15:06 well, it's not a dylib exactly
not sure exactly what it is, to be honest
-module, if memory serves
zahary 15:06 I've just recently started to explore mac, soffy if my questions are too newbiesh
taxilian 15:06 this isn't something that many people understand, when it comes to plugins
seriously, though, if you're new to mac don't try to do everything using gcc
install xcode
it's free
zahary 15:06 ok, but you say I can make such "modules" with gcc too?
taxilian 15:06 with -module, I think
[email protected]:~/Library/Internet Plug-Ins/FBTestPlugin.plugin/Contents/MacOS {master} $ file FBTestPlugin
FBTestPlugin: Mach-O universal binary with 2 architectures
FBTestPlugin (for architecture i386): Mach-O bundle i386
FBTestPlugin (for architecture x86_64): Mach-O 64-bit bundle x86_64
zahary 15:06 my question is actually deeper. I need to make a decision whether to pursue a development path taking advantage of some of the C++0x stuff that's appearing on the other platforms
taxilian 15:06 what are you trying to do?
zahary 15:06 XCode 4 ships with gcc 4.2 and a stripped down version of clang 2 as far as I can tell and non of them supports C++0x
taxilian 15:06 I think it would be a mistake to try to develop a browser plugin without xcode support; that's just me, though
zahary 15:06 So, I'm wondering whether I will be able to work arround it using more recent builds of either gcc or clang (both generally available for mac)
taxilian 15:06 and I also think it would be a mistake to start a browser plugin project and not use FireBreath, which doesn't use c++0x =]
jshanab_wcw 15:06 taxilian, I think the problem i am having is that the npMYPLUGIN.wxs generated file does not exist. it existed in earllier versions.
taxilian 15:06 jshanab_wcw: that file is generated as part of the build process
in fact, it's the output of heat
so I don't think that's it
zahary 15:06 well, I can use it only in my code - it's understandable that a library with a large target audience such as firebreath will take more convervative stance
jshanab_wcw 15:06 oh. LOL
taxilian 15:06 zahary: and you're correct that that is why I'm not using c++0x; I'd sure like to have some of the features
zahary 15:06 sure, that's ok
but do you think I'll be able to circumvent XCode?
taxilian 15:06 I would personally not attempt to do any serious development on Mac involving plugins or bundles that involves hackery with XCode
I have no idea how hard or easy it would be may be helpful
zahary 16:06 the question for me boils down to whether I'll be able to create this BRPL CFBundlePackageType. I'm perfectly fine using other IDE (already using Visual Studio on MS, Emacs/Eclipse on Linux and so on)
taxilian 16:06 the BRPL CFBundlePackageType thing is just packaging; it's a directory structure, resources, Info.plist, and a Mach-o binary
should be doable
but likely much more annoying
and certainly not supported by FireBreath, though you might be able to hack things to make it work
like I said, with the cmake patch I submitted in December that I believe is in 2.8.5rc1 I have built plugins with makefiles/gcc
there is a branch off the firebreath project that has the modifications needed to the cmake files in firebreath
just understand that you'll spend a lot of time fighting your build systems
zahary 16:06 this must be the cmake_patch branch on github? ok, thank you, I'll study it
taxilian 16:06 yes
there is also a fork of FireBreath that someone says works with makefiles/gcc, but I haven't tried it
zahary 16:06 somewhere in there I should look for this -module flags, right?
taxilian 16:06 no, cmake added that by itself
zahary 16:06 aha, but in the still unreleased 2.8.5
taxilian 16:06 doesn't seem like it; there were some changes I made to 2.8.5 that make the full bundle work better, but the -module flag (if that's even an accurate memory) was tied to something that was already there
zahary 16:06 there is one more option I considered, but forgot to ask about
taxilian 16:06 oh?
zahary 16:06 what if I package my code as a dynamic library and try to bundle it with the plugin and load it at runtime - basically I'll have just stubs in the xcode projects redirecting all of the call to the second library
taxilian 16:06 it's doable; it's a bit of a pain is all.
zahary 16:06 maybe not so much, my plugin dosn't have any GUI part, but have lots of I/O and long running operations, so I've decided to make it work as a web server - after it's loaded in the browser, the browser code just makes ajax request to it
so there is not a lot of functions to redirect
taxilian 16:06 probably wouldn't be too hard, then
just remember that depending on what you're doing that could be a security nightmare =]
FireBreath itself actually has an embedded webserver library that can be enabled
so the approach has been used
zahary 16:06 cool :)
taxilian 16:06 the trick is that you don't know who is making the calls
well, and cross-domain policies of course
zahary 16:06 yeah, sure. I'll handle large (as in 256-bit space) "keys" to the loading page and use them as password for the remaining session
taxilian 16:06 okay; just keep in mind potential for XSS and dns spoofing attacks as well
(yes, I speak out of frustrating personal experience =])
of course, the larger the userbase the larger the potential issue
you may not need to worry about it as much as I have
zahary 16:06 could DNS spoofing affect me when the host name is just localhost?
taxilian 16:06 hmm. *probably* not for localhost domains, but I'm thinking of the page that is accessing the plugin
if a page has access and someone manages to do an XSS exploit then they have access to everything as well
zahary 16:06 aha, i got what you mean
taxilian 16:06 not sure where your keys come from; we were using a key generated by the plugin at startup to validate that requests came from the browser, but then if someone can pretend to be a valid site for the plugin to be used on it could get the key
if they come from the server you could still be susceptible to man-in-the-middle attacks
since most users just blindly accept bad certs
but again… I'm having to be uber-paranoid because I have an excessively large userbase that includes countries where man-in-the-middle is standard
so just making some points to consider
zahary 16:06 Points taken :) I'll do my best, and then here is no so much sensitive information offered by the plugin in my case anyway
I have one more idea I need to work out
With my specific audience, I think it will be easier to deploy the code if I manage to package it in a browser extension
I've already seen how this is done on firefox and chrome on every platform, but mac
taxilian 16:06 as long as you only care about firefox and chrome and don't mind maintaining two seperate install processe
zahary 16:06 it looks easy - basically, just just have to include the NPAPI dll in a zip file
taxilian 16:06 yeah, it's not terrible
zahary 16:06 differrent for chrome and firefox indeed
taxilian 16:06 also need the manifest
zahary 16:06 but can you tell me again whether this bundle thing changes how things work on a mac?
taxilian 16:06 I dislike it simply because I prefer a single installation to apply to everything
heh. well, for one thing, you can't do it to target Safari
which is the browser that comes installed by default on a mac
other than that, I think both Chrome and Firefox extensions have ways to put platform specific binaries in
I know firefox does
I don't know the specifics, because I don't use it
zahary 16:06 also, you can just redirect them to the correct package by looking at the user agent
taxilian 16:06 my plugins all target all browsers, so I prefer a simple install; MSI on windows, pkg or applescript on mac
zahary 16:06 I've read that safari can load NPAPI plugins from extensions - I'm trying to find it right now
jshanab_wcw 16:06 taxilian. Before I get that hung heat.exe, i have an erro rthat says LNK1104 cannot open ...npMYPLUGIN.dll but the fiel is there, it just wrote it. very strange.
taxilian 16:06 jshanab_wcw: well, that would be your issue =] I would try rebooting
sometimes windows gets into a funny mode
zahary 16:06 apparently, it's indeed not possible. confirmed here
jshanab_wcw 16:06 taxilian, you have no idea. it has been a week of those
taxilian 16:06 zahary: that is consistent with what I've seen as well
bg_ 17:06 Hey guys, I was wondering if anyone could point me to some page that has information about rebuilding plugins. I followed the video tutorials ( and that worked out, so I was able to register the plugin. Then, when I went and made a modification to the cpp file and tried to rebuild, I got a link error. I'm not sure why.
taxilian 17:06 what link error?
bg_ 17:06 LINK : fatal error LNK1000: Internal error during IncrBuildImage
taxilian 17:06 just rebuild again
bg_ 17:06 Does it make a difference whether I build or rebuilt
taxilian 17:06 no
that's just an error that indicates that visual studio has gotten in a weird mode
sometimes just building again fixes it
sometimes you have to rebuild
not sure what causes it
bg_ 17:06 Alright, rebuilding now
bg_ 17:06 Yeah, still getting the error.
taxilian 17:06 try deleting the build dir
bg_ 17:06 Just worked
taxilian 17:06 and rerun the prep script
no idea :-)
bg_ 17:06 lol
thanks man
taxilian 17:06 good luck
zahary_ 18:06 sorry for being off-topic, but the funny thing is that the hardest thing so far in my new life of cross-platform developer is dealing with all the different keyboard shortcuts eash OS throws at you
do you have any tips dealing with that problem being a more hardened veteran I imagine
taxilian 18:06 my only suggestion is to get used to it, I'm afraid
I've tried adjusting the keyboard shortcuts to be as much the same as possible
and it ends up just being a ton of work and then I can't use systems that aren't configured the way I'm used to
zahary_ 18:06 oh, well, at least you give me hope that I'll get used to it eventually :)
taxilian 18:06 I'll admit that if I spend a large amount of time on one particular system it takes me a bit longer to adjust
and I have visual studio configured to use vim keybindings and such =]
feeling 18:06 hello?
taxilian 19:06 feeling: was that a question?
feeling 19:06 am.. if i change resource file in visualsudio
visual sutdio occur some information messagebox
anyways, my question is could i change resource file in visual studio?
taxilian 19:06 which file?
feeling 19:06 probably firebreathwin.rc
i wanna adding string table or dialog something
taxilian 19:06 that file is generated using values from PluginConfig.cmake
feeling 19:06 but visualstudio says, that file make from macro.
taxilian 19:06 you can copy the original from <firebreath_root>/gen_templates/ into your plugin project directory (projects/yourplugin/)
and then edit it and run the prep script again
what is your native language? (just curious)
feeling 19:06 korean
taxilian 19:06 ahh. cool.
feeling 19:06 anyways
i afraid change resource file in visual sutudio
becase, i don't know for cmake
taxilian 19:06 you can edit the file using visual studio, but you will have to rerun the prep script (cmake) to make it use it
you can't just edit the one in the project
you have to copy the template
feeling 19:06 ok thanks, another question.
the custom libraries, includeing files is disapeear if i rebuild use cmake.
i already know why should do that
so, how to maintain that setting. if i rebuild proejct use cmake
taxilian 19:06 hang on
feeling 20:06 someday, i asked to somepeople. are company will need multibrowser plugin as near future and could i study more for that?
somepeople says, your think is wrong beacuse HTML5, uCloud.. etc.
so i want to know what are your think for that and why your develop plugins frame.
oh sorry, uCloud = cloud service
dougma 20:06 do you mean "why bother with plugins when we have html5"?
html5 is not enough.
javascript is getting faster but it's not fast enough.
feeling 20:06 how about cloud service?
dougma 20:06 not always the right solution is it?
feeling 20:06 right.
but, i think many solution will use cloude service.
dougma 20:06 chrome's nacl is an interesting development
feeling 20:06 does nacl access local storage?
dougma 20:06 no
well probably not the file system but maybe it has local storage
feeling 20:06 oh..
suit, nacl frame work size is 22MB. :(
i will be eating launch, please answer my question taxilian. thanks very much.