Compare commits

...

2 Commits

51 changed files with 216 additions and 66 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "Zip file access"
def get_license():
return "APACHE v2.0"
def create(target):
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'etk-archive', 'LIBRARY')
# add extra compilation flags :
myModule.add_extra_compile_flags()
# add the file to compile:
myModule.add_src_file([
'etk-archive/Archive.cpp',
'etk-archive/Zip.cpp'
])
myModule.add_module_depend(["etk-base"])
myModule.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

View File

@ -104,6 +104,12 @@ namespace etk {
m_data.push_back(_data); m_data.push_back(_data);
m_condition.notify_all(); m_condition.notify_all();
}; };
//! @previous
void post(const MY_TYPE &_data) {
std::unique_lock<std::mutex> lock(m_mutex);
m_data.push_back(_data);
m_condition.notify_all();
};
/** /**
* @brief Remove all the message in the fifo. * @brief Remove all the message in the fifo.
*/ */

56
base/lutin_etk-base.py Normal file
View File

@ -0,0 +1,56 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "etk basis"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-base', 'LIBRARY')
myModule.add_extra_compile_flags()
myModule.add_src_file([
'etk/debug.cpp',
'etk/stdTools.cpp',
'etk/tool.cpp',
'etk/Noise.cpp',
'etk/thread/tools.cpp'
])
myModule.add_module_depend(["etk-log"])
if target.config["mode"] == "release":
myModule.compile_flags('c', "-DMODE_RELEASE")
else:
myModule.add_export_flag('c', "-DDEBUG_LEVEL=3")
myModule.add_export_flag('c', "-DDEBUG=1")
# Bor backtrace display :
if target.name != "Windows":
myModule.add_export_flag('link', "-ldl -rdynamic")
# for ald C++ compatibility (old GCC) just link with boost ...
if target.config["compilator"] == "gcc" \
and target.xx_version < 4007000:
# note : this framework depend on C++ 11, but a simple port of Boost for old compatibility has been done ...
myModule.compile_version_XX(1999)
myModule.add_optionnal_module_depend('boost', ["c++", "-DETK_BUILD_BOOST"], export=True)
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_boost")
else:
myModule.compile_version_XX(2011)
# name of the dependency
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_X11")
if target.name=="Windows":
pass
elif target.name=="Android":
pass
else:
myModule.add_export_flag('link', "-lpthread")
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

23
color/lutin_etk-color.py Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "etk color interface"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-color', 'LIBRARY')
myModule.add_extra_compile_flags()
myModule.add_src_file([
"etk-color/Color.cpp"
])
myModule.add_module_depend(["etk-base"])
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

24
file/lutin_etk-file.py Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "etk file interface"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-file', 'LIBRARY')
myModule.add_extra_compile_flags()
myModule.add_src_file([
"etk-file/Node.cpp",
"etk-file/Right.cpp"
])
myModule.add_module_depend(["etk-base", "etk-archive"])
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

21
log/lutin_etk-log.py Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "etk Log interface"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-log', 'LIBRARY')
myModule.add_extra_compile_flags()
myModule.add_src_file([
"etk/log.cpp"
])
if target.name=="IOs":
myModule.add_src_file('etk/logIOs.m')
#myModule.add_module_depend(["etk-base"])
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

View File

@ -6,19 +6,13 @@ import datetime
def get_desc(): def get_desc():
return "e-tk test software" return "e-tk test software"
def get_license():
return "APACHE v2.0"
def create(target): def create(target):
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'etk-test', 'BINARY') myModule = module.Module(__file__, 'etk-test', 'BINARY')
# add the file to compile:
myModule.add_src_file([ myModule.add_src_file([
'test/main.cpp']) 'test/main.cpp'])
myModule.add_module_depend(['etk', 'gtest']) myModule.add_module_depend(['etk', 'gtest'])
#myModule.compile_flags_XX(["-nostdinc++"]);
# add the currrent module at the system
return myModule return myModule

View File

@ -7,68 +7,20 @@ def get_desc():
def create(target): def create(target):
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'etk', 'LIBRARY') myModule = module.Module(__file__, 'etk', 'LIBRARY')
# add extra compilation flags :
myModule.add_extra_compile_flags() myModule.add_extra_compile_flags()
# add the file to compile:
myModule.add_src_file([ myModule.add_src_file([
'etk/debug.cpp', 'etk/etk.cpp'
'etk/etk.cpp', ])
'etk/stdTools.cpp', myModule.add_module_depend([
'etk/log.cpp', 'etk-archive',
'etk/tool.cpp', 'etk-base',
'etk/Noise.cpp', 'etk-color',
'etk/Color.cpp', 'etk-file',
'etk/thread/tools.cpp', 'etk-log',
'etk/math/Matrix4.cpp', 'etk-math',
'etk/math/Vector2D.cpp', 'etk-time'])
'etk/math/Vector3D.cpp',
'etk/math/Vector4D.cpp',
'etk/os/FSNode.cpp',
'etk/os/FSNodeRight.cpp',
'etk/archive/Archive.cpp',
'etk/archive/Zip.cpp'])
if target.name=="IOs":
myModule.add_src_file('etk/logIOs.m')
if target.config["mode"] == "release":
# TODO : The other way is to remove this ...
# TODO : Fore release mode : the etk folder are absolutly not at the same position in the tree ...
myModule.compile_flags('c', "-DMODE_RELEASE")
else:
myModule.add_export_flag('c', "-DDEBUG_LEVEL=3")
myModule.add_export_flag('c', "-DDEBUG=1")
# Bor backtrace display :
if target.name != "Windows":
myModule.add_export_flag('link', "-ldl -rdynamic")
# for ald C++ compatibility (old GCC) just link with boost ...
if target.config["compilator"] == "gcc" \
and target.xx_version < 4007000:
# note : this framework depend on C++ 11, but a simple port of Boost for old compatibility has been done ...
myModule.compile_version_XX(1999)
myModule.add_optionnal_module_depend('boost', ["c++", "-DETK_BUILD_BOOST"], export=True)
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_boost")
else:
myModule.compile_version_XX(2011)
# name of the dependency
myModule.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
myModule.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_X11")
if target.name=="Windows":
pass
elif target.name=="Android":
pass
else:
myModule.add_export_flag('link', "-lpthread")
myModule.add_export_path(tools.get_current_path(__file__)) myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule return myModule

26
math/lutin_etk-math.py Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "e-tk : Ewol tool kit"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-math', 'LIBRARY')
myModule.add_extra_compile_flags()
myModule.add_src_file([
'etk-math/Matrix4.cpp',
'etk-math/Vector2D.cpp',
'etk-math/Vector3D.cpp',
'etk-math/Vector4D.cpp'
])
myModule.add_module_depend(["etk-base"])
# atomaticly wrap on the bullet lib interface (simplify interface)
myModule.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
myModule.add_export_path(tools.get_current_path(__file__))
return myModule

21
time/lutin_etk-time.py Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "etk time interface"
def get_license():
return "APACHE v2.0"
def create(target):
myModule = module.Module(__file__, 'etk-time', 'LIBRARY')
myModule.add_extra_compile_flags()
"""
myModule.add_src_file([
"etk-log/log.cpp"
])
"""
myModule.add_module_depend(["etk-base"])
myModule.add_export_path(tools.get_current_path(__file__))
return myModule