-
Notifications
You must be signed in to change notification settings - Fork 117
Building PrBoom Plus on Windows
This is a basic guide for building PrBoom-Plus for a 32-bit Windows target using MSYS2.
Download and install MSYS2. Run "MSYS2 MinGW 32-bit" from the Start Menu. In the terminal window, type:
pacman -Syu
If the window closes during updating, run "MSYS2 MinGW 32-bit" from the Start Menu again. Now type:
pacman -Su
Next, install some standard tools:
pacman -S --needed --noconfirm git zip base-devel mingw-w64-i686-cmake mingw-w64-i686-toolchain \
--ignore=mingw-w64-i686-gcc-ada,mingw-w64-i686-gcc-fortran,mingw-w64-i686-gcc-libgfortran,mingw-w64-i686-gcc-objc
Install SDL2 and additional dependencies for PrBoom-Plus:
pacman -S --needed --noconfirm mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_net mingw-w64-i686-SDL2_image \
mingw-w64-i686-pcre mingw-w64-i686-SDL2_mixer mingw-w64-i686-fluidsynth mingw-w64-i686-portmidi \
mingw-w64-i686-libmad mingw-w64-i686-dumb mingw-w64-i686-libvorbis
Make a clone of the PrBoom-Plus Git repository:
git clone https://github.com/coelckers/prboom-plus
Prepare the build folder, generate the build system, and compile:
cd prboom-plus/prboom2
mkdir build
cd build
cmake .. -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release
make
Note: Instead of make
, consider using make -j4
or make -j$(nproc)
to speed up compiling.
The newly built .exe files are located in the build folder.
Create a release folder next to the build folder and copy the .exe and .wad files to it:
cd ..
mkdir release
cp ./build/*.exe ./release/
cp ./build/*.wad ./release/
Download the "mingw-bundledlls" script:
cd ~
git clone https://github.com/mpreisler/mingw-bundledlls
cd mingw-bundledlls
Open the "mingw-bundledlls" file with a text editor. Change DEFAULT_PATH_PREFIXES
to the following:
DEFAULT_PATH_PREFIXES = ["C:/msys64/mingw32/bin"]
Make two more edits:
- Add
"dsound.dll"
toblacklist
- Change
shutil.copy
toshutil.copy2
Save the changes. Run the script on each .exe file:
./mingw-bundledlls --copy ~/prboom-plus/prboom2/release/prboom-plus.exe
./mingw-bundledlls --copy ~/prboom-plus/prboom2/release/prboom-plus-game-server.exe
The .dll files used by PrBoom-Plus are now in the release folder.
Since this is a release build, it's customary to remove symbols from the .exe files:
cd ~/prboom-plus/prboom2/release
strip *.exe
Finally, add the files to an archive with today's date:
zip -j -r ~/prboom-plus-$(date +"%Y%m%d")-win32.zip *