Open main menu

Difference between revisions of "Compiling ScummVM/Visual Studio"

Line 43: Line 43:
Note that you'll need to build all libraries with the same configuration settings (debug or release). If you don't need a specific library, you can remove it from your build by going to Project->Properties, Configuration Properties->C/C++->Preprocessor and remove the "USE_XXX" directive for that library from there. For example, to remove OGG support, remove the USE_VORBIS directive
Note that you'll need to build all libraries with the same configuration settings (debug or release). If you don't need a specific library, you can remove it from your build by going to Project->Properties, Configuration Properties->C/C++->Preprocessor and remove the "USE_XXX" directive for that library from there. For example, to remove OGG support, remove the USE_VORBIS directive


'''NASM'''
=== NASM ===


First of all, we need nasm. So unzip the nasm archive in a directory, copy  
First of all, we need nasm. So unzip the nasm archive in a directory, copy  
Line 49: Line 49:




'''SDL/zlib'''
=== SDL/zlib ===


SDL and zlib are already compiled, so we can skip the compilation step for those two  
SDL and zlib are already compiled, so we can skip the compilation step for those two  
Line 59: Line 59:




'''libogg'''
=== libogg ===


Compile this first, as many other libraries need it. Go to the win32 directory and build the ogg solution in there. DON'T compile the solution in the VS2003 directory, as this produces "libogg.lib" instead of "ogg.lib". A simple rename might work, though
Compile this first, as many other libraries need it. Go to the win32 directory and build the ogg solution in there. DON'T compile the solution in the VS2003 directory, as this produces "libogg.lib" instead of "ogg.lib". A simple rename might work, though




'''libvorbis'''
=== libvorbis ===


Before compiling this, include the libogg include and library paths in VS. To do this, go to Tools->Options->Projects and solutions->VC++ directories and include the include directory of libogg as well as the directory with the compiled ogg library  
Before compiling this, include the libogg include and library paths in VS. To do this, go to Tools->Options->Projects and solutions->VC++ directories and include the include directory of libogg as well as the directory with the compiled ogg library  




'''mpeg2dec'''
=== mpeg2dec ===


After you compile this one, go to its include directory, create a folder "mpeg2dec" in there and copy all files from the include folder in this subfolder. So you should end up with 2 directories, "include" and "include\mpeg2dec" with the same files. This is needed, as ScummVM includes files from the "mpeg2dec" directory  
After you compile this one, go to its include directory, create a folder "mpeg2dec" in there and copy all files from the include folder in this subfolder. So you should end up with 2 directories, "include" and "include\mpeg2dec" with the same files. This is needed, as ScummVM includes files from the "mpeg2dec" directory  




'''libmad'''
=== libmad ===


To compile this, you need to remove all the "_CRTRESTRICT" directives from the code, as VS doesn't understand this directive  
To compile this, you need to remove all the "_CRTRESTRICT" directives from the code, as VS doesn't understand this directive  




'''FLAC'''
=== FLAC ===


Not a necessary library, so you may skip this one. If you do wish to include it, go to the configuration manager and exclude "in_flac" from compilation. This is due to the fact that you don't need that library (it's for Winamp) but also it won't compile with VS2005, because of many things that VS2005 doesn't like in tagz.cpp from Winamp's SDK. You'll also need to copy ogg_static.lib from the ogg library into the obj\release\lib folder  
Not a necessary library, so you may skip this one. If you do wish to include it, go to the configuration manager and exclude "in_flac" from compilation. This is due to the fact that you don't need that library (it's for Winamp) but also it won't compile with VS2005, because of many things that VS2005 doesn't like in tagz.cpp from Winamp's SDK. You'll also need to copy ogg_static.lib from the ogg library into the obj\release\lib folder  




'''Adding all libraries to Visual Studio'''
=== Adding all libraries to Visual Studio ===


Now that we got all libraries compiled, we go to Tools->Options->Projects and solutions->VC++ directories.  
Now that we got all libraries compiled, we go to Tools->Options->Projects and solutions->VC++ directories.  
Line 97: Line 97:




'''Before compiling'''
=== Before compiling ===


Open the solution file in dists\vc8 (or vc7 if you're using VS2003)  
Open the solution file in dists\vc8 (or vc7 if you're using VS2003)  
Line 106: Line 106:




'''Ready to go!'''
=== Ready to go! ===


OK this should be all of it (thankfully), so you should be good to go. I haven't included instructions to include FLAC, since that's not needed to build ScummVM.  
OK this should be all of it (thankfully), so you should be good to go. I haven't included instructions to include FLAC, since that's not needed to build ScummVM.  


Note that whenever you get a new release from the scummvm website, you need to follow the steps in the "before compiling" section to compile scummvm
Note that whenever you get a new release from the scummvm website, you need to follow the steps in the "before compiling" section to compile scummvm
1,489

edits