Remove Premake files

This commit is contained in:
Jérôme Leclercq 2021-05-14 03:07:29 +02:00
parent 7fd94a2068
commit f9bf3d7541
46 changed files with 0 additions and 3918 deletions

View File

@ -1 +0,0 @@
.\premake5.exe codeblocks

View File

@ -1 +0,0 @@
.\premake5.exe codelite

View File

@ -1 +0,0 @@
.\premake5.exe --premakeproject vs2015

View File

@ -1 +0,0 @@
.\premake5.exe --premakeproject vs2017

View File

@ -1 +0,0 @@
.\premake5.exe --premakeproject vs2019

View File

@ -1,2 +0,0 @@
.\premake5.exe encoderesources
pause

View File

@ -1,2 +0,0 @@
.\premake5.exe generateheaders
pause

View File

@ -1,2 +0,0 @@
.\premake5.exe parseunicode
pause

View File

@ -1,2 +0,0 @@
.\premake5.exe package
pause

View File

@ -1,2 +0,0 @@
.\premake5.exe --pack-libdir=msvc package
pause

View File

@ -1,2 +0,0 @@
.\premake5.exe --pack-libdir=mingw package
pause

View File

@ -1,41 +0,0 @@
-- This file contains special configurations values, such as directories to extern libraries (Qt)
-- Editing this file is not required to use/compile the engine, as default values should be enough
-- Additionnal compilation options
--AdditionalCompilationOptions = "-fsanitize=address" -- Enable ASan
-- Builds Nazara extern libraries (such as lua/STB)
BuildDependencies = true
-- Builds Nazara examples
BuildExamples = true
-- Setup configurations array (valid values: Debug, Release, ReleaseWithDebug)
Configurations = "Debug,Release,ReleaseWithDebug" -- "Debug,Release,ReleaseWithDebug"
-- Setup additionnals install directories, separated by a semi-colon ; (library binaries will be copied there)
--InstallDir = "/usr/local/lib64"
-- Adds a project which will recall premake with its original arguments when built (only works on Windows for now)
PremakeProject = false
-- Excludes client-only modules/tools/examples
ServerMode = false
-- Builds modules as one united library (useless on POSIX systems)
UniteModules = false
-- Qt5 directories (required for ShaderNodes editor)
--Qt5IncludeDir = [[C:\Projets\Libs\Qt\5.15.0\msvc2019\include]]
--Qt5BinDir_x86 = [[C:\Projets\Libs\Qt\5.15.0\msvc2019\bin]]
--Qt5BinDir_x64 = [[C:\Projets\Libs\Qt\5.15.0\msvc2019_64\bin]]
--Qt5LibDir_x86 = [[C:\Projets\Libs\Qt\5.15.0\msvc2019\lib]]
--Qt5LibDir_x64 = [[C:\Projets\Libs\Qt\5.15.0\msvc2019_64\lib]]
-- QtNodes directories (required for ShaderNodes editor)
--QtNodesIncludeDir = [[C:\Projets\Libs\nodeeditor\include]]
--QtNodesBinDir_x86 = [[C:\Projets\Libs\nodeeditor\build32\bin\Release]]
--QtNodesBinDir_x64 = [[C:\Projets\Libs\nodeeditor\build64\bin\Release]]
--QtNodesLibDir_x86 = [[C:\Projets\Libs\nodeeditor\build32\lib\Release]]
--QtNodesLibDir_x64 = [[C:\Projets\Libs\nodeeditor\build64\lib\Release]]

View File

@ -1,4 +0,0 @@
dofile("codeblocks/_codeblocks.lua")
dofile("codeblocks/codeblocks.lua")
ACTION.Manual = true

View File

@ -1,44 +0,0 @@
--
-- _codeblocks.lua
-- Define the Code::Blocks action(s).
-- Copyright (c) 2002-2011 Jason Perkins and the Premake project
--
local p = premake
p.modules.codeblocks = {}
p.modules.codeblocks._VERSION = p._VERSION
local codeblocks = p.modules.codeblocks
newaction {
trigger = "codeblocks",
shortname = "Code::Blocks",
description = "Generate Code::Blocks project files",
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib" },
valid_languages = { "C", "C++" },
valid_tools = {
cc = { "clang", "gcc", "ow" },
},
onWorkspace = function(wks)
p.modules.codeblocks.generateWorkspace(wks)
end,
onProject = function(prj)
p.modules.codeblocks.generateProject(prj)
end,
onCleanWorkspace = function(wks)
p.clean.file(wks, wks.name .. ".workspace")
p.clean.file(wks, wks.name .. ".workspace.layout")
end,
onCleanProject = function(prj)
p.clean.file(prj, prj.name .. ".workspace")
p.clean.file(prj, prj.name .. ".depend")
p.clean.file(prj, prj.name .. ".layout")
end
}

View File

@ -1,67 +0,0 @@
--
-- codeblocks_workspace.lua
-- Generate a Code::Blocks workspace.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--
local p = premake
p.modules.codeblocks = {}
p.modules.codeblocks._VERSION = p._VERSION
local codeblocks = p.modules.codeblocks
local project = p.project
function codeblocks.cfgname(cfg)
local cfgname = cfg.buildcfg
if codeblocks.workspace.multiplePlatforms then
cfgname = string.format("%s|%s", cfg.platform, cfg.buildcfg)
end
return cfgname
end
function codeblocks.esc(value)
local result = value:gsub('"', '"')
result = result:gsub('<', '&lt;')
result = result:gsub('>', '&gt;')
return result
end
function codeblocks.generateWorkspace(wks)
p.eol("\r\n")
p.indent("\t")
p.escaper(codeblocks.esc)
p.generate(wks, ".workspace", codeblocks.workspace.generate)
end
function codeblocks.generateProject(prj)
p.eol("\r\n")
p.indent("\t")
p.escaper(codeblocks.esc)
if project.iscpp(prj) then
p.generate(prj, ".cbp", codeblocks.project.generate)
end
end
function codeblocks.cleanWorkspace(wks)
p.clean.file(wks, wks.name .. ".workspace")
p.clean.file(wks, wks.name .. ".workspace.layout")
end
function codeblocks.cleanProject(prj)
p.clean.file(prj, prj.name .. ".workspace")
p.clean.file(prj, prj.name .. ".depend")
p.clean.file(prj, prj.name .. ".layout")
end
function codeblocks.cleanTarget(prj)
-- TODO..
end
include("codeblocks_workspace.lua")
include("codeblocks_project.lua")

View File

