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

IRC Nick Time (GMT-7) Message
cfrost 02:04 Hi, does anyone know how to cross compile a NPAPI plugin made using Firebreath?
reichi 02:04 cross compiling is quite a pain if you don't have a proper toolchain :/
cfrost 02:04 I have a tool chain :-)
And I have found an example of how to make a toolchain file in cmake:
I guess this is how it should be done, but I can't figure out how to include the file when building my plugin
Currently I'm building the provided example
reichi 02:04 hmm
i don't know cmake
at all
cfrost 03:04 should I ask the mailing list instead?
reichi 03:04 taxillian will drop in in like 5 hours or so
he's living in the us
so it's in the middle of the might there :)
(or very earyl morning)
cfrost 03:04 okay, I will try again when he is there :-)
tszabo_ 03:04 Hello again, do you know if it is possible, to get a FB::Pluginwindow in ::StaticInitialize() ?
reichi 03:04 i don't think so
tszabo_ 03:04 We would like to use the SetCooperativeLevel() method there
reichi 03:04 you would you ever get a pluginwindow which doesn't exist?
plugin instances are, iirc, intialized after StaticInitialize
you cannot get something the browser hasn not created
tszabo_ 03:04 yep, you are rigth
reichi 03:04 creation and desctruction of npapi plugins in fully in the hand of browser underneath
so is the creation of the window / surface
and i THINK StaticInitialize is being called long before that
(more or less long)
tszabo_ 03:04 :)
yeah, I see what do you mean
reichi 03:04 you may do what you plan when the window has been initialized, though ;)
there are events for that
tszabo_ 03:04 yep, but it is too late :) we would like to SetCooperativeLevel() on the static init. Anyway, we will figure it out, thanks! :)
reichi 03:04 taxillian may very well be able to give a concrete answer on wether and if, how that can be done
RenJuan 04:04 SFAIK, cross compiling as such isn't something that makes sense for FB
"cross compiling" normally means building binaries for platform Y on distinct platform X
like the way Android normally builds on linux
(i.e. intel targetting ARM)
FB supports 3 platforms with a common C++ code set, that's different
in each case you're presumed to build on that platform, targetting it
should have said Android builds on linux, windows, or Mac, and targets ARM
(mostly ARM)
and also "cross-compiling' normally refers to crossing a binary arch like that, e.g. intel vs ARM. FB only runs on intel SFAIK
though in principle I guess the linux version might have run on something else
reichi 05:04 nope
we are using firebreath on an embedded MIPSEL-based platform
(linux based)
the only "drawback" is that you usually have to get rid of the X11 specific stuff
but that's a matter of a day or two
once u understand how FB works
"X11 specific" stuff includes GTK ;)
the biggest advantage of FB, is, imo, also the most negative aspect of it :/
boost makes it easy to use
but creates absolutely insane amounts of inlined code at compile time
which makes the compiled result big...
RenJuan 05:04 I've never understood why it drags in so much of boost it doesn't seem to use
reichi 05:04 it doesn't
it's the price you pay for heavily template based c++ code
when compiling all templates are resolved to inlined-code
which is a LOT in FB
it's a general known "issue" of boost
it bloats your binary
RenJuan 05:04 well I'd already been a boost user for some years before ever hearing of FB
many if not most boost libs are isolated functionality
and many are header only
reichi 05:04 well yes
RenJuan 05:04 I've not really had significant problems with server4you, btw
reichi 05:04 i may have been very general there
you've got a vserver there?
RenJuan 05:04 glad I switched from godaddy
got much more iron for less money and the service is adequate
no dedicated
I only use linode and AWS for virtual
reichi 05:04 hmm
the smaller ecoservers are really cheap
RenJuan 05:04 that's somekina vserver i guess?
reichi 05:04 nope
Athlon X2
"old" hardware pretty much
recycled for cheap rent
RenJuan 05:04 yeah says "AMD Athlon(tm) II X4 605e Processor"
reichi 05:04 you can decide wether you want to pay ~25USD but a pretty high one-time fee of i guess almost 200 USD
or skip the one-time fee and pay a higher monthly fee
RenJuan 05:04 no I guess you're talking about a lower tier
than I have
reichi 05:04 yeah
i currently think about moving my private server
it's currently a KVM with only 1GB RAM
but it get it for free
RenJuan 05:04 I'll probably be doing my first serious scaling at AWS this year
reichi 05:04 that funky automated stuff?
RenJuan 05:04 at s4y I have that cpu and 4GB RAM, like 1 or 2 TB of disk, forget which
reichi 05:04 could be large X6
RenJuan 05:04 well I'll prolly use puppet and the ec2 tools, is that what you mean?
reichi 05:04 i don't know AWS ;)
with "funky automated stuff" i meant automatic scaling
with instance start and shutdowns
and automatic balancing over all running instances
RenJuan 05:04 "automatic" is perspectival. as the programmer that makes stuff happen, ... (rhetorical ellipsis)
for the average citoyen, all tech is automagic (hate that expression)
is Merkel nearing the end of her term? She's been there a long time.
reichi 06:04 i guess not
just today the newspapers said that Steinbr├╝ck (her only real opponent) currently has bad survey results
RenJuan 06:04 well at least they have term limits here, usually one is envying europe
reichi 06:04 i think it doesn't matter a lot who's to be elected...
not for the small people
RenJuan 07:04 well you know the big people are actually pretty small minded so why can't the small people get big?
SinnerSmile 11:04 Hello gentlemen
taxilian 11:04 g'morning
SinnerSmile 11:04 I'v have this code and got FB::variant_detail::conversion::convert_variant: none of the 5 overloads can convert all parameter error, can you give me advise, what can i do?
And this functions must be devided
taxilian 11:04 you can't expose either of those to the page
because POINT is not a type that FireBreath knows about
SinnerSmile 11:04 wow
taxilian 11:04 expose something else that takes for example x, y, and then create a point and call your other function
easily solved
SinnerSmile 11:04 am can i then expose pt.left and pt.right as int for example and then use?
Oh, seesm yes)
Will try it right now
*am ye x, and y, a bit mixed up with rect struc
SinnerSmile 11:04 Hm, if im exposing pt.x and pt.y as int's the same way and then getting it in ClickSemulationClick(int ptx, int pty) , it still gives me such an errors. Can't convert from "TLast" to "int &"
Can't even find out what is TLast
taxilian 11:04 you can't use &
just do int
not int&
first, if it's an int that doesn't make sense anyway
and secondly if it's an object it needs to be const Type&
there is no pass by reference into a JSAPI method
because it has to convert things from the format js sends us into c++ types
SinnerSmile 11:04 isn't it must be "int &xxx " in function that im exposing from?
taxilian 12:04 it cannot be int &xxx
it would have to either be const int &xxx (which makes no sense), or just int xxx
SinnerSmile 12:04 Like this? But is it makes any sense? I mean are pty and ptx now exposed from ClickSemulationMove to be used in ClickSemulationClick or aren't
taxilian 12:04 that won't work
it will compile, but assigning values to ptx and pty does nothing
you cannot pass by reference from javascript
except as a JSObjectPtr, I suppose. you could pass in an array or an object and modify that
but you aren't in the same process space, even if the browser stored data in the C++ datatypes that you arbitrarily select, which it doesn't
so pass by reference isn't possible with primitive types
As a side note, you misspelled "Simulation" and it should probably be "simulated"
SinnerSmile 12:04 Ye i know that, ahah, dont know why i dont edited this semulation yet)
Well what can i do? I need this functions to be separeted in C++, maybe i can expose ptx and pty from function to JS variables and then use 2nd with this js variables somehow?
taxilian 12:04 you could also return a FB::VariantList with two values
or a FB::VariantMap with ptx and pty values
the first becomes a js array, the second a js object
you could pass *in* a js object and then set values on it
lots of options
but you can't pass primitives by reference
SinnerSmile 12:04 that's harder then i thought, ok will dig in it.
if i will return VariantList with 2 values then i can run my 2nd function with parameter of that VariantList 1st and 2nd values, right?
SinnerSmile 13:04 Confused a bit
FB::VariantList vars = FB::variant_list_of(1)("2")(3.4);
what does it mean, it makes container with 1 , "2" and 3.4 in it?
VariantList i mean
taxilian 13:04 yes
SinnerSmile 13:04 And i can't find some kind of pointer to list containment, how can i point to some of these values to use them in function?
SinnerSmile 13:04 anybody alive?
And i can't find some kind of pointer to list containment, how can i point to some of these values to use them in function?
no? nobody?
that's sad
reichi 14:04 what do you mean
SinnerSmile 14:04 im talking about FB::VariantList
FB::VariantList vars = FB::variant_list_of(1)("2")(3.4) to create lisk with this 3 values, but then how can i poin to one of them form one of my functions?
taxilian 14:04 back
SinnerSmile: You can pass a javascript object in and it will be a FB::JSObjectPtr
you can then use GetProperty, SetProperty, and Invoke to manipulate it
SinnerSmile 14:04 Have you any code sample?
taxilian 14:04 SinnerSmile: sure. look in the firebreath source code
do a search for JSObjectPTr
it's used all over the place
SinnerSmile 14:04 ok, thx will try something tomorrow
taxilian 14:04 good luck
JohnS 16:04 Hi all, I am getting the following error while compiling a plugin.
error: gtk/gtk.h: No such file or directory
taxilian 16:04 sounds like you need to install libgtk+-2.0
I assume you're on linux
JohnS 16:04 I have all the necessary X11 files. The issue is only with this project.
Yes. Debian 6. Squeeze.
taxilian 16:04 then you must be missing an include dir
JohnS 16:04 FB is working well on a different project. I reviewed the build.make files and they are different between both the projects.