diff --git a/engine/modules/engine/core/include/archive/json/serde.inl b/engine/modules/engine/core/include/archive/json/serde.inl index 271f891..2d826b5 100644 --- a/engine/modules/engine/core/include/archive/json/serde.inl +++ b/engine/modules/engine/core/include/archive/json/serde.inl @@ -1,6 +1,5 @@ #include "serde.h" namespace gen { -#ifdef API_DEBUG template inline bool JsonRead(yyjson_val* node, const T& t) { if (!node) return false; @@ -10,10 +9,6 @@ namespace gen { inline yyjson_mut_val* JsonWrite(yyjson_mut_doc* doc, const T& t) { return JsonSerde::Write(doc, &t); } -#else -#define JsonRead(node, t) if(node)JsonSerde::Read(node, &t) -#define JsonWrite(doc, t) JsonSerde::Write(doc, &t) -#endif template struct JsonSerde>> { inline static bool Read(yyjson_val* val, const void* ptr) { diff --git a/engine/modules/engine/core/include/module/module.inl b/engine/modules/engine/core/include/module/module.inl index ed675fc..3da04aa 100644 --- a/engine/modules/engine/core/include/module/module.inl +++ b/engine/modules/engine/core/include/module/module.inl @@ -22,4 +22,4 @@ namespace api { { \ return new ModuleImplClass(); \ } -#define MODULE_DEPENDENCY(name, opt) \ No newline at end of file +#define MODULE_DEPENDENCY(...) \ No newline at end of file diff --git a/engine/modules/engine/zlib/include/refl/detail/meta.h b/engine/modules/engine/zlib/include/refl/detail/meta.h index 69539e2..483bf9c 100644 --- a/engine/modules/engine/zlib/include/refl/detail/meta.h +++ b/engine/modules/engine/zlib/include/refl/detail/meta.h @@ -1,6 +1,7 @@ #pragma once #include "field.h" namespace gen { + using refl::real_type_t; using pmr::CName; using pmr::FName; using pmr::string_hash; diff --git a/engine/xmake/modules/find_sdk.lua b/engine/xmake/modules/find_sdk.lua index 18780ed..e603a16 100644 --- a/engine/xmake/modules/find_sdk.lua +++ b/engine/xmake/modules/find_sdk.lua @@ -14,7 +14,7 @@ function find_my_program(name, sdkdir, use_next) local sdkdir = sdkdir or path.join(os.projectdir(), "tools") local exedir = find_exe_dir() local tool = find_tool(name, {pathes = {sdkdir, exedir, "/usr/local/bin"}}) - local prog = tool and tool.program or find_program(name, {pathes = {sdkdir,exedir, "/usr/local/bin"}}) + local prog = tool and tool.program or find_program(name, {pathes = {sdkdir, exedir, "/usr/local/bin"}}) prog = prog or find_file(name, {sdkdir, exedir}) if (prog == nil) then if os.host() ~= "windows" then diff --git a/engine/xmake/rule_gen/make_gen.lua b/engine/xmake/rule_gen/make_gen.lua index bea4e1a..60c1015 100644 --- a/engine/xmake/rule_gen/make_gen.lua +++ b/engine/xmake/rule_gen/make_gen.lua @@ -35,6 +35,7 @@ function _listen_gen_file(target, batch, template, macro, define) ) end function gen(target) + if is_mode("release") then return end local gen_batch = target:data("codegen.batch") if not gen_batch then return diff --git a/engine/xmake/rule_gen/xmake.lua b/engine/xmake/rule_gen/xmake.lua index c8200c4..5d4ec48 100644 --- a/engine/xmake/rule_gen/xmake.lua +++ b/engine/xmake/rule_gen/xmake.lua @@ -1,7 +1,6 @@ rule("c++.codegen") set_extensions(".inl") after_load(function (target) - if not is_mode("debug") then return end import("make_gen") local headerfiles = {} local files = target:extraconf("rules", "c++.codegen", "files") @@ -14,6 +13,5 @@ rule("c++.codegen") make_gen(target, headerfiles) end) on_config(function (target) - if not is_mode("debug") then return end import("make_gen").gen(target) end) \ No newline at end of file diff --git a/engine/xmake/rule_plugin/make_plugin.lua b/engine/xmake/rule_plugin/make_plugin.lua index fce107a..366ea38 100644 --- a/engine/xmake/rule_plugin/make_plugin.lua +++ b/engine/xmake/rule_plugin/make_plugin.lua @@ -1,7 +1,7 @@ import("core.project.depend") function cmd_compile(target, genfile, file) + if is_mode("release") then return end import("find_sdk") - print("find make_plugin", is_mode("debug")) local plugin = find_sdk.find_my_program("make_plugin") if not plugin then return end print("cmd_compile plugin", genfile, file) diff --git a/engine/xmake/rule_plugin/xmake.lua b/engine/xmake/rule_plugin/xmake.lua index 14e593c..df2523d 100644 --- a/engine/xmake/rule_plugin/xmake.lua +++ b/engine/xmake/rule_plugin/xmake.lua @@ -1,7 +1,6 @@ rule("engine.plugin") set_extensions(".h") on_load(function (target) - if not is_mode("debug") then return end import("make_plugin") local file = target:extraconf("rules", "engine.plugin", "file") make_plugin(target, file or "module.h") diff --git a/engine/xmake/rule_tool/xmake.lua b/engine/xmake/rule_tool/xmake.lua index 32c6e7b..c3b4566 100644 --- a/engine/xmake/rule_tool/xmake.lua +++ b/engine/xmake/rule_tool/xmake.lua @@ -1,5 +1,9 @@ rule("engine.tool") - -- after_build(function (target) - -- -- do nothing - -- --print("after_install", target:targetfile()) - -- end) \ No newline at end of file + after_build(function (target) + local tooldir = path.join(os.projectdir(), "tools", target:name()) + if not os.isdir(tooldir) then + os.mkdir(tooldir) + end + local exefile = target:targetfile() + os.cp(exefile, path.join(tooldir, path.filename(exefile))) + end) \ No newline at end of file