@ -1,243 +0,0 @@
--
-- codeblocks_cbp.lua
-- Generate a Code::Blocks C/C++ project.
-- Copyright (c) 2009, 2011 Jason Perkins and the Premake project
--
local p = premake
local project = p.project
local config = p.config
local tree = p.tree
local codeblocks = p.modules.codeblocks
codeblocks.project = {}
local m = codeblocks.project
m.elements = {}
m.ctools = {
gcc = "gcc",
msc = "Visual C++",
}
function m.getcompilername(cfg)
local tool = _OPTIONS.cc or cfg.toolset or p.GCC
local toolset = p.tools[tool]
if not toolset then
error("Invalid toolset '" + (_OPTIONS.cc or cfg.toolset) + "'")
end
return m.ctools[tool]
end
function m.getcompiler(cfg)
local toolset = p.tools[_OPTIONS.cc or cfg.toolset or p.GCC]
if not toolset then
error("Invalid toolset '" + (_OPTIONS.cc or cfg.toolset) + "'")
end
return toolset
end
function m.header(prj)
_p('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>')
_p('<CodeBlocks_project_file>')
_p(1,'<FileVersion major="1" minor="6" />')
-- write project block header
_p(1,'<Project>')
_p(2,'<Option title="%s" />', prj.name)
_p(2,'<Option pch_mode="2" />')
end
function m.footer(prj)
-- write project block footer
_p(1,'</Project>')
_p('</CodeBlocks_project_file>')
end
m.elements.project = function(prj)
return {
m.header,
m.configurations,
m.files,
m.extensions,
m.footer
}
end
--
-- Project: Generate the CodeBlocks project file.
--
function m.generate(prj)
p.utf8()
p.callArray(m.elements.project, prj)
end
function m.configurations(prj)
-- write configuration blocks
_p(2,'<Build>')
local platforms = {}
for cfg in project.eachconfig(prj) do
local found = false
for k,v in pairs(platforms) do
if (v.platform == cfg.platform) then
table.insert(v.configs, cfg)
found = true
break
end
end
if (not found) then
table.insert(platforms, {platform = cfg.platform, configs = {cfg}})
end
end
for k,platform in pairs(platforms) do
for k,cfg in pairs(platform.configs) do
local compiler = m.getcompiler(cfg)
_p(3,'<Target title="%s">', cfg.longname)
_p(4,'<Option output="%s" prefix_auto="0" extension_auto="0" />', p.esc(cfg.buildtarget.relpath))
if cfg.debugdir then
_p(4,'<Option working_dir="%s" />', p.esc(path.getrelative(prj.location, cfg.debugdir)))
end
_p(4,'<Option object_output="%s" />', p.esc(path.getrelative(prj.location, cfg.objdir)))
-- identify the type of binary
local types = { WindowedApp = 0, ConsoleApp = 1, StaticLib = 2, SharedLib = 3 }
_p(4,'<Option type="%d" />', types[cfg.kind])
_p(4,'<Option compiler="%s" />', m.getcompilername(cfg))
if (cfg.kind == "SharedLib") then
_p(4,'<Option createDefFile="0" />')
_p(4,'<Option createStaticLib="%s" />', iif(cfg.flags.NoImportLib, 0, 1))
end
-- begin compiler block --
_p(4,'<Compiler>')
for _,flag in ipairs(table.join(compiler.getcflags(cfg), compiler.getcxxflags(cfg), compiler.getdefines(cfg.defines), cfg.buildoptions)) do
_p(5,'<Add option="%s" />', p.esc(flag))
end
if not cfg.flags.NoPCH and cfg.pchheader then
_p(5,'<Add option="-Winvalid-pch" />')
_p(5,'<Add option="-include &quot;%s&quot;" />', p.esc(cfg.pchheader))
end
for _,v in ipairs(cfg.includedirs) do
_p(5,'<Add directory="%s" />', p.esc(path.getrelative(prj.location, v)))
end
_p(4,'</Compiler>')
-- end compiler block --
-- begin linker block --
_p(4,'<Linker>')
for _,flag in ipairs(table.join(compiler.getldflags(cfg), cfg.linkoptions)) do
_p(5,'<Add option="%s" />', p.esc(flag))
end
for _,v in ipairs(config.getlinks(cfg, "all", "directory")) do
_p(5,'<Add directory="%s" />', p.esc(v))
end
for _,v in ipairs(config.getlinks(cfg, "all", "basename")) do
_p(5,'<Add library="%s" />', p.esc(v))
end
_p(4,'</Linker>')
-- end linker block --
-- begin resource compiler block --
if config.findfile(cfg, ".rc") then
_p(4,'<ResourceCompiler>')
for _,v in ipairs(cfg.includedirs) do
_p(5,'<Add directory="%s" />', p.esc(v))
end
for _,v in ipairs(cfg.resincludedirs) do
_p(5,'<Add directory="%s" />', p.esc(v))
end
_p(4,'</ResourceCompiler>')
end
-- end resource compiler block --
-- begin build steps --
if #cfg.prebuildcommands > 0 or #cfg.postbuildcommands > 0 then
_p(4,'<ExtraCommands>')
for _,v in ipairs(cfg.prebuildcommands) do
_p(5,'<Add before="%s" />', p.esc(v))
end
for _,v in ipairs(cfg.postbuildcommands) do
_p(5,'<Add after="%s" />', p.esc(v))
end
_p(4,'</ExtraCommands>')
end
-- end build steps --
_p(3,'</Target>')
end
end
_p(2,'</Build>')
end
--
-- Write out a list of the source code files in the project.
--
function m.files(prj)
local pchheader
if (prj.pchheader) then
pchheader = path.getrelative(prj.location, prj.pchheader)
end
local tr = project.getsourcetree(prj)
tree.traverse(tr, {
-- source files are handled at the leaves
onleaf = function(node, depth)
if node.relpath == node.vpath then
_p(2,'<Unit filename="%s">', node.relpath)
else
_p(2,'<Unit filename="%s">', node.name)
_p(3,'<Option virtualFolder="%s" />', path.getdirectory(node.vpath))
end
if path.isresourcefile(node.name) then
_p(3,'<Option compilerVar="WINDRES" />')
elseif path.iscfile(node.name) and prj.language == "C++" then
_p(3,'<Option compilerVar="CC" />')
end
if not prj.flags.NoPCH and node.name == pchheader then
_p(3,'<Option compilerVar="%s" />', iif(prj.language == "C", "CC", "CPP"))
_p(3,'<Option compile="1" />')
_p(3,'<Option weight="0" />')
_p(3,'<Add option="-x c++-header" />')
end
_p(2,'</Unit>')
end,
}, false, 1)
end
function m.extensions(prj)
for cfg in project.eachconfig(prj) do
if cfg.debugenvs and #cfg.debugenvs > 0 then
--Assumption: if gcc is being used then so is gdb although this section will be ignored by
--other debuggers. If using gcc and not gdb it will silently not pass the
--environment arguments to the debugger
if m.getcompilername(cfg) == "gcc" then
_p(3,'<debugger>')
_p(4,'<remote_debugging target="%s">', p.esc(cfg.longname))
local args = ''
local sz = #cfg.debugenvs
for idx, v in ipairs(cfg.debugenvs) do
args = args .. 'set env ' .. v
if sz ~= idx then args = args .. '&#x0A;' end
end
_p(5,'<options additional_cmds_before="%s" />',args)
_p(4,'</remote_debugging>')
_p(3,'</debugger>')
else
error('Sorry at this moment there is no support for debug environment variables with this debugger and codeblocks')
end
end
end
end

View File

@ -1,44 +0,0 @@
--
-- Name: codelite/codelite_workspace.lua
-- Purpose: Generate a CodeLite workspace.
-- Author: Ryan Pusztai
-- Modified by: Andrea Zanellato
-- Manu Evans
-- Created: 2013/05/06
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
--
local p = premake
local project = p.project
local workspace = p.workspace
local tree = p.tree
local codeblocks = p.modules.codeblocks
codeblocks.workspace = {}
local m = codeblocks.workspace
--
-- Generate a CodeBlocks workspace
--
function m.generate(wks)
p.utf8()
_p('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>')
_p('<CodeBlocks_workspace_file>')
_p(1,'<Workspace title="%s">', wks.name)
for prj in workspace.eachproject(wks) do
local fname = path.join(path.getrelative(wks.location, prj.location), prj.name)
local active = iif(prj.project == wks.projects[1], ' active="1"', '')
_p(2,'<Project filename="%s.cbp"%s>', fname, active)
for _,dep in ipairs(project.getdependencies(prj)) do
_p(3,'<Depends filename="%s.cbp" />', path.join(path.getrelative(wks.location, dep.location), dep.name))
end
_p(2,'</Project>')
end
_p(1,'</Workspace>')
_p('</CodeBlocks_workspace_file>')
end

View File

@ -1,49 +0,0 @@
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/*")
table.insert(modules, "../SDK/src/NDK")
for k, modulePath in pairs(modules) do
local moduleName
if (modulePath:sub(4, 6) == "src") then
moduleName = modulePath:sub(15, -1)
else
moduleName = "SDK"
end
local files = os.matchfiles(modulePath .. "/Resources/**")
for k, filePath in pairs(files) do
if (filePath:sub(-2) ~= ".h") then
local file = filePath:sub(modulePath:len() + 12, -1)
local resource, err = io.open(filePath, "rb")
if (not resource) then
error("Failed to read resource file " .. file .. ": " .. err)
end
local resourceContent = resource:read("*a")
resource:close()
local contentLength = resourceContent:len()
local headerContentTable = {}
for i = 1, contentLength do
table.insert(headerContentTable, string.format("%d,", resourceContent:byte(i)))
end
local headerContent = table.concat(headerContentTable)
local header, err = io.open(filePath .. ".h", "w+")
if (not header) then
error("Failed to create header file for " .. file .. ": " .. err)
end
header:write(headerContent)
header:close()
print(string.format("%s: %s (raw: %.3g kB, header: %.3g kB)", moduleName, file, contentLength/1024, string.format("%.3g", headerContent:len()/1024)))
end
end
end
print("Finished (took " .. os.clock() - startClock .. "s)")
end

View File

@ -1,237 +0,0 @@
function PrintTable ( t, indent, done )
done = done or {}
indent = indent or 0
local txt = {}
for key, value in pairs (t) do
table.insert(txt, string.rep (" ", indent))
if (type(value) == "table" and not done[value]) then
done [value] = true
table.insert(txt, tostring(key) .. ":" .. "\n")
table.insert(txt, PrintTable (value, indent + 2, done))
else
table.insert(txt, tostring (key) .. "\t=\t" )
table.insert(txt, tostring(value) .. "\n" )
end
end
return table.concat(txt)
end
Feature = {}
-- Tables de vérité
local andTable =
{
{0,0},
{0,1},
}
local orTable =
{
{0,1},
{1,1},
}
local xorTable =
{
{0,1},
{1,0},
}
local bitFunc = function (a, b, truthTable)
local power = 1
local c = 0
while (a > 0 or b > 0) do
c = c + (truthTable[(a % 2)+1][(b % 2)+1] * power)
a = math.floor(a/2)
b = math.floor(b/2)
power = power * 2
end
return c
end
function Feature.AND(a, b)
return bitFunc(a, b, andTable)
end
function Feature.OR(a, b)
return bitFunc(a, b, orTable)
end
function Feature.XOR(a, b)
return bitFunc(a, b, xorTable)
end
Feature.NotApplicable = 0
Feature.Windows = 2 ^ 0
Feature.Linux = 2 ^ 1
Feature.MacOSX = 2 ^ 2
Feature.RaspberryPi = 2 ^ 3
Feature.POSIX = Feature.Linux + Feature.MacOSX + Feature.RaspberryPi
function Feature.CompleteData(tab, requiredPortability)
if (not requiredPortability) then
assert(tab.RequiredPortability)
requiredPortability = tab.RequiredPortability
elseif (tab.RequiredPortability) then
requiredPortability = Feature.OR(requiredPortability, tab.RequiredPortability)
end
tab.RequiredPortability = requiredPortability
if (not tab.Portability) then
tab.Portability = Feature.NotApplicable
end
if (tab.Features) then
local acc = 0
for k,v in pairs(tab.Features) do
if (type(v) == "string") then
v = {Title = v}
tab.Features[k] = v
end
Feature.CompleteData(v, requiredPortability)
v.Progress = v.Progress or 100
acc = acc + v.Progress
end
tab.Progress = acc/#tab.Features
end
end
function Feature.Generate()
local files = os.matchfiles("scripts/features/*.lua")
local modules = {}
for k, filePath in pairs(files) do
local moduleName = filePath:match(".*/(.*).lua")
local data = dofile(filePath)
Feature.CompleteData(data)
modules[moduleName] = data
end
local content = {}
local contentType =
{
["(%s*)%%MODULELIST%%"] = Feature.GenerateModuleList,
["(%s*)%%MODULEDESCRIPTION%%"] = Feature.GenerateModuleDescriptions,
["(%s*)%%DATE%%"] = function (dontcare, space, content)
table.insert(content, string.format("%s%s", space, os.date("%d/%m/%Y")))
end,
}
local index = io.open("scripts/features/index_template.html")
for line in index:lines() do
local matched = false
for k,v in pairs(contentType) do
local space = line:match(k)
if (space) then
matched = true
v(modules, space, content)
break
end
end
if (not matched) then
table.insert(content, line)
end
end
io.open("scripts/features/index.html", "w+"):write(table.concat(content, "\n"))
end
function Feature.Interpolate(from, to, p)
return from + (to - from)*p
end
function Feature.ComputeColor(progress)
local stable = {0, 200, 0}
local partial = {255, 127, 0}
local unusable = {255, 0, 0}
local a, b, p
if (progress < 20) then
a = unusable
b = partial
p = progress/20.0
else
a = partial
b = stable
p = math.min(20 * 1.020321705^(progress - 20), 100.0)/100.0 -- Je me complique certainement la vie pour ce qui est d'avoir une interpolation exponentielle, mais ça remonte tout ça ...
end
local color = {nil, nil, nil}
for i = 1, 3 do
color[i] = Feature.Interpolate(a[i], b[i], p)
end
return color
end
function Feature.GenerateModuleList(modules, space, content)
for k,v in pairs(modules) do
local c = Feature.ComputeColor(v.Progress)
table.insert(content, string.format([[%s<tr>]], space))
table.insert(content, string.format([[%s <td><a href="#%s">%s</a></td>]], space, k, v.Title))
table.insert(content, string.format([[%s <td style="color: rgb(%d, %d, %d);">%d%%</td>]], space, c[1], c[2], c[3], v.Progress))
table.insert(content, string.format([[%s</tr>]], space))
end
end
function Feature.GenerateModuleDescriptions(modules, space, content)
for k,v in pairs(modules) do
table.insert(content, string.format([[%s<div class="module">]], space))
table.insert(content, string.format([[%s <hr />]], space, k, v.Title))
table.insert(content, string.format([[%s <span id="%s" class="modulename">%s (%s) : %d%%</span>]], space, k, v.Title, v.LibName, math.floor(v.Progress)))
table.insert(content, string.format([[%s <h4>Fonctionnalités:</h4>]], space))
Feature.GenerateFeatureList(v.Features, space .. "\t\t", content)
table.insert(content, string.format([[%s</div>]], space))
end
end
function Feature.GenerateFeatureList(featureTable, space, content)
table.insert(content, string.format("%s<ul>", space))
for k,v in pairs(featureTable) do
local progress = v.Progress
local c = Feature.ComputeColor(progress)
local desc = (progress == 100) and "" or string.format(" (%d%%)", math.floor(progress))
table.insert(content, string.format("%s <li>", space))
table.insert(content, string.format([[%s <span style="color: rgb(%d, %d, %d);">%s%s</span>]], space, c[1], c[2], c[3], v.Title, desc))
if (v.Description) then
table.insert(content, string.format([[%s <br><span class="description">%s</span>]], space, v.Description))
end
if (v.Features) then
Feature.GenerateFeatureList(v.Features, space .. "\t\t\t", content)
end
if (v.Note) then
table.insert(content, string.format([[%s <br><span class="note">Note: <span class="notedesc">%s</span></span>]], space, v.Note))
end
if (v.Portability ~= Feature.NotApplicable and Feature.AND(v.Portability, v.RequiredPortability) ~= v.RequiredPortability) then
table.insert(content, string.format([[%s <br><span class="portability">Il manque une implémentation sur au moins un des OS supportés</span>]], space))
end
table.insert(content, string.format("%s </li>", space))
end
table.insert(content, string.format("%s</ul>", space))
end
ACTION.Name = "GenerateFeatures"
ACTION.Description = "Generate a web page describing each module's feature"
ACTION.Function = Feature.Generate

