Compiling ScummVM and the Scumm Engine only

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Compiling ScummVM and the Scumm Engine only

Post by Windows TV »

So my question is simple, how do I compile ScummVM with the Scumm Engine only? I'm compiling it with Visual Studios but it always hangs because it's trying to compile every engine. I just need to build ScummVM with the Scumm engine only. Can anyone help...? :|
User avatar
dreammaster
ScummVM Developer
Posts: 554
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: Compiling ScummVM and the Scumm Engine only

Post by dreammaster »

Sure. What I do is to make a copy of the create_msvc.bat in the dists/msvc folder.. say call it 'scumm.bat'. Then open the file for editing, and search for the section that starts with ":stable". A couple of lines below it, replace the create_project line with something like the following:
create_project ..\.. --disable-fluidsynth --msvc --disable-all-engines --enable-engine=scumm,scumm_7_8,he

Then run the batch file
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by Windows TV »

Thank you for helping me with that but now I have a new question, how long does the first compile normally take? I should mention I am trying to build ScummVM on an average Windows machine.
User avatar
dreammaster
ScummVM Developer
Posts: 554
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: Compiling ScummVM and the Scumm Engine only

Post by dreammaster »

It's highly variable. For me, on a few years old laptop running VS2019, I can do a build of a single engine and the core/backend code in about a minute.
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by Windows TV »

Wow, my computer is lame then :lol: xD the compile of scumm and scummvm is about 4-5 minutes for me. Thank you for the help in answering the questions!
User avatar
icanntspell
Posts: 95
Joined: Mon May 18, 2009 12:14 pm
Location: The Netherlands
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by icanntspell »

How did you manage to get past this problem? I got this since I started using VS2019

Error C2338 Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined. (compiling source file ..\..\backends\graphics\opengl\pipelines\pipeline.cpp) scummvm C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winnt.h 2482
User avatar
dreammaster
ScummVM Developer
Posts: 554
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: Compiling ScummVM and the Scumm Engine only

Post by dreammaster »

I'm unfamiliar with the OpenGL code, so I can't really offer any suggestion. Beyond that it works for me on my installation, so it could just be some corruption and/or invalid setup on the computer you're currently using. If possible, you might want to try installing Visual Studio 2019 on another computer and see if it works. Otherwise, you might want to try checking in the IRC/Discord channel if you don't get any further reply here.
User avatar
icanntspell
Posts: 95
Joined: Mon May 18, 2009 12:14 pm
Location: The Netherlands
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by icanntspell »

I managed to fix this by retargeting the scummvm project against Windows SDK 8.1 (instead of the latest 10.x). Perhaps this info saves other people some time.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by Praetorian »

Keep in mind that some of the latest commits require to run "create_project" again for Visual Studio local builds.
mataniko
ScummVM Developer
Posts: 7
Joined: Mon Dec 25, 2017 8:03 pm

Re: Compiling ScummVM and the Scumm Engine only

Post by mataniko »

You can resolve this for the latest Windows SDK by updating the SDL2 libs manually.
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Re: Compiling ScummVM and the Scumm Engine only

Post by monsieurouxx »

icanntspell wrote: Sat Aug 17, 2019 9:01 am I managed to fix this by retargeting the scummvm project against Windows SDK 8.1 (instead of the latest 10.x). Perhaps this info saves other people some time.
Yes it does, you magnificent bastard.
More specifically :
- First follow all the instructions before (and from the wiki) to generate the scummVM solution
- Then, in Visual Studio : Right-cick on project (not solution) "scummvm" --> Select "Properties"
- In the properties window, on the "General" tab, change "Windows SDK Version" from "10.0 (latest install version)" (or whatever you have there) to "8.1"
- click OK
- Rebuild project scummvm

After that I got this error about fribidi.h but I ran create_project again, this time with option --disable-fribidi as explained. Because I'm lazy (and ddn't want to make any human mistake) I did so by editing file create_msvc.bat, located part ":stable" (line 65) and changed "create_project ..\.. --disable-fluidsynth --msvc" to "create_project ..\.. --disable-fluidsynth --msvc --disable-fribidi". It goes without saying that then you need to run create_msvc.bat again and select "build only stable engines" as it's the section you just modified.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Compiling ScummVM and the Scumm Engine only

Post by Praetorian »

In Windows 10 x64, I hadn't had any issues building ScummVM (32bit, debug) in the last few months.

I am working with Visual Studio 2019 Community Version, all updates installed for it and Windows 10, and whatever the latest version of SDK 10 is currently.

I am using the instructions from our wiki:
https://wiki.scummvm.org/index.php/Comp ... ual_Studio

However:
- I often re-build create_project and run it again, especially if I get missing files errors
- Typically I will run create_project manually (this is the same as editing the bat file), to only make a solution for a few engines.
- I do use the --disable-fluidsynth since I don't want to deal with compiling that third party lib.
- I use the prebuilt third party libraries provided in that page, with only a few exceptions where I am using more recent library versions (still pre-built). The new libraries that I'm using are:
SDL2-devel-2.0.12-VC, SDL2_net-devel-2.0.1-VC, libfribidi_v1.0.9_msvc16 and (I think) curl-7.69.1_1.
- If you want to build with fribidi support, you have to use a third party lib dependency. There are some extra instructions in this pertinent PR: https://github.com/scummvm/scummvm/pull/2208 especially if you don't want to recompile and run create_project (which is the easier way in my opinion)
Post Reply