[DEV] update new lutin 0.8.0

This commit is contained in:
Edouard DUPIN 2015-10-14 21:21:03 +02:00
parent 590e84e486
commit b5ef639438

View File

@ -1,28 +1,60 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
import datetime
import lutin.debug as debug
import os
def get_type():
return "BINARY"
def get_name():
return "Editeur de N'ours"
def get_desc():
return "EDN application N'ours editor (Editeur De N'ours)"
return "Text editor for sources code with ctags management"
def create(target):
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'edn', 'BINARY')
myModule.add_extra_compile_flags()
# add the file to compile:
myModule.add_src_file([
'appl/ctags/readtags.cpp'])
myModule.add_src_file([
def get_licence():
return "GPL-3"
def get_compagny_type():
return "org"
def get_compagny_name():
return "Edouard DUPIN"
def get_maintainer():
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
def get_version():
tag_file = os.path.join(tools.get_current_path(__file__), "tag")
version_id = tools.file_read_data(tag_file)
tmp_value = version_id.split("-")
if len(tmp_value) > 1:
dirty_tag = tmp_value[1]
else:
dirty_tag = ""
tmp_value = tmp_value[0]
out = []
for elem in tmp_value.split("."):
out.append(int(elem))
if dirty_tag != "":
out.append(dirty_tag)
return out
def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
my_module.add_extra_compile_flags()
my_module.add_src_file([
'appl/ctags/readtags.cpp'
])
my_module.add_src_file([
'appl/debug.cpp',
'appl/global.cpp',
'appl/globalMsg.cpp',
'appl/init.cpp'])
'appl/init.cpp'
])
# Gui:
myModule.add_src_file([
my_module.add_src_file([
'appl/Gui/BufferView.cpp',
'appl/Gui/TextViewer.cpp',
'appl/Gui/ViewerManager.cpp',
@ -33,10 +65,10 @@ def create(target):
'appl/Gui/WorkerSaveFile.cpp',
'appl/Gui/WorkerSaveAllFile.cpp',
'appl/Gui/WorkerCloseFile.cpp',
'appl/Gui/WorkerCloseAllFile.cpp'])
'appl/Gui/WorkerCloseAllFile.cpp'
])
# All needed for the buffer management :
myModule.add_src_file([
my_module.add_src_file([
'appl/Buffer.cpp',
'appl/BufferManager.cpp',
'appl/TextPlugin.cpp',
@ -47,82 +79,72 @@ def create(target):
'appl/TextPluginRmLine.cpp',
'appl/TextPluginSelectAll.cpp',
'appl/TextPluginCtags.cpp',
'appl/TextPluginManager.cpp'])
'appl/TextPluginManager.cpp'
])
# Generic color management for the text editor :
myModule.add_src_file([
my_module.add_src_file([
'appl/GlyphDecoration.cpp',
'appl/GlyphPainting.cpp'])
'appl/GlyphPainting.cpp'
])
# syntax coloration for the text editor
myModule.add_src_file([
my_module.add_src_file([
'appl/HighlightPattern.cpp',
'appl/Highlight.cpp',
'appl/HighlightManager.cpp'])
myModule.add_module_depend(['ewol', 'date'])
myModule.compile_flags('c++', [
"-DPROJECT_NAME=\"\\\""+myModule.name+"\\\"\""
'appl/HighlightManager.cpp'
])
my_module.add_module_depend(['ewol', 'date'])
my_module.compile_flags('c++', [
"-DPROJECT_NAME=\"\\\""+my_module.name+"\\\"\""
])
my_module.copy_path('../data/icon.*','')
my_module.copy_path('../data/languages/gcov/*.xml','languages/gcov/')
my_module.copy_path('../data/languages/asm/*.xml','languages/asm/')
my_module.copy_path('../data/languages/bash/*.xml','languages/bash/')
my_module.copy_path('../data/languages/boo/*.xml','languages/boo/')
my_module.copy_path('../data/languages/cpp/*.xml','languages/cpp/')
my_module.copy_path('../data/languages/c/*.xml','languages/c/')
my_module.copy_path('../data/languages/cmake/*.xml','languages/cmake/')
my_module.copy_path('../data/languages/glsl/*.xml','languages/glsl/')
my_module.copy_path('../data/languages/in/*.xml','languages/in/')
my_module.copy_path('../data/languages/java/*.xml','languages/java/')
my_module.copy_path('../data/languages/json/*.xml','languages/json/')
my_module.copy_path('../data/languages/lua/*.xml','languages/lua/')
my_module.copy_path('../data/languages/makefile/*.xml','languages/makefile/')
my_module.copy_path('../data/languages/matlab/*.xml','languages/matlab/')
my_module.copy_path('../data/languages/php/*.xml','languages/php/')
my_module.copy_path('../data/languages/xml/*.xml','languages/xml/')
my_module.copy_path('../data/languages/python/*.xml','languages/python/')
my_module.copy_path('../data/theme/default/*.svg','theme/shape/square/')
my_module.copy_path('../data/theme/default/*.edf','theme/shape/square/')
my_module.copy_path('../data/theme/colorWhite/*.json','theme/color/white/')
my_module.copy_path('../data/theme/colorBlack/*.json','theme/color/black/')
my_module.copy_path('../data/GUI-Search.xml','')
#myModule.copy_file('../data/icon.png','icon.png')
my_module.add_path(tools.get_current_path(__file__))
myModule.copy_path('../data/icon.*','')
myModule.copy_path('../data/languages/gcov/*.xml','languages/gcov/')
myModule.copy_path('../data/languages/asm/*.xml','languages/asm/')
myModule.copy_path('../data/languages/bash/*.xml','languages/bash/')
myModule.copy_path('../data/languages/boo/*.xml','languages/boo/')
myModule.copy_path('../data/languages/cpp/*.xml','languages/cpp/')
myModule.copy_path('../data/languages/c/*.xml','languages/c/')
myModule.copy_path('../data/languages/cmake/*.xml','languages/cmake/')
myModule.copy_path('../data/languages/glsl/*.xml','languages/glsl/')
myModule.copy_path('../data/languages/in/*.xml','languages/in/')
myModule.copy_path('../data/languages/java/*.xml','languages/java/')
myModule.copy_path('../data/languages/json/*.xml','languages/json/')
myModule.copy_path('../data/languages/lua/*.xml','languages/lua/')
myModule.copy_path('../data/languages/makefile/*.xml','languages/makefile/')
myModule.copy_path('../data/languages/matlab/*.xml','languages/matlab/')
myModule.copy_path('../data/languages/php/*.xml','languages/php/')
myModule.copy_path('../data/languages/xml/*.xml','languages/xml/')
myModule.copy_path('../data/languages/python/*.xml','languages/python/')
myModule.copy_path('../data/theme/default/*.svg','theme/shape/square/')
myModule.copy_path('../data/theme/default/*.edf','theme/shape/square/')
myModule.copy_path('../data/theme/colorWhite/*.json','theme/color/white/')
myModule.copy_path('../data/theme/colorBlack/*.json','theme/color/black/')
myModule.copy_path('../data/GUI-Search.xml','')
my_module.copy_file("../data/Font/freefont/FreeSerif.ttf","fonts/FreeSerif.ttf")
my_module.copy_path("../data/Font/freefont/FreeMon*.ttf","fonts/")
myModule.add_path(tools.get_current_path(__file__))
myModule.copy_file("../data/Font/freefont/FreeSerif.ttf","fonts/FreeSerif.ttf")
myModule.copy_path("../data/Font/freefont/FreeMon*.ttf","fonts/")
tagFile = tools.get_current_path(__file__) + "/tag"
tagFile = os.path.join(tools.get_current_path(__file__), "tag")
versionID = tools.file_read_data(tagFile)
myModule.compile_flags('c', [
my_module.compile_flags('c', [
"-DAPPL_VERSION=\"\\\"" + versionID + "\\\"\""
])
tagFile = tools.get_current_path(__file__) + "/tagCode"
tagFile = os.path.join(tools.get_current_path(__file__), "tagCode")
versionIDCode = tools.file_read_data(tagFile)
# set the package properties :
myModule.pkg_set("VERSION", versionID)
myModule.pkg_set("VERSION_CODE", versionIDCode)
myModule.pkg_set("COMPAGNY_TYPE", "org")
myModule.pkg_set("COMPAGNY_NAME", "Edouard DUPIN")
myModule.pkg_set("MAINTAINER", ["Mr DUPIN Edouard <yui.heero@gmail.com>"])
# set the package properties:
my_module.pkg_set("VERSION", versionID)
my_module.pkg_set("VERSION_CODE", versionIDCode)
if target.name=="MacOs":
myModule.pkg_set("ICON", tools.get_current_path(__file__) + "/../data/icon.icns")
my_module.pkg_set("ICON", tools.get_current_path(__file__) + "/../data/icon.icns")
else:
myModule.pkg_set("ICON", tools.get_current_path(__file__) + "/../data/icon.png")
my_module.pkg_set("ICON", tools.get_current_path(__file__) + "/../data/icon.png")
myModule.pkg_set("SECTION", ["Development", "Editors"])
myModule.pkg_set("PRIORITY", "optional")
myModule.pkg_set("DESCRIPTION", "Text editor for sources code with ctags management")
myModule.pkg_set("NAME", "Editeur de N'ours")
my_module.pkg_set("SECTION", ["Development", "Editors"])
my_module.pkg_set("PRIORITY", "optional")
my_module.pkg_add("RIGHT", "WRITE_EXTERNAL_STORAGE")
my_module.pkg_add("RIGHT", "SET_ORIENTATION")
myModule.pkg_add("RIGHT", "WRITE_EXTERNAL_STORAGE")
myModule.pkg_add("RIGHT", "SET_ORIENTATION")
return myModule
return my_module