-
Notifications
You must be signed in to change notification settings - Fork 75
3. Building
If you installed Premake to PATH
, no need for ./
Windows:
Replace *
with 2015
, 2017
, 2019
, or 2022
for your Visual Studio.
./premake5 vs*
Read at the end for the various premake options.
Open ./build/ygo.sln
in Visual Studio and build from the IDE!
Linux and macOS:
On macOS, make sure you have these environment variables set first, if building for compatibility.
export MACOSX_DEPLOYMENT_TARGET=10.11
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
In both cases:
./premake5 gmake2 --vcpkg-root=YOUR_VCPKG_FOLDER
make -Cbuild -j2
config=debug
is the default and config=release
is supported. Build targets are ocgcore
, ocgcoreshared
, clzma
, ygopro
, and ygoprodll
.
Premake-generated project files are in build
. Built object files are in obj
and final binaries are in the corresponding bin
folder depending on configuration. Remove these folders to start a totally clean build, especially if you changed your project files via Premake, as Visual Studio and Make's clean command might not catch everything.
The premake build scripts have various options used to toggle the build, those options can be set with --option_name=option_value
(make sure to properly escape string options) if they require a parameter, otherwise they can be set with just --option_name
:
-
covers
:url_template
Default URL for cover images -
discord
:app_id_token
Discord App ID for rich presence (if not set no discord integration will be compiled in) -
fields
:url_template
Default URL for Field Spell backgrounds -
no-direct3d
: Disable DirectX options in irrlicht if the DirectX SDK isn't installed -
oldwindows
: Use some workarounds to support up to windows 2000 (requires to have installed the v140_xp (vs2015) or v141_xp (vs2017) toolset, and use the appropriate vcpkg cache archive (installed_x86-windows-static-vs2015.zip
if building with v140_xp orinstalled_x86-windows-static.zip
for v141_xp) -
pics
:url_template
Default URL for card images -
sound
:backend
among one of the supported sound backends:irrklang
sdl-mixer
sfml
-
update-url
:url
API endpoint to check for updates from (if not set, no client auto updating will be compiled in) -
use-mpg123
: Use mpg123 mp3 backend instead of minimp3 (Available only when using SFML audio backend) -
vcpkg-root
:path
Path to vcpkg installation