mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Merge pull request #10 from azerothcore/master
This commit is contained in:
77
.travis.yml
Normal file
77
.travis.yml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: xenial # (16.04)
|
||||||
|
# bionic (18.04) is not yet available in travis
|
||||||
|
|
||||||
|
language: cpp
|
||||||
|
|
||||||
|
cache: ccache
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
- mysql
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 10
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- prepare_cache
|
||||||
|
- run
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: prepare_cache
|
||||||
|
env: TRAVIS_BUILD_ID="1"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
|
- stage: run
|
||||||
|
env: TRAVIS_BUILD_ID="1"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh ON
|
||||||
|
- source ./apps/ci/ci-import-db.sh
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
- source ./apps/ci/ci-worldserver-dry-run.sh
|
||||||
|
|
||||||
|
- stage: prepare_cache
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
|
- stage: run
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh ON
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
@@ -1,7 +1,2 @@
|
|||||||
CU_SET_PATH("CMAKE_MOD_ELUNA_ENGINE_DIR" "${CMAKE_CURRENT_LIST_DIR}")
|
CU_SET_PATH("CMAKE_MOD_ELUNA_ENGINE_DIR" "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
CU_ADD_HOOK(AFTER_LOAD_CONF "${CMAKE_CURRENT_LIST_DIR}/cmake/after_load_conf.cmake")
|
CU_ADD_HOOK(AFTER_LOAD_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake/after_load_cmake_modules.cmake")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Submodule LuaEngine updated: adf722a181...c027d0bcb5
@@ -1,5 +1,5 @@
|
|||||||
# mod-LuaEngine
|
# mod-LuaEngine
|
||||||
english | [中文说明](README_CN.md)
|
[english](README.md) | [中文说明](README_CN.md) | [Español](README_ES.md)
|
||||||
|
|
||||||
a Eluna module for AzerothCore.
|
a Eluna module for AzerothCore.
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# mod-LuaEngine
|
# mod-LuaEngine
|
||||||
[english](README.md) | 中文
|
[english](README.md) | [中文说明](README_CN.md) | [Español](README_ES.md)
|
||||||
|
|
||||||
一个用于AzerothCore的ELUNA模块.
|
一个用于AzerothCore的ELUNA模块.
|
||||||
|
|
||||||
|
|||||||
19
README_ES.md
Normal file
19
README_ES.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# mod-LuaEngine
|
||||||
|
[English](README.md) | [中文说明](README_CN.md) | [Español](README_ES.md)
|
||||||
|
|
||||||
|
Un módulo de Eluna para AzerothCore.
|
||||||
|
|
||||||
|
Cómo instalar:
|
||||||
|
|
||||||
|
1. Descargar o clonar este módulo:
|
||||||
|
> [Descargar archivo zip](https://github.com/azerothcore/mod-eluna-lua-engine/archive/master.zip)
|
||||||
|
> o clonar `git clone https://github.com/azerothcore/mod-eluna-lua-engine.git`
|
||||||
|
2. Póngalo en la carpeta de módulos del Azerothcore.
|
||||||
|
> $HOME/azerothcore/modules/
|
||||||
|
3. Descargar o clonar el archivo central de ELUNA:
|
||||||
|
> [Descargar archivo zip](https://github.com/ElunaLuaEngine/Eluna/archive/master.zip)
|
||||||
|
> o clonar `git clone https://github.com/ElunaLuaEngine/Eluna.git .`
|
||||||
|
4. Dentro de la carpeta del módulo de Eluna de Azeroth, se encuentra una carpeta / directorio llamado: `LuaEngine` (mod-eluna-lua-engine/LuaEngine). Debe depositar los ficheros de lua, directamente dentro de esa carpeta. Los archivos directamente, no un directorio y luego los ficheros dentro. Por eso te utiliza el “.” cuando se está clonando, para que no genere un directorio nuevo.
|
||||||
|
5. Una vez copiado los ficheros y descargado el modulo, debes volver a compilar. Si seguiste la guía de instalación, debiste haber generado un directorio build, dentro de azerothcore. Dirígete a él y realiza la compilación como lo menciona en la guía.
|
||||||
|
|
||||||
|
Eluna API : [http://www.elunaengine.com/](http://www.elunaengine.com/)
|
||||||
@@ -1,28 +1,31 @@
|
|||||||
|
CollectIncludeDirectories(
|
||||||
|
${CMAKE_MOD_ELUNA_ENGINE_DIR}
|
||||||
|
PUBLIC_INCLUDES)
|
||||||
|
|
||||||
include_directories(
|
target_include_directories(game-interface
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine
|
INTERFACE
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib
|
${PUBLIC_INCLUDES})
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/src
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
add_dependencies(game lualib)
|
add_dependencies(game lualib)
|
||||||
target_link_libraries(game lualib)
|
|
||||||
|
target_link_libraries(game
|
||||||
|
PUBLIC
|
||||||
|
lualib)
|
||||||
|
|
||||||
if( WIN32 )
|
if( WIN32 )
|
||||||
if ( MSVC )
|
if ( MSVC )
|
||||||
add_custom_command(TARGET game
|
add_custom_command(TARGET game
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/"
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/lua_scripts/extensions/"
|
||||||
)
|
)
|
||||||
elseif ( MINGW )
|
elseif ( MINGW )
|
||||||
add_custom_command(TARGET game
|
add_custom_command(TARGET game
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/"
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/"
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/lua_scripts/extensions/"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(DIRECTORY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/")
|
install(DIRECTORY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/")
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
add_subdirectory(${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib)
|
add_subdirectory(${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib)
|
||||||
|
|
||||||
add_definitions(-DELUNA)
|
add_definitions(-DELUNA)
|
||||||
add_definitions(-DAZEROTHCORE)
|
add_definitions(-DAZEROTHCORE)
|
||||||
add_definitions(-DWOTLK)
|
add_definitions(-DWOTLK)
|
||||||
|
|
||||||
CU_ADD_HOOK(BEFORE_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/before_gs_install.cmake")
|
CU_ADD_HOOK(BEFORE_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/before_gs_install.cmake")
|
||||||
CU_ADD_HOOK(AFTER_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/after_gs_install.cmake")
|
CU_ADD_HOOK(AFTER_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/after_gs_install.cmake")
|
||||||
CU_ADD_HOOK(BEFORE_SCRIPTS_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/before_script_install.cmake")
|
|
||||||
CU_ADD_HOOK(AFTER_WORLDSERVER_CMAKE "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/after_ws_install.cmake")
|
|
||||||
|
|
||||||
AC_ADD_CONFIG_FILE("${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist")
|
AC_ADD_CONFIG_FILE("${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist")
|
||||||
|
|
||||||
message("** [Eluna Module] LuaEngine is enable!")
|
message("** [Eluna Module] LuaEngine is enable!")
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/src
|
|
||||||
)
|
|
||||||
@@ -2,15 +2,12 @@ file(GLOB_RECURSE method_headers ${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/*Method
|
|||||||
file(GLOB_RECURSE sources_ElunaFile_CPP ${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/*.cpp )
|
file(GLOB_RECURSE sources_ElunaFile_CPP ${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/*.cpp )
|
||||||
file(GLOB_RECURSE sources_ElunaFile_H ${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/*.h)
|
file(GLOB_RECURSE sources_ElunaFile_H ${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine/*.h)
|
||||||
|
|
||||||
set(game_STAT_SRCS
|
set(ElunaLuaEngineFiles
|
||||||
${game_STAT_SRCS}
|
${ElunaLuaEngineFiles}
|
||||||
${sources_ElunaFile_H}
|
${sources_ElunaFile_H}
|
||||||
${sources_ElunaFile_CPP}
|
${sources_ElunaFile_CPP}
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group("LuaEngine\\Methods" FILES ${method_headers})
|
source_group("LuaEngine\\Methods" FILES ${method_headers})
|
||||||
|
|
||||||
source_group("LuaEngine\\Header Files" FILES ${sources_ElunaFile_H})
|
source_group("LuaEngine\\Header Files" FILES ${sources_ElunaFile_H})
|
||||||
|
|
||||||
source_group("LuaEngine\\Source Files" FILES ${sources_ElunaFile_CPP})
|
source_group("LuaEngine\\Source Files" FILES ${sources_ElunaFile_CPP})
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
include_directories(
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/LuaEngine
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib
|
|
||||||
${CMAKE_MOD_ELUNA_ENGINE_DIR}/src
|
|
||||||
)
|
|
||||||
@@ -4,16 +4,25 @@
|
|||||||
# Please see the included DOCS/LICENSE.md for more information
|
# Please see the included DOCS/LICENSE.md for more information
|
||||||
#
|
#
|
||||||
|
|
||||||
file(GLOB sources *.c)
|
CollectSourceFiles(
|
||||||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/lua.c)
|
|
||||||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/luac.c)
|
|
||||||
|
|
||||||
set(lua_STAT_SRCS
|
|
||||||
${sources}
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
PRIVATE_SOURCES
|
||||||
|
# Exclude
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||||
|
|
||||||
add_library(lualib STATIC ${lua_STAT_SRCS})
|
list(REMOVE_ITEM PRIVATE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lua.c)
|
||||||
|
list(REMOVE_ITEM PRIVATE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/luac.c)
|
||||||
|
|
||||||
|
add_library(lualib STATIC
|
||||||
|
${PRIVATE_SOURCES})
|
||||||
|
|
||||||
|
CollectIncludeDirectories(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PUBLIC_INCLUDES)
|
||||||
|
|
||||||
|
target_include_directories(lualib
|
||||||
|
PUBLIC
|
||||||
|
${PUBLIC_INCLUDES}
|
||||||
|
PRIVATE
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|||||||
Reference in New Issue
Block a user