Building on Windows - salix5/ygopro GitHub Wiki
Modified from https://github.com/Fluorohydride/ygopro/wiki/Building-on-Windows
Preparation
Download
-
YGOPro distribution
It is used to obtain cards database and pictures, in which database is necessary
-
VS2015 and above versions can be used theoretically. During installation, select Desktop development with C++
-
(and a GitHub account)
-
There are two kinds of project description files, premake and cmake, but cmake has not been maintained recently
Dependency Libraries
At present, there is no mature solution for the installation of dependency library on windows, so it is recommended to download source code manually and compile statically
-
Only this version has been tested, and the new version may work
-
Only this version has been tested. It is not recommended to use the new version for the time being
-
Only this version has been tested and needs to be patched with Chinese support
-
Versions 5.2 and earlier are not supported
-
Non open source, download the 32-bit version, can be disabled by changing
USE_IRRKLANG
in premake5.lua, the result is no sound
Download repo
Just use git clone
, and add --recursive
to clone sub modules at the same time, or run git submodule update --init
after completion
After cloning is finished, enter the ocgcore
and script
sub-module dirs and checkout
to master
branch.
Commands:
git clone https://github.com/salix5/ygopro.git
cd ygopro
git submodule update --init
cd ocgcore/
git checkout master
cd ..
cd script/
git checkout master
cd ..
Install Dependency Libraries
-
Unzip the downloaded libevent to the project folder and rename it to
event
-
Unzip the downloaded freetype to the project folder and rename it to
freetype
-
Unzip the downloaded irrlicht to the project folder and rename it to
irrlicht
-
Unzip the downloaded irrKlang to the project folder and rename it to
irrKlang
-
Unzip the downloaded lua to the project folder and rename it to
lua
-
Unzip the downloaded sqlite3 to the project folder and rename it to
sqlite3
(There is a "3") -
Copy all folders in the premake folder to the project folder, which contains the premake description files of each dependent library, which can be modified and improved by yourself
Irrlicht 1.8.5 (custom)
Irrlicht 1.8.5 has many problems, including but not limited to:
- does not support CJK characters copy and paste
- does not support input method
- dereference nullptr in
~SMaterialLayer()
Please use the modified version.
Generate project files and compile
Install premake5.exe and add it to PATH, or put it directly into the project folder and run
premake5 vs2022
Then you can use VS to open the YGOPro.sln file in the build folder and compile
At this time, the directory structure should look like this after omitting redundant files:
├─bin
├─build
├─cmake
├─event
│ └─include
├─freetype
│ ├─include
│ └─src
├─gframe
├─irrKlang
│ ├─bin
│ ├─include
│ └─lib
├─irrlicht
│ ├─include
│ └─source
│ └─Irrlicht
├─lua
│ └─src
├─ocgcore
├─premake
├─script
├─sound
├─sqlite3
└─textures
Run and Debug
Copy cards.cdb
and the pics
folder, the deck
folder and the replay
folder from the distribution to the project root directory
Copy the 3 DLL of irrklang from irrklang\bin\win32-visualStudio
to the project root directory
Then copy ygopro.exe
generated in bin\release
or bin\debug
to the project root directory to run
You can also specify the working directory in VS as the YGOPro directory you are using for direct debugging
Using irrKlang pro
Irrklang is a commercial software, but all its features are free, but the free version must be released with DLL and cannot be statically compiled, so it is not necessary to use its pro version
If you must use pro version, after purchase, you can compile ikpMP3 in plugins together. The specific process is omitted
But in VS debugging, you need to use the free version of lib, and the pro version of lib does not support debugging