View File

@ -1,116 +0,0 @@
ACTION.Name = "GenerateHeaders"
ACTION.Description = "Generate a global header for each module"
ACTION.ModuleExcludes = {}
ACTION.ModuleExcludes["ConfigCheck.hpp"] = true
ACTION.ModuleExcludes["Debug.hpp"] = true
ACTION.ModuleExcludes["DebugOff.hpp"] = true
ACTION.ModuleExcludes["ThreadSafety.hpp"] = true
ACTION.ModuleExcludes["ThreadSafetyOff.hpp"] = true
local action = ACTION
ACTION.Function = function ()
local paths = {}
local modules = os.matchdirs("../include/Nazara/*")
for k, modulePath in pairs(modules) do
local moduleName = modulePath:match(".*/(.*)")
local config, err = io.open(modulePath .. "/Config.hpp", "r")
local head = ""
if (not config) then
error("Failed to read config file: " .. err)
end
for line in config:lines() do
if (line == "#pragma once") then -- Stop before including the #pragma once as it's already written automatically
break
end
head = head .. line .. "\n"
end
config:close()
table.insert(paths, {
Excludes = action.ModuleExcludes,
Header = head,
HeaderGuard = "NAZARA_GLOBAL_" .. moduleName:upper() .. "_HPP",
Name = "Nazara" .. moduleName,
SearchDir = modulePath,
Target = modulePath .. ".hpp",
TopDir = "Nazara"
})
end
table.insert(paths, {
Excludes = {
["DeviceFunctions.hpp"] = true,
["GlobalFunctions.hpp"] = true,
["InstanceFunctions.hpp"] = true,
},
HeaderGuard = "NAZARA_GLOBAL_VULKANRENDERER_WRAPPER_HPP",
Name = "Vulkan wrapper",
SearchDir = "../include/Nazara/VulkanRenderer/Wrapper",
TopDir = "Nazara",
Target = "../include/Nazara/VulkanRenderer/Wrapper.hpp"
})
table.insert(paths, {
Excludes = {},
HeaderGuard = "NDK_COMPONENTS_GLOBAL_HPP",
Name = "NDK Components",
SearchDir = "../SDK/include/NDK/Components",
TopDir = "NDK",
Target = "../SDK/include/NDK/Components.hpp"
})
table.insert(paths, {
Excludes = {},
HeaderGuard = "NDK_SYSTEMS_GLOBAL_HPP",
Name = "NDK Systems",
SearchDir = "../SDK/include/NDK/Systems",
TopDir = "NDK",
Target = "../SDK/include/NDK/Systems.hpp"
})
table.insert(paths, {
Excludes = {},
HeaderGuard = "NDK_WIDGETS_GLOBAL_HPP",
Name = "NDK Widgets",
SearchDir = "../SDK/include/NDK/Widgets",
TopDir = "NDK",
Target = "../SDK/include/NDK/Widgets.hpp"
})
for k,v in ipairs(paths) do
print(v.Name)
local header, err = io.open(v.Target, "w+")
if (not header) then
error("Failed to create header file (" .. v.Target .. "): " .. err)
end
header:write("// This file was automatically generated\n\n")
if (v.Header) then
header:write(v.Header)
end
header:write("#pragma once\n\n")
header:write("#ifndef " .. v.HeaderGuard .. "\n")
header:write("#define " .. v.HeaderGuard .. "\n\n")
local files = os.matchfiles(v.SearchDir .. "/*.hpp")
local count = 0
for k, filePath in pairs(files) do
local include, fileName = filePath:match(".*(" .. v.TopDir .. "/.*/(.*))")
if (not v.Excludes[fileName]) then
header:write("#include <" .. include .. ">\n")
count = count + 1
end
end
header:write("\n#endif // " .. v.HeaderGuard .. "\n")
header:close()
print(string.format("-#include count: %d", count))
end
end

View File

