[DEV] remove LUA and compilation update

This commit is contained in:
Edouard DUPIN 2015-03-20 23:18:16 +01:00
parent cdcfc201d4
commit 551846181c
24 changed files with 5 additions and 484 deletions

6
.gitmodules vendored
View File

@ -23,9 +23,6 @@
[submodule "external/ogg"]
path = external/ogg
url = https://github.com/HeeroYui/libogg.git
[submodule "external/lua"]
path = external/lua
url = https://github.com/HeeroYui/liblua.git
[submodule "external/z/zlib"]
path = external/z/zlib
url = https://github.com/madler/zlib.git
@ -71,9 +68,6 @@
[submodule "external/gtest"]
path = external/gtest
url = https://github.com/HeeroYui/gtest
[submodule "external/luaWrapper"]
path = external/luaWrapper
url = https://github.com/HeeroYui/luaWrapper.git
[submodule "external/speex"]
path = external/speex
url = https://github.com/HeeroYui/speex.git

2
external/eaudiofx vendored

@ -1 +1 @@
Subproject commit 8cd0fe0b88e8a8838b30d2b5342e105aee842d51
Subproject commit 6aac7ed0bbb3bdfa099f99f71778f16b43507508

2
external/etk vendored

@ -1 +1 @@
Subproject commit a84ec0fcb11358c51bec545dce9c884cd69b13f5
Subproject commit bf74ba1a02024183ab18e5b56782dcf745240c2c

2
external/ewolsa vendored

@ -1 +1 @@
Subproject commit 23467923b4917aa7db24f262b3129ac5f58803c5
Subproject commit 3c60592630d0595840773328355c3b90697528b9

1
external/lua vendored

@ -1 +0,0 @@
Subproject commit a0505920fe022de956ef46c8a0be8263710105eb

1
external/luaWrapper vendored

@ -1 +0,0 @@
Subproject commit 1c941a031b9382b3c98f00a0fcf39dc20c135a24

2
external/ogg vendored

@ -1 +1 @@
Subproject commit fd44b865a3f42dbcae7c08888f2228c0644e980f
Subproject commit 4bbdfe1c53ec2368883b29f99b3635c36a87be48

2
external/speex vendored

@ -1 +1 @@
Subproject commit b34a74f479cce409bbe12b08b45df34eba816cd9
Subproject commit b0cc582eabc4eb2c8924fac517fe6a73e2d90193

View File

@ -1,71 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#include <etk/types.h>
#include <ewol/ewol.h>
#include <ewol/context/commandLine.h>
#include <appl/debug.h>
#include <appl/Windows.h>
#include <ewol/object/Object.h>
#include <ewol/widget/Manager.h>
#include <ewol/context/Context.h>
#include <lua/lua.h>
#include <lua/lualib.h>
#include <lua/lauxlib.h>
#include <ewolLua/ewolLua.h>
class MainApplication : public ewol::context::Application {
private:
lua_State* m_lua;
public:
bool init(ewol::Context& _context, size_t _initId) {
APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
m_lua = luaL_newstate();
// TODO : Remove this : Move if in the windows properties
_context.setSize(vec2(800, 600));
luaL_openlibs(m_lua);
ewolLua::loadEwolLuaWrapper(m_lua);
// select internal data for font ...
_context.getFontDefault().setUseExternal(true);
_context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19);
if (luaL_dostring(m_lua, "")) {
std::cout << lua_tostring(m_lua, -1) << std::endl;
}
std::shared_ptr<ewol::widget::Windows> basicWindows = appl::Windows::create();
// create the specific windows
_context.setWindows(basicWindows);
APPL_INFO("==> Init APPL (END)");
return true;
}
void unInit(ewol::Context& _context) {
APPL_INFO("==> Un-Init APPL (START)");
// nothing to do ...
lua_close(m_lua);
APPL_INFO("==> Un-Init APPL (END)");
}
};
/**
* @brief Main of the program (This can be set in every case, but it is not used in Andoid...).
* @param std IO
* @return std IO
*/
int main(int _argc, const char *_argv[]) {
// second possibility
return ewol::run(new MainApplication(), _argc, _argv);
}

View File

@ -1,14 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#ifndef __APPL_MAIN_H__
#define __APPL_MAIN_H__
#endif

