From 3eb49a191bd2c4d0ab4a921d8f167fe5f4b2c491 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 30 Mar 2017 17:18:23 +0800 Subject: support windows x64 --- core/pkg/tbox.pkg/inc/windows/tbox.config.h | 15 +++++- core/pkg/tbox.pkg/lib/release/windows/x64/tbox.lib | Bin 0 -> 1260812 bytes core/pkg/tbox.pkg/xmake.lua | 60 ++++++++++----------- core/src/xmake/machine.c | 2 +- core/src/xmake/os/find.c | 6 +-- core/src/xmake/process/waitlist.c | 6 +-- 6 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 core/pkg/tbox.pkg/lib/release/windows/x64/tbox.lib diff --git a/core/pkg/tbox.pkg/inc/windows/tbox.config.h b/core/pkg/tbox.pkg/inc/windows/tbox.config.h index 53b4f98b1..d9f19f03c 100644 --- a/core/pkg/tbox.pkg/inc/windows/tbox.config.h +++ b/core/pkg/tbox.pkg/inc/windows/tbox.config.h @@ -6,7 +6,7 @@ #define TB_CONFIG_VERSION_MAJOR 1 #define TB_CONFIG_VERSION_MINOR 6 #define TB_CONFIG_VERSION_ALTER 2 -#define TB_CONFIG_VERSION_BUILD 201703291120 +#define TB_CONFIG_VERSION_BUILD 201703301429 // defines #define TB_CONFIG_OS_WINDOWS 1 @@ -46,16 +46,29 @@ #define TB_CONFIG_LIBC_HAVE_SETJMP 1 #define TB_CONFIG_LIBC_HAVE_SETLOCALE 1 #define TB_CONFIG_LIBC_HAVE_FPUTS 1 +#define TB_CONFIG_LIBM_HAVE_LOG2 1 +#define TB_CONFIG_LIBM_HAVE_LOG2F 1 #define TB_CONFIG_LIBM_HAVE_SQRT 1 +#define TB_CONFIG_LIBM_HAVE_SQRTF 1 #define TB_CONFIG_LIBM_HAVE_ACOS 1 +#define TB_CONFIG_LIBM_HAVE_ACOSF 1 #define TB_CONFIG_LIBM_HAVE_ASIN 1 +#define TB_CONFIG_LIBM_HAVE_ASINF 1 #define TB_CONFIG_LIBM_HAVE_POW 1 +#define TB_CONFIG_LIBM_HAVE_POWF 1 #define TB_CONFIG_LIBM_HAVE_FMOD 1 +#define TB_CONFIG_LIBM_HAVE_FMODF 1 #define TB_CONFIG_LIBM_HAVE_TAN 1 +#define TB_CONFIG_LIBM_HAVE_TANF 1 #define TB_CONFIG_LIBM_HAVE_ATAN 1 +#define TB_CONFIG_LIBM_HAVE_ATANF 1 #define TB_CONFIG_LIBM_HAVE_ATAN2 1 +#define TB_CONFIG_LIBM_HAVE_ATAN2F 1 #define TB_CONFIG_LIBM_HAVE_COS 1 +#define TB_CONFIG_LIBM_HAVE_COSF 1 #define TB_CONFIG_LIBM_HAVE_SIN 1 +#define TB_CONFIG_LIBM_HAVE_SINF 1 #define TB_CONFIG_LIBM_HAVE_EXP 1 +#define TB_CONFIG_LIBM_HAVE_EXPF 1 #endif diff --git a/core/pkg/tbox.pkg/lib/release/windows/x64/tbox.lib b/core/pkg/tbox.pkg/lib/release/windows/x64/tbox.lib new file mode 100644 index 000000000..b48b20aed Binary files /dev/null and b/core/pkg/tbox.pkg/lib/release/windows/x64/tbox.lib differ diff --git a/core/pkg/tbox.pkg/xmake.lua b/core/pkg/tbox.pkg/xmake.lua index b946b73b2..c6bc5ee18 100644 --- a/core/pkg/tbox.pkg/xmake.lua +++ b/core/pkg/tbox.pkg/xmake.lua @@ -1,30 +1,30 @@ - --- the tbox package -option("tbox") - - -- show menu - set_showmenu(true) - - -- set category - set_category("package") - - -- set description - set_description("The tbox package") - - -- set language: c99, c++11 - set_languages("c99", "cxx11") - - -- add defines to config.h if checking ok - add_defines_h_if_ok("$(prefix)_PACKAGE_HAVE_TBOX") - - -- add links for checking - add_links("tbox") - - -- add link directories - add_linkdirs("lib/$(mode)/$(plat)/$(arch)") - - -- add c includes for checking - add_cincludes("tbox/tbox.h") - - -- add include directories - add_includedirs("inc/$(plat)", "inc") + +-- the tbox package +option("tbox") + + -- show menu + set_showmenu(true) + + -- set category + set_category("package") + + -- set description + set_description("The tbox package") + + -- set language: c99, c++11 + set_languages("c99", "cxx11") + + -- add defines to config.h if checking ok + add_defines_h_if_ok("$(prefix)_PACKAGE_HAVE_TBOX") + + -- add links for checking + add_links("tbox") + + -- add link directories + add_linkdirs("lib/$(mode)/$(plat)/$(arch)") + + -- add c includes for checking + add_cincludes("tbox/tbox.h") + + -- add include directories + add_includedirs("inc/$(plat)", "inc") diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c index c4d1ddd70..84bb69649 100644 --- a/core/src/xmake/machine.c +++ b/core/src/xmake/machine.c @@ -201,7 +201,7 @@ static tb_bool_t xm_machine_main_get_program_directory(xm_machine_impl_t* impl, #ifdef TB_CONFIG_OS_WINDOWS // get the program directory - tb_size_t size = GetModuleFileName(tb_null, path, maxn); + tb_size_t size = (tb_size_t)GetModuleFileName(tb_null, path, (DWORD)maxn); tb_assert_and_check_break(size < maxn); // end diff --git a/core/src/xmake/os/find.c b/core/src/xmake/os/find.c index ea847f195..ac336b52d 100644 --- a/core/src/xmake/os/find.c +++ b/core/src/xmake/os/find.c @@ -101,8 +101,8 @@ static tb_bool_t xm_os_find_walk(tb_char_t const* path, tb_file_info_t const* in path += rootlen + 1; // exclude pathes - tb_size_t i = 0; - tb_size_t count = luaL_getn(lua, 5); + tb_int_t i = 0; + tb_int_t count = luaL_getn(lua, 5); for (i = 0; i < count && !excluded; i++) { // get exclude @@ -133,7 +133,7 @@ static tb_bool_t xm_os_find_walk(tb_char_t const* path, tb_file_info_t const* in } // save this path - if (!excluded) lua_rawseti(lua, -3, ++*pcount); + if (!excluded) lua_rawseti(lua, -3, (tb_int_t)(++*pcount)); // pop this return value else lua_pop(lua, 1); } diff --git a/core/src/xmake/process/waitlist.c b/core/src/xmake/process/waitlist.c index e7a3f5162..3e5d20aa0 100644 --- a/core/src/xmake/process/waitlist.c +++ b/core/src/xmake/process/waitlist.c @@ -77,7 +77,7 @@ tb_int_t xm_process_waitlist(lua_State* lua) } // get the processes - tb_size_t i = 0; + tb_int_t i = 0; tb_process_ref_t processes[64 + 1]; for (i = 0; i < count; i++) { @@ -93,14 +93,14 @@ tb_int_t xm_process_waitlist(lua_State* lua) if (!processes[i]) { // error - lua_pushfstring(lua, "process[%ld] is null for process.waitlist", i); + lua_pushfstring(lua, "process[%d] is null for process.waitlist", i); lua_error(lua); } } else { // error - lua_pushfstring(lua, "invalid process[%ld] type(%s) for process.waitlist", i, luaL_typename(lua, -1)); + lua_pushfstring(lua, "invalid process[%d] type(%s) for process.waitlist", i, luaL_typename(lua, -1)); lua_error(lua); } -- cgit v1.3.1