@ -1,200 +0,0 @@
newoption({
trigger = "pack-libdir",
description = "Specifies the subdirectory in lib/ to be used when packaging the project"
})
ACTION.Name = "Package"
ACTION.Description = "Pack Nazara binaries/include/lib together"
ACTION.Function = function ()
local libDir = _OPTIONS["pack-libdir"]
if (not libDir or #libDir == 0) then
local libDirs = os.matchdirs("../lib/*")
if (#libDirs > 1) then
error("More than one subdirectory was found in the lib directory, please use the --pack-libdir command to clarify which directory should be used")
elseif (#libDirs == 0) then
error("No subdirectory was found in the lib directory, have you built the engine yet?")
else
libDir = path.getname(libDirs[1])
print("No directory was set by the --pack-libdir command, \"" .. libDir .. "\" will be used")
end
end
local realLibDir = "../lib/" .. libDir .. "/"
if (not os.isdir(realLibDir)) then
error(string.format("\"%s\" doesn't seem to be an existing directory", realLibDir))
end
local archEnabled = {
["x64"] = false,
["x86"] = false
}
local enabledArchs = {}
for k,v in pairs(os.matchdirs(realLibDir .. "*")) do
local arch = path.getname(v)
if (archEnabled[arch] ~= nil) then
archEnabled[arch] = true
table.insert(enabledArchs, arch)
else
print("Unknown directory " .. v .. " found, ignored")
end
end
enabledArchs = table.concat(enabledArchs, ", ")
print(enabledArchs .. " arch found")
local packageDir = "../package/"
local copyTargets = {
{ -- Engine headers
Masks = {"**.hpp", "**.inl"},
Source = "../include/",
Target = "include/"
},
{ -- SDK headers
Masks = {"**.hpp", "**.inl"},
Source = "../SDK/include/",
Target = "include/"
},
{ -- Examples files
Masks = {"**.hpp", "**.inl", "**.cpp"},
Source = "../examples/",
Target = "examples/"
},
{ -- Demo resources
Masks = {"**.*"},
Source = "../examples/bin/resources/",
Target = "examples/bin/resources/"
},
-- Unit test sources
{
Masks = {"**.hpp", "**.inl", "**.cpp"},
Source = "../tests/",
Target = "tests/src/"
},
-- Unit test resources
{
Masks = {"**.*"},
Source = "../tests/resources/",
Target = "tests/resources/"
}
}
local binFileMasks
local libFileMasks
local exeFileExt
local exeFilterFunc
if (os.ishost("windows")) then
binFileMasks = {"**.dll", "**.pdb"}
libFileMasks = {"**.lib", "**.a"}
exeFileExt = ".exe"
exeFilterFunc = function (filePath) return true end
else
if (os.ishost("macosx")) then
binFileMasks = {"**.dynlib"}
else
binFileMasks = {"**.so"}
end
libFileMasks = {"**.a"}
exeFileExt = ""
exeFilterFunc = function (filePath) return path.getextension(filePath):contains('/') end
end
for arch, enabled in pairs(archEnabled) do
if (enabled) then
local archLibSrc = realLibDir .. arch .. "/"
local arch3rdPartyBinSrc = "../thirdparty/lib/common/" .. arch .. "/"
local archBinDst = "bin/" .. arch .. "/"
local archLibDst = "lib/" .. arch .. "/"
-- Engine/SDK binaries
table.insert(copyTargets, {
Masks = binFileMasks,
Source = archLibSrc,
Target = archBinDst
})
-- Engine/SDK libraries
table.insert(copyTargets, {
Masks = libFileMasks,
Source = archLibSrc,
Target = archLibDst
})
-- 3rd party binary dep
table.insert(copyTargets, {
Masks = binFileMasks,
Source = arch3rdPartyBinSrc,
Target = archBinDst
})
end
end
-- Demo executable
table.insert(copyTargets, {
Masks = {"Demo*" .. exeFileExt},
Filter = exeFilterFunc,
Source = "../examples/bin/",
Target = "examples/bin/"
})
-- Unit test
table.insert(copyTargets, {
Masks = {"*" .. exeFileExt},
Filter = exeFilterFunc,
Source = "../tests/",
Target = "tests/"
})
-- Processing
os.mkdir(packageDir)
local size = 0
for k,v in pairs(copyTargets) do
local target = packageDir .. v.Target
local includePrefix = v.Source
local targetFiles = {}
for k, mask in pairs(v.Masks) do
print(includePrefix .. mask .. " => " .. target)
local files = os.matchfiles(includePrefix .. mask)
if (v.Filter) then
for k,path in pairs(files) do
if (not v.Filter(path)) then
files[k] = nil
end
end
end
targetFiles = table.join(targetFiles, files)
end
for k,v in pairs(targetFiles) do
local relPath = v:sub(#includePrefix + 1)
local targetPath = target .. relPath
local targetDir = path.getdirectory(targetPath)
if (not os.isdir(targetDir)) then
local ok, err = os.mkdir(targetDir)
if (not ok) then
print("Failed to create directory \"" .. targetDir .. "\": " .. err)
end
end
local ok, err = os.copyfile(v, targetPath)
if (not ok) then
print("Failed to copy \"" .. v .. "\" to \"" .. targetPath .. "\": " .. err)
end
local stat = os.stat(targetPath)
if (stat) then
size = size + stat.size
end
end
end
local config = libDir .. " - " .. enabledArchs
print(string.format("Package successfully created at \"%s\" (%u MB, %s)", packageDir, size // (1024 * 1024), config))
end

View File

@ -1,271 +0,0 @@
ACTION.Name = "UpdateSpirV"
ACTION.Description = "Download and parse the SpirV grammar and generate a .cpp file for it"
local spirvGrammarURI = "https://raw.githubusercontent.com/KhronosGroup/SPIRV-Headers/master/include/spirv/unified1/spirv.core.grammar.json"
ACTION.Function = function()
io.write("Downloading Spir-V grammar... ")
local content, resultStr, resultCode = http.get(spirvGrammarURI, {
headers = { "From: Premake", "Referer: Premake" }
})
if (resultCode ~= 200) then
error("Failed to download SpirV grammar: " .. resultStr)
end
print("Done")
io.write("Parsing... ")
local result, err = json.decode(content)
assert(result, err)
local instructions = {}
local instructionById = {}
for _, instruction in pairs(result.instructions) do
local duplicateId = instructionById[instruction.opcode]
if (duplicateId == nil) then
table.insert(instructions, instruction)
instructionById[instruction.opcode] = #instructions
else
instructions[duplicateId] = instruction
end
end
local operands = {}
local operandByInstruction = {}
for _, instruction in pairs(instructions) do
if (instruction.operands) then
local resultId
local firstId = #operands
local operandCount = #instruction.operands
for i, operand in pairs(instruction.operands) do
table.insert(operands, operand)
if (operand.kind == "IdResult") then
assert(not resultId, "unexpected operand with two IdResult")
resultId = i - 1
end
end
operandByInstruction[instruction.opcode] = { firstId = firstId, count = operandCount, resultId = resultId }
end
end
print("Done")
io.write("Generating... ")
local headerFile = io.open("../include/Nazara/Shader/SpirvData.hpp", "w+")
assert(headerFile, "failed to open Spir-V header")
headerFile:write([[
// Copyright (C) ]] .. os.date("%Y") .. [[ Jérôme Leclercq
// This file is part of the "Nazara Engine - Shader generator"
// For conditions of distribution and use, see copyright notice in Config.hpp"
// This file was generated automatically, please do not edit
#pragma once
#ifndef NAZARA_SPIRVDATA_HPP
#define NAZARA_SPIRVDATA_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/Flags.hpp>
#include <Nazara/Shader/Config.hpp>
namespace Nz
{
]])
headerFile:write([[
constexpr UInt32 SpirvMagicNumber = ]] .. result.magic_number .. [[;
constexpr UInt32 SpirvMajorVersion = ]] .. result.major_version .. [[;
constexpr UInt32 SpirvMinorVersion = ]] .. result.minor_version .. [[;
constexpr UInt32 SpirvRevision = ]] .. result.revision .. [[;
constexpr UInt32 SpirvVersion = (SpirvMajorVersion << 16) | (SpirvMinorVersion << 8);
]])
-- SpirV operations
headerFile:write([[
enum class SpirvOp
{
]])
for _, instruction in pairs(result.instructions) do
headerFile:write("\t\t" .. instruction.opname .. " = " .. instruction.opcode .. ",\n")
end
headerFile:write([[
};
]])
-- SpirV operands
headerFile:write([[
enum class SpirvOperandKind
{
]])
for _, operand in pairs(result.operand_kinds) do
headerFile:write("\t\t" .. operand.kind .. ",\n")
end
headerFile:write([[
};
]])
-- SpirV enums
for _, operand in pairs(result.operand_kinds) do
if (operand.category == "ValueEnum" or operand.category == "BitEnum") then
local enumName = "Spirv" .. operand.kind
headerFile:write([[
enum class ]] .. enumName .. [[
{
]])
local maxName
local maxValue
for _, enumerant in pairs(operand.enumerants) do
local value = enumerant.value
local eName = enumerant.enumerant:match("^%d") and operand.kind .. enumerant.enumerant or enumerant.enumerant
headerFile:write([[
]] .. eName .. [[ = ]] .. value .. [[,
]])
if (not maxValue or value > maxValue) then
maxName = eName
end
end
headerFile:write([[
};
]])
if (operand.category == "BitEnum") then
headerFile:write([[
template<>
struct EnumAsFlags<]] .. enumName .. [[>
{
static constexpr ]] .. enumName .. [[ max = ]] .. enumName .. "::" .. maxName .. [[;
static constexpr bool AutoFlag = false;
};
]])
end
end
end
-- Struct
headerFile:write([[
struct SpirvInstruction
{
struct Operand
{
SpirvOperandKind kind;
const char* name;
};
SpirvOp op;
const char* name;
const Operand* operands;
const Operand* resultOperand;
std::size_t minOperandCount;
};
]])
-- Functions signatures
headerFile:write([[
NAZARA_SHADER_API const SpirvInstruction* GetInstructionData(UInt16 op);
]])
headerFile:write([[
}
#endif
]])
local sourceFile = io.open("../src/Nazara/Shader/SpirvData.cpp", "w+")
assert(sourceFile, "failed to open Spir-V source")
sourceFile:write([[
// Copyright (C) ]] .. os.date("%Y") .. [[ Jérôme Leclercq
// This file is part of the "Nazara Engine - Shader generator"
// For conditions of distribution and use, see copyright notice in Config.hpp"
// This file was generated automatically, please do not edit
#include <Nazara/Shader/SpirvData.hpp>
#include <algorithm>
#include <array>
#include <cassert>
namespace Nz
{
static constexpr std::array<SpirvInstruction::Operand, ]] .. #operands .. [[> s_operands = {
{
]])
for _, operand in pairs(operands) do
sourceFile:write([[
{
SpirvOperandKind::]] .. operand.kind .. [[,
R"(]] .. (operand.name or operand.kind) .. [[)"
},
]])
end
sourceFile:write([[
}
};
static std::array<SpirvInstruction, ]] .. #instructions .. [[> s_instructions = {
{
]])
for _, instruction in pairs(instructions) do
local opByInstruction = operandByInstruction[instruction.opcode]
local resultId = opByInstruction and opByInstruction.resultId or nil
sourceFile:write([[
{
SpirvOp::]] .. instruction.opname .. [[,
R"(]] .. instruction.opname .. [[)",
]] .. (opByInstruction and "&s_operands[" .. opByInstruction.firstId .. "]" or "nullptr") .. [[,
]] .. (resultId and "&s_operands[" .. opByInstruction.firstId + resultId .. "]" or "nullptr") .. [[,
]] .. (opByInstruction and opByInstruction.count or "0") .. [[,
},
]])
end
sourceFile:write([[
}
};
]])
-- Operand to string
sourceFile:write([[
const SpirvInstruction* GetInstructionData(UInt16 op)
{
auto it = std::lower_bound(std::begin(s_instructions), std::end(s_instructions), op, [](const SpirvInstruction& inst, UInt16 op) { return UInt16(inst.op) < op; });
if (it != std::end(s_instructions) && UInt16(it->op) == op)
return &*it;
else
return nullptr;
}
]])
sourceFile:write([[
}
]])
print("Done")
end

View File

