IRC Log Viewer » #firebreath » 2013-05-13

IRC Nick Time (GMT-7) Message
gouri 03:05 Hi
I have to expose the C# classes from javacsript through Firebreath framework.
then how should i do this?
gouri 03:05 If you have any information related to this then plese let me know
diorcety 03:05 gouri: you may have to create a wrapper to do that
gouri 03:05 yes I already created the wrapper but i need the generalized solution for it.
Lets take an example :suppose there is class library in C# which contains the classes like DramImage,TestImage
DrawImage class contains the method ShowImage(TestImage testImage) with parameters as object of TestImage class
gouri 04:05 @ diorcety
Aktau 06:05 Hey guys
Whenever I start my NPAPI plugin
i get a white flash first
It's short, but annoying
Anybody dealt with that before?
rcpdesigns 09:05 new install, winxp. Have CMake2.8, Python 2.7. I've run prep2008.cmd. It downloaded boost.tar.gz and saved it. Says 'Using 7-zip to extract the archive'. Nothing ever happens after that. I have 7-zip in the path
all steps prior seemed to work fine. fbgen.py generated projects folder and my project. prep2008 verified various VC folders
i can find where the cmd file or whatever is downloading and extracting boost to figure out what when wrong and fix it
taxilian 09:05 rcpdesigns: get it from git instead of as a zip
it's cmake that's doing the download
rcpdesigns 09:05 get boost from git?
taxilian 09:05 get firebreath from git
and have git in your path
then do a git submodule update --init --recursive and it will download boost for you
rcpdesigns 09:05 oh my
thanks, i'll get started on that
rcpdesigns 09:05 ok, I got git
i got firebreath 1.7
i typed git submodule update --init --recursive
it responded with
fatal: Not a git repository (or any of the parent directories): .git
ok, i see problem
taxilian 09:05 yeah, you needed to change into the firebreath dir first =]
rcpdesigns 09:05 everything is in wrong folder now.. i've made quite a mess. time to start over
taxilian 09:05 oops
rcpdesigns 09:05 nothing that rmdir /s won't fix ;)
taxilian 09:05 hehe
best file compression around: del *.* == 100% compression!
rcpdesigns 09:05 truth
.... and build files have been written
taxilian 09:05 excellent
rcpdesigns 09:05 building....
========== Build: 14 succeeded, 0 failed, 1 up-to-date, 1 skipped ========== Total Build Time 6:08
very impressive system
dcherman 10:05 rcpdesigns: taxilian: i remember running into that. the fb setup is suppressing 7zip messages, but 7zip is sitting at a prompt waiting for user input
rcpdesigns 10:05 many thanks... this is going to save me many hours
taxilian 10:05 odd. not sure why the 7zip method isn't working anymore
dcherman 10:05 i forget exactly what it is, but you can find out by unsuppressing the 7zip info
taxilian 10:05 the git method is better anyway, though
rcpdesigns 10:05 dchermam: right, it was
taxilian: agreed, once you get git, it is better
many thanks to all
taxilian 10:05 good luck!
rcpdesign 14:05 i've managed to build examples and they somewhat work
the project that I built get an exception from regsvr32
the auto-generated files are still as they were generate
the auto-generated files are still as they were generated
i'm also running into problems linking with the rather infamous link error
error LNK2001: unresolved external symbol __invalid_parameter_noinfo
i think this is caused as I am linking to ffmpeg libs that are release and my project is debug
any ideas on why a blank project causes a heap corruption error during registration?
I built the examples and I'm not sure they are really working.
If I click on "Click Me" it says plugin working
Nothing happens when I click on Activate Counter or Fire a test event
I've tried IE 8, Firefox 20 and Chrome 26
taxilian 14:05 blank project, not linking to anything unusual?
rcpdesign 14:05 no, linking ffmepg, directx
taxilian 14:05 most likely, then, you're mixing CRT versions in an incompatible way
rcpdesign 14:05 i'm working on release build now to see if that eliminates problems, if not, I'm probably going to need to move along
existing code base is huge
(and works)
taxilian 14:05 plugins can be a pain to work with, and mixing libraries just makes things more difficult
sometimes libs built by different versions of visual studio can be an issue as well
rcpdesign 14:05 agreed
MinSizeRel version built
regsvr32 reports "The specified procedure could not be found"
didn't crash though ;)
taxilian 15:05 hmm. usually that means missing DLL
rcpdesign 15:05 right
let me make sure ffmpeg stuff is in path
taxilian 15:05 dependency walker may help as well
rcpdesign 15:05 everything is in \windows\system32
IESHIMS.DLL
WER.DLL
according to depends these are not around
taxilian 15:05 ieshims is normal to seem missing
and is safe
wer.dll I'm not sure
but it seems familiar
rcpdesign 15:05 Windows Error Reporting
taxilian 15:05 ahh
probably okay
probably not that, then
interesting. does it show DllRegisterServer as being a valid export for the .dll?
rcpdesign 15:05 uh, justa sec... its been a few years since I've done this
yeah, it looks like my DLL has DllRegisterServer and others just fine
taxilian 15:05 weird
you did use the normal prep script, not the _64 one right?
rcpdesign 15:05 right
depends says
At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
and all the ffmpeg DDLs are red
MPR.DLL is red as well
and has an hour glass next to it
and I have no idea what any of that means
taxilian 15:05 interesting
if the ffmpeg dlls are red that's probably the source of the issue
if you can make those black I bet it'll load
rcpdesign 15:05 and the make black command is ??
taxilian 15:05 lol
I mean you need to figure out why it can't load those
and fix that problem
not unlikely that you'll need ot have the ffmpeg dlls in your local dir
rcpdesign 15:05 yeah, tried that... no help
WHT is MPR.DLL?
is that something with Firebreath?
taxilian 15:05 Multiple Provider Router; no idea what it is from, but it is not required by firebreath
I dont' believe
firebreath has no dll dependencies that aren't available even on windows xp
rcpdesign 15:05 i haven't used depends in years so it's going to take awhile to figure out what is missing
taxilian 15:05 :-/
gotta love DLLs
rcpdesign 15:05 hmm
it seems that something is expecting all ffmpeg DLLs to have things like CoCreateInstance, CoTaskMemAlloc, etc, etc
obviously they are not going to have that
taxilian 15:05 that doesn't make any sense
nothing from FireBreath would be expecting that
rcpdesign 15:05 this is really strange
I guess I'm going to be asking this a little late...
but is it ok to just stick the LIB files in the project settings??
taxilian 15:05 in visual studio directly?
rcpdesign 15:05 right
taxilian 15:05 not recommended
I don't know why it would cause the issue you're seeing
but you'd be better off having cmake find them and then include them with target_link_library
rcpdesign 15:05 I put everything in Additional Depends in project settings
taxilian 15:05 http://www.firebreath.org/display/documentation/Using+Libraries
rcpdesign 15:05 I read that but didn't understand it
i actually read it a couple of times
went and looked at the file I was supposed to add things to as to see if something was there I could just copy and modify
gave up
taxilian 15:05 I'd be happy to answer questions
basically it's a question of understanding how cmake works
rcpdesign 15:05 yeah, well, i don't understand how CMake works
i'm wondering what has turned ffmpeg libs into COM dlls
taxilian 15:05 that one has nothing to do with cmake
though I guess it's conceivable that it has to do with something you did differently than cmake when adding the libs, I suppose… seems unlikely, but possible
rcpdesign 15:05 it's odd because I added several LIBs after what CMake had specified
most of them worked
the ffmpeg stuff ended up looking like COM modules
i'm attempting projectDef.cmake right now
taxilian 15:05 recommend using find_library to make sure it locates the library, but absolute paths should theoretically work for testing
rcpdesign 15:05 do I add a target_link_libraries line for each LIB?
taxilian 15:05 target_link_libraries(${PROJECT_NAME} lib1 lib2 lib3 lib4 ...)
rcpdesign 15:05 k
taxilian 15:05 http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:target_link_libraries\
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:target_link_libraries
bleh
rcpdesign 15:05 run prep again?
taxilian 15:05 yes
krishna_ 15:05 all, DCMAKE_BUILD_TYPE=Release isn't helping, is there something else to be done for doing "Release" build?
-DCMAKE_BUILD_TYPE=Release
taxilian 15:05 what platform?
krishna_ 15:05 macos
taxilian 15:05 yeah; tell xcode to build in release mode
cmake_build_type only affects linux
krishna_ 15:05 ah
taxilian 15:05 http://stackoverflow.com/questions/5387076/running-a-release-build-with-xcode-4
krishna_ 15:05 ok
taxilian 15:05 I'm away for a bit
krishna_ 15:05 ok
thanks for the help!
rcpdesign 16:05 taxilian: it's ffmpeg problem..
http://stackoverflow.com/questions/14980236/using-zeranoe-libavcodec-build-in-visual-studio-2008
is this something I can change for CMake?
taxilian 16:05 yeah, just gotta figure out if that's a compiler or a link error
flag, I mean
rcpdesign 16:05 link flag
"/OPT:NOREF"
taxilian 16:05 set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/OPT:NOREF")
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:set_target_properties
rcpdesign 16:05 so if I use the auto-generated FBControl.htm, will it be calling onWindowAttached()?
taxilian 16:05 should, yes
if you didn't disable the GUI
rcpdesign 16:05 that would have been 'false'
the default
taxilian 16:05 I think so
I forget
rcpdesign 16:05 k
i'm not seeing anything happen... and that call should have kicked off quite a bit of activity
what is the simple way to output back to the click
for example
taxilian 16:05 I'd enable logging
rcpdesign 16:05 if I wanted to print 'hello world'
taxilian 16:05 and/or attach a debugger
rcpdesign 16:05 in that function
taxilian 16:05 http://www.firebreath.org/display/documentation/Logging
rcpdesign 16:05 k
i must say that CMake is as confusing as it is powerful
taxilian 16:05 yeah
it's pretty awful. It's nearly as bad as not having it
rcpdesign 16:05 i've been coding for over 25 years and I'm having a real hard time with the docs
taxilian 16:05 those are particularly horrible at first
rcpdesign 16:05 i need to set include directory
taxilian 16:05 though once you get used to them they aren't bad
wamp3ter 16:05 Is there any way to set custom headers when making an AsyncGet. I wanted to send in an If-Modified-Since?
taxilian 16:05 include_directories(…)
wamp3ter: nope
kylehuff 16:05 lol, that is a quotable right there.
wamp3ter 16:05 @taxilian thanks...
rcpdesign 16:05 i think i'd do better at just guessing than reading the docs
i'm pretty sure i would have tried include_directories() pretty early
;)
kylehuff 16:05 one could turn that into a product tagline; "CMake - it's nearly as awful as not having it!"
rcpdesign 16:05 agreed
kylehuff 16:05 of course, for some, the same could be said about women.
taxilian 16:05 nah, you always have to put a positive spin on it: "Cmake — it's better than not having it!"
it's actually a lot better than not having it, but it is a pain
it's nearly as bad as any other good option, in fact
unlike most of the others ( like scons) cmake still lets you use visual studio, xcode, etc
kylehuff 16:05 lol, that sounds so depressing "it's nearly as bad as any other good option, in fact"
rcpdesign 16:05 i added
add_firebreath_library(log4cplus)
prep2008
is now looking for tons of files
what happened?
wamp3ter 16:05 does the plugin onLoad event get fired /after/ the onPluginReady is done or do I have to have some other mechanism to deal with anything I do in onPluginReady event?
taxilian 16:05 rcpdesign that's the log4cplus library
it just has a complicatedish build initially
wamp3ter 16:05 I download some files and check for updates in on onPluginReady and want to be sure that its done before any js on the page uses it
taxilian 16:05 onPluginReady *must not* block
nor must anything else on the main thread
but you could fire another event to tell javascript that it's ready
wamp3ter 16:05 @taxilian it uses asyncthread
s/thread/get/
rcpdesign 16:05 k
wamp3ter 17:05 @taxilian I created a custom event and the associated method to fire in my_API.cpp. I am not sure how I fire it from inside onPLuginReady as I am not sure if I can call getRootJSAPI from in there without messing something up
oh wait I think I can call it as by then the BrowserPtr has been inited
ok, so getRootJSAPI does not appear to return /my/ JSAPI object. Would that be correct or am I missing something?
wamp3ter 17:05 A bit lost about how to call JSAPI methods from within the plugin code, as direct calls result in a compile error, Invoke compiled but does not seem to work, help!
rcpdesign 18:05 taxilian: my plugin builds and loads
I can have the draw function increment and number and print it out using GDI graphics
I can't get any variant of logging to work.
I've tried FBLOG_ERROR, this->m_host->htmlLog, and writing to my own files
no files get created.
I can't run debug because I can't link with ffmpeg because it uses release CRT
My part of the plugin isn't creating a window, initializing directX, opening the stream, etc, etc.
I'm on XP
is there some sort of permissions that keeps me from writing files, opening windows, using directX, sockets, etc?
rcpdesign 18:05 and now the DLL is hung and we reboot...
rcpdesigns 19:05 taxilian: i fixed my logger, but no luck with FB logging... not really a problem though
...and it now all works
wow
unicode issue
many thanks!!
I had to make a bunch of changes for unicode and whilst changing a derived class to use wchar I forgot to change the base class
thus only the base class got called
and, of course, the base class doesn't do anything
;)
Even with all the troubles, 9 hours later my pretty complex streamin A/V player now works in Firefox, Chrome and IE
can't beat that
OSX is next... but only after a few changes to the Win version. callbacks, JS interaction and stuff
taxilian 23:05 rcpdesigns: let me know if you want to try to get your logging working and I'll see if I can help
wamp3ter 23:05 @taxilian is there any way to fire an event from code that's not in pluginAPI.cpp. In plugin.cpp I tried this->getRootJSAPI()->fire_myevent() and also Invoke. The first errors in compilation and th eother does nothing
taxilian 23:05 sure, just cast it to the correct type. FB::ptr_cast<pluginAPI>(getRootJSAPI())->fire_myevent()
getRootJSAPI returns a FB::JSAPIPtr which doesn't know anything about your type
alternately when the JSAPI object is created (also in your plugincore object) you could save a reference to it as a pluginAPIPtr