Building and running Redivivus
source: docs/building.md @ 1b1c2d3
This is the build that delivers a runnable d2.exe today, with a modern compiler. To compile
with the compilers that built the original, Visual C++ 2005 SP1 and Apple LLVM 4.2, with their
flags, see original-compilers.md.
You need
- Your own installation of Diablo II: Lord of Destruction, version 1.14. This repository
contains no game data and no Blizzard binaries; the executable reads the MPQ archives
from your installation. If you have no installation at hand,
blizzard-legacy-dl downloads the
installers from Blizzard's own servers:
blizzard-legacy-dl fetch D2DV -o ./d2 # Diablo II blizzard-legacy-dl fetch D2XP -o ./d2 # Lord of DestructionYou still need your own CD keys to install.
- To build: a mingw-w64 cross compiler for 32-bit Windows (
i686-w64-mingw32-g++), CMake and Ninja.- macOS:
brew install mingw-w64 cmake ninja - Debian/Ubuntu:
apt install g++-mingw-w64-i686 cmake ninja-build - Windows: an MSYS2 MinGW32 shell
- macOS:
Build
cmake -S . -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-i686.cmake
cmake --build buildThat produces build/d2.exe, a 32-bit Windows executable. tools/check-build.sh does
the same from a clean clone and checks the result; CI runs it on every push.
Run
Copy d2.exe into your Diablo II folder, next to the original Game.exe, and
start it from there:
d2.exe -w-w runs it in a window.