Commit 6084661f authored by nanahira's avatar nanahira

static sqlite3 for non-windows

parent 61b5423e
...@@ -9,15 +9,18 @@ variables: ...@@ -9,15 +9,18 @@ variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
USE_IRRKLANG: "1" USE_IRRKLANG: "1"
mat_lua: mat_common:
stage: prepare stage: prepare
tags: tags:
- linux - linux
script: 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 - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.5.tar.gz | tar zfx -
- mv lua-5.3.5/src lua - 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: artifacts:
paths: paths:
- lua - lua
...@@ -91,10 +94,6 @@ mat_windows: ...@@ -91,10 +94,6 @@ mat_windows:
# freetype # freetype
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.1.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.1.tar.gz | tar zfx -
- mv freetype-2.10.1 freetype - mv freetype-2.10.1 freetype
# 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
# irrlicht # irrlicht
- wget https://cdn01.moecube.com/ygopro-build-materials/irrlicht-1.8.4.zip - wget https://cdn01.moecube.com/ygopro-build-materials/irrlicht-1.8.4.zip
- 7z x -y irrlicht-1.8.4.zip - 7z x -y irrlicht-1.8.4.zip
...@@ -114,7 +113,7 @@ exec_windows: ...@@ -114,7 +113,7 @@ exec_windows:
tags: tags:
- vs - vs
dependencies: dependencies:
- mat_lua - mat_common
- mat_irrklang - mat_irrklang
- mat_windows - mat_windows
variables: variables:
...@@ -143,7 +142,7 @@ exec_linux: ...@@ -143,7 +142,7 @@ exec_linux:
#YGOPRO_LINUX_ALL_STATIC: '1' #YGOPRO_LINUX_ALL_STATIC: '1'
#YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/' #YGOPRO_LINUX_ALL_STATIC_LIB_PATH: '/usr/lib/x86_64-linux-gnu/'
dependencies: dependencies:
- mat_lua - mat_common
- mat_irrklang - mat_irrklang
- mat_linux - mat_linux
cache: cache:
...@@ -172,7 +171,7 @@ exec_macos: ...@@ -172,7 +171,7 @@ exec_macos:
dependencies: dependencies:
- mat_irrklang - mat_irrklang
- mat_macos - mat_macos
- mat_lua - mat_common
cache: cache:
paths: paths:
- bin/ - bin/
......
...@@ -7,9 +7,9 @@ project "ygopro" ...@@ -7,9 +7,9 @@ project "ygopro"
files { "**.cpp", "**.cc", "**.c", "**.h" } files { "**.cpp", "**.cc", "**.c", "**.h" }
excludes { "lzma/**", "spmemvfs/**" } excludes { "lzma/**", "spmemvfs/**" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht" } links { "ocgcore", "clzma", "cspmemvfs", "Irrlicht", "sqlite3" }
if not LINUX_ALL_STATIC then if not LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" } links { "freetype", "event" }
end end
if USE_IRRKLANG then if USE_IRRKLANG then
defines { "YGOPRO_USE_IRRKLANG" } defines { "YGOPRO_USE_IRRKLANG" }
...@@ -30,7 +30,7 @@ project "ygopro" ...@@ -30,7 +30,7 @@ project "ygopro"
configuration "not linux" configuration "not linux"
if LINUX_ALL_STATIC then if LINUX_ALL_STATIC then
links { "freetype", "sqlite3", "event" } links { "freetype", "event" }
end end
configuration "windows" configuration "windows"
files "ygopro.rc" files "ygopro.rc"
...@@ -63,9 +63,13 @@ project "ygopro" ...@@ -63,9 +63,13 @@ project "ygopro"
if not LINUX_ALL_STATIC then if not LINUX_ALL_STATIC then
links { "event_pthreads" } links { "event_pthreads" }
end end
if BUILD_SQLITE then
includedirs { "../sqlite3" }
end
configuration { "not windows", "not macosx" } configuration { "not windows", "not macosx" }
links "GL" links "GL"
configuration "linux" configuration "linux"
linkoptions { "-static-libstdc++", "-static-libgcc" }
includedirs { "../irrlicht_linux/include" } includedirs { "../irrlicht_linux/include" }
if BUILD_LUA then if BUILD_LUA then
links { "lua" } links { "lua" }
...@@ -74,7 +78,7 @@ project "ygopro" ...@@ -74,7 +78,7 @@ project "ygopro"
end end
links { "X11", "Xxf86vm" } links { "X11", "Xxf86vm" }
if LINUX_ALL_STATIC then if LINUX_ALL_STATIC then
linkoptions { LIB_ROOT.."libfreetype.a", LIB_ROOT.."libsqlite3.a", "-static-libstdc++", "-static-libgcc" } linkoptions { LIB_ROOT.."libfreetype.a" }
local libeventRootPrefix=LIB_ROOT local libeventRootPrefix=LIB_ROOT
if LIBEVENT_ROOT then if LIBEVENT_ROOT then
includedirs { LIBEVENT_ROOT.."/include" } includedirs { LIBEVENT_ROOT.."/include" }
......
...@@ -4,3 +4,8 @@ project "cspmemvfs" ...@@ -4,3 +4,8 @@ project "cspmemvfs"
configuration "windows" configuration "windows"
includedirs { "../../sqlite3" } includedirs { "../../sqlite3" }
configuration "not windows"
if BUILD_SQLITE then
includedirs { "../../sqlite3" }
end
...@@ -8,11 +8,14 @@ solution "ygo" ...@@ -8,11 +8,14 @@ solution "ygo"
IRRKLANG_PRO = true IRRKLANG_PRO = true
end end
end end
if os.ishost("linux") then if not os.ishost("windows") then
if os.getenv("YGOPRO_BUILD_LUA") then if os.getenv("YGOPRO_BUILD_LUA") or os.ishost("macosx") then
BUILD_LUA=true BUILD_LUA=true
end end
if os.getenv("YGOPRO_LINUX_ALL_STATIC") then if os.getenv("YGOPRO_BUILD_SQLITE") then
BUILD_SQLITE=true
end
if os.ishost("linux") and os.getenv("YGOPRO_LINUX_ALL_STATIC") then
BUILD_LUA=true BUILD_LUA=true
LINUX_ALL_STATIC=true LINUX_ALL_STATIC=true
LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/" LIB_ROOT=os.getenv("YGOPRO_LINUX_ALL_STATIC_LIB_PATH") or "/usr/lib/x86_64-linux-gnu/"
...@@ -103,13 +106,17 @@ end ...@@ -103,13 +106,17 @@ end
include "freetype" include "freetype"
include "irrlicht" include "irrlicht"
include "sqlite3" include "sqlite3"
else
if BUILD_LUA then
include "lua"
end
if BUILD_SQLITE then
include "sqlite3/premake4.lua"
end
end end
if os.ishost("linux") then if os.ishost("linux") then
include "irrlicht_linux" include "irrlicht_linux"
end end
if os.ishost("macosx") or BUILD_LUA then
include "lua"
end
if USE_IRRKLANG then if USE_IRRKLANG then
include "ikpmp3" include "ikpmp3"
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