From c7be90d12885ec04b46e92e3555eb8bcce1a1b61 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 16 Sep 2016 23:17:09 +0200 Subject: [PATCH] [DEBUG] MacOs build back --- gale/context/IOs/Context.cpp | 10 +++++----- gale/context/MacOs/Context.mm | 8 ++++---- gale/context/MacOs/Windows.mm | 1 + lutin_gale.py | 14 ++++++++------ 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gale/context/IOs/Context.cpp b/gale/context/IOs/Context.cpp index b7deedc..e6e759a 100644 --- a/gale/context/IOs/Context.cpp +++ b/gale/context/IOs/Context.cpp @@ -69,7 +69,7 @@ public: } void MAC_SetMouseState(int32_t _id, bool _isDown, float _x, float _y) { OS_SetInput(gale::key::type::mouse, - (_isDown==true?gale::key::status::down:gale::key::status_up), + (_isDown==true?gale::key::status::down:gale::key::status::up), _id, vec2(_x, _y)); } @@ -81,7 +81,7 @@ public: } void MAC_SetInputState(int32_t _id, bool _isDown, float _x, float _y) { OS_SetInput(gale::key::type::finger, - (_isDown==true?gale::key::status::down:gale::key::status_up), + (_isDown==true?gale::key::status::down:gale::key::status::up), _id, vec2(_x, _y)); } @@ -119,12 +119,12 @@ public: } OS_setKeyboard(_special, move, - (_isDown==false?gale::key::status::down:gale::key::status_up), + (_isDown==false?gale::key::status::down:gale::key::status::up), _isARepeateKey); } else { OS_setKeyboard(_special, gale::key::keyboard::character, - (_isDown==false?gale::key::status::down:gale::key::status_up), + (_isDown==false?gale::key::status::down:gale::key::status::up), _isARepeateKey, _unichar); } @@ -134,7 +134,7 @@ public: bool _isDown) { OS_setKeyboard(_special, _move, - (_isDown==true?gale::key::status::down:gale::key::status_up)); + (_isDown==true?gale::key::status::down:gale::key::status::up)); } void openURL(const std::string& _url) { mm_openURL(_url.c_str()); diff --git a/gale/context/MacOs/Context.mm b/gale/context/MacOs/Context.mm index f182ee7..d67f421 100644 --- a/gale/context/MacOs/Context.mm +++ b/gale/context/MacOs/Context.mm @@ -67,7 +67,7 @@ class MacOSInterface : public gale::Context { } void MAC_SetMouseState(int32_t _id, bool _isDown, float _x, float _y) { OS_SetInput(gale::key::type::mouse, - (_isDown==true?gale::key::status::down:gale::key::status_up), + (_isDown==true?gale::key::status::down:gale::key::status::up), _id, vec2(_x, _y)); } @@ -103,16 +103,16 @@ class MacOSInterface : public gale::Context { move = gale::key::keyboard::right; break; } - OS_setKeyboard(_special, move, (_isDown==false?gale::key::status::down:gale::key::status_up), _isAReapeateKey); + OS_setKeyboard(_special, move, (_isDown==false?gale::key::status::down:gale::key::status::up), _isAReapeateKey); } else { - OS_setKeyboard(_special, gale::key::keyboard::character, (_isDown==false?gale::key::status::down:gale::key::status_up), _isAReapeateKey, _unichar); + OS_setKeyboard(_special, gale::key::keyboard::character, (_isDown==false?gale::key::status::down:gale::key::status::up), _isAReapeateKey, _unichar); } } void MAC_SetKeyboardMove(gale::key::Special& _special, enum gale::key::keyboard _move, bool _isDown, bool _isAReapeateKey) { - OS_setKeyboard(_special, _move, (_isDown==true?gale::key::status::down:gale::key::status_up), _isAReapeateKey); + OS_setKeyboard(_special, _move, (_isDown==true?gale::key::status::down:gale::key::status::up), _isAReapeateKey); } void openURL(const std::string& _url) { std::string req = "open " + _url; diff --git a/gale/context/MacOs/Windows.mm b/gale/context/MacOs/Windows.mm index 4387f23..e3bd4fc 100644 --- a/gale/context/MacOs/Windows.mm +++ b/gale/context/MacOs/Windows.mm @@ -10,6 +10,7 @@ #include #include +#include @implementation GaleMainWindows diff --git a/lutin_gale.py b/lutin_gale.py index 98086c4..6082f8c 100644 --- a/lutin_gale.py +++ b/lutin_gale.py @@ -145,7 +145,7 @@ def create(target, module_name): my_module.add_path(tools.get_current_path(__file__)) my_module.add_flag('c++', [ - "-DGALE_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + "-DGALE_VERSION=\"\\\"" + tools.version_to_string(my_module.get_pkg("VERSION")) + "\\\"\"" ]) if "Linux" in target.get_type(): @@ -156,22 +156,24 @@ def create(target, module_name): target.add_action("BINARY", 50, "gale-auto-wrapper", tool_generate_main_java_class) # TODO : Add the same for BINARY to create a console interface ? elif "Windows" in target.get_type(): - #my_module.add_depend("glew") + my_module.add_depend("glew") pass elif "MacOs" in target.get_type(): - my_module.add_export_flag('link', [ + my_module.add_flag('link', [ "-framework Cocoa", "-framework QuartzCore", "-framework AppKit" - ]) + ], + export=True) elif "IOs" in target.get_type(): - my_module.add_export_flag('link', [ + my_module.add_flag('link', [ "-framework CoreGraphics", "-framework UIKit", "-framework GLKit", "-framework Foundation", "-framework QuartzCore" - ]) + ], + export=True) return my_module