summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-07 15:27:27 +0800
committerruki <[email protected]>2025-12-07 17:16:00 +0800
commit35aeaac3f956f26f188ebab40c443b64d2cb2f95 (patch)
treedab003800ba799760013cd98c1cb04ffb10565ac
parenta88b0246d856ffac9dfa509d07631dc02fedbc67 (diff)
move bin2obj and bin2c modules
-rw-r--r--xmake/modules/utils/binary/bin2c.lua (renamed from xmake/modules/private/utils/bin2c.lua)3
-rw-r--r--xmake/modules/utils/binary/bin2obj.lua (renamed from xmake/modules/private/utils/bin2obj.lua)20
-rw-r--r--xmake/rules/utils/bin2c/xmake.lua2
-rw-r--r--xmake/rules/utils/bin2obj/xmake.lua2
-rw-r--r--xmake/rules/utils/glsl2spv/xmake.lua2
-rw-r--r--xmake/rules/utils/hlsl2spv/xmake.lua2
-rw-r--r--xmake/rules/xmake_cli/xmake.lua2
7 files changed, 17 insertions, 16 deletions
diff --git a/xmake/modules/private/utils/bin2c.lua b/xmake/modules/utils/binary/bin2c.lua
index 0d6f06a1d..ce7336e36 100644
--- a/xmake/modules/private/utils/bin2c.lua
+++ b/xmake/modules/utils/binary/bin2c.lua
@@ -122,8 +122,9 @@ function main(...)
local argv = {...}
local opt = option.parse(argv, options, "Print c/c++ code files from the given binary file."
, ""
- , "Usage: xmake l private.utils.bin2c [options]")
+ , "Usage: xmake l utils.binary.bin2c [options]")
-- do bin2c
_do_bin2c(opt.binarypath, opt.outputpath, opt)
end
+
diff --git a/xmake/modules/private/utils/bin2obj.lua b/xmake/modules/utils/binary/bin2obj.lua
index caa8b2e22..afb04dc3b 100644
--- a/xmake/modules/private/utils/bin2obj.lua
+++ b/xmake/modules/utils/binary/bin2obj.lua
@@ -22,15 +22,15 @@
import("core.base.option")
local options = {
- {'i', "binarypath", "kv", nil, "Set the binary file path."},
- {'o', "outputpath", "kv", nil, "Set the output object file path."},
- {'f', "format", "kv", nil, "Set the object file format (coff, elf, macho)."},
- {nil, "symbol_prefix", "kv", nil, "Set the symbol prefix (default: _binary_)."},
- {'a', "arch", "kv", nil, "Set the target architecture."},
- {'p', "plat", "kv", nil, "Set the target platform (macosx, iphoneos, etc.)."},
- {nil, "target_minver", "kv", nil, "Set the target minimum version (e.g., 10.0, 18.2)."},
- {nil, "xcode_sdkver", "kv", nil, "Set the Xcode SDK version (e.g., 10.0, 18.2)."},
- {nil, "zeroend", "k", nil, "Append a null terminator ('\\0') at the end of data."}
+ {'i', "binarypath", "kv", nil, "Set the binary file path."},
+ {'o', "outputpath", "kv", nil, "Set the output object file path."},
+ {'f', "format", "kv", nil, "Set the object file format (coff, elf, macho)."},
+ {nil, "symbol_prefix", "kv", nil, "Set the symbol prefix (default: _binary_)."},
+ {'a', "arch", "kv", nil, "Set the target architecture."},
+ {'p', "plat", "kv", nil, "Set the target platform (macosx, iphoneos, etc.)."},
+ {nil, "target_minver", "kv", nil, "Set the target minimum version (e.g., 10.0, 18.2)."},
+ {nil, "xcode_sdkver", "kv", nil, "Set the Xcode SDK version (e.g., 10.0, 18.2)."},
+ {nil, "zeroend", "k", nil, "Append a null terminator ('\\0') at the end of data."}
}
function _do_bin2obj_coff(binarypath, outputpath, opt)
@@ -162,7 +162,7 @@ function main(...)
local argv = {...}
local opt = option.parse(argv, options, "Convert binary file to object file for direct linking."
, ""
- , "Usage: xmake l private.utils.bin2obj [options]")
+ , "Usage: xmake l utils.binary.bin2obj [options]")
-- do bin2obj
_do_bin2obj(opt.binarypath, opt.outputpath, opt)
diff --git a/xmake/rules/utils/bin2c/xmake.lua b/xmake/rules/utils/bin2c/xmake.lua
index fc05ecf4e..7be711af1 100644
--- a/xmake/rules/utils/bin2c/xmake.lua
+++ b/xmake/rules/utils/bin2c/xmake.lua
@@ -54,7 +54,7 @@ rule("utils.bin2c")
if nozeroend then
table.insert(argv, "--nozeroend")
end
- batchcmds:vlua("private.utils.bin2c", argv)
+ batchcmds:vlua("utils.binary.bin2c", argv)
-- add deps
batchcmds:add_depfiles(sourcefile_bin)
diff --git a/xmake/rules/utils/bin2obj/xmake.lua b/xmake/rules/utils/bin2obj/xmake.lua
index d35e50606..69fd9e717 100644
--- a/xmake/rules/utils/bin2obj/xmake.lua
+++ b/xmake/rules/utils/bin2obj/xmake.lua
@@ -89,7 +89,7 @@ rule("utils.bin2obj")
if zeroend then
table.insert(argv, "--zeroend")
end
- batchcmds:vlua("private.utils.bin2obj", argv)
+ batchcmds:vlua("utils.binary.bin2obj", argv)
-- add deps
batchcmds:add_depfiles(sourcefile_bin)
diff --git a/xmake/rules/utils/glsl2spv/xmake.lua b/xmake/rules/utils/glsl2spv/xmake.lua
index dfd1779fe..a6c4a2aef 100644
--- a/xmake/rules/utils/glsl2spv/xmake.lua
+++ b/xmake/rules/utils/glsl2spv/xmake.lua
@@ -86,7 +86,7 @@ rule("utils.glsl2spv")
-- add commands
local argv = {"--nozeroend", "-i", path(spvfilepath), "-o", path(headerfile)}
- batchcmds:vlua("private.utils.bin2c", argv)
+ batchcmds:vlua("utils.binary.bin2c", argv)
end
-- add deps
diff --git a/xmake/rules/utils/hlsl2spv/xmake.lua b/xmake/rules/utils/hlsl2spv/xmake.lua
index 2b285d893..4af520420 100644
--- a/xmake/rules/utils/hlsl2spv/xmake.lua
+++ b/xmake/rules/utils/hlsl2spv/xmake.lua
@@ -86,7 +86,7 @@ rule("utils.hlsl2spv")
-- add commands
local argv = {"--nozeroend", "-i", path(spvfilepath), "-o", path(headerfile)}
- batchcmds:vlua("private.utils.bin2c", argv)
+ batchcmds:vlua("utils.binary.bin2c", argv)
end
batchcmds:add_depfiles(sourcefile_hlsl)
diff --git a/xmake/rules/xmake_cli/xmake.lua b/xmake/rules/xmake_cli/xmake.lua
index d3a4b6f26..7c543cb36 100644
--- a/xmake/rules/xmake_cli/xmake.lua
+++ b/xmake/rules/xmake_cli/xmake.lua
@@ -55,7 +55,7 @@ rule("xmake.cli")
local headerfile = path.join(headerdir, "luafiles.xmz.h")
target:add("includedirs", headerdir)
argv = {"--nozeroend", "-i", path(archivefile), "-o", path(headerfile)}
- batchcmds:vlua("private.utils.bin2c", argv)
+ batchcmds:vlua("utils.binary.bin2c", argv)
batchcmds:add_depfiles(sourcefiles)
batchcmds:set_depmtime(os.mtime(dependfile))