|IRC Nick||Time (GMT-7)||Message|
|Jake__||07:01||hey guys... how can I utilize file handling capabilities of C++ in Firebreath???|
|linearray||07:01||you just do it|
|ldiqual||07:01||I thought there was no one here
so I asked my question on stackoverflow
|Jake__||07:01||hmmmmmm... i'm just used to creating the function in the header file... and implementing it in the main function(.cpp).. i just don't know how to do it in Firebreath.. can you shed some light on this please?|
|linearray||07:01||Jake__: take a look at yourpluginAPI.cpp/.h
you declare it in the header and implement it in the cpp file
|ldiqual||07:01||linearray, did you take a look at my question ?|
|linearray||07:01||and I'm afraid my cmake isn't good enough to help you
so what do you think ?
(I guess I'm not the only one to require root access in a plugin)
|linearray||07:01||the usual way is to have a privileged process that your plugin communicates with|
|ldiqual||07:01||ok so that's what firesheep does
so i'll have my plugin and a process binary, but how to build them together whith cmake ?
|someone-noone||08:01||ldiqual: tell me more about your problem
you have c++ program and you want to inject it in firebreath, yes?
announce: searching for plugin-developer for hiring for video-player plugin. Need next skillz: firebreath, sdl, linux and windows graphics(opengl\direct x)
|jshanab_wcw||08:01||someone-noone. Sounds like me and the project I am currently on :-)|
|someone-noone||08:01||jshanab_wcw: it's very good. Let's talk private?|
|ldiqual||08:01||well, yes, that's my issue
and I want it to be compiled cross-platform
|someone-noone||08:01||okay. some questions.
Does your program is already cross-platform?
|ldiqual||08:01||well, it will
for now, it's just mac os :)
let me be more precise
i'm actually making a chrome version of firesheep
firesheep is just meant for firefox, and it doesn't use firebreath
(and it's deprecated now)
so I made my plugin, it works fine
but when I want to capture on monitor mode (wifi)
I need root access
so I have two choices
1- a plugin can run as root
2- a plugin can't run as root, but it can launch a process with granted privileges (that's what firesheep does)
|someone-noone||08:01||i'm not sure that plugin can run as root. Probably, only if browser ran at root
to run such process, it should be a root too, isn't it ? :)
sec, I search for a link
|someone-noone||08:01||okay, if no, tell me what is your problem|
it launches a process as root, being not root itself
(it will show a password window)
I want cmake to compile the plugin AND my binary
or maybe it's possible to have multiple files in a single plugin
I don't know...
|someone-noone||08:01||First, you shouldn't compile binary
Compiling is process for sources :)
definetely, you can insert such function (from pastebin) to firebreath
|ldiqual||08:01||ok, you're playing with me :)|
|someone-noone||08:01||you can do it either by inserting it to the existing files
or create a new one
and rerun sh prepare.sh
for "linux only", place your code to Lin folder
and rerun cmake (prepare.sh)
|ldiqual||08:01||what about my program sources ?|
|someone-noone||08:01||also, if you're planning to develop on c\c++ i'd offered you to learn "cmake". Because, it's the most powerful instrument for cross-platform c\c++ development i know
you can insert them into your "lin" folder too
|someone-noone||08:01||but do not forget to run prepare.sh each time you add new files|
|ldiqual||08:01||(cmake syntaxes are pretty ugly, you can admit ^^)|
|someone-noone||08:01||i'm not sure how it is realized in firebreath, but "make" should rerun cmake too(cmake uses caching)
agreed with syntax, but currently there is nothing better then this :)
I see what you mean
lin/mac/win folders already exist ?
in fbgen, right ?
in your project folder
there are mac\lin\win folders
|ldiqual||08:01||ok I was looking into the wrong folder
|someone-noone||08:01||sorry, not "lin", but "X11" folder|
|ldiqual||09:01||ok so let me sum it up
I'll have my program sources in lin/mac/win
I'll have a launcher script my root directory
now, two questions
ok, no, I still don't understand how to do it
the launch commands depend of the system
so let's say there will be win/launch.cpp, lin/launch.cpp, etc...
how do I know the current system so I can include it ?
|someone-noone||09:01||there are several ways you can do it
first of all, cmake will automatically will choose only lin,win or mac directory to compile
also you can make some "defines". I think they are already defined in firebreath
|ldiqual||09:01||ok, I guess I should learn more about cmake
I'll read some tutorials
|someone-noone||09:01||yeah, this is not really hard|
|ldiqual||09:01||thank you ;)
gotta go !
have a nice day
|someone-noone||09:01||you will spend one hour to understand whole philosophy and will save some days
good luck )
|linearray||14:01||taxilian_away: you won't believe this (or maybe you will): setting something like [oPanel setAllowedFileTypes:[NSArray arrayWithObject:@"txt"]]; works everywhere except in chrome.|