ResidualVM logo Main website - Forums - BuildBot - Doxygen - Contact us Log in curved edge

Building ResidualVMBuilding ResidualVM

Revision as of 20:52, 20 March 2018 by BgK (Talk | contribs)



The following components are required to build ResidualVM from source:

  • SDL Development Files
  • libGL Development Files
  • libGLU Development Files

Building on Linux

Get the required software

First of all we must install the software we need to be able to compile ResidualVM. So fire up your package manager and install

  • GCC
  • Git
  • SDL
  • Mesa, if you don't have it yet, or any other thing that provides OpenGL (like Nvidia's proprietary drivers)

Note that in some distributions libraries like SDL are split in two packages, commonly SDL and SDL-dev or SDL-devel. If this is the case install both.

Get and build the sources

Now open your preferred terminal and issue the commands below.

git clone git://
cd residualvm
mkdir build
cd build
../configure && make

If these succeded you can now issue a sudo make install to install ResidualVM.


Now simply call residualvm in the terminal and enjoy playing!

Building on Mac OS X


The following is based off of Elowan's work on building ResidualVM for PPC Mac's in the forums.

So, what is this? For those, who are still on an G4 Mac with OSX 10.5.9 and want to play Grim Fandango thru ResidualVM and not thru emulation via VPC/Win98 - this is for you!

This procedure should work on any 12" powerbook G4 1.5Ghz, running 10.5.9. Other ppc machines are not tested. If you got a different PPC machine or OSX version , this might not work for you!

Hint: Every terminal command in quotes must be used without ""

Hint: If you are on 10.5 Mac Intel, you can skip step 8.

First, we need to get and setup some tools - this is maybe the hardest part.

1. Get a copy of XCode and make sure, you install the whole thing. X11 also must be installed (X11 User package), you will find this your Leopard CD/DVD, see "optional install" and/or on the internet.

2. If you dont have an account at Apple Developer Network, go create one. It takes only a few minutes and you gain access to the tool you will need: XCode 3.1.4. link: You will find it there (a far bit down the page, or just simply do search within your browser)

3. Download XCode 3.1.4 (about 1GB ) and install it on your Mac.

4. Now, you are set to install another one : MacPorts link:

5. After you've successfully done this, open the terminal an type: "sudo port -v selfupdate" and wait for some smaller downloads to end.

6. Now type "sudo port install libsdl" to get the last "tool" you need. This will take a longer while (like 1 hour or a bit more, if you are on G4 1.5Ghz) Just be patient and wait till this stuff finishes.

7. Ok, now it's time to get the latest version of ResidualVM. Just type "git clone git://" into your terminal. Now, change the directory: "cd residualvm"

8. After a short download do "./configure".

9. Now, we can (finally) start building the application. Type "make bundle" into your terminal and wait for the process to finish.

10. You can close the terminal now and open up you home directory in finder. Or just type "residualvm" in spotlight and open the residualvm folder. In this folder, you should see an application called "ResidualVM" with a yellow "R" icon. You can drag this into your dock or just doubleclick it to start ResidualVM.

10.5 Intel

Follow the above guidelines, but skip step 8

Building on Windows

With MingW

Install Git

Git is a version control system and you can download it here.

When you install it, make sure you choose the option that adds to PATH. After that choose the recommended options for Windows.

Get ResidualVM's source code from GitHub

Once you have Git installed with a PATH set up correctly, go to the command prompt, navigate to the parent directory you'd like your "ResidualVM" directory to be in and type:

git clone

It should then download the latest source into the current directory.

In future, to update the sources to the latest version, you can type:

git pull

Install MingW

This is a necessary step. Download and get the latest version of the installer from here.
NOTE: When installing it select a directory without spaces in its name, else troubles may come up. Be sure to install the components C++ and MingW Developer Tookit (including MSYS)

Now probably the most confusing part... Open up the command prompt in Windows and type 'path'. Make sure that all the MinGW directories are there. It should contain (assuming you installed to C:\MinGW)


