#gemrb@irc.freenode.net logs for 16 Jun 2013 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:05:34] <-- Maighstir has left IRC (Quit: .)
[00:36:31] --> brada has joined #gemrb
[01:30:18] <-- brada has left IRC (Quit: brada)
[05:42:02] --> brada has joined #gemrb
[07:16:25] <-- Pepelka has left IRC (Ping timeout: 264 seconds)
[07:16:31] --> Pepelka has joined #gemrb
[07:17:56] <-- brada has left IRC (Quit: brada)
[08:01:18] --> Yoshimo has joined #gemrb
[08:22:43] --> fizzle has joined #gemrb
[08:37:20] --> lynxlynxlynx has joined #gemrb
[08:37:20] <-- lynxlynxlynx has left IRC (Changing host)
[08:37:20] --> lynxlynxlynx has joined #gemrb
[08:37:20] --- ChanServ gives channel operator status to lynxlynxlynx
[08:40:56] <-- edheldil has left IRC (Remote host closed the connection)
[10:02:10] <-- Yoshimo has left IRC (Ping timeout: 268 seconds)
[10:13:17] --> Yoshimo has joined #gemrb
[11:13:41] <-- Yoshimo has left IRC (Ping timeout: 248 seconds)
[16:12:31] --> brada has joined #gemrb
[16:57:37] --> Maighstir has joined #gemrb
[17:10:30] <fizzle> brada: how do you determine whether PLGUN_DIR etc are wanted or not?
[17:10:46] <fizzle> they don't see to be defined ever now
[17:11:00] <fizzle> that broke my setup at least
[17:11:47] <brada> you mean plugindir?
[17:11:58] <fizzle> yes
[17:12:54] <brada> better fix that
[17:13:37] <brada> how did we define it before?
[17:13:45] <brada> pass on the command line?
[17:14:16] <fizzle> no, in cmake
[17:14:31] <fizzle> but the variable name is different from the makefile name
[17:14:51] <brada> i see that
[17:14:59] <brada> ill go look at the diff
[17:16:22] <brada> ok so PLUGIN_DIR is set by LAYOUT then?
[17:17:00] <fizzle> possible, I didn't look at it very closely
[17:17:59] <brada> you should be able to supply one on the command line too right?
[17:18:23] <fizzle> yes, I think that's what I did, actually
[17:18:54] <brada> -DPLUGIN_DIR
[17:20:17] <brada> i pickup cmake as i go so im hardly an expert
[17:20:38] <fizzle> that makes two of us
[17:20:39] <brada> i guess layout is overwriting what you put on the cli, but that isnt any diffrent than before
[17:21:10] <fizzle> I'd expect it to work the other way around, actually
[17:21:37] <fizzle> you always have a layout, right?
[17:22:29] <brada> it looks like you always have one
[17:22:29] <fizzle> and since I don't have my plugins in a standard layout location PLUGIN_DIR must take precedence
[17:22:33] <brada> and need one in fact
[17:23:42] <brada> it would help to know exactly what the problem is. is it that PLUGIN_DIR is set or not set?
[17:24:08] <fizzle> PLUGINDIR is undefined in config.h, is the problem
[17:25:07] <brada> so where is HAVE_CONFIG_H set?
[17:25:11] <brada> maybe that is the problem
[17:25:26] <brada> er nevermind
[17:25:37] <brada> misread
[17:26:38] <brada> if its not set that looks like PLUGIN_DIR is not set
[17:27:08] <brada> ok
[17:28:02] <brada> so before you probably had PLUGINDIR defined but it was defined as ""?
[17:28:21] <fizzle> no, it was defined as the directory where my plugins are
[17:28:37] <brada> but i dont see how...
[17:28:56] <brada> i believe you
[17:29:00] <brada> i just dont see it
[17:29:00] <fizzle> I think the problem is PLUGINDIR vs PLUGIN_DIR
[17:29:18] <fizzle> cmake probably checks PLUGINDIR but that's not defined
[17:29:30] <fizzle> PLUGIN_DIR is
[17:30:08] <fizzle> cmakedefine VAR VALUE checks whether VAR is defined, not VALUE
[17:30:54] <brada> hmm
[17:31:07] <brada> we should keep them the same anyway imo
[17:33:07] <brada> ok
[17:33:15] <brada> so we need 2 variables for each define?
[17:33:18] <brada> is that right?
[17:33:53] <fizzle> why two?
[17:34:50] <brada> well we cant have PLUGIN_DIR defined when its empty
[17:35:02] <brada> unless there is a macro that works diffrent than ifdef
[17:35:04] <fizzle> you should be able to cmakedefine PLUGINDIR "${PLUGINDIR}"
[17:35:30] <brada> wont that make #define /plugin/path /plugin/path
[17:35:39] <brada> or does it just check that variable xisists?
[17:35:40] <fizzle> no
[17:35:42] <brada> ok
[17:36:18] <brada> well try it
[17:36:26] <brada> if it works fix the othes and commit is :)
[17:36:49] <fizzle> lazy bum :P
[17:37:17] <brada> he he
[17:37:30] <brada> id do it but i dont have a good way to test like you do
[17:41:46] <fizzle> wasn't your problem that PLUGIN_DIR was always defined
[17:42:10] <fizzle> after changing this it will again be always defined afaics
[17:44:55] <brada> yes that was the problem
[17:45:04] <brada> having paths defined as ""
[17:46:25] <fizzle> that problem will be back then
[17:47:30] <brada> :/
[17:47:38] <brada> surely there is some way to reconcile this
[17:50:07] <fizzle> just go back to #define and check for "" via the preprocessor?
[17:51:54] <fizzle> eh, no string comparison
[17:55:21] <brada> yeah :(
[17:57:56] <brada> so the 2 vars for each path thing comes back to mind
[18:07:41] <fizzle> http://stackoverflow.com/questions/3781520/how-to-test-if-preprocessor-symbol-is-defined-but-has-no-value
[18:07:43] <Pepelka> c++ - How to test if preprocessor symbol is #define'd but has no value? - Stack Overflow
[18:11:00] <brada> neat
[18:11:10] <brada> does it break for some compilers tho?
[18:13:08] <fizzle> no idea
[18:31:07] <brada> i can look at it on tuesday if you dont solve it first
[18:31:19] <lynxlynxlynx> you can detect an empty string with cmake or even checkf for a path
[18:32:28] <lynxlynxlynx> if(NOT IS_DIRECTORY ${PLUGINDIR}) unset(PLUGINDIR) endif() # something like this before the config is generated
[18:34:25] <brada> that should work
[18:35:49] <lynxlynxlynx> the manual is a bit scary about it though
[18:36:12] <lynxlynxlynx> string(LENGTH <string> <output variable>) # strlen < 1 would be safer, if it works
[18:40:13] <lynxlynxlynx> or just a STREQUAL ""
[18:40:33] <lynxlynxlynx> wierd order of thought
[19:56:39] --> nutron has joined #gemrb
[20:16:33] <brada> i wont be suprised if this refactor ends up being less lines of code :D
[20:16:47] <brada> not counting the GPL header of course
[20:17:12] <brada> im only at +91 right now
[20:18:11] <lynxlynxlynx> always a good thing :)
[20:20:18] <brada> yup. still more code to remove
[20:20:33] <brada> sdlvideo.cpp is a few hundred lines smaller
[20:22:36] <Lightkey> om nom nom
[20:22:53] <brada> time to kill off vptr :D
[20:23:02] <brada> this will take a while ill bet
[21:25:53] <-- fireglow has left IRC (Ping timeout: 240 seconds)
[21:53:43] <-- fizzle has left #gemrb
[21:57:06] --> fireglow has joined #gemrb
[22:10:03] <brada> well ended up +133, but I feel like things are a lot nicer
[22:10:10] <brada> and paves the way for SDL2
[22:12:36] <brada> still some improvements to make so well see
[22:36:06] <-- Maighstir has left IRC (Quit: .)
[22:48:20] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[22:48:28] <brada> ready for initial review
[22:48:29] <brada> https://github.com/bradallred/gemrb/compare/951ca22d44e7550215f9ffbe06e345599a339c81...sprites
[22:48:35] <Pepelka> Comparing 951ca22d44e7550215f9ffbe06e345599a339c81...sprites · bradallred/gemrb · GitHub
[22:48:36] <Pepelka> »gemrb - Game Engine Made with preRendered Background«
[23:51:48] --> duckpunch has joined #gemrb
[23:53:17] <brada> its probably a good time to kill the automake stff