summaryrefslogtreecommitdiff
path: root/tests/projects/xmake_cli/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-22 22:34:55 +0800
committerruki <[email protected]>2020-04-22 09:29:34 +0800
commit15dc39430ed49d42709bba3ef2acab8500414a3a (patch)
tree21b5fe80d575cf9a1604c5edce5940504ede17c7 /tests/projects/xmake_cli/xmake
parente273a770ecd7917f29f013904d3c4b8201af307c (diff)
add xmake.cli rule
Diffstat (limited to 'tests/projects/xmake_cli/xmake')
-rw-r--r--tests/projects/xmake_cli/xmake/src/main.c17
-rw-r--r--tests/projects/xmake_cli/xmake/src/xmake.icobin0 -> 119943 bytes
-rw-r--r--tests/projects/xmake_cli/xmake/src/xmake.rc43
-rw-r--r--tests/projects/xmake_cli/xmake/xmake.lua10
4 files changed, 70 insertions, 0 deletions
diff --git a/tests/projects/xmake_cli/xmake/src/main.c b/tests/projects/xmake_cli/xmake/src/main.c
new file mode 100644
index 000000000..6e75791ed
--- /dev/null
+++ b/tests/projects/xmake_cli/xmake/src/main.c
@@ -0,0 +1,17 @@
+#include <xmake/xmake.h>
+
+tb_int_t main(tb_int_t argc, tb_char_t** argv)
+{
+ tb_int_t ok = -1;
+ if (xm_init())
+ {
+ xm_engine_ref_t engine = xm_engine_init();
+ if (engine)
+ {
+ ok = xm_engine_main(engine, argc, argv);
+ xm_engine_exit(engine);
+ }
+ xm_exit();
+ }
+ return ok;
+}
diff --git a/tests/projects/xmake_cli/xmake/src/xmake.ico b/tests/projects/xmake_cli/xmake/src/xmake.ico
new file mode 100644
index 000000000..52c8ef389
--- /dev/null
+++ b/tests/projects/xmake_cli/xmake/src/xmake.ico
Binary files differ
diff --git a/tests/projects/xmake_cli/xmake/src/xmake.rc b/tests/projects/xmake_cli/xmake/src/xmake.rc
new file mode 100644
index 000000000..0d737ebc3
--- /dev/null
+++ b/tests/projects/xmake_cli/xmake/src/xmake.rc
@@ -0,0 +1,43 @@
+#include "xmake.config.h"
+#include "winres.h"
+
+#define _STR(x) #x
+#define STR(x) _STR(x)
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION XM_CONFIG_VERSION_MAJOR, XM_CONFIG_VERSION_MINOR, XM_CONFIG_VERSION_ALTER, 0
+ PRODUCTVERSION XM_CONFIG_VERSION_MAJOR, XM_CONFIG_VERSION_MINOR, XM_CONFIG_VERSION_ALTER, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004B0"
+ BEGIN
+ VALUE "Comments", "A cross-platform build utility based on Lua\nwebsite: https://xmake.io"
+ VALUE "CompanyName", "The TBOOX Open Source Group"
+ VALUE "FileDescription", "XMake build utility"
+ VALUE "FileVersion", XM_CONFIG_VERSION "+" STR(XM_CONFIG_VERSION_BUILD)
+ VALUE "InternalName", "xmake"
+ VALUE "LegalCopyright", "Copyright (C) 2015-2020 Ruki Wang, tboox.org, xmake.io\nCopyright (C) 2005-2015 Mike Pall, luajit.org"
+ VALUE "LegalTrademarks", ""
+ VALUE "OriginalFilename", "xmake.exe"
+ VALUE "ProductName", "XMake"
+ VALUE "ProductVersion", XM_CONFIG_VERSION "+" STR(XM_CONFIG_VERSION_BUILD)
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
+
+
+IDI_APP ICON DISCARDABLE "xmake.ico"
diff --git a/tests/projects/xmake_cli/xmake/xmake.lua b/tests/projects/xmake_cli/xmake/xmake.lua
new file mode 100644
index 000000000..e00d7e14d
--- /dev/null
+++ b/tests/projects/xmake_cli/xmake/xmake.lua
@@ -0,0 +1,10 @@
+add_rules("mode.debug", "mode.release")
+add_requires("libxmake")
+target("xmake")
+ add_rules("xmake.cli")
+ add_files("src/*.c")
+ if is_plat("windows") then
+ add_files("src/*.rc")
+ end
+ add_packages("libxmake")
+