at the end. Those should have been added by the install program, but if not, you'll have to add them manually. To do this, go to Computer -> System properties -> Advanced System Settings (it's on the left). Then click on the Environment Variable button, and in the bottom dialog box scroll down until you see the PATH variable, and double click it. Then add the directories listed above, making sure to have a semi colon before all the directory names.

You now have the ResidualVM source and a compiler, but you need libraries before you can compile and make a ResidualVM.exe.

Install SDL Development Libraries Download the SDL Libraries from here.

Extract the files to a directory on your computer, then move the contents of the following folders to their respective MingW folders:

include\ to c:\MingW\include\
lib\ to c:\MingW\lib\
bin\ to c:\MingW\bin\

Install zlib

Despite what the ResidualVM site says, you apparently need zlib installed, too. This is another fiddly step, but not too difficult.

Download the source code of zlib from its site.

Copy the contents of the zlib source archive to a temporary folder, e.g. c:\zlib.

Now open up MSYS. This is done by going to MingW Shell in your START menu. A window should open that looks very much like the normal command prompt.

Type the following:

cd /c/zlib
make -f win32/makefile.gcc

After the code has compiled type:

cp -p libz.a /c/mingw/lib
cp -p zlib.h zconf.h /c/mingw/include


(Here's a guide to the basic commands of MSYS, if you're confused:

Compile ResidualVM

You need to go into MingW Shell (aka MSYS) again.

Simply navigate to your ResidualVM directory in the MingW Shell (see the above guide if you need help on that) and type:


and then:


At the end of the process you should have a residualvm.exe in your ResidualVM folder. You've just compiled ResidualVM!

You can strip out debug symbols if you not needed to make a smaller executable, type:

strip residualvm.exe

And you're done!

Guide adapted from the work of KuroShiro and JohnnyWalker2001 from this forum thread.

With MSYS2, MinGW-w64 and the Qt Creator IDE

 1. Download the MSYS2 installer from
 2. Install MSYS2 following the official instructions on that page.
 3. Open a MSYS2 MinGW 64-bits terminal (not a plain MSYS2 terminal).
 4. Install the packages required to build ResidualVM:
    `pacman -S git mingw-w64-x86_64-{cmake,curl,gdb,freetype,flac,fluidsynth,gcc,glew,iconv,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,make,readline,SDL2,SDL2_net,zlib}`
 5. Edit `C:\msys64\mingw64\lib\cmake\SDL2\sdl2-config.cmake`, replace `set(prefix "/mingw64")` with `set(prefix "C:/msys64/mingw64")`.
 6. Download QT Creator from Install it and open it.
 7. In the build panel of Qt Creator's options dialog:
   a. Add a new `MinGW` C compiler pointing to `C:\msys64\mingw64\bin\gcc.exe`, select the 64 bits ABI.
   b. Add a new `MinGW` C++ compiler pointing to `C:\msys64\mingw64\bin\g++.exe`, select the 64 bits ABI.
   c. Add a new debugger pointing to `C:\msys64\mingw64\bin\gdb.exe`.
   d. Add a new CMake installation pointing to `C:\msys64\mingw64\bin\cmake.exe`.
   e. Modify the Desktop Kit, selecting the newly added C compiler, C++ compiler, debugger, CMake installation. Select the `MinGW Makefiles` CMake generator.
 8. Clone the ResidualVM git repository:
    `cd && git clone`
 9. Build the IDE project generator:
    `cd ~/residualvm/devtools/create_project/cmake && cmake -G"MSYS Makefiles" . && mingw32-make`
 10. Generate a CMake project at the root of the source tree:
     `cd ~/residualvm && ./devtools/create_project/cmake/create_project.exe . --cmake`
     The CMake project needs to be updated using that command each time the project structure changes (a new file is added, ...).
 11. In Qt Creator, open the generated `CMakeLists.txt` project at the root of the source tree, select the Desktop Kit, and configure the project.
 12. ResidualVM should build and run from the IDE. Debugging should work when enabling the debug build configuration.


curved edge   curved edge