Commit 1464ced6 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 7e1b616c 2d59f16d
......@@ -30,10 +30,18 @@ mat_linux:
- apt update; apt -y install git wget tar
#- 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/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:
paths:
- premake5
#- irrlicht_linux
- libevent-stable
mat_windows:
stage: prepare
......@@ -85,7 +93,12 @@ exec_linux:
stage: build
tags:
- linux
variables:
YGOPRO_BUILD_LUA: '1'
YGOPRO_LINUX_ALL_STATIC: '1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies:
- mat_lua
#- mat_irrklang
- mat_linux
cache:
......@@ -93,9 +106,9 @@ exec_linux:
- bin/
- obj/
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
- ./premake5 gmake
- env YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
- cd build
- make config=release -j$(nproc)
- cd ..
......
......@@ -26,18 +26,33 @@ project "ygopro"
"single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "sqlite3", "event"}
links { "ocgcore", "clzma" }
configuration "windows"
links { "sqlite3", "event" }
files "ygopro.rc"
includedirs { "../event/include", "../sqlite3" }
links { "ws2_32", "lua" }
configuration "not vs*"
buildoptions { "-std=c++14", "-fno-rtti" }
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
links { "lua" }
else
links { "lua5.3-c++" }
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"
location "build"
language "C++"
objdir "obj"
if os.ishost("linux") and os.getenv("YGOPRO_BUILD_LUA") then
if os.ishost("macosx") then
BUILD_LUA=true
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" }
if os.getenv("YGOPRO_NO_LUA_SAFE") then
......@@ -87,6 +98,6 @@ end
include "sqlite3"
end
if os.ishost("macosx") or BUILD_LUA then
if BUILD_LUA then
include "lua"
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