View File

@ -1,33 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#include <ewol/ewol.h>
#include <appl/debug.h>
#include <appl/Windows.h>
#include <ewol/widget/Label.h>
#undef __class__
#define __class__ "Windows"
appl::Windows::Windows() {
addObjectType("appl::Windows");
}
void appl::Windows::init() {
ewol::widget::Windows::init();
setTitle("example 001_HelloWord");
std::shared_ptr<ewol::widget::Label> tmpWidget = ewol::widget::Label::create();
if (tmpWidget == nullptr) {
APPL_ERROR("Can not allocate widget ==> display might be in error");
} else {
tmpWidget->setLabel("Hello <font color=\"blue\">Word</font>");
tmpWidget->setExpand(bvec2(true,true));
setSubWidget(tmpWidget);
}
}

View File

@ -1,25 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#ifndef __APPL_WINDOWS_H__
#define __APPL_WINDOWS_H__
#include <ewol/widget/Windows.h>
namespace appl {
class Windows : public ewol::widget::Windows {
protected:
Windows();
void init();
public:
DECLARE_FACTORY(Windows);
};
};
#endif

View File

@ -1,15 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#include <appl/debug.h>
int32_t appl::getLogId() {
static int32_t g_val = etk::log::registerInstance("example");
return g_val;
}

View File

@ -1,52 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#ifndef __APPL_DEBUG_H__
#define __APPL_DEBUG_H__
#include <etk/log.h>
namespace appl {
int32_t getLogId();
};
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
#define APPL_BASE(info,data) \
do { \
if (info <= etk::log::getLevel(appl::getLogId())) { \
std::stringbuf sb; \
std::ostream tmpStream(&sb); \
tmpStream << data; \
etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \
} \
} while(0)
#define APPL_CRITICAL(data) APPL_BASE(1, data)
#define APPL_ERROR(data) APPL_BASE(2, data)
#define APPL_WARNING(data) APPL_BASE(3, data)
#ifdef DEBUG
#define APPL_INFO(data) APPL_BASE(4, data)
#define APPL_DEBUG(data) APPL_BASE(5, data)
#define APPL_VERBOSE(data) APPL_BASE(6, data)
#define APPL_TODO(data) APPL_BASE(4, "TODO : " << data)
#else
#define APPL_INFO(data) do { } while(false)
#define APPL_DEBUG(data) do { } while(false)
#define APPL_VERBOSE(data) do { } while(false)
#define APPL_TODO(data) do { } while(false)
#endif
#define APPL_ASSERT(cond,data) \
do { \
if (!(cond)) { \
APPL_CRITICAL(data); \
assert(!#cond); \
} \
} while (0)
#endif

View File

@ -1,32 +0,0 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
# optionnal : Describe in the "lutin.py --help"
def get_desc():
return "Tutorial 099 : lua example"
# Module creation instance (not optionnal)
def create(target):
# module name is '001_HelloWord' and type binary.
myModule = module.Module(__file__, '099_lua', 'BINARY')
# add the file to compile:
myModule.add_src_file([
'appl/Main.cpp',
'appl/debug.cpp',
'appl/Windows.cpp',
])
# add Library dependency name
myModule.add_module_depend(['ewolLua'])
# add application C flags
myModule.compile_flags_CC([
"-DPROJECT_NAME=\"\\\""+myModule.name+"\\\"\""])
# Add current include Path
myModule.add_path(tools.get_current_path(__file__))
# return the created module
return myModule

View File

@ -1,14 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include "debug.h"
int32_t ewolLua::getLogId() {
static int32_t g_val = etk::log::registerInstance("ewolLua");
return g_val;
}

View File

@ -1,52 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#ifndef __EWOL_LUA_DEBUG_H__
#define __EWOL_LUA_DEBUG_H__
#include <etk/log.h>
namespace ewolLua {
int32_t getLogId();
};
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
#define EWOLLUA_BASE(info,data) \
do { \
if (info <= etk::log::getLevel(ewolLua::getLogId())) { \
std::stringbuf sb; \
std::ostream tmpStream(&sb); \
tmpStream << data; \
etk::log::logStream(ewolLua::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \
} \
} while(0)
#define EWOLLUA_CRITICAL(data) EWOLLUA_BASE(1, data)
#define EWOLLUA_ERROR(data) EWOLLUA_BASE(2, data)
#define EWOLLUA_WARNING(data) EWOLLUA_BASE(3, data)
#ifdef DEBUG
#define EWOLLUA_INFO(data) EWOLLUA_BASE(4, data)
#define EWOLLUA_DEBUG(data) EWOLLUA_BASE(5, data)
#define EWOLLUA_VERBOSE(data) EWOLLUA_BASE(6, data)
#define EWOLLUA_TODO(data) EWOLLUA_BASE(4, "TODO : " << data)
#else
#define EWOLLUA_INFO(data) do { } while(false)
#define EWOLLUA_DEBUG(data) do { } while(false)
#define EWOLLUA_VERBOSE(data) do { } while(false)
#define EWOLLUA_TODO(data) do { } while(false)
#endif
#define EWOLLUA_ASSERT(cond,data) \
do { \
if (!(cond)) { \
EWOLLUA_CRITICAL(data); \
assert(!#cond); \
} \
} while (0)
#endif

View File

@ -1,18 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include "ewolLua.h"
#include "object.h"
#include "objectManager.h"
int32_t ewolLua::loadEwolLuaWrapper(lua_State* _L) {
loadObject(_L);
loadObjectManager(_L);
return 0;
}

View File

@ -1,20 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#ifndef __EWOL_LUA_H__
#define __EWOL_LUA_H__
#include <etk/types.h>
struct lua_State;
namespace ewolLua {
int32_t loadEwolLuaWrapper(lua_State* _L);
};
#endif

View File

@ -1,35 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <ewol/object/Object.h>
#include <luaWrapper/luaWrapper.hpp>
#include "object.h"
#include "debug.h"
std::shared_ptr<ewol::Object> ewolObjectNew(lua_State *_L) {
const char* name = luaL_checkstring(_L, 1);
return ewol::Object::create(name);
}
static luaL_Reg s_metatable[] = {
//{ "getIdFunc", luaU_get<ewol::Object, int32_t, &ewol::Object::getId> },
//{ "NameFunc", luaU_getset<ewol::Object, std::string, &ewol::Object::getName, &ewol::Object::setName> },
{ "getObjectType", luaU_func(&ewol::Object::getObjectType) },
{ "getTypeDescription", luaU_func(&ewol::Object::getTypeDescription) },
{ "isTypeCompatible", luaU_func(&ewol::Object::isTypeCompatible) },
//{ "addObjectType", luaU_func(&ewol::Object::addObjectType) },
{ "getStatic", luaU_func(&ewol::Object::getStatic) },
{ NULL, NULL }
};
int32_t ewolLua::loadObject(lua_State* _L) {
luaW_register<ewol::Object>(_L, "ewol__Object", NULL, s_metatable, ewolObjectNew);
return 0;
}

View File

@ -1,20 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#ifndef __EWOL_LUA_OBJECT_H__
#define __EWOL_LUA_OBJECT_H__
#include <etk/types.h>
struct lua_State;
namespace ewolLua {
int32_t loadObject(lua_State* _L);
};
#endif

View File

@ -1,17 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include "objectManager.h"
#include "debug.h"
int32_t ewolLua::loadObjectManager(lua_State* _L) {
return 0;
}

View File

@ -1,20 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#ifndef __EWOL_LUA_OBJECT_MANAGER_H__
#define __EWOL_LUA_OBJECT_MANAGER_H__
#include <etk/types.h>
struct lua_State;
namespace ewolLua {
int32_t loadObjectManager(lua_State* _L);
};
#endif

View File

@ -1,33 +0,0 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import os
import lutinMultiprocess
def get_desc():
return "ewol lua Wrapper"
def get_license():
return "APACHE v2.0"
def create(target):
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'ewolLua', 'LIBRARY')
# add extra compilation flags :
myModule.add_extra_compile_flags()
# add the file to compile:
myModule.add_src_file([
'ewolLua/object.cpp',
'ewolLua/objectManager.cpp',
'ewolLua/ewolLua.cpp',
'ewolLua/debug.cpp',
])
# name of the dependency
myModule.add_module_depend(['ewol', 'luaWrapper'])
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule