This guide describes how to build 1oom on Windows.
Install MSYS2 following the instructions on http://www.msys2.org/.
After doing all the updates as instructed, launch MSYS2 MSYS and install your toolchain (replace i686 with x86_64 if you want 64-bit EXEs):
pacman -S mingw-w64-i686-toolchain mingw-w64-i686-SDL mingw-w64-i686-SDL_mixer mingw-w64-i686-libsamplerateIf you want to build the SDL2 binaries too (again replacing i686 with x86_64 if you want 64-bit EXEs):
pacman -S mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixerInstall the build tools:
pacman -S git autoconf automake make
Close the shell and launch MSYS2 MinGW 32-bit (or 64-bit respectively) to set up the environment variables.
Use git to clone the source code to a local repository:
git clone https://gitlab.com/KilgoreTroutMaskReplicant/1oom.gitNow you have a copy of 1oom source code in a directory named "1oom". Let's go into it:
cd 1oomLet's check where we are:
pwdThe rest of this document assumes the output from that command was /home/USERNAME/1oom.
Let's set 1oom up for the first configure:
autoreconf -fiThis needs to be done only once, right after the git clone.
Let's create a build directory to keep the src directory clean.
mkdir build-native cd build-native
Next we configure the source code for the first compile:
../configureYou should see a bunch of text that ends with something like:
config.status: creating src/hw/sdl/Makefile config.status: creating src/hw/sdl/1/Makefile config.status: creating src/hw/sdl/2/Makefile config.status: creating src/hw/alleg/Makefile config.status: creating src/hw/alleg/4/Makefile config.status: creating src/config.h config.status: executing depfiles commandsIf you instead get an error about SDL or SDL2 then be sure to send config.log along with complaints. The Allegro 4 warning can be safely ignored.
The configure step needs to be done (manually) only once. If you got this far, steps 1 to 5 can be forgotten.
Compiling the code is simple:
makeIf you have a multicore processor (and who doesn't these days) you can make it go faster:
make -j 3You should see a bunch of text that ends with something like:
gcc -g -O3 -Wall -Wno-inline -Wstrict-prototypes -o 1oom_classic_sdl1 fmt_mus.o fmt_sfx.o ... -lSDLmain -lSDL -lsamplerate ... make: Leaving directory '/home/USERNAME/1oom/build-native/src' make: Entering directory '/home/USERNAME/1oom/build-native' make: Nothing to be done for 'all-am'. make: Leaving directory '/home/USERNAME/1oom/build-native'The built binaries reside in /home/USERNAME/1oom/build-native/src.
Try to run the freshly built 1oom_classic_sdl1.exe using the usual Windows method. It will complain about a missing DLL file. To fix that, copy the DLL file (for example SDL.dll) to the src directory (replace mingw32 with mingw64 if you chose to build 64-bit EXEs):
cp /mingw32/SDL.dll src/Try to run again and copy the next missing DLL file (tip: press Up/Down to access previous commands).
Eventually 1oom will start and complain about missing LBX files. Copy those to /home/USERNAME/1oom/build-native/src.
Congratulations! You have made a working 1oom build. Enjoy software freedom!
The freshly built executables are rather large due to included debugging data. To get rid of the fat:
If you have made a neat change that you wish to share, the quick and dirty way to make a patch file:
git diff > my_cool_feature.patchTo make a proper patch, please refer to git documentation. Please read HACKING if you want your patch to be included in 1oom.
Start MSYS2 again and get back to the local repository:
cd 1oomUpdate to the latest upstream code:
git pullOverview on what changed (q to quit):
git logWhat changed exactly:
git log -pBuild it again:
cd build-native make -j 3