IRC Log Viewer » #firebreath » 2011-08-09

IRC Nick Time (GMT-7) Message
dougma 01:08 taxilian_away: omitting the url on FB::BrowserHost::DetectProxySettings doesn't get the default proxy (at least on FF5 win)
i just get a false return...
dougma 01:08 NPN_GetValueForURL returned NPERR_INVALID_URL
dougma 01:08 anyone know how to retrieve Firefox's config variables from a plugin? specifically "network.proxy.type"?
dougma 02:08 maybe before firefox 3.6 i would NPN_GetValue for NPNVserviceManager? but now?
https://www.bugzilla.mozilla.org/show_bug.cgi?id=500513 :( :(
dodo__ 03:08 any ideas on how to deploy my plugin in ubuntu? i also need to deploy it with a udev + another.so file.
FireBreathBot 03:08 dodo__: 04 Aug 14:32Z <taxilian> tell dodo__ you keep leaving before I get online; I usually dont' get online until 9-10am MDT (GMT-0600)
imran 03:08 hi,
i m using CprintDialog it dtects the class in intelliscese but as i build the project it gives me error that CPrintDialog undeclared identifier
but in simple win32 application it didn't give me any error
dougma 04:08 FireBreathBot: tell imran sounds like you're missing the correct #include
FireBreathBot 04:08 dougma: I'll pass that on when imran is around.
Dee_ 06:08 Hello
I'm trying to create a NPObject by using NPN_CreateObject
but it is throwing an exception like below...could you please help me to find the issue
Undefined symbols for architecture x86_64:
"_NPN_CreateObject", referenced from: _NPP_GetValue in main.o
Could you please help me to resolve the above issue
someone-noone 06:08 is @executable_path for plugin == executable_path of plugin, not browser?
_vizZ 06:08 knock, knock? ;p
anybody? ;p
someone-noone 06:08 hello
_vizZ 06:08 hi :)
do you happen to know if I can "grab" somehow the parent window of the FB plugin on Linux?
i mean, i need to make the plugin's dialogs modal, so I need the handle to the parent window ( the browser's window )
someone-noone 06:08 afaik, you can handle parent window. At least on mac and windows. I think linux is same
you can't *
_vizZ 06:08 well i definitely CAN hanle window on windows ;)
::GetFocus() or ::GetActiveWindow() for example
someone-noone 06:08 probably, in some cases yes. I know that jshanab_wcw had problems when he tried to draw into parent window on windows
_vizZ 06:08 ( ::GetFocus() works better on Win7 - there is a problem with the lost focus )
( with ::GetActiveWindow )
someone-noone 06:08 probably, you should to create a child window on linux and work with it
but it's only my suggestion
_vizZ 06:08 no, i need the browser to be the parent
someone-noone 07:08 then, better to ask someone else :)
_vizZ 07:08 ;p
someone-noone 07:08 So seems i need to use @loader_path instead of @executable_path. I used install_name_tool to change this. But when i'm loading plugin in Safari i'm still receiving error about @executable_path (wtf? i changed it and reloaded browser).
Library not loaded: @executable_path/../Frameworks/SDL.framework/Versions/A/SDL
but otool -L shows that my executable has this line @loader_path/../Frameworks/SDL.framework/Versions/A/SDL
mystic?
_vizZ 07:08 ok, another question
is it possible to extract window handle from const FB::BrowserHostPtr& h_host property?
omg, i've just seen FB class reference page... :D
nice work
taxilian 07:08 _vizZ: no, the browserhost does not know about the window
only your plugin does
_vizZ 08:08 damn :/
well, that is really a "WISH-TO-BE-IN-FB" feature ;p
the thing is I need to prevent any interaction with underlying webpage
so i have this Qt FB-based browser plugin for Linux
but i need to initialize any QDialog with a parent for the window to be modal ( in relation to the browser )
on Windows i use QWinWiget, which is a "non-present" ( initilized with HWND from ::GetFocus() win function ) parent for any of my QDialog's
and that works well
i just need the same thing and linux and mac
actualy wxWidgets deal with this problem
but i far as i had time to scan through the source code, they seem to use xlib to somehow get the proper window handle
*but as
i think ;p
taxilian 08:08 _vizZ: why would you need it in browserhost?
why would you want it in browserhost?
doesn't make sense
oh, I see what you're asking; you have misunderstood
you can get the window handle (at least in windows) of the browser's window
just not from browserhost
but on linux and mac the parent window can't be accessed from within a plugin
because you can't access them cross platform
it's just not possible
also, remember that if you open a modal dialog *always* do it on another thread, not on the main thread
nomuna 10:08 Hello folks. I have a question regarding the FIREBREATH-74 issue.
FireBreathBot 10:08 FIREBREATH-74: Summary: In Firefox 4 the message string in FB::script_error(message) doesn't show up.
FIREBREATH-74: Assigned To: richard
FIREBREATH-74: Priority: Major, Status: Closed, http://jira.firebreath.org/browse/FIREBREATH-74
taxilian 10:08 okay
ask
nomuna 10:08 I know that it's been closed but. Is there a workaround? In the comment there is something which sounds like a workaround. "Setting a property on the window object".
How do I do it. Is it difficult?
taxilian 10:08 not really; just use getDOMWindow on the browser host
!wiki getDOMWindow
FireBreathBot 10:08 7 results found. Note: Results limited to 8
"class FB ActiveX ActiveXBrowserHost getDOMWindow": http://goo.gl/HCvrl
"class FB BrowserHost getDOMWindow": http://goo.gl/5Q6L8
"class FB Npapi NpapiBrowserHost getDOMWindow": http://goo.gl/EyJ49
"Tips and Tricks": http://goo.gl/sOA8M
"Plugin Lifecycle": http://goo.gl/nVhKS
"Features": http://goo.gl/xXK1q
"Version History": http://goo.gl/lgWpo
nomuna 10:08 THanks a lot I'll look into it. I think you have saved me a lot of time...
:D
taxilian 10:08 yw
Ankita 10:08 hi cn some one help i want to use Cstring and CPrinterDialog in plugin but when evr i build the project i got the error of C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>.h already
taxilian 10:08 I don't know of a way to use MFC with FireBreath
Ankita 10:08 any suggessions
taxilian 10:08 sure; don't use MFC
Ankita 10:08 lolz
so wat be the next option
taxilian 10:08 since I don't know what you're doing, it's really hard to say
Ankita 10:08 um going to develop printing plugin
that will print bitmaps
taxilian 10:08 okay
I don't know what CPrinterDialog does
so that still doesn't help me
Ankita 10:08 Cprintdialog is a class that will set the default seetings for printer
taxilian 10:08 well, what you can do with an MFC class you can do with direct windows APIS
and you might be able to do with ATL
so I recommend you research that
Ankita 10:08 ATL
Ok any well known Apis???
taxilian 10:08 not my specialty, I'm afriad
Ankita 10:08 :(
hehehehehe thanks for such an awesome plugin
taxilian 10:08 yw
linearray 10:08 I heard a crazy idea yesterday: put _all_ #includes in a project.h and only include that one in all .cpp files
taxilian 10:08 linearray: sometimes a good idea, other times a very bad idea
linearray 10:08 is that a good idea or more like shooting myself in the foot?
hm
taxilian 10:08 more often then not probably that's shooting yourself in the foot
but it can be nice for a small project
to an extent that's what you're doing with a precompiled header (which is supported on windows in 1.6)
linearray 10:08 so a problem arises when I start having contradictory declarations
taxilian 10:08 or when you have an include loop
or if you have one .cpp file that needs a huge include file but you don't really need it anywhere else
linearray 10:08 shouldnt that be taken care of by guards?
taxilian 10:08 if you only use a header file in one place, why would you want to include it everywhere?
sometimes yes, sometimes no
linearray 11:08 yeah, I guess it just tidies up the .cpp file a bit
not much else in its favor
taxilian 11:08 at the expense of including every single include file in every single .cpp file
linearray 11:08 :)
taxilian 11:08 which can drastically slow down compilation in some cases and cause serious namespace or build issues in others
it all depends on your project
Sajty 12:08 Putting Ogre.h in a precompiled header resulted for us in 4x faster compilation on msvc. Also you don't need to mess up the source files by putting the precompiled header on top. You can use Force include /FI flag to magically include it. On GCC its not that big speedup.
taxilian 12:08 I believe that
EL45 13:08 Hi everyone. I have been receiving a weakHost.expired() error when exiting the browser. It seems to be a problem with how I am using m_host->htmlLog() since if I simply put m_host->setEnableHtmlLog(false); I no longer receive the error message. Any hints where to start?
taxilian 13:08 hmm. honestly, my first suggestion would be to not use htmlLog :-P
EL45 13:08 haha. Fair enough.
taxilian 13:08 the next thing I'd look at, though, is the htmlLog stuff itself (which isn't considered anywhere near production quality) to see if you can see what might be holding onto (and likely leaking) a BrowserHostPtr
EL45 13:08 Ok good to know. I will look into that. Thank you
taxilian 13:08 really, though, I'd use (I do use) log4cplus and either console or file logging
FireBreathBot 14:08 Commit afd6121 on master by Richard Bateman: "Fixed missing virtual destructor in virtual base class" http://goo.gl/pEvtu
linearray 18:08 hm, still no cmake 2.8.5 in ports
oh well
taxilian 18:08 sorry :-/
Guest27835 18:08 hi all, quick question: with firebreath we arent supposed to edit the project settings right? that goes for solution too? If so how are we supposed to add post building instructions, such as copying folder, renaming, etc.. (stuff that is normally done in command prompt via Visual Studios)
taxilian 18:08 !wiki cmake
FireBreathBot 18:08 8 results found. Note: Results limited to 8
"Using CMake With FireBreath": http://goo.gl/Q3r1T
"Using Libraries": http://goo.gl/cUVa6
"Useful resources": http://goo.gl/sNLLj
"Prep Scripts": http://goo.gl/VnMXJ
"PluginSigning": http://goo.gl/jrBRo
"Working with bundles": http://goo.gl/8JwH5
"FireBreath 1.5.0RC1 Released!": http://goo.gl/lppMa
"Using FireBreath": http://goo.gl/IHwid
taxilian 18:08 use cmake
edit the cmake files and then rerun the prep script
Guest27835 18:08 i tried that, i tried echoing a string
throws a parse error
just tried to copy
no go
guess i will read the wiki
taxilian 18:08 okay; let's step back. you sound like you're saying that what I'm suggesting doesn't work; that simply isn't true. I wrote the system; I promise you that you can add project settings using cmake
so
the question is what are you doing
and why isn't it working
instead of saying "I tried that and it didn't work", try looking at what you're trying to do
and give me a specific question that I might be able to answer
or an example of what you're trying that I can look at
then I might be able to help
Guest27835 18:08 projectDef.cmake => Added "echo lol"
didn't work, removed it
taxilian 18:08 ...
of course it didn't work
Guest27835 18:08 CmakeLists.txt
taxilian 18:08 that's not a valid cmake command
where did you get the idea that it was?
(serious question; if we have bad docs it needs to be fixed)
Guest27835 18:08 In build events I was able to echo out command line instructions
Build Events -> POst-Build Event
taxilian 18:08 okay; that's a very different thing than cmake
Guest27835 18:08 Command Line
taxilian 18:08 cmake is not command line
cmake has its own language
Guest27835 18:08 ah
taxilian 18:08 you need add_custom_command
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_command
read down to the second definition where it shows you how to use PRE_BUILD or POST_BUILD
if you look in the firebreath tree you can find some examples of using it
your target will be ${PLUGIN_NAME}
and you will need to do the custom command probably ideally in projectDef.cmake and after the add_<platform>_plugin call
Guest27835 18:08 ugh
obscure errors, wrong type of arguement and not which one
argument*
taxilian 18:08 that's very unspecific; if you need help with something I need specifics
Guest27835 19:08 1> CMake Error at projectDef.cmake:75 (add_custom_command):
1> add_custom_command Wrong syntax. Unknown type of argument.
add_custom_command( ${PLUGIN_NAME}
POST_BUILD
COMMAND cmake -E copy ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${FBSTRING_PluginFileName}.dll
../bin/
)
taxilian 19:08 .pb
FireBreathBot 19:08 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin. http://fpaste.org, https://pzt.me/, and https://gist.github.com are all good options
taxilian 19:08 (for future reference)
you need it to start:
add_custom_command( TARGET ${PLUGIN_NAME}
and I doubt that ../bin/ will work; you'll want a full path, I suspect
but you can make the path relative to ${CMAKE_CURRENT_SOURCE_DIR} which will be your plugin dir
Guest27835 19:08 ah, I see now
missing TARGET, wasn't a reference, but actually part of the command
taxilian 19:08 yes
when it's in caps it usually is
takes some time to get used to the cmake docs, which aren't really all that great
Guest27835 19:08 yeah, I knew that about ../bin/ but I was playing with the last two params trying to figure out what was going on
taxilian 19:08 just making sure =]
Guest27835 19:08 ok thanks
this works perfectly
taxilian 19:08 great
Guest27835 19:08 saves time from copy and pasting everything
taxilian 19:08 feel free to contribute back docs on how that works as a thankyou =]
Guest27835 19:08 ok, will do
is there a reason cmake is used?
taxilian 19:08 awesome =]
yeah; lots and lots and lots of reasons
Guest27835 19:08 like compatibility between linux/windows/etc?
taxilian 19:08 the primary one is that it allows us to support multiple platforms (and even multiple versions of visual studio) without having to try to support a dozen different project types
but in addition it saves you from about 90% of the configuration hassle of a plugin
generates the source code files for the .rc and .rgs files, header files, etca
and other configuration files
Guest27835 19:08 does it also ensure compatibility across different versions of windows, like the need for VS 2010 Redist
taxilian 19:08 it helps
well
not with the redist
we just statically link to avoid that
but it does help to find libraries that we need that may differ on different platforms
even of windows
express edition vs professional, etc
Guest27835 19:08 sounds neat
I really need to read about cmake and play with it
but I rarely run into projects that require me to use it
since I develop by myself
taxilian 19:08 yeah; there are real advantages and disadvantages to it. things I like and things I don't
what it comes down to, though, is that I don't know of another adequate solution =]
Guest27835 19:08 looks like it does a well enough job, just rather confusing to someone who hasn't had any experience with this
nice job though :)
taxilian 19:08 thanks
linearray 19:08 do you know GYP?
Guest27835 19:08 who is that directed towards?
linearray 19:08 taxilian :)
taxilian 19:08 me, I think; it's Generate Your Project, a build system from Google
and I've heard of it, but haven't really looked at it
linearray 19:08 yes, they use it for chrome
http://code.google.com/p/gyp/wiki/GypVsCMake
I guess this sums it up
taxilian 19:08 I seriously doubt I'm interested, then; I've seen the build processes around chrome, and they make me want to shoot people and burn things
but I'll read up =]
linearray 19:08 heh, I was working on chrome for a while
but it was just slightly overwhelming