给eluna模块增加设置文件

This commit is contained in:
Ayase
2018-04-28 22:46:26 +08:00
parent 00f27756da
commit 0476eb8294
3 changed files with 44 additions and 0 deletions

View File

@@ -1,6 +1,10 @@
if( ELUNA ) if( ELUNA )
CU_SET_PATH("CMAKE_MOD_ELUNA_ENGINE_DIR" "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(lualib) add_subdirectory(lualib)
add_subdirectory(LuaEngine) add_subdirectory(LuaEngine)
CU_ADD_HOOK(AFTER_WORLDSERVER_CMAKE "${CMAKE_CURRENT_LIST_DIR}/cmake/after_ws_install.cmake")
install(FILES "${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist" DESTINATION ${CONF_DIR})
endif() endif()

View File

@@ -0,0 +1,15 @@
if( WIN32 )
if ( MSVC )
add_custom_command(TARGET worldserver
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist" ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
)
elseif ( MINGW )
add_custom_command(TARGET worldserver
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist" ${CMAKE_BINARY_DIR}/bin/
)
endif()
endif()
install(FILES "${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist" DESTINATION ${CONF_DIR})

View File

@@ -0,0 +1,25 @@
[worldserver]
###################################################################################################
# ELUNA SETTINGS
#
# Eluna.Enabled
# Description: Enable or disable Eluna LuaEngine
# Default: true - (enabled)
# false - (disabled)
#
# Eluna.TraceBack
# Description: Sets whether to use debug.traceback function on a lua error or not.
# Notice that you can redefine the function.
# Default: false - (use default error output)
# true - (use debug.traceback function)
#
# Eluna.ScriptPath
# Description: Sets the location of the script folder to load scripts from
# The path can be relative or absolute.
# Default: "lua_scripts"
#
Eluna.Enabled = true
Eluna.TraceBack = false
Eluna.ScriptPath = "lua_scripts"