Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MobiusMei
ygopro
Commits
3954dd36
Commit
3954dd36
authored
Jul 09, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linux build
parent
fb6c4de7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
53 deletions
+159
-53
.ci/pack-linux.sh
.ci/pack-linux.sh
+1
-1
.gitlab-ci.yml
.gitlab-ci.yml
+33
-19
gframe/premake4.lua
gframe/premake4.lua
+36
-6
premake/freetype/premake4.lua
premake/freetype/premake4.lua
+40
-10
premake5.lua
premake5.lua
+49
-17
No files found.
.ci/pack-linux.sh
View file @
3954dd36
...
...
@@ -6,4 +6,4 @@ set -o errexit
apt update
&&
apt
-y
install tar
git
git submodule update
--init
mkdir
dist replay
tar
-zcf
dist/ygopro-
$CI_COMMIT_REF_NAME
-linux-
$TARGET_LOCALE
.tar.gz
--exclude
=
'.git*'
ygopro LICENSE README.md lib
IrrKlang.so
lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
tar
-zcf
dist/ygopro-
$CI_COMMIT_REF_NAME
-linux-
$TARGET_LOCALE
.tar.gz
--exclude
=
'.git*'
ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
.gitlab-ci.yml
View file @
3954dd36
...
...
@@ -11,18 +11,27 @@ variables:
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
# freetype
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.4.tar.gz | tar zfx -
-
mv freetype-2.10.4 freetype
# premake
-
cp -rf premake/* .;
artifacts
:
paths
:
-
lua
-
freetype
-
sqlite3
mat_irrklang
:
stage
:
prepare
...
...
@@ -47,10 +56,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_macos
:
stage
:
prepare
...
...
@@ -82,13 +99,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
# freetype
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.10.1.tar.gz | tar zfx -
-
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
-
wget https://cdn01.moecube.com/ygopro-build-materials/irrlicht-1.8.4.zip
-
7z x -y irrlicht-1.8.4.zip
...
...
@@ -99,8 +109,6 @@ mat_windows:
paths
:
-
premake5.exe
-
event
-
freetype
-
sqlite3
-
irrlicht
exec_windows
:
...
...
@@ -108,7 +116,7 @@ exec_windows:
tags
:
-
vs
dependencies
:
-
mat_
lua
-
mat_
common
-
mat_irrklang
-
mat_windows
variables
:
...
...
@@ -132,7 +140,12 @@ exec_linux:
stage
:
build
tags
:
-
linux
variables
:
YGOPRO_BUILD_ALL
:
'
1'
YGOPRO_LINUX_ALL_STATIC
:
'
1'
YGOPRO_LINUX_ALL_STATIC_LIB_PATH
:
'
/usr/lib/x86_64-linux-gnu/'
dependencies
:
-
mat_common
-
mat_irrklang
-
mat_linux
cache
:
...
...
@@ -140,19 +153,20 @@ exec_linux:
-
bin/
-
obj/
script
:
-
apt update; apt -y install git build-essential lib
freetype6-dev libevent-dev libsqlite3-dev libgl1-mesa-dev libglu-dev liblua5.3
-dev libxxf86vm-dev
-
apt update; apt -y install git build-essential lib
gl1-mesa-dev libglu
-dev libxxf86vm-dev
-
git submodule update --init
-
./premake5 gmake
-
mkdir lib
-
cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/
-
YGOPRO_LINUX_ALL_STATIC_LIBEVENT_PATH=$PWD/libevent-stable ./premake5 gmake
-
cd build
-
make config=release -j$(nproc)
-
cd ..
-
mv bin/release/ygopro .
-
strip ygopro
-
cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so .
artifacts
:
paths
:
-
ygopro
-
lib
IrrKlang.so
-
lib
exec_macos
:
stage
:
build
...
...
@@ -161,14 +175,14 @@ exec_macos:
dependencies
:
-
mat_irrklang
-
mat_macos
-
mat_
lua
-
mat_
common
cache
:
paths
:
-
bin/
-
obj/
script
:
-
git submodule update --init
-
brew install
freetype libevent sqlite
dylibbundler
-
brew install
libevent
dylibbundler
-
sudo cp -rf irrklang/bin/macosx-gcc/libirrklang.dylib /usr/local/lib/
#- sudo cp -rf irrklang/include /usr/local/include/irrklang
-
./premake5 gmake --cc=clang
...
...
gframe/premake4.lua
View file @
3954dd36
...
...
@@ -7,7 +7,10 @@ project "ygopro"
files
{
"**.cpp"
,
"**.cc"
,
"**.c"
,
"**.h"
}
excludes
{
"lzma/**"
,
"spmemvfs/**"
}
includedirs
{
"../ocgcore"
}
links
{
"ocgcore"
,
"clzma"
,
"cspmemvfs"
,
"Irrlicht"
,
"freetype"
,
"sqlite3"
,
"event"
}
links
{
"ocgcore"
,
"clzma"
,
"cspmemvfs"
,
"Irrlicht"
,
"sqlite3"
,
"freetype"
}
if
not
LINUX_ALL_STATIC
then
links
{
"event"
}
end
if
USE_IRRKLANG
then
defines
{
"YGOPRO_USE_IRRKLANG"
}
links
{
"ikpmp3"
}
...
...
@@ -17,6 +20,10 @@ project "ygopro"
end
end
configuration
"not linux"
if
LINUX_ALL_STATIC
then
links
{
"event"
}
end
configuration
"windows"
files
"ygopro.rc"
excludes
"CGUIButton.cpp"
...
...
@@ -42,21 +49,44 @@ project "ygopro"
configuration
"not vs*"
buildoptions
{
"-std=c++14"
,
"-fno-rtti"
}
configuration
"not windows"
includedirs
{
"/usr/include/irrlicht"
,
"/usr/include/freetype2"
}
excludes
{
"COSOperator.*"
}
links
{
"event_pthreads"
,
"dl"
,
"pthread"
}
links
{
"dl"
,
"pthread"
}
if
not
LINUX_ALL_STATIC
then
links
{
"event_pthreads"
}
end
if
BUILD_SQLITE
then
includedirs
{
"../sqlite3"
}
end
if
BUILD_FREETYPE
then
includedirs
{
"../freetype/include"
}
else
includedirs
{
"/usr/include/freetype2"
}
end
configuration
{
"not windows"
,
"not macosx"
}
links
"GL"
configuration
"linux"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
,
"-Wl,-rpath=./lib/"
}
includedirs
{
"../irrlicht_linux/include"
}
links
{
"X11"
,
"Xxf86vm"
,
"lua5.3-c++"
}
if
BUILD_LUA
then
links
{
"lua"
}
else
links
{
"lua5.3-c++"
}
end
links
{
"X11"
,
"Xxf86vm"
}
if
LINUX_ALL_STATIC
then
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"
}
end
if
USE_IRRKLANG
then
links
{
"IrrKlang"
}
linkoptions
{
"-Wl,-rpath=./"
}
libdirs
{
"../irrklang/bin/linux-gcc-64"
}
end
configuration
"macosx"
links
{
"lua"
}
links
{
"lua"
}
includedirs
{
"../irrlicht/include"
}
libdirs
{
"../irrlicht"
}
if
USE_IRRKLANG
then
...
...
premake/freetype/premake4.lua
View file @
3954dd36
...
...
@@ -4,16 +4,46 @@ project "freetype"
includedirs
{
"include"
}
defines
{
"FT2_BUILD_LIBRARY"
}
files
{
"src/autofit/autofit.c"
,
"src/bdf/bdf.c"
,
"src/cff/cff.c"
,
"src/base/ftbase.c"
,
"src/base/ftbitmap.c"
,
"src/cache/ftcache.c"
,
"src/base/ftfstype.c"
,
"src/base/ftgasp.c"
,
"src/base/ftglyph.c"
,
"src/gzip/ftgzip.c"
,
"src/base/ftinit.c"
,
"src/lzw/ftlzw.c"
,
"src/base/ftstroke.c"
,
"src/base/ftsystem.c"
,
"src/smooth/smooth.c"
,
"src/base/ftbbox.c"
,
"src/base/ftfntfmt.c"
,
"src/base/ftmm.c"
,
"src/base/ftpfr.c"
,
"src/base/ftsynth.c"
,
"src/base/fttype1.c"
,
"src/base/ftwinfnt.c"
,
"src/base/ftlcdfil.c"
,
"src/base/ftgxval.c"
,
"src/base/ftotval.c"
,
"src/base/ftpatent.c"
,
"src/pcf/pcf.c"
,
"src/pfr/pfr.c"
,
"src/psaux/psaux.c"
,
"src/pshinter/pshinter.c"
,
"src/psnames/psmodule.c"
,
"src/raster/raster.c"
,
"src/sfnt/sfnt.c"
,
"src/truetype/truetype.c"
,
"src/type1/type1.c"
,
"src/cid/type1cid.c"
,
"src/type42/type42.c"
,
"src/winfonts/winfnt.c"
}
files
{
"src/autofit/autofit.c"
,
"src/base/ftbase.c"
,
"src/base/ftbbox.c"
,
"src/base/ftbdf.c"
,
"src/base/ftbitmap.c"
,
"src/base/ftcid.c"
,
"src/base/ftfstype.c"
,
"src/base/ftgasp.c"
,
"src/base/ftglyph.c"
,
"src/base/ftgxval.c"
,
"src/base/ftinit.c"
,
"src/base/ftmm.c"
,
"src/base/ftotval.c"
,
"src/base/ftpatent.c"
,
"src/base/ftpfr.c"
,
"src/base/ftstroke.c"
,
"src/base/ftsynth.c"
,
"src/base/ftsystem.c"
,
"src/base/fttype1.c"
,
"src/base/ftwinfnt.c"
,
"src/bdf/bdf.c"
,
"src/cache/ftcache.c"
,
"src/cff/cff.c"
,
"src/cid/type1cid.c"
,
"src/gzip/ftgzip.c"
,
"src/lzw/ftlzw.c"
,
"src/pcf/pcf.c"
,
"src/pfr/pfr.c"
,
"src/psaux/psaux.c"
,
"src/pshinter/pshinter.c"
,
"src/psnames/psmodule.c"
,
"src/raster/raster.c"
,
"src/sfnt/sfnt.c"
,
"src/smooth/smooth.c"
,
"src/truetype/truetype.c"
,
"src/type1/type1.c"
,
"src/type42/type42.c"
,
"src/winfonts/winfnt.c"
}
configuration
"windows"
files
{
"builds/windows/ftdebug.c"
}
configuration
"not windows"
files
{
"src/base/ftdebug.c"
}
premake5.lua
View file @
3954dd36
...
...
@@ -8,6 +8,31 @@ solution "ygo"
IRRKLANG_PRO
=
true
end
end
if
not
os
.
ishost
(
"windows"
)
then
if
os.getenv
(
"YGOPRO_BUILD_LUA"
)
then
BUILD_LUA
=
true
end
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"
}
configuration
"windows"
...
...
@@ -33,8 +58,8 @@ solution "ygo"
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"
,
}
libdirs
{
"/usr/local/lib"
}
buildoptions
{
"-stdlib=libc++"
}
links
{
"OpenGL.framework"
,
"Cocoa.framework"
,
"IOKit.framework"
}
...
...
@@ -76,19 +101,26 @@ solution "ygo"
include
"ocgcore"
include
"gframe"
if
os
.
ishost
(
"macosx"
)
then
include
"lua"
end
if
os
.
ishost
(
"windows"
)
then
include
"lua"
include
"event"
include
"freetype"
include
"irrlicht"
include
"sqlite3"
end
if
os
.
ishost
(
"windows"
)
then
include
"lua"
include
"event"
include
"freetype"
include
"irrlicht"
include
"sqlite3"
else
if
BUILD_LUA
then
include
"lua"
end
if
BUILD_SQLITE
then
include
"sqlite3/premake4.lua"
end
if
BUILD_FREETYPE
then
include
"freetype"
end
end
if
os
.
ishost
(
"linux"
)
then
include
"irrlicht_linux"
end
if
USE_IRRKLANG
then
include
"ikpmp3"
end
include
"irrlicht_linux"
end
if
USE_IRRKLANG
then
include
"ikpmp3"
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment