IRC Log Viewer » #firebreath » 2010-11-30

IRC Nick Time (GMT-7) Message
Plasma- 01:11 Hi guys. I have a basic plugin (basically the example plugin without any other code) built that works fine under Windows FF/Chrome/IE; however Safari on windows (not mac) the plugin does not appear in its list of installed plugins list. Ive even tried putting it in the \safari\plugins folder and had no luck
google has not been any help in trying to find out whether there is an option to debug why a plugin is not loading; so I have zero idea why its not loading
I built the plugin on osx and that version works for safari osx fine - so its just the windows plugin not running in windows safari, any ideas anyone? Thanks
Sinisa 02:11 hi all
i'd need help a bit to setup project for mac osx
anyone free?
Plasma- 02:11 hi
have you read the wiki on FB.org? I followed that and it worked out pretty well
Sinisa 02:11 i've created project source with python, but i have some error report from .sh script
Plasma- 02:11 can u pastebin?
Sinisa 02:11 yeah, actually i already made plugin for windows
Plasma- 02:11 you probably forgot to run the init script for osx perhaps?
then you run the build script for the plugin on mac; I didnt need to open xcode itself
so prepmac.sh you need to do first
(after you've built the windows plugin thats ok)
Sinisa 02:11 error i get from prepmake.sh is: line 10: cmake: command not found
Plasma- 02:11 yep, you probably need to install something
Sinisa 02:11 i would guess - do you know what?
python is there - as it generated project files (cpp etc.)
my osx is 10.6.4
Plasma- 02:11 cmake is a build utility/compiler; you need to install it via termainal and apt-get install I think
Sinisa 02:11 mac book pro
Plasma- 02:11 im not a mac or linux guru, but its something like that
http://www.google.com.au/search?sourceid=chrome&ie=UTF-8&q=cmake+command+not+found#sclient=psy&hl=en&q=install+cmake+osx&aq=f&aqi=&aql=&oq=&gs_rfai=&pbx=1&fp=7b5e783a0afd3fff
Sinisa 02:11 ok thanks, will try that out and let you know how it goes
:-)
Plasma- 02:11 if you dont have xcode installed; do that first
you can get xcode from apple's site, you need to register a free developer account thou
Sinisa 02:11 oh i do - i've developed quite a lot - but this is first time i setup FB on mac
Plasma- 02:11 http://www.cmake.org/cmake/resources/software.html
yeah grab Mac OSX Universal (.dmg installer for Tiger or later)
grab the .dmg and install; I think I had to do that too
Sinisa 02:11 awesome, thanks. can i ask you again, if i get stuck?
Plasma- 02:11 if im here sure; I may go afk though (im just a FB user like you)
Sinisa 02:11 ok thanks man!
Plasma- 02:11 but from memory just install cmake and then that prep script etc then run xcodebuild from the cmdline
its on the FB.org wiki
np, afk
Sinisa 03:11 hey I got (probably stupid) question, but I'm a bit confused - for Mac version, I've successfully ran python script, and cmake script - how do I open project in X-Code?
I've been looking in build/projects/projname/ folder, I can see files generated there, but cant see xcode project - on Windows though it would generate vcproj & sln...
is there anything else in terminal I should execute? after execiting prepmake.sh ?
ok I am blind. there is prepmac.sh and I am running prepmake.sh instead.
my bad
Ok this is weird, I can see prepmac.sh in the folder, but in terminal it says: "prepmac.sh: command not found"
Plasma- 03:11 im back
Sinisa 03:11 I've deleted entire FB, unpacked it again, did python first, and then tried "prepmac.sh projects"
Plasma- 03:11 you probably mean to type ./prepmac.sh not just prepmac.sh
Sinisa 03:11 oh crap, I forgot how it is in terminal
Plasma- 03:11 and check the fb wiki/instructions for mac, it says to use xcodebuild or something to takecare of building (at least I did this) I didnt need to use xcode itself; maybe you want to though
and you may need to chmod +x prepmac.sh first to make it executable
kalev_ 03:11 yeah, prepmac.sh is current needed to manually patch xcode project files after running cmake; there is a cmake patch pending for review to get proper CFBundle support for all generators which should make this patching step unnecessary: http://www.vtk.org/Bug/view.php?id=11295
Sinisa 03:11 apparently it's already set, as I can see .xcodeproj there :-)
thanks! I'm working straight +12h, can't think clearly anymore
btw pc game is moved to http://ifoam.ponds.com.cn/test/game/index.html , client is changing something on server, so it's in test folder for now
if you're on windows machine, check it out
Sinisa 03:11 it works beautifuly on mac
iaincollins 03:11 Last night, I dreamt about plug-ins :-(
taxilian 09:11 iaincollins: Welcome to my world =]
Plasma-: kudos on popping in and helping another FireBreath user =] very much appreciated, as many of us were asleep at the time =]
gotta admit; 50K lines of code isn't bad for a little project like ours :-P
neilg_ 09:11 That's pretty cool actually. And yet crazy to comprehend at the same time!
taxilian 09:11 you're telling me. I'm pretty sure I wrote at least 75% of that
kalev_ 09:11 taxilian: by the way, I was looking at latest Firebreath tree and noticed that you have a JSON library in there
taxilian 09:11 yes
kalev_ 09:11 are you aware that there's a JSON parser in boost too?
taxilian 09:11 I was not aware of that :-P
kalev_ 09:11 it's part of boost::property_tree, http://www.boost.org/doc/libs/1_45_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.json_parser
taxilian 09:11 can it convert to json as well?
kalev_ 09:11 no idea, I've only used boost::property_tree for xml parsing
taxilian 09:11 ahh.. parses XML as well? excelent
I'm still thinking that when we replace the .rgs files it might make sense to do so with the (rough) .xml format used by WiX
kalev_ 09:11 hmm. these files need to be parsed at compile time, right?
taxilian 09:11 not neccesarily. currently the .rgs files are injected as resource files and parsed when DllRegisterServer is called
we could optionally do it at compile time
if we were to do that, I guess we could probably use an XSLT transform or something
kalev_ 09:11 oh, this is awesome. I can already see how this makes it so much easier to make firebreath a proper library :)
taxilian 09:11 lol
the #1 thing keeping me from being able to do that right now is ActiveX
kalev_ 09:11 ... and this is what I know nothing about
taxilian 09:11 and this #1 thing keeping me from getting rid of ATL in favor of something more friendly is the need for something to replace the .rgs
the sad thing is that I think the only person around who knows more than I do about it is Dries, and he's about 180 degrees away from me. we're rarely on at hte same time
kalev_ 09:11 there was somebody on the ml who started working on getting rid of ATL; did he get anywhere?
taxilian 09:11 the reason that's really sad is that there is way too much I don't know
that's Dries; he made some progress, but ran into the .rgs replacement problem =]
if you want to write something, that would get it a lot closer :-P
kalev: so currently I'm using the json library to create json, rather than to parse it; I can't find a way to create json with boost. Granted, creating it is a lot easier than parsing it =] perhaps we'll do our own boost-based one, though
kalev_ 09:11 taxilian: it looks like it can write JSON too
let me try if it actually works, sec.
neilg_ 09:11 I like Cajun as a C++ JSON library. I haven't tried the boost one though but I have quite a lot of experience with Cajun!
taxilian 09:11 the one that is in there is there simply because it had a compatible license and I needed something =]
I can switch it out easily enough, if there is something better to use
or we could even have multiple
kalev_ 09:11 taxilian: so, I converted one of the boost's xml examples to use JSON instead.
sample json file for testing: http://fpaste.org/HELu/
and code, which first reads the file and then serializes everything into another file: http://fpaste.org/QAQi/
taxilian 09:11 not bad. can it work with a completely dynamic format, rather than a struct?
kalev_ 09:11 sure.
taxilian 09:11 cool. What we probably should do is build something with this to make it use FB::variant; then we could extend the convert_cast functionality of FB::variant a bit and use JSON the same way we'd use anything else
kalev_ 09:11 the idea is that you first create an in-memory tree-like data structure, and then the library can serialize it into xml or json or some other format
taxilian 09:11 makes sense
definitely need to play with this more
don't suppose you have time to distill this into a usable libary, do you? =]
kalev_ 09:11 I _think_ it should already be in place: it's boost's header-only library
anyway, I need to go now, see you!
taxilian 09:11 kalev_: yeah, I really want some auto-conversion stuff tied into FB::variant; something like FB::toJSON(variant_val) and variant_val = FB::fromJSON(str)
take care
=]
thanks for mentioning this
amackera 09:11 Fully support the move to github :D
How does dev/stable work with github?
taxilian 10:11 amackera: dev is the master branch
so dev is now default
when we do a new stable release, we create a new branch called firebreath-<ver>
so currently the stable branch is firebreath-1.3
minor releases are tagged
you saw I added you to the project?
amackera 10:11 I see
taxilian 10:11 the frusrating thing is that annotated tags automatically create downloads on github, but they don't include submodules
so you can download any of the releases that way, but you don't get boost
amackera 10:11 Lame :(
So we still need to roll our own downloads?
taxilian 10:11 moderately, yes
well, currently they are still on gcode
that and issues are all that is left there
since github is so close to working correctly, there are a couple of options
I could keep the downloads on gcode, but add docs for "when you download firebreath, also download boost from this repo here..."
I could move boost back into the repo, which option I do not like
and would also hose the ohloh stats and any other stats we run on our repo, which I really don't like
amackera 10:11 same
ah crap brb, forgot to start irssi in screen
1 sec
okay there we go
taxilian 10:11 hehe
okay, I mixed the first option up
the first option would be to keep downloads on gcode as they are now
another option is to move boost back into the repo
a third option would be to use github downloads but add docs for "if you don't have boost, get it from here..."
or even have CMake download boost automatically
if you don't have it
amackera 10:11 can you do that with cmake?
taxilian 10:11 yes, actually
amackera 10:11 that's the best choice then i think
taxilian 10:11 though I don't know if I could extract it or not
amackera 10:11 ahh, true
taxilian 10:11 I could probably try to extract it, and then print out a message if it fails :-P
or package a binary in firebreath for extracting it
amackera 10:11 and there's no way to include boost in the github downloads?
taxilian 10:11 or, I could keep the downloads on gcode and have the build script update the downloads page on firebreath.org to point to the latest download
well, boost is available as a download from github, but it's from another repository
github uses git-archive, which doesn't fetch submodules
amackera 10:11 right
lame...
taxilian 10:11 yep
amackera 10:11 I wonder what other people do? surely other cpp projects use boost
taxilian 10:11 generally speaking they make you install it yourself
which, btw, even if you use the binary install, can take up to 30 minutes on slower computers, such as my 2.8Ghz core 2 duo macbook pro w/ 8 gig of ram...
amackera 10:11 :S
taxilian 10:11 and thus we include it in firebreath =]
amackera 10:11 Hm...
FB_GitHubBot 11:11 FireBreath: master Richard Bateman * dcbf06f (2 files in 2 dirs): Added check_boost function in cmake ... - http://bit.ly/eXzdBJ
taxilian 11:11 hehe... I love our little githubbot
taxilian 12:11 well, this is just awesome. github requires all downloads to hit their https server
but their https server uses a wildcard certificate that not all websites accept
sorry, not all clients
so I can't automatically download from github using wget
nor using cmake
nirvdrum 12:11 wget --no-check-certificate
It is annoying. They did it response to the cookie hijacking discussion going on.
taxilian 12:11 yeah; except windows doesn't have wget by default :-/
I was hoping to use raw cmake
which would work fine if we could just use http
so I'll have to add wget.exe (400K) to the repo just to support stinking windows
and I can't get curl working to download it on mac
ok, got curl working now
just irritates me that they force all downloads through https, when https is harder to support
with plain HTTP just about *anything* can download it
I can't decide which is more ridiculous... the fact that you can do this in cmake, or the fact that I'm actually doing it
nirvdrum 12:11 Heh.
It was basically so your cookie couldn't get hijacked.
Not awesome, but I can understand it.
taxilian 12:11 who cares about the cookie when you're doing a download? I just want a simple download! <pouts>
nirvdrum 12:11 Because it's the same auth cookie that lets you delete your repository.
If you're just doing the cmake / wget thing, probably not a problem. But if you visit the download page from the browser you're already logged into, the browser is going to push out the auth cookie.
taxilian 12:11 right... I just wish they'd make it possible to link to it without using https
if you try, it redirects you to https and then back to http
nirvdrum 12:11 Ahh.
Sinisa 12:11 hi all
taxilian 12:11 hey
Sinisa 12:11 i have some weird problem with xcode & firebreath. if i add OpenGL.framework, and include <OpenGL/OpenGL.h> and just try one gl function (eg. glTranslatef(..)), in linking it says cannot find external dependency.
taxilian 12:11 how did you add the opengl framework?
Sinisa 12:11 right-click on project, add existing frameworks
pop-up shows frameworks for selected sdk
taxilian 12:11 ok, that's your first problem
never try to modify the project in xcode
hang on
Sinisa 12:11 ok
taxilian 12:11 when you use cmake, you use cmake... do everything in cmake
Sinisa 12:11 ok, i'm not familiar with cmake, so I have to ask for step-by-step instructions..
taxilian 12:11 hmm. info should be here, but is not: http://www.firebreath.org/display/documentation/Using+Libraries
hang on some more
I will find you an example
Sinisa 12:11 awesome, thanks!
taxilian 12:11 the best thanks you could give me would be to add this to the docs when you figure it out
so I don't have to tell the next person =]
ok
https://github.com/firebreath/FireBreath/blob/master/cmake/projectConfig_main.cmake.in
look at line 97
find_library(OPENGL_FRAMEWORK OpenGL) (amackera, tell me if I'm doing this right). then you can target_link_libraries(${PROJ_NAME} ${OPENGL_FRAMEWORK}) in your projectDef.cmake file
Sinisa 12:11 ok, and for any other library, same block of code?
taxilian 12:11 yep
that will find the location of hte library
Sinisa 12:11 and for static-linked libs?
taxilian 12:11 and set the variable ${OPENGL_FRAMEWORK}
Sinisa 12:11 not-frameworks
taxilian 12:11 so you can then use that later
libs should be the same
I think
a framework is just a fancy library
Sinisa 12:11 ok let me try
so basically i need to recreate project?
using prepmac.sh?
taxilian 12:11 yes
Sinisa 12:11 ok
taxilian 12:11 any time you change things
Sinisa 12:11 can I change in existing project, or I gotta always start with blank firebreath/
?
taxilian 12:11 your projects/ dir is yours
you never need to recreate it
some changes may require you to remove the build/ dir
but that's disposable anyway
projects/ is not
Sinisa 12:11 ok
trying out now
taxilian 12:11 in fact, I normally keep projects outside of my firebreath dir
this may help: http://colonelpanic.net/2010/11/firebreath-tips-working-with-source-control/
Sinisa 12:11 ok great
how does cmake find libs?
taxilian 12:11 you know, I'm not totally sure :-P
it's pretty good at it, though, when they are installed properly
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_library
Sinisa 12:11 yeah, but these are my own libs, from some other projects, like guilib, jpeglib, some other stuff...
they are in my projects folders, outside fb
taxilian 12:11 look at the docs for the command
if you know for sure where they are, you can just use the path to the library
or you can have find_library search
Sinisa 13:11 how do I set path to the library instead of eg. find_library(CARBON_FRAMEWORK Carbon) ?
taxilian 13:11 just doing find_library just gets you the path
and puts it in the variable CARBON_FRAMEWORK
you still have to add it to the link_libraries list with target_link_libraries http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:target_link_libraries
you can just put the path to the lib file in target_link_libraries directly
look at http://www.firebreath.org/display/documentation/Using+Libraries
Sinisa 13:11 btw, FB can be compiled with MacOSX10.5 SDK, correct?
just to check, for each framework, i need to have following cmake lines:
find_library(name)
set( PLUGIN_INTERNAL_DEPS ${name} ${PLUGIN_INTERNAL_DEPS})
taxilian 13:11 that will work as long as you set that before PLUGIN_INTERNAL_DEPS is used (I think in projectDef.cmake)
and AFAIK FB should work fine with the 10.5 SDK
btw, can some people try out the new downloads? http://www.firebreath.org/display/documentation/Download Ignore the google code ones, those should still be the same. Try getting the latest firebreath build. (I'm still fixing the 1.3 builds)
FB_GitHubBot 13:11 FireBreath: master Richard Bateman * 2035cac (1 files in 1 dirs): Added windows wget.exe and will now try to use wget or curl before using cmake to download
FireBreath: master Richard Bateman * dafa2de (1 files in 1 dirs): Updated common.cmake
FireBreath: master Richard Bateman * 36487e1 (1 files in 1 dirs): Merged
FireBreath: master Richard Bateman * f039969 (1 files in 1 dirs): Auto-downloads seem to be working
FireBreath: master commits 7d82b33...f039969 - http://bit.ly/gHvn9N
amackera 13:11 Ooo fancy
Sinisa 13:11 ok, I added to projectConfig_main.cmake.in, inside if(APPLE) section, these: find_library(OPENGL_FRAMEWORK OpenGL) and right below that is set (PLUGIN_INTERNAL_DEPS ${OPENGL_FRAMEWORK} ${PLUGIN_INTENRAL_DEPS})
then I recreated xcode project (deleted build dir)
but still if I try any of gl functions, link fails
taxilian 13:11 Sinisa: no no no
don't ever modify projectConfig_main.cmake
that was intended as an example
sorry
Sinisa 13:11 whops :-)
taxilian 13:11 you shouldn't normally be changing anything outside of your projects dir
open Mac/projectDef.cmake in your project dir
that's where it should go
Sinisa 13:11 ah ok, sorry, it's 4:30am here
so making stupid mistakes
taxilian 13:11 lol. I understand completely
I'd tell you to get sleep and come back, but I won't be here when you get back if you do :-P
Sinisa 13:11 ok looking at it, so where should I place it? and thanks for helping out, btw
ah ok
at the end
taxilian 13:11 like I said, if you're really greatful feel free to update the docs with this when you get it working =] that would be the best thanks you could give me. look at the bottom where...
yeah
exactly
Sinisa 13:11 target_link_libraries
ok
taxilian 13:11 so you can either add then to that
or add them to PLUGIN_INTERNAL_DEPS before then
either way
that will be mac specific
if you want to add libraries for all platforms, that's a different file
Sinisa 13:11 crap. in build process, i see errors "library not found for -lfind_library"
taxilian 13:11 what is the line you're using?
Sinisa 13:11 right below line target_link_libraries(${PROJNAME} I've added:
find_library(OPENGL_FRAMEWORK OpenGL)
and then next line (actually 3 lines)
set ( PLUGIN_INTERNAL_DEPS
${OPENGL_FRAMEWORK}
${PLUGIN_INTERNAL_DEPS})
and then is the one that was there before ($PLUGIN_INTERNAL_DEPS} and then )
taxilian 13:11 try doing a message("OGL_FW: ${OPENGL_FRAMEWORK}")
and see if it found it
oh, wit
wait
Sinisa 13:11 ok
taxilian 13:11 you can't put find_library insdie target_link_libraries
that's a function
call
Sinisa 13:11 oh ok, so how do i do that?
taxilian 13:11 the find_library and such all has to be outside of the target_link_libraries(..... ) call
before it
Sinisa 13:11 appears it worked now
link went ok
taxilian 13:11 good
Sinisa 13:11 is there any way i can recreate project, but keep somehow source that I have added to it?
taxilian 13:11 why would you want to recreate the project?
Sinisa 13:11 i mean, if i realize i need to add more frameworks, do i need to delete build folder?
taxilian 13:11 don't neccesarily have to delete the build folder
running the prep script again should be enough
Sinisa 13:11 oh ok
taxilian 13:11 but you should usually only run fbgen.py once
Sinisa 13:11 that's a relief :-)
taxilian 13:11 shouldn't be
Sinisa 13:11 yes, that I figured out ;-)
taxilian 13:11 deleting the build folder should never be a problem
Sinisa 13:11 ok, let me now try to link all libs & source... hopefully will get it done quickly
taxilian 13:11 remember that build/ is disposable
so if you delete it, you won't lose any changes
all of your changes are in the projects/ folder
Sinisa 13:11 ok!
taxilian 13:11 if you change anything in your build/ directory, that will get overwritten
Sinisa 13:11 so for static-linked libs (.a), do I add them also with cmake?
neilg_ 13:11 Yes
amackera 13:11 Yep you can
neilg_ 13:11 You have to
amackera 13:11 use target_link_library
neilg_ 13:11 Sorry I wasn't around earlier, I could also have helped. I've had to do this a lot recently!
Sinisa 13:11 :-) great now I got your attention
so basically i just figured out how to add frameworks
now i got some of my own .a libs to add as well
so how do i specify path to .a file?
taxilian 13:11 should just have to put in the path
FB_GitHubBot 13:11 FireBreath: firebreath-1.3 Richard Bateman * 7b5cdc5 (2 files in 2 dirs): Auto-downloads backported from master - http://bit.ly/gLSCdn
amackera 13:11 target_link_libraries(${PROJNAME} /path/to/liblibrary.a)
Sinisa 13:11 so basically i just add line inside target_link_library("/Projects/libs/libname.a") ?
ah ok
no "
?
amackera 13:11 not required
neilg_ 13:11 Well, you can
Sinisa 14:11 and for headers?
or I add path to them in xcode?
amackera 14:11 include_directories("/path/to/headers.h")
Sinisa 14:11 ah
ok
thanks
amackera 14:11 actually.. that might not work
you might need to add them to your header path in xcode
taxilian 14:11 amackera: no
use include_directories
amackera 14:11 there's some weird cmake thing about adding include directories iirc
taxilian 14:11 just make sure you do the path to the include dir you want to add, not the path to the .h file
well, it's always worked for me =]
amackera 14:11 hmm.. i must be wrong :P it's been a while
Sinisa 14:11 ok, trying out now
taxilian 14:11 you probably have to do it before the project is added, though
so it'll need to be before add_mac_target
amackera 14:11 ahh yeah that's it
Sinisa 14:11 and for other source, I just add it in xcode?
taxilian 14:11 no
add it in your project dir
then re-run prepmac
or add the files to the SOURCES variable (look in CMakeLists.txt and Mac/projectDef.cmake for places things are added to SOURCES)
Sinisa 14:11 but if some source is outside (eg. in some svn folder?)
taxilian 14:11 and then re-run prepmac.sh
Sinisa 14:11 ok
so basically i do nothing in xcode regarding settings?
amackera 14:11 correcto mecto
neilg_ 14:11 I have lines like:
taxilian 14:11 amackera: have you seen what I just did in cmake just now? =]
neilg_ 14:11 SET (MYINCLUDE_DIR "${FireBreath_SOURCE_DIR}/external/my/include/path;${FireBreath_SOURCE_DIR}/another/include/path" CACHE STRING "My include dir. You may add additional search paths here. Use ; to separate multiple paths.")
INCLUDE_DIRECTORIES(${MYINCLUDE_DIR})
Wait... that's a bad example. You were talking about libraries.
taxilian 14:11 lol
same principles apply, though; just use different functions
amackera 14:11 Does windows come with tar?
taxilian 14:11 nope, but firebreath now comes with 7za
neilg_ 14:11 Nope
amackera 14:11 :P
taxilian 14:11 and wget
neilg_ 14:11 Although you can achieve the same thing with copy
taxilian 14:11 not if you're trying to extract a tarballl
neilg_ 14:11 If you're trying to extract then... that would be a whole world of pain ;)
taxilian 14:11 so when you download firebreath and run the prep script for the first time, it will now check if boost is there or not
if you specified WITH_SYSTEM_BOOST, then it does nothing
if you checked it out of git, then it runs git submodule update --init --recursive to get firebreath-boost
if you didn't, then it checks and uses either curl or wget to download the latest
and then uses either tar or 7za to extract it
then puts it in place and deletes the temporary files
all with cmake
amackera 14:11 haha, badass!
taxilian 14:11 and more than a little nuts
amackera 14:11 I smell an epic blog post
taxilian 14:11 lol
it's not really anything strange enough to blog about
just a bunch of hacks
it's all in common.cmake
now, getting the doxygen docs into confluence all automatically... that was an epic hack
amackera 14:11 no kidding
neilg_ 14:11 My lines for adding library dependencies look like:
set (SANDSTONE_DIR ${FireBreath_SOURCE_DIR}/external/sandstone/lib)
target_link_libraries(${PLUGIN_NAME} debug "${SANDSTONE_DIR}/debug/sandstone.lib")
target_link_libraries(${PLUGIN_NAME} optimized "${SANDSTONE_DIR}/release/sandstone.lib")
The "debug" and "optimized" option is very useful!
Sinisa 14:11 thnx neilg
neilg_ 14:11 That's in my projectDef.cmake (just an FYI)
taxilian 14:11 neilg_: hey, I remembered something I want you to put on the wiki! ;-)
neilg_ 14:11 Uh-oh. lol What was that?
taxilian 14:11 exactly what you're talking about right now =]
added libs and include dirs
^added^adding^
neilg_ 14:11 Oh! Okay. I can do that.
taxilian 14:11 http://www.firebreath.org/display/documentation/Using+Libraries
needs to be updated
and maybe expanded
ultimately we should really have a "Updating the FireBreath CMake Project" or similarly named project
Sinisa 14:11 just to verify - if I add some cpp/h to projects/projectname folder, and then run prepmac.sh, will it show these source in xcode when I open the project?
or i gotta specify path in cmake?
taxilian 14:11 the default cmakelists.txt file that is in there should find them
and add them to the xcode project
look at CMakeLists.txt in your projectname dir, you'll see a file(GLOB ... function call
neilg_ 14:11 Yup, it works for me
taxilian 14:11 that searches for files
very useful trick
Sinisa 14:11 so basically, if I wanna add this /Projects/source/test.cpp, how will that cmake line look like?
i'm still unclear
file(GLOB GENERAL ABSOLUTE ".....test.cpp") ?
taxilian 14:11 the GLOB does wildcard searches
so it's already set up to find any .cpp or .h files in your project dir
neilg_ 14:11 Right. It finds any source code files adjacent to the CMakeLists.txt
Sinisa 14:11 will it look in subfolders of my project dir?
neilg_ 14:11 So any source files in that directory will be found and added
taxilian 14:11 no, but you could add that easily enough if you want
Sinisa 14:11 because my plugin src is in subfolder, and i don't wanna change that as VS under Windows is reading them from that path
how do I add that?
neilg_ 14:11 I would say that you want CMake to generate the solution for Windows as well
It will make maintaining things much easier for you
(I learnt this the hard way...)
Sinisa 14:11 sure, i agree, i mean, i don't wanna be moving source code, if i don't really have to. in project folder is subfolder gameapp, which is os-independent code
so VS is reading that source already (i got win plugin done)
neilg_ 14:11 Wouldn't it make more sense to build the game as a library and link it into the plugin?
Rather than adding the source into the plugin directly?
Just trying to make life easier for you
Sinisa 14:11 harder to do debugging
and then i gotta always rebuild library
then link to plugin
then test
taxilian 14:11 well, gotta head to class
sounds like neilg_ has you covered ;-) thanks guys
be back in a bit
Sinisa 14:11 ok, taxilian thanks for help
neilg_ 14:11 taxilian: Have fun!
Sinisa: You're right, that's the downside - but the upside is it makes dealing with cross-platform issues much easier
It keeps maintaining the project easier (for the same reason)
But you're absolutely correct - that's a downside for sure
But when you're dealing with libraries that are only available for one platform (which may not be an issue for you!) then being able to build the game as a library and link it into the plugin becomes very powerful indeed
Sinisa 14:11 just to check about adding include paths
1. I do it in projectDef.cmake
2. it looks something like include_directories("/Projects/source/include/")
neilg_ 14:11 The include paths go inside the CMakeLists.txt
Sinisa 14:11 target_link_libraries also?
or those go to projectDef.cmake
neilg_ 14:11 Though you _could_ put them into projectDef.cmake if they're platform specific
Sinisa 14:11 headers are not
neilg_ 14:11 The target_link_libraries go into projectDef.cmake because libraries are going to be platform-specific
Right
Sinisa 14:11 ok
neilg_ 14:11 I mean, you could put them both in projectDef.cmake and it would work - it's just a rule of thumb
Sinisa 14:11 so grammar is include_directories("path") correct?
because I'm trying and can't find eg. jpglib.h even though I've placed path to the folder that contains it
taxilian 14:11 Sinisa: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:include_directories
make sure the include_directories call is before add_mac_target
Sinisa 14:11 i don't see add_mac_target in CMakeLists.txt
taxilian 14:11 oh, right; if in CMakeLists.txt then it should be before the last line that is something about add_platform()
or include_platform()
Sinisa 14:11 I see it in projectDef
taxilian 14:11 I forget
Sinisa 14:11 yeah it is
way before that
taxilian 14:11 ok
Sinisa 14:11 placed it after file(GLOB...
but for some reason still cant find headers in xcode :-(
taxilian 14:11 and after the ) as well, right? can you pastebin your CMakeLists.txt file?
neilg_ 14:11 You have to delete your build directory and regenerate it again
Sinisa 14:11 let me log in with mac (this is PC, mac is next to it)
ah ok
will do that
neilg_ 14:11 I have had that problem and that's the only way I can resolve it
I'm convinced it's a bug in CMake but it doesn't seem like others have cared about it ;)
taxilian 14:11 ahh, yeah, that could be
neilg_ 14:11 taxilian: I edited the wiki to add info about adding libraries
It seems CMake is great at picking up some changes... but not include paths
taxilian 14:11 cool. thx
Sinisa 14:11 nope didt work. let me relog with mac
ok here i am
include_directories("/Projects/rgl_core_and_thirdpart_20101130_1904/core/" "/Projects/rgl_core_and_thirdpart_20101130_1904/zip123/macosx/include/" "/Projects/rgl_core_and_thirdpart_20101130_1904/solpos/macosx/include/" "/Projects/rgl_core_and_thirdpart_20101130_1904/lodepng/macosx/include/" "/Projects/rgl_core_and_thirdpart_20101130_1904/jpglib/macosx/include/" "/Projects/rgl_core_and_thirdpart_20101130_1904/ftgl/macosx/include/" "/
this is after file( GLOB..... )
in CMakeLists.txt
but in xcode project, #include "jpglib.h" cannot find it, and it's in the folder
taxilian 14:11 Sinisa: pastebin your file
or fpaste
or gist
or whatever =]
Sinisa 14:11 um... not sure how to
taxilian 14:11 go to http://fpaste.org/
paste your file contents in
then send us the resulting URL
Sinisa 14:11 ah ok
http://fpaste.org/abkK/
never used this before, quite cool :-)
taxilian 14:11 hmm. neilg_: hope you can see it, web just stopped working for me
gotta love the campus internet connection
Sinisa 14:11 and this is my projectDef.cmake for static libs & frameworks: http://fpaste.org/NzFL/
taxilian 14:11 Sinisa: look in your xcode project settings where you'd normally put in the include directories and see if those are all listed
Sinisa 14:11 ok
nope
Header Search Paths is empty
as well as LIbrary Search Paths
taxilian 15:11 anything interesting in the output of prepmac.sh?
Sinisa 15:11 http://fpaste.org/DrDR/
i love this thing fpaste :-)
taxilian 15:11 lol
hmm. it all looks good
Sinisa 15:11 deleted build, running prepmac again
taxilian 15:11 you're certain the directories are valid?
brb
Sinisa 15:11 I was very careful about it
and checked several times
char by char
this is prepmac with empty build: http://fpaste.org/gzHI/
checking out paths again
taxilian 15:11 hmm. looks good to me
did you close and reopen the xcode project?
usually it prompts you, but occasionally I've had it not
Sinisa 15:11 i've now closed it
will delete build folder, try one more time
nope, i dont see header paths in xcode props
taxilian 15:11 that's bizarre
i've never had that problem
amackera: I take it this is the issue you've seen before?
Sinisa 15:11 i'm gonna actuall cry :-)))
ok, maybe it's my long folder name
let me change that
taxilian 15:11 you could try putting it in projectDef
Sinisa 15:11 nope doesn;t work
taxilian 15:11 hmm
Sinisa 15:11 this is my projectDef.cmake: http://fpaste.org/E8cg/
taxilian 15:11 try doing a cmake —build build_dir and then fpaste the output
Sinisa 15:11 i've added include paths before add mac plugin
build_dir is which path? project? or build?
taxilian 15:11 build
Sinisa 15:11 http://fpaste.org/y1u7/
taxilian 15:11 sorry, you need two hyphens
--
not -
it should actually try to build the project
Sinisa 15:11 oh ok it's doing that
bunch of errors
undefines - can't find headers
taxilian 15:11 right
send me the output
Sinisa 15:11 still printing it out
pasting into fpaste...
i think it's too big to paste it there
it gets time-out
taxilian 15:11 then give me a part of it
that has 20 or so of the errors
the first ones
neilg_ 15:11 Sorry, I was in a meeting
Still need help?
Sinisa 15:11 http://fpaste.org/4QRO/ that's build log
part of it
hey neilg
yeah
unfortunately
neilg_ 15:11 I don't think include_directories is set up correctly
I don't know for sure - I can only say it's not how I'm doing it
taxilian 15:11 look at the first line
the include dirs are there
well, the 3rd line technically
look toward the end
-I/Projects/rgl/thirdparty/zip123/macosx/include etc
in fact, it's obvioulsy finding some of them
/Projects/rgl/thirdparty/ft239/macosc/include/ft2build.h is throwing one of the errors
Sinisa 15:11 yeah looking at it
taxilian 15:11 so where is ftheader.h located?
Sinisa 15:11 oh crap, there is subfolder there
how do I make it look recursive?
taxilian 15:11 you can't
you have to add each subdirectory
Sinisa 15:11 ok so add them all
taxilian 15:11 just like any build system
Sinisa 15:11 ok, now at least i know how ;-)
thanks fo rhelp!
taxilian 15:11 good luck
neilg_ 15:11 That's what I get for skimming ;)
taxilian 15:11 hehe
neilg_ 15:11 At least you're getting somewhere. Good luck!
Sinisa 15:11 whoa it compiled most of it, other errors are something else related
nitrogenycs 15:11 does anybody know of a better way to make the browser fullscreen than to make the user press F11 (or send the F11 key message to the browser window itself)?
taxilian 15:11 nope
Sinisa 15:11 for plugin?
nitrogenycs 15:11 yes. I figured it's not possible through javascript (which is just fair)
I don't want only the plugin to be maximized though, the whole browser
taxilian 15:11 sending the F11 key to the browser is actually a cool idea :-P
that's what I'd try
Sinisa 15:11 maybe you don't need it. create window from plugin, alway on top, covers entire desktop (like games in fullscreen)
plugin can create it's own windows if needed, you're not bound to hwnd in browser
nitrogenycs 15:11 I know, but in this case I really need it
I might go with the F11 method
or just display a message box to the user for now :)
Sinisa 16:11 question - how do i link FB with dylib ?
need to link with OpenCV - already got OpenCV dylibs and headers
headers are included
amackera 16:11 The same way you link a static lib
The linker should figure it out I thin
thinks*
lol
think*
Sinisa 16:11 trying out
amackera 16:11 You will also need to include the dylib somewhere that the system can find it
Either in the plugin bundle or in like /usr/local/lib or wherever
I think that's how it works :P
Sinisa 16:11 it's installed by MacPort in opt/local/lib
but compiler cannot link it
in /opt/local/lib/libcv.2.1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
amackera 16:11 Ah, I see
that error message tells you all you need to know
either build your plugin for the dylib arch
Sinisa 16:11 so it;s 64bit?
amackera 16:11 Seems like it
Sinisa 16:11 ok
let's give it a try
default FB setting is both
should I set 64bit only?
amackera 16:11 If the dylib is 64 bit only then yes
Sinisa 16:11 or this message means dylib is 32bit
because I changed in xcode props to be 64bit only
but still get same error
amackera 16:11 Ahh
Sinisa 16:11 I'm afraid to ask what happend :-)
oh, do i set 32/64bit from cmake?
amackera 16:11 You can yes
its in your prepmac script
You can find out what arch(s) the dylib uses by using the "file" command
Sinisa 16:11 crap it's 64bit
i can now link opencv
but none of my libs
so i gotta recompile them all
amackera 16:11 haha, yes
wait
Sinisa 16:11 craaaaaap
amackera 16:11 hold on :P
you could download OpenCV source and compile as a fat binary
or figure out how macports configures its build scripts and change that to be universal
That's much easier than recompiling all your libraries
not to mention anyone that has a 32bit machine (or is running their browser in 32 bit mode), won't be able to load your plugin
if you only compile a 64 bit version
Sinisa 16:11 yeah
u got the point
amackera 16:11 I ran into the exact same problem, except it was FreeType2 and not OpenCV
The state of building/linking libraries in mac os x is awful, just awful
taxilian 17:11 amackera: it could be worse… it could be linux
sabotaged|wk 17:11 anyone have any idea why IE is giving me an Invalid Arguments javascript exception for attachEvent?
taxilian 17:11 well, what arguments are you passing?
and I assume that this is a secondary JSAPI object, not the root?
sabotaged|wk 17:11 yes it isn't the root
is that even allowed?
taxilian 17:11 what, events on the root?
sabotaged|wk 17:11 events not on the root
taxilian 17:11 oh, yeah
but it's handled differently
sabotaged|wk 17:11 oh
taxilian 17:11 and it's quite possible that it's been broken somehow and nobody has noticed :-P
what arguments are you passing?
sabotaged|wk 17:11 well, it works for npruntime
pretty much same as the sample
taxilian 17:11 well, that's totally different code :-P
what is the exact text of the error?
excpetion
sabotaged|wk 17:11 JScript Debugger - Invalid Arguments
taxilian 17:11 … it should give you more than that
weird
I would recommend attaching a debugger
and set a breakpoint in JSAPI_IDispatchEx.h in Invoke
to make sure attachEvent is getting called
if you can send me a sample project, I can glance at it
sabotaged|wk 17:11 oh yeah
yeah so there's a FB::invalid_arguments exception in JSAPI_IDispatchEx.h
at std::string evtName = args[0].convert_cast<std::string>();
taxilian 17:11 well, what did you pass in for the first argument? exactly
sabotaged|wk 17:11 onDebugMessage
taxilian 17:11 the string or the javascript object?
sabotaged|wk 17:11 string
taxilian 17:11 are you 110% sure? because it doesn't look like it
also, the event name should be all lower case
or it won't work correctly
it's an oddity of IE
just FYI
sabotaged|wk 17:11 both when i register it in my plugin and javascript?
taxilian 17:11 yes
sabotaged|wk 17:11 ok
i'll try that first
taxilian 17:11 that's not going to fix a convert_cast error
a convert_cast error means that your first parameter is not actually a string
which is why I keep asking for the exact line of javascript that you are using, so I can see if there is anything that might suggest what is going on
sabotaged|wk 18:11 obj.attachEvent("ondebugmessage", func);
same thing, changed plugin code to use lower case too
taxilian 18:11 hmm. then I recommend you use the debugger to walk through where it converts the arguments from VARIANT to FB::variant and see if you can figure out where the string is getting lost and what is happening :-/
or send me a test project
but I probably wouldn't have time tonight
sabotaged|wk 18:11 ok ill try seeing why the cast fails
thanks
taxilian 18:11 you'll want to look not at the cast itself
but at what is in the VARIANT when it comes in
it should be easier
sabotaged|wk 18:11 oh ok
FB_GitHubBot 20:11 FireBreath: cmake_patch Richard Bateman * dfc4c3c (2 files in 2 dirs): Made changes to work with patched cmake. Hopefully this patch will be in cmake 2.8.4 - http://bit.ly/hrflH4
taxilian 21:11 nirvdrum: btw, you may find the JSAPIProxy object I've been working on lately interesting
FB_GitHubBot 22:11 FireBreath: master Richard Bateman * e66bfb7 (2 files in 1 dirs): Added swap and reset to JSAPIProxy - http://bit.ly/fg9WVE
nirvdrum 22:11 I'm about to crash, but I'll have to bug you about it later.
taxilian 22:11 aight. take care, and thanks again