windows: Fix client by using LuaJIT and installing DLLs
This commit is contained in:
parent
dedc75f6db
commit
e6c1b78b4b
@ -101,7 +101,7 @@ if(BUILD_CLIENT)
|
||||
)
|
||||
if(WIN32)
|
||||
target_link_libraries(${CLIENT_EXE_NAME}
|
||||
${URHO3D_HOME}/Build/ThirdParty/Lua/libLua.a
|
||||
${URHO3D_HOME}/Build/ThirdParty/LuaJIT/libLuaJIT.a
|
||||
)
|
||||
endif()
|
||||
endif(BUILD_CLIENT)
|
||||
@ -169,11 +169,22 @@ if(WIN32)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/NOTICE" DESTINATION ".")
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/README.md" DESTINATION ".")
|
||||
|
||||
message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
||||
get_filename_component(COMPILER_BIN_PATH "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
||||
message(STATUS "COMPILER_BIN_PATH: ${COMPILER_BIN_PATH}")
|
||||
get_filename_component(COMPILER_USR_PATH "${COMPILER_BIN_PATH}" DIRECTORY)
|
||||
message(STATUS "COMPILER_USR_PATH: ${COMPILER_USR_PATH}")
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
install(TARGETS ${CLIENT_EXE_NAME} DESTINATION "${DST_BIN}")
|
||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/client" DESTINATION "${DST_SHARE}")
|
||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/extensions" DESTINATION "${DST_SHARE}")
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/util/windows/launch_client.bat" DESTINATION ".")
|
||||
if(NOT BUILD_SERVER)
|
||||
install(FILES "${COMPILER_USR_PATH}/bin/libwinpthread-1.dll" DESTINATION "${DST_BIN}")
|
||||
install(FILES "${COMPILER_USR_PATH}/bin/libgcc_s_dw2-1.dll" DESTINATION "${DST_BIN}")
|
||||
install(FILES "${COMPILER_USR_PATH}/bin/libstdc++-6.dll" DESTINATION "${DST_BIN}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_SERVER)
|
||||
@ -188,12 +199,6 @@ if(WIN32)
|
||||
install(DIRECTORY "${URHO3D_HOME}/Source" DESTINATION "${DST_SHARE}/Urho3D")
|
||||
install(FILES "${URHO3D_HOME}/Build/Engine/Urho3D.h" DESTINATION "${DST_SHARE}/Urho3D/Build/Engine")
|
||||
|
||||
message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
||||
get_filename_component(COMPILER_BIN_PATH "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
||||
message(STATUS "COMPILER_BIN_PATH: ${COMPILER_BIN_PATH}")
|
||||
get_filename_component(COMPILER_USR_PATH "${COMPILER_BIN_PATH}" DIRECTORY)
|
||||
message(STATUS "COMPILER_USR_PATH: ${COMPILER_USR_PATH}")
|
||||
|
||||
install(DIRECTORY "${COMPILER_USR_PATH}/bin" DESTINATION "${DST_COMPILER}")
|
||||
install(DIRECTORY "${COMPILER_USR_PATH}/i686-w64-mingw32" DESTINATION "${DST_COMPILER}")
|
||||
install(DIRECTORY "${COMPILER_USR_PATH}/include" DESTINATION "${DST_COMPILER}")
|
||||
|
@ -91,14 +91,14 @@ Use Mingw-w64 in an MSYS environment.
|
||||
$ cd /path/to/Urho3D
|
||||
$ mkdir Build
|
||||
$ cd Build
|
||||
$ cmake ../Source -G "MSYS Makefiles" -DURHO3D_LIB_TYPE=SHARED -DURHO3D_LUA=true -DURHO3D_SAFE_LUA=true
|
||||
$ cmake ../Source -G "MSYS Makefiles" -DURHO3D_LIB_TYPE=SHARED -DURHO3D_LUAJIT=TRUE
|
||||
$ make -j4
|
||||
|
||||
$ cd /path/to/buildat
|
||||
$ mkdir Build
|
||||
$ cd Build
|
||||
$ export URHO3D_HOME="/path/to/Urho3D"
|
||||
$ cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DURHO3D_LIB_TYPE=SHARED
|
||||
$ cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DURHO3D_LIB_TYPE=SHARED -DURHO3D_LUAJIT=TRUE
|
||||
$ make -j4
|
||||
|
||||
Running the server:
|
||||
|
@ -146,6 +146,7 @@ function M.wrap_class(type_name, def)
|
||||
if def.unsafe_constructor == nil then
|
||||
error("Sandbox definition of "..type_name.." has no unsafe_constructor")
|
||||
end
|
||||
local arg = {...}
|
||||
--local unsafe_instance = def.unsafe_constructor(unpack(arg, 1, table.maxn(arg)))
|
||||
--log:info("unsafe_instance="..dump(unsafe_instance))
|
||||
--local safe_instance = class_meta.wrap(unsafe_instance)
|
||||
@ -158,6 +159,7 @@ function M.wrap_class(type_name, def)
|
||||
return safe_instance
|
||||
end
|
||||
class_meta.__call = function(_, ...)
|
||||
local arg = {...}
|
||||
return class_meta.create_new(_, unpack(arg, 1, table.maxn(arg)))
|
||||
end
|
||||
class_meta.__index = function(t, k)
|
||||
@ -334,6 +336,7 @@ function M.safe.class(name)
|
||||
local user_constructor = __buildat_sandbox_environment[name][name]
|
||||
if user_constructor ~= nil then
|
||||
-- Allow arguments to this safe constructor
|
||||
local arg = {...}
|
||||
user_constructor(safe_instance, unpack(arg, 1, table.maxn(arg)))
|
||||
end
|
||||
end,
|
||||
|
@ -134,6 +134,7 @@ local function wrap_function(return_types, param_types, f)
|
||||
return_types = {"__safe"}
|
||||
end
|
||||
return function(...)
|
||||
local arg = {...}
|
||||
local checked_arg = {}
|
||||
for i = 1, #param_types do
|
||||
checked_arg[i] = magic_sandbox.safe_to_unsafe(arg[i], param_types[i])
|
||||
@ -152,6 +153,7 @@ local function self_function(function_name, return_types, param_types)
|
||||
if #param_types < 1 then
|
||||
error("At least one argument required (self)")
|
||||
end
|
||||
local arg = {...}
|
||||
local checked_arg = {}
|
||||
for i = 1, #param_types do
|
||||
checked_arg[i] = magic_sandbox.safe_to_unsafe(arg[i], param_types[i])
|
||||
|
@ -1 +1 @@
|
||||
bin/buildat_client.exe -P . -C cache -U Urho3D
|
||||
"bin/buildat_client.exe" -P . -C cache -U Urho3D
|
Loading…
x
Reference in New Issue
Block a user