diff --git a/lutinParseSubFolders.txt b/lutinParseSubFolders.txt new file mode 100644 index 0000000..a04b5ea --- /dev/null +++ b/lutinParseSubFolders.txt @@ -0,0 +1,15 @@ +sample/Accelerometer +sample/CameraPosition +sample/Collision +sample/DoubleView +sample/GameFPS +sample/GamePad +sample/GameRacer +sample/GameSpaceSimulation +sample/Light +sample/Material +sample/MeshCreator +sample/Particle +sample/RayTest +sample/Script +sample/StereoVision \ No newline at end of file diff --git a/sample/CameraPosition/appl/Windows.cpp b/sample/CameraPosition/appl/Windows.cpp index c7630ca..254671d 100644 --- a/sample/CameraPosition/appl/Windows.cpp +++ b/sample/CameraPosition/appl/Windows.cpp @@ -22,6 +22,7 @@ appl::Windows::Windows() { addObjectType("appl::Windows"); + propertyTitle.setDirectCheck("example ege : CameraPosirion"); } @@ -66,21 +67,21 @@ static std::shared_ptr createViewBoxStar() { void appl::Windows::init() { ewol::widget::Windows::init(); - setTitle("example ege : CameraPosirion"); - getObjectManager().periodicCall.bind(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera); + getObjectManager().periodicCall.connect(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera); m_env = ege::Environement::create(); // Create basic Camera m_camera = std::make_shared(vec3(30,30,-100), vec3(0,0,0)); m_env->addCamera("basic", m_camera); - std::shared_ptr tmpWidget = ege::widget::Scene::create(m_env); + std::shared_ptr tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_ERROR("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("basic"); setSubWidget(tmpWidget); } diff --git a/sample/CameraPosition/appl/main.cpp b/sample/CameraPosition/appl/main.cpp index 946e920..d46cc3c 100644 --- a/sample/CameraPosition/appl/main.cpp +++ b/sample/CameraPosition/appl/main.cpp @@ -20,9 +20,16 @@ class MainApplication : public ewol::context::Application { public: - bool init(ewol::Context& _context, size_t _initId) { - APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); - + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + std::string tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); @@ -33,14 +40,18 @@ class MainApplication : public ewol::context::Application { std::shared_ptr basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); - APPL_INFO("==> Init APPL (END)"); - return true; + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - void unInit(ewol::Context& _context) { - APPL_INFO("==> Un-Init APPL (START)"); + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... - APPL_INFO("==> Un-Init APPL (END)"); + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; diff --git a/sample/CameraPosition/lutin_egeCameraPosition.py b/sample/CameraPosition/lutin_egeCameraPosition.py index ddb5998..22aaa7a 100644 --- a/sample/CameraPosition/lutin_egeCameraPosition.py +++ b/sample/CameraPosition/lutin_egeCameraPosition.py @@ -28,6 +28,9 @@ def get_compagny_name(): def get_maintainer(): return ["Mr DUPIN Edouard "] +def get_version(): + return [0,1] + def create(target, module_name): # module name is 'edn' and type binary. my_module = module.Module(__file__, module_name, get_type()) @@ -44,8 +47,12 @@ def create(target, module_name): my_module.copy_path("data/*") - # set the package properties : - my_module.pkg_set("VERSION", "0.0.0") + my_module.compile_flags('c++', [ + "-DPROJECT_NAME=\"\\\"" + my_module.name + "\\\"\"", + "-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + ]) + + # set the package properties: my_module.pkg_set("VERSION_CODE", "0") my_module.pkg_set("COMPAGNY_TYPE", get_compagny_type()) my_module.pkg_set("COMPAGNY_NAME", get_compagny_name()) @@ -54,7 +61,5 @@ def create(target, module_name): my_module.pkg_set("PRIORITY", "optional") my_module.pkg_set("DESCRIPTION", get_desc()) my_module.pkg_set("NAME", get_name()) - - # add the currrent module at the return my_module diff --git a/sample/Collision/appl/Windows.cpp b/sample/Collision/appl/Windows.cpp index 26a31c4..9302e30 100644 --- a/sample/Collision/appl/Windows.cpp +++ b/sample/Collision/appl/Windows.cpp @@ -25,6 +25,7 @@ appl::Windows::Windows() { addObjectType("appl::Windows"); + propertyTitle.setDirectCheck("example ege : DoubleView"); } @@ -69,9 +70,8 @@ static std::shared_ptr createViewBoxStar() { void appl::Windows::init() { ewol::widget::Windows::init(); - setTitle("example ege : DoubleView"); - getObjectManager().periodicCall.bind(shared_from_this(), &appl::Windows::onCallbackPeriodicCheckCollision); + getObjectManager().periodicCall.connect(shared_from_this(), &appl::Windows::onCallbackPeriodicCheckCollision); m_env = ege::Environement::create(); // Create basic Camera @@ -79,12 +79,13 @@ void appl::Windows::init() { m_camera->setEye(vec3(100*std::sin(m_angleTetha),100*std::cos(m_angleTetha),40*std::cos(m_anglePsy))); m_env->addCamera("basic", m_camera); - std::shared_ptr tmpWidget = ege::widget::Scene::create(m_env); + std::shared_ptr tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("basic"); setSubWidget(tmpWidget); } diff --git a/sample/Collision/appl/main.cpp b/sample/Collision/appl/main.cpp index 946e920..d46cc3c 100644 --- a/sample/Collision/appl/main.cpp +++ b/sample/Collision/appl/main.cpp @@ -20,9 +20,16 @@ class MainApplication : public ewol::context::Application { public: - bool init(ewol::Context& _context, size_t _initId) { - APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); - + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + std::string tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); @@ -33,14 +40,18 @@ class MainApplication : public ewol::context::Application { std::shared_ptr basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); - APPL_INFO("==> Init APPL (END)"); - return true; + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - void unInit(ewol::Context& _context) { - APPL_INFO("==> Un-Init APPL (START)"); + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... - APPL_INFO("==> Un-Init APPL (END)"); + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; diff --git a/sample/Collision/lutin_egeCollision.py b/sample/Collision/lutin_egeCollision.py index 580ffbf..7b163a5 100644 --- a/sample/Collision/lutin_egeCollision.py +++ b/sample/Collision/lutin_egeCollision.py @@ -28,6 +28,9 @@ def get_compagny_name(): def get_maintainer(): return ["Mr DUPIN Edouard "] +def get_version(): + return [0,1] + def create(target, module_name): # module name is 'edn' and type binary. my_module = module.Module(__file__, module_name, get_type()) @@ -44,8 +47,12 @@ def create(target, module_name): my_module.copy_path("data/*") + my_module.compile_flags('c++', [ + "-DPROJECT_NAME=\"\\\"" + my_module.name + "\\\"\"", + "-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + ]) + # set the package properties : - my_module.pkg_set("VERSION", "0.0.0") my_module.pkg_set("VERSION_CODE", "0") my_module.pkg_set("COMPAGNY_TYPE", get_compagny_type()) my_module.pkg_set("COMPAGNY_NAME", get_compagny_name()) diff --git a/sample/DoubleView/appl/Windows.cpp b/sample/DoubleView/appl/Windows.cpp index 931e110..eeac442 100644 --- a/sample/DoubleView/appl/Windows.cpp +++ b/sample/DoubleView/appl/Windows.cpp @@ -25,6 +25,7 @@ appl::Windows::Windows() { addObjectType("appl::Windows"); + propertyTitle.setDirectCheck("example ege : DoubleView"); } @@ -69,7 +70,6 @@ static std::shared_ptr createViewBoxStar() { void appl::Windows::init() { ewol::widget::Windows::init(); - setTitle("example ege : DoubleView"); m_env = ege::Environement::create(); // Create basic Camera @@ -86,40 +86,45 @@ void appl::Windows::init() { std::shared_ptr camera4 = std::make_shared(vec3(0,100,0), vec3(0,0,0)); m_env->addCamera("left", camera4); - std::shared_ptr tmpSizerVert = ewol::widget::Sizer::create(ewol::widget::Sizer::modeVert); + std::shared_ptr tmpSizerVert = ewol::widget::Sizer::create(); if (tmpSizerVert == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { + tmpSizerVert->propertyMode.set(ewol::widget::Sizer::modeVert); setSubWidget(tmpSizerVert); - std::shared_ptr tmpWidget = ege::widget::Scene::create(m_env); + std::shared_ptr tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("basic"); tmpSizerVert->subWidgetAdd(tmpWidget); } - std::shared_ptr tmpSizerHori = ewol::widget::Sizer::create(ewol::widget::Sizer::modeHori); + std::shared_ptr tmpSizerHori = ewol::widget::Sizer::create(); if (tmpSizerHori == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { + tmpSizerHori->propertyMode.set(ewol::widget::Sizer::modeHori); tmpSizerVert->subWidgetAdd(tmpSizerHori); - tmpWidget = ege::widget::Scene::create(m_env); + tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("front"); tmpSizerHori->subWidgetAdd(tmpWidget); } - tmpWidget = ege::widget::Scene::create(m_env); + tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_CRITICAL("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("top"); tmpSizerHori->subWidgetAdd(tmpWidget); } diff --git a/sample/DoubleView/appl/main.cpp b/sample/DoubleView/appl/main.cpp index 946e920..d46cc3c 100644 --- a/sample/DoubleView/appl/main.cpp +++ b/sample/DoubleView/appl/main.cpp @@ -20,9 +20,16 @@ class MainApplication : public ewol::context::Application { public: - bool init(ewol::Context& _context, size_t _initId) { - APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); - + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + std::string tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); @@ -33,14 +40,18 @@ class MainApplication : public ewol::context::Application { std::shared_ptr basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); - APPL_INFO("==> Init APPL (END)"); - return true; + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - void unInit(ewol::Context& _context) { - APPL_INFO("==> Un-Init APPL (START)"); + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... - APPL_INFO("==> Un-Init APPL (END)"); + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; diff --git a/sample/DoubleView/lutin_egeDoubleView.py b/sample/DoubleView/lutin_egeDoubleView.py index 71bdddd..aa47e9c 100644 --- a/sample/DoubleView/lutin_egeDoubleView.py +++ b/sample/DoubleView/lutin_egeDoubleView.py @@ -28,6 +28,9 @@ def get_compagny_name(): def get_maintainer(): return ["Mr DUPIN Edouard "] +def get_version(): + return [0,1] + def create(target, module_name): # module name is 'edn' and type binary. my_module = module.Module(__file__, module_name, get_type()) @@ -44,8 +47,12 @@ def create(target, module_name): my_module.copy_path("data/*") - # set the package properties : - my_module.pkg_set("VERSION", "0.0.0") + my_module.compile_flags('c++', [ + "-DPROJECT_NAME=\"\\\"" + my_module.name + "\\\"\"", + "-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + ]) + + # set the package properties: my_module.pkg_set("VERSION_CODE", "0") my_module.pkg_set("COMPAGNY_TYPE", get_compagny_type()) my_module.pkg_set("COMPAGNY_NAME", get_compagny_name()) diff --git a/sample/MeshCreator/appl/Windows.cpp b/sample/MeshCreator/appl/Windows.cpp index ab70a6f..1b8d53b 100644 --- a/sample/MeshCreator/appl/Windows.cpp +++ b/sample/MeshCreator/appl/Windows.cpp @@ -22,6 +22,7 @@ appl::Windows::Windows() { addObjectType("appl::Windows"); + propertyTitle.setDirectCheck("example ege: MeshCreator"); } static std::shared_ptr createViewBoxStar() { @@ -78,21 +79,21 @@ static std::shared_ptr createMars() { void appl::Windows::init() { ewol::widget::Windows::init(); - setTitle("example ege : MeshCreator"); - getObjectManager().periodicCall.bind(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera); + getObjectManager().periodicCall.connect(shared_from_this(), &appl::Windows::onCallbackPeriodicUpdateCamera); m_env = ege::Environement::create(); // Create basic Camera m_camera = std::make_shared(vec3(30,30,-100), vec3(50,0,0)); m_env->addCamera("basic", m_camera); - std::shared_ptr tmpWidget = ege::widget::Scene::create(m_env); + std::shared_ptr tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_ERROR("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("basic"); setSubWidget(tmpWidget); } diff --git a/sample/MeshCreator/appl/main.cpp b/sample/MeshCreator/appl/main.cpp index 946e920..d46cc3c 100644 --- a/sample/MeshCreator/appl/main.cpp +++ b/sample/MeshCreator/appl/main.cpp @@ -20,9 +20,16 @@ class MainApplication : public ewol::context::Application { public: - bool init(ewol::Context& _context, size_t _initId) { - APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); - + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + std::string tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); @@ -33,14 +40,18 @@ class MainApplication : public ewol::context::Application { std::shared_ptr basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); - APPL_INFO("==> Init APPL (END)"); - return true; + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - void unInit(ewol::Context& _context) { - APPL_INFO("==> Un-Init APPL (START)"); + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... - APPL_INFO("==> Un-Init APPL (END)"); + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; diff --git a/sample/MeshCreator/lutin_egeMeshCreator.py b/sample/MeshCreator/lutin_egeMeshCreator.py index e69ec0f..59b03eb 100644 --- a/sample/MeshCreator/lutin_egeMeshCreator.py +++ b/sample/MeshCreator/lutin_egeMeshCreator.py @@ -28,6 +28,9 @@ def get_compagny_name(): def get_maintainer(): return ["Mr DUPIN Edouard "] +def get_version(): + return [0,1] + def create(target, module_name): # module name is 'edn' and type binary. my_module = module.Module(__file__, module_name, get_type()) @@ -44,8 +47,12 @@ def create(target, module_name): my_module.copy_path("data/*") - # set the package properties : - my_module.pkg_set("VERSION", "0.0.0") + my_module.compile_flags('c++', [ + "-DPROJECT_NAME=\"\\\"" + my_module.name + "\\\"\"", + "-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + ]) + + # set the package properties: my_module.pkg_set("VERSION_CODE", "0") my_module.pkg_set("COMPAGNY_TYPE", get_compagny_type()) my_module.pkg_set("COMPAGNY_NAME", get_compagny_name()) @@ -55,6 +62,5 @@ def create(target, module_name): my_module.pkg_set("DESCRIPTION", get_desc()) my_module.pkg_set("NAME", get_name()) - # add the currrent module at the return my_module diff --git a/sample/RayTest/appl/Windows.cpp b/sample/RayTest/appl/Windows.cpp index 1ac91c9..c89afb1 100644 --- a/sample/RayTest/appl/Windows.cpp +++ b/sample/RayTest/appl/Windows.cpp @@ -26,6 +26,7 @@ appl::Windows::Windows() : m_angleTetha(0), m_anglePsy(0) { addObjectType("appl::Windows"); + propertyTitle.setDirectCheck("example ege: RayTest"); } static std::shared_ptr createViewBoxStar() { @@ -67,7 +68,7 @@ static std::shared_ptr createViewBoxStar() { void appl::Windows::init() { ewol::widget::Windows::init(); - setTitle("example ege : RayTest"); + m_env = ege::Environement::create(); // Create basic Camera @@ -75,15 +76,16 @@ void appl::Windows::init() { m_camera->setEye(vec3(100*std::sin(m_angleTetha),100*std::cos(m_angleTetha),40*std::cos(m_anglePsy))); m_env->addCamera("basic", m_camera); - std::shared_ptr tmpWidget = ege::widget::Scene::create(m_env); + std::shared_ptr tmpWidget = ege::widget::Scene::create(); if (tmpWidget == nullptr) { APPL_ERROR("Can not allocate widget ==> display might be in error"); } else { - tmpWidget->setExpand(bvec2(true,true)); - tmpWidget->setFill(bvec2(true,true)); + tmpWidget->setEnv(m_env); + tmpWidget->propertyExpand.set(bvec2(true,true)); + tmpWidget->propertyFill.set(bvec2(true,true)); tmpWidget->setCamera("basic"); setSubWidget(tmpWidget); - tmpWidget->signalDisplayDebug.bind(shared_from_this(), &appl::Windows::onCallbackDisplayDebug); + tmpWidget->signalDisplayDebug.connect(shared_from_this(), &appl::Windows::onCallbackDisplayDebug); } std::shared_ptr myMesh; // Create an external box : diff --git a/sample/RayTest/appl/main.cpp b/sample/RayTest/appl/main.cpp index 946e920..d46cc3c 100644 --- a/sample/RayTest/appl/main.cpp +++ b/sample/RayTest/appl/main.cpp @@ -20,9 +20,16 @@ class MainApplication : public ewol::context::Application { public: - bool init(ewol::Context& _context, size_t _initId) { - APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); - + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + std::string tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); @@ -33,14 +40,18 @@ class MainApplication : public ewol::context::Application { std::shared_ptr basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); - APPL_INFO("==> Init APPL (END)"); - return true; + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - void unInit(ewol::Context& _context) { - APPL_INFO("==> Un-Init APPL (START)"); + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... - APPL_INFO("==> Un-Init APPL (END)"); + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; diff --git a/sample/RayTest/lutin_egeRayTest.py b/sample/RayTest/lutin_egeRayTest.py index 28eef6e..8209523 100644 --- a/sample/RayTest/lutin_egeRayTest.py +++ b/sample/RayTest/lutin_egeRayTest.py @@ -28,6 +28,9 @@ def get_compagny_name(): def get_maintainer(): return ["Mr DUPIN Edouard "] +def get_version(): + return [0,1] + def create(target, module_name): # module name is 'edn' and type binary. my_module = module.Module(__file__, module_name, get_type()) @@ -44,8 +47,12 @@ def create(target, module_name): my_module.copy_path("data/*") - # set the package properties : - my_module.pkg_set("VERSION", "0.0.0") + my_module.compile_flags('c++', [ + "-DPROJECT_NAME=\"\\\"" + my_module.name + "\\\"\"", + "-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"" + ]) + + # set the package properties: my_module.pkg_set("VERSION_CODE", "0") my_module.pkg_set("COMPAGNY_TYPE", get_compagny_type()) my_module.pkg_set("COMPAGNY_NAME", get_compagny_name()) @@ -54,7 +61,5 @@ def create(target, module_name): my_module.pkg_set("PRIORITY", "optional") my_module.pkg_set("DESCRIPTION", get_desc()) my_module.pkg_set("NAME", get_name()) - - # add the currrent module at the return my_module