Commit 1464ced6 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 7e1b616c 2d59f16d
...@@ -30,10 +30,18 @@ mat_linux: ...@@ -30,10 +30,18 @@ mat_linux:
- apt update; apt -y install git wget tar - apt update; apt -y install git wget tar
#- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux #- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht irrlicht_linux
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-alpha14-linux.tar.gz | tar zfx -
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- cd libevent-2.0.22-stable
- ./configure --prefix=$PWD/libevent-stable --disable-openssl
- make -j$(nproc)
- make install
- cd ..
- mv libevent-2.0.22-stable/libevent-stable .
artifacts: artifacts:
paths: paths:
- premake5 - premake5
#- irrlicht_linux #- irrlicht_linux
- libevent-stable
mat_windows: mat_windows:
stage: prepare stage: prepare
...@@ -85,7 +93,12 @@ exec_linux: ...@@ -85,7 +93,12 @@ exec_linux:
stage: build stage: build
tags: tags:
- linux - linux
variables:
YGOPRO_BUILD_LUA: '1'
YGOPRO_LINUX_ALL_STATIC: '1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies: dependencies:
- mat_lua
#- mat_irrklang #- mat_irrklang
- mat_linux - mat_linux
cache: cache:
...@@ -93,9 +106,9 @@ exec_linux: ...@@ -93,9 +106,9 @@ exec_linux:
- bin/ - bin/
- obj/ - obj/
script: script:
- apt update; apt -y install git build-essential libevent-dev libsqlite3-dev liblua5.3-dev - apt update; apt -y install git build-essential libsqlite3-dev
- git submodule update --init - git submodule update --init
- ./premake5 gmake - env YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
- cd .. - cd ..
......
...@@ -26,18 +26,33 @@ project "ygopro" ...@@ -26,18 +26,33 @@ project "ygopro"
"single_duel.cpp", "single_duel.h", "single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" } "tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "sqlite3", "event"} links { "ocgcore", "clzma" }
configuration "windows" configuration "windows"
links { "sqlite3", "event" }
files "ygopro.rc" files "ygopro.rc"
includedirs { "../event/include", "../sqlite3" } includedirs { "../event/include", "../sqlite3" }
links { "ws2_32", "lua" } links { "ws2_32", "lua" }
configuration "not vs*" configuration "not vs*"
buildoptions { "-std=c++14", "-fno-rtti" } buildoptions { "-std=c++14", "-fno-rtti" }
configuration "not windows" configuration "not windows"
links { "event_pthreads", "dl", "pthread" } links { "dl", "pthread" }
if not LINUX_ALL_STATIC then
links { "event_pthreads" }
end
if BUILD_LUA then if BUILD_LUA then
links { "lua" } links { "lua" }
else else
links { "lua5.3-c++" } links { "lua5.3-c++" }
end end
if LINUX_ALL_STATIC then
linkoptions { LIB_ROOT.."libsqlite3.a" }
local libeventRootPrefix=LIB_ROOT
if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" }
libeventRootPrefix=LIBEVENT_ROOT.."/lib/"
end
linkoptions { libeventRootPrefix.."libevent.a", libeventRootPrefix.."libevent_pthreads.a" }
else
links { "sqlite3", "event" }
end
...@@ -2,9 +2,20 @@ solution "ygo" ...@@ -2,9 +2,20 @@ solution "ygo"
location "build" location "build"
language "C++" language "C++"
objdir "obj" objdir "obj"
if os.ishost("linux") and os.getenv("YGOPRO_BUILD_LUA") then if os.ishost("macosx") then
BUILD_LUA=true BUILD_LUA=true
end end
if os.ishost("linux") then
if os.getenv("YGOPRO_BUILD_LUA") then
BUILD_LUA=true
end
if os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_LUA=true
LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/"
LIBEVENT_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH")
end
end
configurations { "Release", "Debug" } configurations { "Release", "Debug" }
if os.getenv("YGOPRO_NO_LUA_SAFE") then if os.getenv("YGOPRO_NO_LUA_SAFE") then
...@@ -87,6 +98,6 @@ end ...@@ -87,6 +98,6 @@ end
include "sqlite3" include "sqlite3"
end end
if os.ishost("macosx") or BUILD_LUA then if BUILD_LUA then
include "lua" include "lua"
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment