svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
239 stars 49 forks source link

Build instructions for Windows #39

Closed SkyeHDD closed 7 years ago

SkyeHDD commented 8 years ago

I've been trying pretty much all night to build this source on Windows to no avail, using multiple VC versions but nothing seems to work. It's just errors on errors on errors.

Which VC should I be using, and where should I put the external dependencies so CMake actually sees them?

Thanks!

pinkwah commented 8 years ago

Currently Windows support is a work in progress. It works, but there are a few minor packaging problems. If you just want to use an updated version of Doom64EX, you can download it here. (It's a pre-pre alpha, hence why I'm being a tiny bit secretive)

To compile it yourself, you'll need:

Extract the dependencies into the /extern/ directory, such that the following directories exist:

Use CMake to generate MinGW Makefiles from the main CMakeLists.txt file and make it. You can also use IDEs with CMake support such as CLion (which is known to work), QtCreator, etc.

Sadly, Visual Studio's C++ Compiler is unsupported at this time because it lacks support for C++14 features.

If you have any further questions, feel free to ask.

SkyeHDD commented 7 years ago

Thanks, I had a feeling MinGW was the key to building this.

EDIT: I built it successfully with a few caveats: I had to import the DLLs from your download to get it to work, and there are some texture issues with glowing objects. I assume this is all known.

SDL2.dll wasn't included and when downloaded it errors out about SDL2Net not having the procedure entrty point SDL_Free. Was fixed by importing the DLLs from your build download.

pinkwah commented 7 years ago

Didn't see your edits, sorry:

I'll close this issue once I update the README.

SkyeHDD commented 7 years ago

Okay thanks!

One other issue: When using -wadgen, the created DOOMSND.SF2 doesn't seem to work or load properly. Here's the console output

WARNING: CVar s_soundfont doesn't point to a file.Found SoundFont C:\Users\CENSORED\AppData\Roaming\\doom64ex\doomsnd.sf2 SoundFont file size mismatch fluidsynth: error: Couldn't load soundfont file fluidsynth: error: Failed to load SoundFont "C:\Users\CENSORED\AppData\Roaming\\doom64ex\doomsnd.sf2" WARNING: I_InitSequencer: Failed to find soundfont file

pinkwah commented 7 years ago

Could you try copying doomsnd.sf2 to the location of the .exe and see if that helps?

SkyeHDD commented 7 years ago

Still no luck with that.

S_Init: Setting up sound. Found SoundFont doomsnd.sf2 SoundFont file size mismatch fluidsynth: error: Couldn't load soundfont file fluidsynth: error: Failed to load SoundFont "doomsnd.sf2" WARNING: I_InitSequencer: Failed to find soundfont file

The only way I can get sound is to use the old DOOMSND.SF2 from the old release build but even then it can sometimes crash when starting a new game.

pinkwah commented 7 years ago

Alright, thanks. I'm assuming that it has something to do with SoundFont file size mismatch. I'll have a closer look when I'm at a Windows PC.

Edit: I think this bug is the culprit: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991

You can try "fixing" it by putting #pragma pack(1) in the beginning of src/engine/wadgen/sndfont.h and then regenerating doomsnd.sf2.

SkyeHDD commented 7 years ago

That did the trick!

It still crashed when starting a new game on Hardcore! only once after compiling, here's the crash info in case you want it but it seems to be working fine for now:

Faulting application name: doom64ex.exe, version: 0.0.0.0, time stamp: 0x57dae435 Faulting module name: doom64ex.exe, version: 0.0.0.0, time stamp: 0x57dae435 Exception code: 0xc0000005 Fault offset: 0x00054458 Faulting process id: 0x42f30 Faulting application start time: 0x01d20f7c95c2058d Faulting application path: D:\Users\CENSORED\Doom\Doom64EX\New folder\doom64ex.exe Faulting module path: D:\Users\CENSORED\Doom\Doom64EX\New folder\doom64ex.exe Report Id: 46f6bc61-6694-414c-92af-3942112fa6bc Faulting package full name: Faulting package-relative application ID: