-
Notifications
You must be signed in to change notification settings - Fork 599
Home
A script engine for "yu-gi-oh!" and sample gui
see wiki page.
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 .
to run the ygopro(.exe) at least the following files are necessary:
- /textures
- cards.cdb
- lflist.conf
- strings.conf
- system.conf with the right path to fonts
the simplest way is to copy the executable and cards.cdb to the root directory of this repository
the full functionality of ygopro need the following in addition:
- /pics
- /pics/thumbnail
- /script
to be added
to be added