Added experimental new build system

Former-commit-id: ab7fb35db6be4b975d0558680c840d72e38562f9
This commit is contained in:
Lynix
2015-01-20 23:37:49 +01:00
parent bce3cadfd5
commit debe39501e
19 changed files with 797 additions and 549 deletions

View File

@@ -1,4 +1,7 @@
function encodeResources()
ACTION.Name = "EncodeResources"
ACTION.Description = "Generate a includable header version of resources"
ACTION.Function = function ()
print("Encoding resources ...")
local startClock = os.clock()
local modules = os.matchdirs("../src/Nazara/*")
@@ -38,10 +41,3 @@ function encodeResources()
end
print("Finished (took " .. os.clock() - startClock .. "s)")
end
newaction
{
trigger = "encoderesources",
description = "Generate a includable header version of resources",
execute = encodeResources
}

View File

@@ -1,10 +0,0 @@
function examples()
dofile("../examples/build/common.lua")
end
newaction
{
trigger = "examples",
description = "Generate examples",
execute = examples
}

View File

@@ -1,4 +1,7 @@
function generateHeaders()
ACTION.Name = "GenerateHeaders"
ACTION.Description = "Generate a global header for each module"
ACTION.Function = function ()
local modules = os.matchdirs("../include/Nazara/*")
for k, modulePath in pairs(modules) do
local moduleName = modulePath:match(".*/(.*)")
@@ -52,10 +55,3 @@ function generateHeaders()
print(string.format("-#include count: %d", count))
end
end
newaction
{
trigger = "generateheaders",
description = "Generate a global header for each module",
execute = generateHeaders
}

View File

@@ -1,3 +1,6 @@
ACTION.Name = "ParseUnicode"
ACTION.Description = "Parse the Unicode Character Data and put the useful informations into a header"
local CategoryToString = {}
CategoryToString["C"] = "Category_Other"
CategoryToString["Cc"] = "Category_Other_Control"
@@ -67,7 +70,7 @@ table.maxn = table.maxn or function (tab) -- Compatibilit
end
end
function getCharacter(tab, first, index)
local function getCharacter(tab, first, index)
local character = {}
character.Category = CategoryToString[tab[3]] or "Category_NoCategory"
character.Direction = DirectionToString[tab[5]] or error("Direction not recognized")
@@ -78,7 +81,7 @@ function getCharacter(tab, first, index)
return character
end
function parseUnicodeData()
ACTION.Function = function ()
local unicodeSet = {}
file = io.open ("scripts/data/UnicodeData.txt", "r")
@@ -189,9 +192,3 @@ function parseUnicodeData()
end
--print(string.match("<Plane 15 Private Use, First>", "<.+, (%w+)>"))
newaction
{
trigger = "parseunicode",
description = "Parse the Unicode Character Data and put the useful informations into a header",
execute = parseUnicodeData
}