Cygwin
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
This guide contains instructions for compiling Cataclysm-BN on Windows under Cygwin.
These instructions were written using 64-bit Windows 7 and the 64-bit version of Cygwin; the steps should be the same for other versions of Windows.
Due to slow environment setup and execution of the resulting binary, compilation using MSYS2 is preferred.
Prerequisites:
- 64-bit version of Windows 7, 8, 8.1, or 10
- NTFS partition with ~10 Gb free space (~2 Gb for Cygwin installation, ~3 Gb for repository and ~5 Gb for ccache)
- 64-bit version of Cygwin
Installation:
-
Go to the Cygwin homepage and download the 64-bit installer (e.g. setup-x86_64.exe).
-
Run downloaded file and install Cygwin. Select
Install from Internet
and select the desired installation directory. It is suggested that you install into a dev-specific directory (e.g.C:\dev\cygwin64
), but it’s not strictly necessary. Install for all users. -
Give the
\downloads\
folder as the local package directory (e.g.C:\dev\cygwin64\downloads
). -
Use system proxy settings unless you know you have a reason not to.
-
On the next screen, select any mirror you like.
-
Enter
wget
into the search box, expand the “Web” category and select the latest version in the drop-down (1.21.1-1 as of the time this guide was written). -
Confirm that wget is shown in the following screen by scrolling to the bottom. This is the full list of packages that Cygwin will download and install.
-
Retry any packages that throw errors.
-
Check boxes to add shortcuts to Start Menu and/or Desktop, then press
Finish
button.
Configuration:
-
Launch the Cygwin64 terminal from your desktop.
-
Install
apt-cyg
for easier package installation:
wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -O /bin/apt-cyg
chmod 755 /bin/apt-cyg
- Install packages required for compilation:
apt-cyg install astyle ccache gcc-g++ intltool git libSDL2_image-devel libSDL2_mixer-devel libSDL2_ttf-devel make xinit
You will see messages saying packages are already installed, as well as Cygwin installing packages you didn’t ask for; this is the result of Cygwin’s package manager automatically resolving dependencies.
Cloning and compilation:
- Clone the Cataclysm-BN repository with following command:
Note: This will download the entire CBN repository and all of its history (3GB). If you’re just
testing, you should probably add --depth=1
(~350MB).
cd /cygdrive/c/dev
git clone https://github.com/cataclysmbnteam/Cataclysm-BN.git
cd Cataclysm-BN
- Compile:
make -j$((`nproc`+0)) CCACHE=1 RELEASE=1 CYGWIN=1 DYNAMIC_LINKING=1 SDL=1 TILES=1 SOUND=1 LANGUAGES=all LINTJSON=0 ASTYLE=0 BACKTRACE=0 RUNTESTS=0
You will receive warnings about unterminated character constants; they do not impact the compilation as far as this writer is aware.
Note: This will compile release version with Sound and Tiles support and all localization
languages, skipping checks and tests and using ccache for faster build. You can use other switches,
but CYGWIN=1
, DYNAMIC_LINKING=1
and BACKTRACE=0
are required to compile without issues.
Running:
-
Execute the XWin Server from the Start menu.
-
When the icons appear in the system tray, right-click the one that looks like a black C (X Applications Menu.)
-
Point to System Tools, then click UXTerm.
cd /cygdrive/c/dev/Cataclysm-BN
./cataclysm-bn-tiles
There is no functionality for running Cygwin-compiled CBN from outside of UXTerm.