Skip to content

Instantly share code, notes, and snippets.

@chungy
Created February 3, 2017 20:19
Show Gist options
  • Save chungy/c207b53b66a8bb164daffcec50de99c1 to your computer and use it in GitHub Desktop.
Save chungy/c207b53b66a8bb164daffcec50de99c1 to your computer and use it in GitHub Desktop.
Compiling Chocolate Doom under Cygwin

Intalling cygwin

Select the packages:

  • autoconf

  • automake

  • git

  • mingw64-i686-SDL2

  • mingw64-i686-SDL2_mixer

  • mingw64-i686-SDL2_net

  • mingw64-i686-gcc-core

  • mingw64-i686-libpng

  • mingw64-i686-libsamplerate

  • pkg-config

  • python

  • zip

python3 should work equally as well as python

zip isn’t required, but if you want to give the build to others…​

Cloning chocolate-doom

Generating ./configure

Either run autoconf -fi or ./autogen.sh. The latter will fail on a fresh Cygwin install, after it runs ./configure, with only the packages I specified, there’s no Cygwin compiler installed. This is fine.

Building

Running ./configure --host i686-w64-mingw32 should succeed at this point.

After doing that, just run make (possibly with -j for a parallelized build)

Running/distributing

At present, doing make -C pkg/win32 doesn’t work, cp-with-libs isn’t passed in parameters that lets it find the mingw64 DLLs Cygwin installs. We can workaround:

  1. cd pkg/win32

  2. mkdir doom

  3. ./cp-with-libs --dll_path=/usr/i686-w64-mingw32/sys-root/mingw/bin ../../src/chocolate-doom-setup.exe doom

  4. ./cp-with-libs --dll_path=/usr/i686-w64-mingw32/sys-root/mingw/bin ../../src/chocolate-doom.exe doom

  5. (Optional) zip -j chocolate-doom-sdl2.zip doom

Conclusion

Failed to have a working build. Trying to run the EXEs results in a out of memory error. Don’t know why. These instructions might still be helpful for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment