Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
hfc2x

Building Chocolate Doom

Recommended Posts

Hey there. Does anyone have up-to-date instructions on how to build the Chocolate Doom Windows binaries? Doesn't matter if it's cross-building.

 

I downloaded the 3.0.0 source code, and made some modifications just for personal use, but the instructions on the ChocoDoom  wiki, on Github, and even Linguica's Tutorial are all out of date and won't work whatsoever.

Share this post


Link to post
2 hours ago, hfc2x said:

Doesn't matter if it's cross-building.

In that case, it's probably easiest to set up Arch and install mingw-w64-* packages from AUR (mignw-w64-gcc, mingw-w64-sdl2, ...), and running ./configure --host=i686-w64-mingw32. On Windows itself, msys2 probably works well, I mainly say that because it uses the same package manager as Arch but I've never personally tried it.

 

Sorry, I know it's not too helpful. the official releases are done by fraggle via, I believe, Debian, and we don't have anyone actively maintaining the Windows workflow.

Share this post


Link to post

You'll need MSYS2. Follow the instructions listed here (although you should open up MSYS2 MinGW 64-bit if you want to compile a 64-bit binary, and MSYS2 MinGW (32-bit) for a 32-binary. I do NOT recommend you using MSYS2 MSYS for anything except the installation of packages from pacman, and the other batch files can do that just fine) . Afterwards, you'll need to enter the following code into your MSYS2 terminal:

pacman -S base-devel msys2-devel mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain autotools automake autogen autobuild cmake make subversion mercurial mingw-w64-x86_64-gcc mingw-w64-i686-gcc  mingw-w64-x86_64-libsamplerate mingw-w64-i686-libsamplerate mingw-w64-x86_64-make mingw-w64-i686-make mingw-w64-x86_64-gpp mingw-w64-i686-gpp mingw-w64-x86_64-g++ mingw-w64-i686-g++ mingw-w64-i686-SDL mingw-w64-i686-SDL2 mingw-w64-i686-SDL_gfx mingw-w64-i686-SDL_image mingw-w64-i686-SDL_mixer mingw-w64-i686-SDL_net mingw-w64-i686-SDL_ttf mingw-w64-i686-SDL2_gfx mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_mixer mingw-w64-i686-SDL2_net mingw-w64-i686-SDL2_ttf mingw-w64-x86_64-SDL mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL_gfx mingw-w64-x86_64-SDL_image mingw-w64-x86_64-SDL_mixer mingw-w64-x86_64-SDL_net mingw-w64-x86_64-SDL_ttf mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-dumb mingw-w64-i686-dumb mingw-w64-x86_64-portmidi mingw-w64-i686-portmidi

With that, enter your chocolate doom directory (although I would have preferred using the git repository, but since you already made your changes...) and type (if necessary, ./autogen.sh . then...) ./configure , then make. When and if it successfully builds, you'll find the exes you'll need in the src directory. Copy them to another directory. One last thing, in the MSYS2 shell, type ldd chocolate-doom.exe (or ldd whateveryourexeiscalled.exe). Open up a text editor and copy the contents of that command to it. Remove every dll listed that doesn't originate from the msys2 folders. You'll need to copy each of the remaining dlls to where you copied the binaries to.

edit: Kinda sorta ninja'd by @chungy?

Share this post


Link to post
2 minutes ago, Danfun64 said:

One last thing, in the MSYS2 shell, type ldd chocolate-doom.exe (or ldd whateveryourexeiscalled.exe). Open up a text editor and copy the contents of that command to it. Remove every dll listed that doesn't originate from the msys2 folders. You'll need to copy each of the remaining dlls to where you copied the binaries to.

You can also "cd pkg/win32 && make" assuming you have Python installed too. It automatically does all of that.

Share this post


Link to post

Didn't know that. Thank you!

 

edit: and since my instructions might have been unclear, I meant remove the non msys2 dlls from the text editor output. I do not in _any_ way recommend you delete those dlls from your hard drive lol.

 

...sure, it's obvious, but you can't be too careful.

Share this post


Link to post

Okay, so I tried both of these methods, and none of them work either. The problem with Arch Linux is that it doesn't recognize my proper keyboard layout, with the default one being very.. strange, and trying to set the right one is kinda very difficult, since the console does not let me scroll up to see the full list of available keyboard layouts for my computer.

 

And this

On 13/2/2018 at 7:38 PM, Danfun64 said:

You'll need MSYS2. Follow the instructions listed here (although you should open up MSYS2 MinGW 64-bit if you want to compile a 64-bit binary, and MSYS2 MinGW (32-bit) for a 32-binary. I do NOT recommend you using MSYS2 MSYS for anything except the installation of packages from pacman, and the other batch files can do that just fine) . Afterwards, you'll need to enter the following code into your MSYS2 terminal:


pacman -S base-devel msys2-devel mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain autotools automake autogen autobuild cmake make subversion mercurial mingw-w64-x86_64-gcc mingw-w64-i686-gcc  mingw-w64-x86_64-libsamplerate mingw-w64-i686-libsamplerate mingw-w64-x86_64-make mingw-w64-i686-make mingw-w64-x86_64-gpp mingw-w64-i686-gpp mingw-w64-x86_64-g++ mingw-w64-i686-g++ mingw-w64-i686-SDL mingw-w64-i686-SDL2 mingw-w64-i686-SDL_gfx mingw-w64-i686-SDL_image mingw-w64-i686-SDL_mixer mingw-w64-i686-SDL_net mingw-w64-i686-SDL_ttf mingw-w64-i686-SDL2_gfx mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_mixer mingw-w64-i686-SDL2_net mingw-w64-i686-SDL2_ttf mingw-w64-x86_64-SDL mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL_gfx mingw-w64-x86_64-SDL_image mingw-w64-x86_64-SDL_mixer mingw-w64-x86_64-SDL_net mingw-w64-x86_64-SDL_ttf mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-dumb mingw-w64-i686-dumb mingw-w64-x86_64-portmidi mingw-w64-i686-portmidi

With that, enter your chocolate doom directory (although I would have preferred using the git repository, but since you already made your changes...) and type (if necessary, ./autogen.sh . then...) ./configure , then make. When and if it successfully builds, you'll find the exes you'll need in the src directory. Copy them to another directory. One last thing, in the MSYS2 shell, type ldd chocolate-doom.exe (or ldd whateveryourexeiscalled.exe). Open up a text editor and copy the contents of that command to it. Remove every dll listed that doesn't originate from the msys2 folders. You'll need to copy each of the remaining dlls to where you copied the binaries to.

edit: Kinda sorta ninja'd by @chungy?

Doesn't work because MSYS2 tells me it cannot find autotools, autobuild, mingw-w64-x86_64-gpp, mingw-w64-i686-gpp, mingw-w64-x86_64-g++ and mingw-w64-i686-g++, and either using the command you provided, or trying to install them one by one says it couldn't find them either, so it doesn't allow me to proceed.

Share this post


Link to post

I managed to get MSYS2 to work

 

I'll document steps in more detail on the wiki (probably replacing the cygwin page... I doubt anyone minds), but in general:

 

1. Install msys2, run it after the install completes.

2. Update it! `pacman -Syu` first, it will print a warning message that you need to close msys2 without exiting back to the shell. Merely trying to use the "X" on the mintty terminal didn't really work, I went into Task Manager to kill mintty.exe, bash.exe, and pacman.exe.

3. Update it the second time, using `pacman -Su`, this will pull in the rest of the package updates there are.

4. Install all your dependencies: `pacman -S base-devel git mingw-w64-i686-{toolchain,SDL2{,_net,_mixer},libsamplerate,libpng} msys2-devel python zip`

5. Clone the git repository: `git clone https://github.com/chocolate-doom/chocolate-doom`

6. Make sure that you are using the proper terminal for the Chocolate build, so the $PATH and other variables point to the right place. Use the "MSYS2 MinGW 32-bit" shortcut to do this for a 32-bit build.

7. Change to the Chocolate Doom directory and configure: `cd chocolate-doom && ./autogen.sh --host=i686-w64-mingw32`

8. Compile it with `make`

9. Build Windows release Zips: `cd pkg/win32 && make`

 

You can then browse to your `C:\msys64\home\user\chocolate-doom\pkg\win32` directory and either copy the Zips somewhere or just run it directly from the staging-* directories. Also change the "i686" in the above instructions to "x86_64" if you want a 64-bit build, and use the "MSYS MinGW 64-bit" shortcut instead for it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×