Commit 7563e086 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 922ae9d7 6aad7bfe
......@@ -9,15 +9,18 @@ variables:
GIT_DEPTH: "1"
#USE_IRRKLANG: "1"
mat_lua:
mat_common:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install wget tar
# lua
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.5.tar.gz | tar zfx -
- mv lua-5.3.5/src lua
- cp premake/lua/premake4.lua lua/;
# sqlite3
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx -
- mv sqlite-autoconf-3360000 sqlite3
- cp -rf premake/* .;
artifacts:
paths:
- lua
......@@ -55,10 +58,6 @@ mat_windows:
# event
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
- mv libevent-2.0.22-stable event ; cp -rf event/WIN32-Code/* event/include
# sqlite3
- wget https://cdn01.moecube.com/ygopro-build-materials/sqlite-amalgamation-3310100.zip
- 7z x -y sqlite-amalgamation-3310100.zip
- mv sqlite-amalgamation-3310100 sqlite3
artifacts:
paths:
- premake5.exe
......@@ -70,7 +69,7 @@ exec_windows:
tags:
- vs
dependencies:
- mat_lua
- mat_common
- mat_windows
#variables:
# irrklang_pro: '1'
......@@ -98,7 +97,7 @@ exec_linux:
#YGOPRO_LINUX_ALL_STATIC: '1'
#YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies:
- mat_lua
- mat_common
#- mat_irrklang
- mat_linux
cache:
......
......@@ -26,10 +26,9 @@ project "ygopro"
"single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h" }
includedirs { "../ocgcore" }
links { "ocgcore", "clzma" }
links { "ocgcore", "clzma", "sqlite3" }
configuration "windows"
links { "sqlite3", "event" }
files "ygopro.rc"
includedirs { "../event/include", "../sqlite3" }
links { "ws2_32", "lua" }
......@@ -40,13 +39,15 @@ project "ygopro"
if not LINUX_ALL_STATIC then
links { "event_pthreads" }
end
if BUILD_SQLITE then
includedirs { "../sqlite3" }
end
if BUILD_LUA then
links { "lua" }
else
links { "lua5.3-c++" }
end
if LINUX_ALL_STATIC then
linkoptions { LIB_ROOT.."libsqlite3.a", "-static-libstdc++", "-static-libgcc" }
local libeventRootPrefix=LIB_ROOT
if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" }
......@@ -54,5 +55,7 @@ project "ygopro"
end
linkoptions { libeventRootPrefix.."libevent.a", libeventRootPrefix.."libevent_pthreads.a" }
else
links { "sqlite3", "event" }
links { "event" }
end
configuration "linux"
linkoptions { "-static-libstdc++", "-static-libgcc" }
......@@ -4,3 +4,8 @@ project "cspmemvfs"
configuration "windows"
includedirs { "../../sqlite3" }
configuration "not windows"
if BUILD_SQLITE then
includedirs { "../../sqlite3" }
end
......@@ -5,16 +5,30 @@ solution "ygo"
if os.ishost("macosx") then
BUILD_LUA=true
end
if os.ishost("linux") then
if not os.ishost("windows") then
if os.getenv("YGOPRO_BUILD_LUA") then
BUILD_LUA=true
end
if os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_LUA=true
if os.getenv("YGOPRO_BUILD_SQLITE") then
BUILD_SQLITE=true
end
--[[if os.getenv("YGOPRO_BUILD_FREETYPE") then
BUILD_FREETYPE=true
end]]
if os.getenv("YGOPRO_BUILD_ALL") or os.ishost("macosx") then
BUILD_ALL=true
end
if os.ishost("linux") and os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_ALL=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
if BUILD_ALL then
BUILD_LUA=true
BUILD_SQLITE=true
--BUILD_FREETYPE=true
end
end
configurations { "Release", "Debug" }
......@@ -45,8 +59,8 @@ end
configuration "macosx"
defines { "LUA_USE_MACOSX", "DBL_MAX_10_EXP=+308", "DBL_MANT_DIG=53", "GL_SILENCE_DEPRECATION" }
includedirs { "/usr/local/include/event2", "/usr/local/include/freetype2", "/usr/local/opt/sqlite3/include" }
libdirs { "/usr/local/lib", "/usr/local/opt/sqlite3/lib" }
includedirs { "/usr/local/include/event2", "/usr/local/include/freetype2" }
libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" }
links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework" }
......@@ -93,11 +107,14 @@ end
include "ocgcore"
include "gframe"
if os.ishost("windows") then
include "lua"
include "event"
include "sqlite3"
end
if BUILD_LUA then
include "lua"
include "event"
include "sqlite3"
else
if BUILD_LUA then
include "lua"
end
if BUILD_SQLITE then
include "sqlite3/premake4.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