-
Notifications
You must be signed in to change notification settings - Fork 597
build (obsoleted)
get source code
git clone https://github.com/Fluorohydride/ygopro.git
cd ygopro
git submodule update --init --recursive
download source code of dependences:
Libevent: https://github.com/libevent/libevent/archive/release-2.1.11-stable.zip
Freetype: https://www.freetype.org/download.html
Sqlite: https://www.sqlite.org/download.html
Irrlicht: http://irrlicht.sourceforge.net/?page_id=10
Lua: http://www.lua.org/ftp/lua-5.3.5.tar.gz
extract them to the ygopro
folder, changes the name of source code folders to event freetype irrlicht sqlite3 lua
the file structure should as follows
ygopro
event
CMakeLists.txt
...
freetype
CMakeLists.txt
...
irrlicht
...
sqlite3
sqlite3.h
...
lua
...
CMakeLists.txt
...
Libevent and Freetype are already cmake projects, we need add CMakeLists.txt to sqlite3, lua and irrlicht:
project (sqlite3)
set (SRC_FILES sqlite3.h sqlite3.c)
source_group(src FILES ${SRC_FILES})
add_library (sqlite3 STATIC ${SRC_FILES})
project (lua)
set (AUTO_FILES_RESULT)
AutoFiles("." "src" "\\.(cpp|c|h)$" "lua.c|luac.c")
set_source_files_properties(${AUTO_FILES_RESULT} PROPERTIES LANGUAGE CXX)
add_library (lua STATIC ${AUTO_FILES_RESULT})
for irrlicht, you can refer to https://github.com/DailyShana/irrlicht
Then generate project files to build:
# out-of-source build
mkdir build && cd build
# generate visual studio project
# to target WinXP, add -T "v141_xp"
cmake -G "Visual Studio 15 2017" ..
# or other version of visual studio
# config
cmake -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_DEBUG_MODE=ON -DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_REGRESS=ON -DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=ON .
# build
cmake --build . --config Release
# or open \build\ygopro.sln to build
# or use cmake GUI(ccmake or cmake-gui) to config and generate project files
# see https://cmake.org/runningcmake/
install dependencies
# Debian/Ubuntu
sudo apt install libfreetype6-dev libevent-dev libsqlite3-dev libirrlicht-dev liblua5.3-dev libgl1-mesa-dev libglu-dev
# If build dependencies from source, note that the lua library must be built as c++
get source code
git clone https://github.com/Fluorohydride/ygopro.git
cd ygopro
git submodule update --init --recursive
Then generate and build
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ..
cmake --build .
I'm using Windows 7 and Visual Sudio 2010 for this setup. Similar procedure can be applied for other versions of windows and visual studio.
-
Get the following packages from the link given
-
Download the
ygopro
source from here. -
Build libevent using visual studio command prompt (from start menu in visual studio sdk).
-
Extract the
libevent-2.0.22-stable.tar.gz
compressed file andcd
to it from the visual studio command prompt. -
Type
nmake Makefile.nmake
. This will generate aevent.lib
file. -
Copy the include directory to
ygopro-master/event
. Also copy the files fromWIN32-Code
to theygopro-master/event/include
directory, maintaining the structure. -
Copy the
event.lib
toygopro-master/event/lib
. -
Extract the
freetype-2.3.5-1-bin.zip
file and copy the include folder toygopro-master/freetype
. Also copy the lib folder toygopro-master/freetype
. -
Now we'll build
irrlicht
. -
Extract the
irrlicht-1.8.1.zip
and open theirrlicht-1.8.1/source/Irrlicht/Irrlicht10.0.sln
. -
Open
IrrCompileConfig.h
from the visual studio solution bar. Find the line#define _IRR_COMPILE_WITH_DIRECT3D_9_
and comment it. -
Find the line
#define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
and comment it. -
Now select
Static lib Debug
in visual studio and buildirrlicht
. -
Copy the include folder to
ygopro-master/irrlicht
. Also copy the filelib/Win64-visualStudio/Irrlicht.lib
to folderygopro-master/irrlicht/lib
. -
Now we'll build
lua
in visual studio. -
Extract the file
lua-5.2.0.tar.gz
. -
Open visual studio and create an empty c++ project at any desired location.
-
Now in the
header
folder(in visual studio) right click to add an existing item. Now select all the.hpp
and.h
files. -
Now right click the
source
folder and selectadd existing item
and select all.c
and files. Note: In visual studio you must add /FORCE to the Additional Options section under Project/project properties/Linker/Command line. Note: In visual studio you must Project/Project properties/(C/C++)/Advanced/Disable Specific Warnings to 4996. -
Build the project (Debug or Release).
-
Copy
lauxlib.h
,lua.h
,lua.hpp
,luaconf.h
andlualib.h
toygopro-master/lua/include
. Also copy thelua.lib
from theDebug
folder (fromLua
project we just build) toygopro-master/lua/lib
. -
Extract
sqlite-amalgamation-3081002.zip
andcd
to this directory ffrom the visual studio command prompt. Typelib /def:sqlite3.def /out:sqlite3.lib
. This will generate asqlite3.lib
file. Copy the.h
files toygopro-master/sqlite3/include
andsqlite3.lib
toygopro-master/sqlite3/lib
. -
Extract
premake-stable-windows.zip
toygopro-master/
. -
Open
ygopro-master/premake4.lua
and delete the following line.if os.is("windows") then include "event" include "freetype" include "irrlicht" include "lua" include "sqlite3" end
-
cd
toygopro-master
folder from the command prompt and typepremake4 vs2010
. -
Move the following files and folder from
ygopro-master
toygopro/build
script/ single/ textures/ cards.cdb lflist.conf strings.conf system.conf
-
Open
ygopro-master/build/system.conf
in any editor and assignuse_d3d
to0
. (This is important) -
Open
ygopro-master/ygo.sln
in visual studio and add all theinclude
andlib
folder to your project. -
Create an empty file named
ygopro.rc
inygopro-master/gframe
folder and build the project. -
You will be needing
freetype6.dll
,sqlite3.dll
andzlib1.dll
which can be found in the there source package or can be downloaded from the internet.
sudo yum install git gcc gcc-c++ make premake freetype-devel libevent-devel sqlite-devel http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/Packages/i/irrXML-1.2-11.fc17.x86_64.rpm http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/Packages/i/irrXML-devel-1.2-11.fc17.x86_64.rpm http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/Packages/i/irrlicht-1.7.2-11.fc17.x86_64.rpm http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Everything/x86_64/os/Packages/i/irrlicht-devel-1.7.2-11.fc17.x86_64.rpm
git clone https://github.com/Fluorohydride/ygopro.git
cd ygopro
premake4 gmake
cd build
wget http://www.lua.org/ftp/lua-5.2.1.tar.gz
tar vfx lua-5.2.1.tar.gz
cd lua-5.2.1
sudo cp src/* /usr/include/
make linux
sudo make install
cd ..
make
sudo pacman -S gcc make premake freetype2 libevent sqlite irrlicht lua git
git clone https://github.com/Fluorohydride/ygopro.git
cd ygopro
premake4 gmake
make -Cbuild
sudo apt-get install build-essential git libirrlicht-dev libfreetype6-dev libglu1-mesa-dev libevent-dev liblua5.2-dev libsqlite3-dev premake4
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/lib/x86_64-linux-gnu/liblua.so
git clone https://github.com/Fluorohydride/ygopro.git
cd ygopro
git submodule update --init --recursive
premake4 gmake
make -Cbuild
game is in bin/debug
you might need to init git submodules ocgcore
and script
before you start compiling
cd ygopro
git submodule update --init --recursive
premake4 gmake
maybe you will get the warning Permission Denied
please edit the .git/config
[submodule "ocgcore"]
active = true
url = https://github.com/Fluorohydride/ygopro-core.git
[submodule "script"]
active = true
url = https://github.com/Fluorohydride/ygopro-scripts.git
if you get this error attempt to call global 'startproject' (a nil value)
please edit the file ygopro/premake4.lua to delete this line:
startproject "ygopro"
reference :Startup projects are currently only supported by Visual Studio.
you need to modified the system.conf
textfont = /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc 14
numfont = /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
finished!