@ -1,265 +0,0 @@
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"
CategoryToString["Cf"] = "Category_Other_Format"
CategoryToString["Cn"] = "Category_Other_NotAssigned"
CategoryToString["Co"] = "Category_Other_PrivateUse"
CategoryToString["Cs"] = "Category_Other_Surrogate"
CategoryToString["L"] = "Category_Letter"
CategoryToString["Ll"] = "Category_Letter_Lowercase"
CategoryToString["Lm"] = "Category_Letter_Modifier"
CategoryToString["Lo"] = "Category_Letter_Other"
CategoryToString["Lt"] = "Category_Letter_Titlecase"
CategoryToString["Lu"] = "Category_Letter_Uppercase"
CategoryToString["M"] = "Category_Mark"
CategoryToString["Me"] = "Category_Mark_Enclosing"
CategoryToString["Mn"] = "Category_Mark_NonSpacing"
CategoryToString["Mc"] = "Category_Mark_SpacingCombining"
CategoryToString["N"] = "Category_Number"
CategoryToString["Nd"] = "Category_Number_DecimalDigit"
CategoryToString["Nl"] = "Category_Number_Letter"
CategoryToString["No"] = "Category_Number_Other"
CategoryToString["P"] = "Category_Punctuation"
CategoryToString["Pe"] = "Category_Punctuation_Close"
CategoryToString["Pc"] = "Category_Punctuation_Connector"
CategoryToString["Pd"] = "Category_Punctuation_Dash"
CategoryToString["Pf"] = "Category_Punctuation_FinalQuote"
CategoryToString["Pi"] = "Category_Punctuation_InitialQuote"
CategoryToString["Ps"] = "Category_Punctuation_Open"
CategoryToString["Po"] = "Category_Punctuation_Other"
CategoryToString["S"] = "Category_Symbol"
CategoryToString["Sc"] = "Category_Symbol_Currency"
CategoryToString["Sm"] = "Category_Symbol_Math"
CategoryToString["Sk"] = "Category_Symbol_Modifier"
CategoryToString["So"] = "Category_Symbol_Other"
CategoryToString["Z"] = "Category_Separator"
CategoryToString["Zl"] = "Category_Separator_Line"
CategoryToString["Zp"] = "Category_Separator_Paragraph"
CategoryToString["Zs"] = "Category_Separator_Space"
local DirectionToString = {}
DirectionToString["AL"] = "Direction_Arabic_Letter"
DirectionToString["AN"] = "Direction_Arabic_Number"
DirectionToString["BN"] = "Direction_Boundary_Neutral"
DirectionToString["CS"] = "Direction_Common_Separator"
DirectionToString["EN"] = "Direction_European_Number"
DirectionToString["ES"] = "Direction_European_Separator"
DirectionToString["ET"] = "Direction_European_Terminator"
DirectionToString["FSI"] = "Direction_First_Strong_Isolate"
DirectionToString["L"] = "Direction_Left_To_Right"
DirectionToString["LRE"] = "Direction_Left_To_Right_Embedding"
DirectionToString["LRI"] = "Direction_Left_To_Right_Isolate"
DirectionToString["LRO"] = "Direction_Left_To_Right_Override"
DirectionToString["NSM"] = "Direction_Nonspacing_Mark"
DirectionToString["ON"] = "Direction_Other_Neutral"
DirectionToString["B"] = "Direction_Paragraph_Separator"
DirectionToString["PDF"] = "Direction_Pop_Directional_Formatting"
DirectionToString["PDI"] = "Direction_Pop_Directional_Isolate"
DirectionToString["R"] = "Direction_Right_To_Left"
DirectionToString["RLE"] = "Direction_Right_To_Left_Embedding"
DirectionToString["RLI"] = "Direction_Right_To_Left_Isolate"
DirectionToString["RLO"] = "Direction_Right_To_Left_Override"
DirectionToString["S"] = "Direction_Segment_Separator"
DirectionToString["WS"] = "Direction_White_Space"
table.maxn = table.maxn or function (tab) -- Compatibilité Lua 5.2
local maxIndex = 0
for k,v in pairs(tab) do
if (k > maxIndex) then
maxIndex = k
end
end
end
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")
character.LowerCase = (string.len(tab[14]) ~= 0 and (tonumber(tab[14], 16)-first)) or index
character.UpperCase = (string.len(tab[13]) ~= 0 and (tonumber(tab[13], 16)-first)) or index
character.TitleCase = (string.len(tab[15]) ~= 0 and (tonumber(tab[15], 16)-first)) or character.UpperCase
return character
end
ACTION.Function = function ()
local unicodeSet = {}
if (not os.isdir("scripts/data") and not os.mkdir("scripts/data")) then
print("Failed to create scripts/data folder")
end
local filepath = "scripts/data/UnicodeData.txt"
print("Downloading UnicodeData.txt...")
local t1 = os.clock()
local result_str, response_code = http.download("https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt", filepath, {
headers = { "From: Premake", "Referer: Premake" }
})
if (response_code ~= 200) then
error("Failed to download UnicodeData.txt")
end
local fileInfo = os.stat(filepath)
local t2 = os.clock()
print(string.format("Download succeeded (%.3f MiB) in %fs (%d KiB/s)", fileInfo.size / (1024 * 1024), t2 - t1, math.floor((fileInfo.size / (t2 - t1)) / 1024)))
file = io.open (filepath, "r")
if (not file) then
error("Unable to open Unicode Data file")
return
end
local characters = {}
local characterSets = {}
local lowercaseCharacters = {}
local titlecaseCharacters = {}
local uppercaseCharacters = {}
local currentBlock
local currentBlockStartCodepoint
local lineIndex = 1
t1 = os.clock()
print("Parsing UnicodeData.txt...")
for line in file:lines() do
local parts = line:explode(";")
local codepoint = tonumber(parts[1], 16)
local characterName = parts[2]
local category = parts[3]
local direction = parts[5]
local uppercaseMapping = tonumber(parts[13], 16)
local lowercaseMapping = tonumber(parts[14], 16)
local titlecaseMapping = tonumber(parts[15], 16)
local blockName, blockId = string.match(characterName, "<(.+), (%w+)>")
if (currentBlock) then
if (blockId ~= "Last") then
error("Parsing error: expected last block at line " .. lineIndex)
end
print("Detected set " .. blockName .. " from codepoint " .. currentBlockStartCodepoint .. " to " .. codepoint)
table.insert(characterSets, {
startCodepoint = currentBlockStartCodepoint,
endCodepoint = codepoint,
name = "<" .. blockName .. ">",
category = category,
direction = direction
})
currentBlock = nil
else
if (blockName) then
if (blockId ~= "First") then
error("Parsing error: expected first block at line " .. lineIndex)
end
currentBlock = blockName
currentBlockStartCodepoint = codepoint
else
table.insert(characters, {
codepoint = codepoint,
name = characterName,
category = category,
direction = direction,
upper = uppercaseMapping,
lower = lowercaseMapping,
title = titlecaseMapping
})
if (lowercaseMapping) then
table.insert(lowercaseCharacters, {codepoint = codepoint, lower = lowercaseMapping})
end
if (titlecaseMapping) then
table.insert(titlecaseCharacters, {codepoint = codepoint, title = titlecaseMapping})
end
if (uppercaseMapping) then
table.insert(uppercaseCharacters, {codepoint = codepoint, upper = uppercaseMapping})
end
end
end
lineIndex = lineIndex + 1
end
t2 = os.clock()
print("Parsed " .. #characters .. " characters in " .. (t2 - t1) .. " seconds")
print("Writting Unicode Data to header...")
file = io.open("../src/Nazara/Core/UnicodeData.hpp", "w+")
if (not file) then
error("Failed to open Unicode Data header")
return
end
t1 = os.clock()
file:write(string.format("UnicodeCharacter unicodeCharacters[%d] = {\n", #characters))
for _, data in pairs(characters) do
local category = CategoryToString[data.category]
if (not category) then
error("Unknown category " .. data.category .. " for character " .. data.codepoint)
end
local direction = DirectionToString[data.direction]
if (not direction) then
error("Unknown direction " .. data.direction .. " for character " .. data.codepoint)
end
file:write(string.format("\t{%d, Unicode::%s, Unicode::%s},\n", data.codepoint, category, direction))
end
file:write("};\n\n")
file:write(string.format("UnicodeSet unicodeSets[%d] = {\n", #characterSets))
for _, data in pairs(characterSets) do
local category = CategoryToString[data.category]
if (not category) then
error("Unknown category " .. data.category .. " for character " .. data.codepoint)
end
local direction = DirectionToString[data.direction]
if (not direction) then
error("Unknown direction " .. data.direction .. " for character " .. data.codepoint)
end
file:write(string.format("\t{%d, %d, {%d, Unicode::%s, Unicode::%s}},\n", data.startCodepoint, data.endCodepoint, data.startCodepoint, category, direction))
end
file:write("};\n\n")
file:write(string.format("UnicodeCharacterSimpleMapping unicodeLower[%d] = {\n", #lowercaseCharacters))
for _, data in pairs(lowercaseCharacters) do
file:write(string.format("\t{%d, %d},\n", data.codepoint, data.lower))
end
file:write("};\n\n")
file:write(string.format("UnicodeCharacterSimpleMapping unicodeTitle[%d] = {\n", #titlecaseCharacters))
for _, data in pairs(titlecaseCharacters) do
file:write(string.format("\t{%d, %d},\n", data.codepoint, data.title))
end
file:write("};\n\n")
file:write(string.format("UnicodeCharacterSimpleMapping unicodeUpper[%d] = {\n", #uppercaseCharacters))
for _, data in pairs(uppercaseCharacters) do
file:write(string.format("\t{%d, %d},\n", data.codepoint, data.upper))
end
file:write("};\n\n")
file:close()
print("Succeeded in " .. (os.clock() - t1) .. "sec.")
end

File diff suppressed because it is too large Load Diff

View File

@ -1,89 +0,0 @@
return {
Title = "Module audio",
LibName = "NazaraAudio",
Description = "Module permettant de charger et jouer des sons, ainsi que d'accéder au microphone",
RequiredPortability = Feature.Windows + Feature.POSIX,
Features =
{
{
Title = "Gestion des émetteurs de sons (SoundEmitter)",
Description = "Classe de base dont héritent les sources sonores (Music, Sound)",
Features =
{
"Positionnement 3D (spatialisation) si désiré",
"Configuration de l'atténuation",
"Prise en charge de l'effet Doppler (vitesse du son)",
"Altération du ton (pitch)"
}
},
{
Title = "Gestion des tampons sonores (SoundBuffer)",
Description = "Tampon (buffer) stockant les échantillons (samples) décompressés, chargés à partir de fichiers sonores.",
Features =
{
{
Title = "Mixage mono",
Description = "Permet de mixer les différents canaux en un seul (mono), permettant la spatialisation.",
Note = "Le mixage mono n'est actuellement possible qu'au chargement du tampon depuis un fichier",
Progress = 90
}
}
},
{
Title = "Gestion des flux sonores (SoundStream)",
Description = "Interface permettant de définir un flux sonore de source indéfinie (fichier, réseau, etc.)"
},
{
Title = "Sons (Sound)",
Description = "Classe permettant de jouer un tampon sonore",
Features =
{
"Bouclage",
"Mise en pause",
"Récupération/positionnement de l'indice de lecture (offset)"
}
},
{
Title = "Sons streamés (Music)",
Description = "Classe permettant de jouer un son depuis un flux quelconque (SoundStream)",
Features =
{
"Streaming depuis un fichier sonore (+ mixage mono si demandé)",
"Bouclage",
"Mise en pause",
{Title = "Mixage mono", Note = "Le mixage mono devrait être possible au niveau du son lui-même plutôt qu'au niveau du loader", Progress = 0},
{Title = "Récupération/positionnement de l'indice de lecture (offset)", Progress = 0}
}
},
{
Title = "Configuration globale (Audio)",
Description = "Classe permettant de régler les différents paramètres généraux de l'environnement sonore",
Features =
{
"Positionnement/Orientation du listener",
"Réglage du volume général",
"Réglage de la vitesse du son/facteur Doppler"
}
},
{
Title = "Microphone",
Description = "Classe permettant l'accès aux microphones connectés à l'ordinateur",
Progress = 0
},
{
Title = "Environnement (EFX)",
Description = "Prise en charge de l'environnement",
Progress = 0
},
{
Title = "Formats supportés (chargement/streaming)",
Description = "Liste des formats de fichiers supportés par le loader inclus par le module (libsndfile)",
Note = "Le populaire format MP3 n'est pas supporté pour des raisons de royalties (mais la flexibilité du moteur vous permet de rajouter votre propre loader MP3)",
Features =
{
"aiff", "au", "avr", "caf", "flac", "htk", "ircam", "mat4", "mat5", "mpc2k", "nist","ogg", "pvf", "raw", "rf64", "sd2", "sds", "svx", "voc", "w64", "wav", "wve"
}
}
}
}

View File

@ -1,203 +0,0 @@
return {
Title = "Noyau",
LibName = "NazaraCore",
Description = "Noyau du moteur, possède les fonctionnalités utilisées partout ailleurs dans le moteur.",
RequiredPortability = Feature.Windows + Feature.POSIX,
Features =
{
{
Title = "Classes utilitaires de base",
Description = "Classes assurant certaines fonctionnalités de base destinées à aider le programmeur.",
Features =
{
{
Title = "Chaînes de caractère unicode (String)",
Description = "Classe supplantant std::string, rajoutant le support de l'UTF-8 et quelques opérations utiles (rechercher/remplacer, correspondance par motif, ..)."
},
{
Title = "Exécution de code lors de la destruction (CallOnExit)",
Description = "Permet l'appel d'une fonction/lambda à la destruction de cet objet, en accordance avec le RAII/RRID."
},
{
Title = "Gestion de l'initialisation/libération statique de classes, en accordance avec le RAII/RRID",
Description = "Permet d'initialiser et de libérer automatiquement des classes possédant des fonctions membres statiques Initialize/Uninitialize, selon un ordre de dépendance, comme par exemple les classes des modules du moteur lui-même."
},
{
Title = "Gestion des couleurs (Color)",
Description = "Classe permettant de stocker et effectuer des opérations sur des couleurs (conversion, mélange, etc.)."
},
{
Title = "Gestion de primitives, au sens géométrique (Primitive, PrimitiveList)",
Description = "Structures définissant certaines primitives géométriques (boite, cône, plan, sphère), utiles pour la génération de meshs (de rendu ou physiques)."
},
{
Title = "OffsetOf",
Description = "Fonction permettant de récupérer à la compilation l'adresse locale (décalage d'octets) d'un membre de n'importe quelle structure/classe."
},
{
Title = "Pointeurs à écart (stride) indépendant (SparsePtr)",
Description = "Classe se comportant comme un pointeur, à l'exception de l'écart entre deux éléments (opérations d'accès, d'addition et de soustraction) qui est indépendant du type pointé."
},
{
Title = "Stockage et gestion de champs de bits dynamiques (Bitset)",
Description = "Classe permettant le stockage et la manipulation optimisée d'un nombre élevé et dynamique de bits (=booléens, opérations de comptage, recherche de bits activés, opérations entre champs de bits, etc.)",
Note = "Il manque une spécialisation de la fonction de hachage",
Progress = 95
}
}
},
{
Title = "Gestion de fichiers et dossiers (File/Directory)",
Description = "Classes supportant les chemins unicodes et les tailles 64 bits, ainsi que quelques opérations sur les chemins (normalisation, transformation d'un chemin relatif en chemin absolu).",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "Gestion de l'endianness",
Description = "Boutisme, récupération à la compilation ou à l'exécution, possibilité de lire des fichiers en corrigeant le boutisme des objets lors de la lecture."
},
{
Title = "Gestion de bibliothèques dynamiques (DynLib)",
Description = "Classe permettant de charger à l'exécution des bibliothèques dynamiques (selon la plateforme: .dll/.so/.dynlib) et d'en extraire des fonctions.",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "Fonctions de hachage",
Description = "Possibilité de hacher (calculer une somme de contrôle) de n'importe quelles données, chaîne de caractère ou fichier.",
Features =
{
{Title = "CRC16", Progress = 0},
"CRC32",
"Fletcher16",
{Title = "Fletcher32", Progress = 0},
"MD5",
"SHA-1",
"SHA-224",
"SHA-256",
"SHA-384",
"SHA-512",
"Whirlpool"
}
},
{
Title = "Gestion de la mémoire",
Description = "Set de fonctionnalités permettant d'aider le programmeur à gérer la mémoire de son programme.",
Features =
{
{
Title = "MemoryManager",
Description = "Classe permettant de suivre les allocations de mémoire et éventuels leaks, peut suivre automatiquement chaque allocation du programme."
},
{
Title = "MemoryPool",
Description = "Classe permettant d'allouer/libérer des blocs de mémoire de taille prédéfinie à coût constant."
}
}
},
{
Title = "Gestion de l'exécution concurrentielle",
Description = "Set de fonctionnalités liées à l'exécution et la synchronisation entre processus légers (threads) sans dépendance sur la bibliothèque standard.",
Features =
{
{
Title = "Thread",
Description = "Classe permettant d'appeler une fonction (avec passage d'arguments) dans un thread, supporte une interface similaire à std::thread.",
Note = "Il n'est pas encore possible de récupérer le Thread::Id courant",
Progress = 95,
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "Mutex",
Description = "Primitive de synchronisation binaire (exclusion mutuelle).",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "Semaphore",
Description = "Primitive de synchronisation à N concurrents simultanés.",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "ConditionVariable",
Description = "Primitive de synchronisation à signaux.",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "LockGuard",
Description = "Classe utilitaire permettant de verrouiller/déverrouiller une mutex en accordance avec le RAII/RRID."
},
{
Title = "TaskScheduler",
Description = "Classe permettant de répartir X tâches sur Y workers de façon efficace.",
Portability = Feature.Windows + Feature.POSIX
}
}
},
{
Title = "Gestion du temps",
Description = "Classes/fonctions permettant de gérer le temps dans un programme.",
Features =
{
{
Title = "Récupération du temps en millisecondes ou en microsecondes",
Description = "Permet de récupérer le nombre de millisecondes ou de microsecondes (si supporté par le système) écoulées depuis un référentiel constant (référentiel indéterminé).",
Portability = Feature.Windows + Feature.POSIX
},
{
Title = "Clock",
Description = "Classe chronomètre permettant de mesurer le temps écoulé depuis un évènement précis, supporte la mise en pause."
}
}
},
{
Title = "Gestion de compteurs de référence",
Description = "Set de classes permettant de gérer des pointeurs intelligents partagés intrusifs.",
},
{
Title = "Gestion de liste de paramètres",
Description = "Classe gérant une liste de paramètres nommées à type variable.",
},
{
Title = "Gestion de ressources (chargement/gestion)",
Description = "Set de classes s'occupant du chargement et de la gestion de certaines classes spéciales, appartenant au groupe des ressources (ex: chargée depuis un fichier).",
Features =
{
{
Title = "ResourceLibrary",
Description = "Classe template chargée du stockage de ressources de façon nommée."
},
{
Title = "ResourceLoader",
Description = "Classe template chargée de stocker et gérer des loaders (fonctions s'occupant de transformer un flux de données en ressource)."
},
{
Title = "ResourceManager",
Description = "Classe template chargée de charger et mettre en cache des ressources depuis un chemin de fichier."
}
}
},
{
Title = "Gestion des plugins",
Description = "Capacité d'extension du moteur à l'aide de bibliothèques dynamiques conçues dans cette optique.",
Note = "Nécessite une révision, permettant aux plugins de se signaler (nom, version)",
Progress = 80
},
{
Title = "Gestion de l'empaquetage bidimensionnel",
Description = "Algorithmes permettant de placer des rectangles 2D arbitraires dans un espace prédéfini de façon à minimiser la perte d'espace.",
Note = "Algorithme Guillotine terminé, algorithme Skyline manquant",
Progress = 60
},
{
Title = "Gestion de l'Unicode",
Description = "Récupération d'informations sur les caractères Unicode (si les données Unicode sont incorporées au programme).",
Note = "Il manque l'intégration des UnicodeData dans le moteur",
Progress = 20
},
{
Title = "Récupération d'informations sur le hardware",
Description = "Classe permettant, si la plateforme le supporte, de récupérer des informations utiles sur le matériel: nom et fabricant du processeur, nombre de coeurs, support d'un set d'extension (exemple: SSE), quantité de mémoire vive, exécution de l'instruction CPUID.",
Progress = 100,
Portability = Feature.Windows + Feature.POSIX
}
}
}

View File

@ -1,71 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Avancement de Nazara</title>
</head>
<body>
<div id="englob">
<img style="display: block;margin-left: auto;margin-right: auto;" src="https://github.com/DigitalPulseSoftware/NazaraEngine/raw/master/Logo.png" alt="Nazara Engine" />
<hr>
Retrouvez le moteur sur GitHub !<br>
<a href="https://github.com/DigitalPulseSoftware/NazaraEngine">Dépôt GitHub</a><br><br>
Venez vous renseigner sur les topics dédiés à Nazara présents sur plusieurs sites web :<br>
<a href="https://openclassrooms.com/forum/sujet/moteur-de-jeu-nazara-engine-69732">OpenClassrooms</a>, <a href="http://pdp.microjoe.org/forums/sujet/354/projet-nazara-engine-moteur-de-jeu">Progdupeupl</a> ou <a href="https://zestedesavoir.com/forums/sujet/1039/nazara-engine/">ZesteDeSavoir</a>
<br><br>
... ou pourquoi ne pas venir faire un tour sur <a href="http://forum.digitalpulsesoftware.net">le forum dédié au moteur</a> ?
<hr>
<h1>Fonctionnalités de Nazara</h1>
<div>Dernière mise à jour : <span class="lastupdate">
%DATE%
</span></div>
<h2>Important:</h2>
<p>Afin de faciliter la mise à jour, la page que vous voyez ici a été générée automatiquement par un <i>script Lua</i>, ce qui m'oblige néanmoins à encoder les fonctionnalités de chaque module dans un premier temps.
C'est un travail assez long (pour vous donner une idée, les données du noyau représentent un fichier de 200 lignes), et il n'est pas encore complet, c'est pourquoi des modules manquent sur cette page.<br>
Gardez donc à l'esprit que le moteur possède plus de fonctionnalités que ce qui est décrit actuellement sur cette page.</p>
<p>Oh et bien sûr je ne suis pas concepteur de site web, c'est pourquoi cette page est moche (j'ai <u>essayé</u> de minimiser les dégâts).<br>
Si vous sentez en vous l'irrésistible envie d'améliorer cette page, sachez que votre aide serait grandement appréciée (vous pouvez me contacter via le lien de votre choix plus haut).</p>
<p>Le pourcentage indiqué est calculé automatiquement en fonction des <u>fonctionnalités</u>, cela signifie qu'une fonctionnalité présente sera comptée à 100% à partir du moment où son implémentation de base est considérée fonctionnelle, <u>cela n'est donc pas une assurance qu'aucun bug n'existe concernant cette fonctionnalité</u> (cependant cela signifie que la fonctionnalité est utilisable).<br>
Et bien entendu, un module ou une fonctionnalité ayant atteint les 100% peut toujours évoluer par la suite.</p>
<hr>
<table>
<caption>Sommaire</caption>
<thead>
<tr>
<th>Module</th>
<th>Avancement</th>
</tr>
</thead>
<tbody>
%MODULELIST%
</tbody>
</table>
%MODULEDESCRIPTION%
<hr>
<table>
<caption>Sommaire</caption>
<thead>
<tr>
<th>Module</th>
<th>Pourcentage</th>
</tr>
</thead>
<tbody>
%MODULELIST%
</tbody>
</table>
</div>
</body>
</html>

View File

@ -1,121 +0,0 @@
/* Je ne suis pas développeur HTML/CSS, je dois y toucher une fois l'an, désolé pour les quelques atrocités que vous pourrez trouver ici */
body
{
font-family: sans-serif;
text-align: center;
margin: 0;
background-color: #f1f1f1;
}
#englob {
display: block;
margin-left: auto;
margin-right: auto;
background-color: white;
width: 50%;
min-width: 765px;
padding: 0 20px;
}
hr {
height: 0;
border: 0;
border-top: 1px solid #eee;
}
a
{
color: #007ACC;
}
a:hover
{
color: lightblue;
}
h1
{
display: inline;
}
h2
{
display: inline;
text-decoration: underline;
}
h4
{
text-decoration: underline;
}
p {
text-align: justify;
}
ol
{
list-style-type: none;
}
table
{
border-collapse: collapse;
text-align: center;
display: inline-block;
border: white groove;
border-radius: 10px;
box-shadow: 0px 0px 10px lightblue;
}
th
{
text-shadow: 2px 2px 4px black;
}
tr
{
border: 1px solid white;
}
tbody tr:hover
{
text-shadow: 0px 0px 4px white;
}
.description
{
margin-left: 20px;
}
.lastupdate
{
font-size: x-large;
font-weight: bold;
color: #f1c40f;
}
.modulename
{
font-size: x-large;
font-weight: bold;
text-shadow: 2px 2px 10px #007ACC;
}
.note
{
margin-left: 20px;
color: #007ACC;
}
.notedesc
{
color: rgb(200, 200, 255);
}
.portability
{
margin-left: 20px;
color: red;
}

View File

@ -1,37 +0,0 @@
MODULE.Name = "Audio"
MODULE.ClientOnly = true
MODULE.Defines = {
"NAZARA_AUDIO_OPENAL"
}
MODULE.Libraries = {
"NazaraCore"
}
MODULE.OsLibraries.Windows = {
"sndfile-1"
}
MODULE.OsLibraries.Posix = {
"sndfile"
}
MODULE.OsDynLib.Windows = {
"soft_oal"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Audio/Win32/**.hpp",
"../src/Nazara/Audio/Win32/**.cpp"
}
MODULE.OsFiles.Posix = {
"../src/Nazara/Audio/Posix/**.hpp",
"../src/Nazara/Audio/Posix/**.cpp"
}
MODULE.DynLib = {
"soft_oal"
}

View File

@ -1,24 +0,0 @@
MODULE.Name = "Core"
MODULE.Excludable = false -- Excluding the core makes no sense as everything relies on it
MODULE.Files = { -- Other files will be automatically added
"../include/Nazara/Prerequisites.hpp",
"../include/Nazara/Math/**.hpp",
"../include/Nazara/Math/**.inl",
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Core/Win32/**.hpp",
"../src/Nazara/Core/Win32/**.cpp"
}
MODULE.OsFiles.Posix = {
"../src/Nazara/Core/Posix/**.hpp",
"../src/Nazara/Core/Posix/**.cpp"
}
MODULE.OsLibraries.Posix = {
"dl",
"m", -- Math library (for sincos())
"pthread"
}

View File

@ -1,10 +0,0 @@
MODULE.Name = "Graphics"
MODULE.ClientOnly = true
MODULE.Libraries = {
"NazaraCore",
"NazaraRenderer",
"NazaraShader",
"NazaraUtility"
}

View File

@ -1,29 +0,0 @@
MODULE.Name = "Network"
MODULE.Libraries = {
"NazaraCore"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Network/Win32/**.hpp",
"../src/Nazara/Network/Win32/**.cpp"
}
MODULE.OsFiles.Posix = {
"../src/Nazara/Network/Posix/**.hpp",
"../src/Nazara/Network/Posix/**.cpp"
}
MODULE.OsFiles.Linux = {
"../src/Nazara/Network/Linux/**.hpp",
"../src/Nazara/Network/Linux/**.cpp"
}
MODULE.OsFilesExcluded.Linux = {
"../src/Nazara/Network/Posix/SocketPollerImpl.hpp",
"../src/Nazara/Network/Posix/SocketPollerImpl.cpp"
}
MODULE.OsLibraries.Windows = {
"ws2_32"
}

View File

@ -1,12 +0,0 @@
MODULE.Name = "Physics2D"
MODULE.Defines = {"CP_USE_CGTYPES=0", "TARGET_OS_IPHONE=0", "TARGET_OS_MAC=0"}
MODULE.Libraries = {
"NazaraCore",
"chipmunk"
}
MODULE.DynLib = {
"chipmunk"
}

View File

@ -1,30 +0,0 @@
MODULE.Name = "Physics3D"
MODULE.Defines = {
"_NEWTON_STATIC_LIB"
}
MODULE.OsDefines.Windows = {
"_WINDOWS"
}
MODULE.Libraries = {
"NazaraCore",
"newton" -- Newton Game Dynamics
}
MODULE.Custom = function()
vectorextensions("SSE3")
filter({"architecture:x86_64", "system:linux"})
defines("_POSIX_VER_64")
filter({"architecture:x86", "system:linux"})
defines("_POSIX_VER")
filter({"architecture:x86_64", "system:macosx"})
defines("_POSIX_VER_64")
filter({"architecture:x86", "system:macosx"})
defines("_POSIX_VER")
end

View File

@ -1,35 +0,0 @@
MODULE.Name = "Platform"
MODULE.ClientOnly = true
MODULE.Defines = {
"NAZARA_PLATFORM_SDL2"
}
MODULE.Libraries = {
"NazaraCore",
"NazaraUtility",
"SDL2"
}
MODULE.Files = {
"../src/Nazara/Platform/SDL2/**.hpp",
"../src/Nazara/Platform/SDL2/**.cpp"
}
MODULE.OsDefines.Windows = {
"SDL_VIDEO_DRIVER_WINDOWS=1"
}
MODULE.DynLib = {
"SDL2"
}
MODULE.Custom = function()
filter("system:linux")
defines("SDL_VIDEO_DRIVER_X11=1")
defines("SDL_VIDEO_DRIVER_WAYLAND=1")
filter("system:macosx")
defines("SDL_VIDEO_DRIVER_COCOA=1")
end

View File

@ -1,20 +0,0 @@
MODULE.Name = "Renderer"
MODULE.ClientOnly = true
MODULE.Libraries = {
"NazaraCore",
"NazaraShader",
"NazaraUtility",
"NazaraPlatform"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Renderer/Win32/**.hpp",
"../src/Nazara/Renderer/Win32/**.cpp"
}
MODULE.OsFiles.Posix = {
"../src/Nazara/Renderer/GLX/**.hpp",
"../src/Nazara/Renderer/GLX/**.cpp"
}

View File

@ -1,6 +0,0 @@
MODULE.Name = "Shader"
MODULE.Libraries = {
"NazaraCore",
"NazaraUtility"
}

View File

@ -1,15 +0,0 @@
MODULE.Name = "Utility"
MODULE.Libraries = {
"NazaraCore",
"stb_image"
}
MODULE.OsLibraries.Windows = {
"freetype-s"
}
MODULE.OsLibraries.Posix = {
"freetype"
}

View File

@ -1,25 +0,0 @@
TOOL.Name = "Assimp"
TOOL.Directory = "../plugins/Assimp"
TOOL.Kind = "Plugin"
TOOL.Includes = {
"../include",
"../plugins/Assimp"
}
TOOL.ExtIncludes = {
"../thirdparty/include"
}
TOOL.Files = {
"../plugins/Assimp/**.hpp",
"../plugins/Assimp/**.inl",
"../plugins/Assimp/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraUtility",
"assimp"
}

View File

@ -1,34 +0,0 @@
TOOL.Name = "SDK"
TOOL.Directory = "../SDK"
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../lib"
TOOL.Defines = {
"NDK_BUILD"
}
TOOL.Includes = {
"../include",
"../src"
}
TOOL.Files = {
"../include/NazaraSDK/**.hpp",
"../include/NazaraSDK/**.inl",
"../src/NazaraSDK/**.hpp",
"../src/NazaraSDK/**.inl",
"../src/NazaraSDK/**.cpp"
}
TOOL.Libraries = function()
local libraries = {}
for k,v in pairs(NazaraBuild.Modules) do
table.insert(libraries, "Nazara" .. v.Name)
end
-- Keep libraries in the same order to prevent useless premake regeneration
table.sort(libraries)
return libraries
end

View File

@ -1,51 +0,0 @@
TOOL.Name = "SDKServer"
TOOL.Directory = "../SDK"
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../lib"
TOOL.Defines = {
"NDK_BUILD",
"NDK_SERVER"
}
TOOL.Includes = {
"../include",
"../src"
}
TOOL.Files = {
"../include/NazaraSDK/**.hpp",
"../include/NazaraSDK/**.inl",
"../src/NazaraSDK/**.hpp",
"../src/NazaraSDK/**.inl",
"../src/NazaraSDK/**.cpp"
}
-- Excludes client-only files
TOOL.FilesExcluded = {
"../*/NazaraSDK/BaseWidget.*",
"../*/NazaraSDK/Canvas.*",
"../*/NazaraSDK/Console.*",
"../*/NazaraSDK/**/CameraComponent.*",
"../*/NazaraSDK/**/DebugComponent.*",
"../*/NazaraSDK/**/DebugSystem.*",
"../*/NazaraSDK/**/GraphicsComponent.*",
"../*/NazaraSDK/**/LightComponent.*",
"../*/NazaraSDK/**/ListenerComponent.*",
"../*/NazaraSDK/**/ListenerSystem.*",
"../*/NazaraSDK/**/Particle*Component.*",
"../*/NazaraSDK/**/ParticleSystem.*",
"../*/NazaraSDK/**/RenderSystem.*",
"../*/NazaraSDK/**/*Layout*.*",
"../*/NazaraSDK/**/*Widget*.*"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraNetwork",
"NazaraPhysics2D",
"NazaraPhysics3D",
"NazaraShader",
"NazaraUtility"
}

View File

@ -1,57 +0,0 @@
TOOL.Name = "OpenGLRenderer"
TOOL.ClientOnly = true
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../lib"
TOOL.Defines = {
"NAZARA_BUILD",
"NAZARA_OPENGLRENDERER_BUILD"
}
TOOL.Includes = {
"../include",
"../src/"
}
TOOL.ExtIncludes = {
"../extlibs/include"
}
TOOL.Files = {
"../include/Nazara/OpenGLRenderer/**.hpp",
"../include/Nazara/OpenGLRenderer/**.inl",
"../src/Nazara/OpenGLRenderer/**.hpp",
"../src/Nazara/OpenGLRenderer/**.inl",
"../src/Nazara/OpenGLRenderer/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraPlatform",
"NazaraRenderer",
"NazaraShader",
"NazaraUtility"
}
TOOL.OsFiles.Windows = {
"../include/Nazara/OpenGLRenderer/Wrapper/Win32/**.hpp",
"../include/Nazara/OpenGLRenderer/Wrapper/Win32/**.inl",
"../include/Nazara/OpenGLRenderer/Wrapper/WGL/**.hpp",
"../include/Nazara/OpenGLRenderer/Wrapper/WGL/**.inl",
"../src/Nazara/OpenGLRenderer/Wrapper/Win32/**.hpp",
"../src/Nazara/OpenGLRenderer/Wrapper/Win32/**.inl",
"../src/Nazara/OpenGLRenderer/Wrapper/Win32/**.cpp",
"../src/Nazara/OpenGLRenderer/Wrapper/WGL/**.hpp",
"../src/Nazara/OpenGLRenderer/Wrapper/WGL/**.inl",
"../src/Nazara/OpenGLRenderer/Wrapper/WGL/**.cpp"
}
TOOL.OsFiles.Linux = {
"../include/Nazara/OpenGLRenderer/Wrapper/Linux/**.hpp",
"../include/Nazara/OpenGLRenderer/Wrapper/Linux/**.inl",
"../src/Nazara/OpenGLRenderer/Wrapper/Linux/**.hpp",
"../src/Nazara/OpenGLRenderer/Wrapper/Linux/**.inl",
"../src/Nazara/OpenGLRenderer/Wrapper/Linux/**.cpp"
}

View File

@ -1,95 +0,0 @@
TOOL.Name = "ShaderNodes"
TOOL.ClientOnly = true
TOOL.EnableConsole = true
TOOL.Kind = "Application"
TOOL.TargetDirectory = "../bin"
TOOL.Defines = {
"NODE_EDITOR_SHARED"
}
TOOL.Includes = {
"../include",
"../src"
}
TOOL.ExtIncludes = {
"../extlibs/include"
}
TOOL.Files = {
"../src/ShaderNode/**.hpp",
"../src/ShaderNode/**.inl",
"../src/ShaderNode/**.cpp"
}
TOOL.Libraries = {
"NazaraCore%s(-s)%d(-d)",
"NazaraShader%s(-s)%d(-d)",
"NazaraUtility%s(-s)%d(-d)",
"Qt5Core%d(d)",
"Qt5Gui%d(d)",
"Qt5Widgets%d(d)",
"nodes%d(d)"
}
local function AppendValues(tab, value)
if (type(value) == "table") then
for _, v in pairs(value) do
AppendValues(tab, v)
end
else
table.insert(tab, value)
end
end
function TOOL:ValidateLib(libName)
local config = NazaraBuild:GetConfig()
local includes = config[libName .. "IncludeDir"]
local binDir32 = config[libName .. "BinDir_x86"]
local binDir64 = config[libName .. "BinDir_x64"]
local libDir32 = config[libName .. "LibDir_x86"]
local libDir64 = config[libName .. "LibDir_x64"]
if (not includes) then
return false, "missing " .. libName .. " includes directories in config.lua"
end
if (not libDir32 and not libDir64) then
return false, "missing " .. libName .. " library search directories in config.lua"
end
AppendValues(self.Includes, includes)
if (binDir32) then
AppendValues(self.BinaryPaths.x86, binDir32)
end
if (binDir64) then
AppendValues(self.BinaryPaths.x64, binDir64)
end
if (libDir32) then
AppendValues(self.LibraryPaths.x86, libDir32)
end
if (libDir64) then
AppendValues(self.LibraryPaths.x64, libDir64)
end
return true
end
function TOOL:Validate()
local success, err = self:ValidateLib("Qt5")
if (not success) then
return false, err
end
local success, err = self:ValidateLib("QtNodes")
if (not success) then
return false, err
end
return true
end

View File

@ -1,27 +0,0 @@
TOOL.Name = "UnitTests"
TOOL.Category = "Test"
TOOL.Directory = "../tests"
TOOL.EnableConsole = true
TOOL.Kind = "Application"
TOOL.TargetDirectory = TOOL.Directory
TOOL.Defines = {
}
TOOL.Includes = {
"../include"
}
TOOL.Files = {
"../tests/main.cpp",
"../tests/Engine/**.hpp",
"../tests/Engine/**.cpp",
"../tests/SDK/**.hpp",
"../tests/SDK/**.cpp"
}
TOOL.Libraries = {
"NazaraNetwork",
"NazaraSDK"
}

View File

@ -1,38 +0,0 @@
TOOL.Name = "UnitTestsServer"
TOOL.Category = "Test"
TOOL.Directory = "../tests"
TOOL.EnableConsole = true
TOOL.Kind = "Application"
TOOL.TargetDirectory = TOOL.Directory
TOOL.Defines = {
"NDK_SERVER"
}
TOOL.Includes = {
"../include"
}
TOOL.Files = {
"../tests/main.cpp",
"../tests/Engine/**.hpp",
"../tests/Engine/**.cpp",
"../tests/SDK/**.hpp",
"../tests/SDK/**.cpp"
}
-- Excludes client-only files
TOOL.FilesExcluded = {
"../tests/Engine/Audio/**",
"../tests/Engine/Graphics/**",
"../tests/Engine/Platform/**",
"../tests/SDK/NDK/Application.cpp",
"../tests/SDK/NDK/Systems/ListenerSystem.cpp",
"../tests/SDK/NDK/Systems/RenderSystem.cpp"
}
TOOL.Libraries = {
"NazaraNetwork",
"NazaraSDKServer"
}

View File

@ -1,56 +0,0 @@
TOOL.Name = "VulkanRenderer"
TOOL.ClientOnly = true
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../lib"
TOOL.Defines = {
"NAZARA_BUILD",
"NAZARA_VULKANRENDERER_BUILD",
"VK_NO_PROTOTYPES"
}
TOOL.Includes = {
"../include",
"../src/"
}
TOOL.ExtIncludes = {
"../extlibs/include"
}
TOOL.Files = {
"../include/Nazara/VulkanRenderer/**.hpp",
"../include/Nazara/VulkanRenderer/**.inl",
"../src/Nazara/VulkanRenderer/**.hpp",
"../src/Nazara/VulkanRenderer/**.inl",
"../src/Nazara/VulkanRenderer/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraPlatform",
"NazaraRenderer",
"NazaraShader",
"NazaraUtility"
}
TOOL.OsDefines.Linux = {
-- "VK_USE_PLATFORM_MIR_KHR",
-- "VK_USE_PLATFORM_XCB_KHR"
"VK_USE_PLATFORM_XLIB_KHR",
"VK_USE_PLATFORM_WAYLAND_KHR"
}
TOOL.OsDefines.BSD = TOOL.OsDefines.Linux
TOOL.OsDefines.Solaris = TOOL.OsDefines.Linux
TOOL.OsDefines.Windows = {
"VK_USE_PLATFORM_WIN32_KHR"
}
TOOL.OsFiles.Windows = {
"../src/Nazara/VulkanRenderer/Win32/**.hpp",
"../src/Nazara/VulkanRenderer/Win32/**.cpp"
}