Difference between revisions of "Compiling ScummVM/Visual Studio"

Jump to navigation Jump to search
Update compiling for Visual Studio with 2015 and new lib zips
(Update compiling for Visual Studio with 2015 and new lib zips)
Line 7: Line 7:
== Things needed ==
== Things needed ==


=== Visual Studio 2013 ===
=== Visual Studio 2015 ===
There exist several versions of Visual Studio 2013. A feature comparison can be found
There exists a free Community version of Visual Studio 2015 [https://www.visualstudio.com/en-US/products/visual-studio-express-vs here] that can be used.
[http://www.visualstudio.com/en-US/products/compare-visual-studio-products-vs here]


You can obtain the free Express version of Visual C++ 2013 [http://www.microsoft.com/express here]
Visual Studio 2015 or 2013 is preferred for compiling ScummVM, but old older versions of Visual Studio may work so long as you have them updated to their latest Service Pack revisions. In fact, we suggest making sure that you always have the latest Service Packs and patches applied for these tool sets. In some cases, fixes were put into the free-to-download "Processor Pack" add-on for Visual C++. So, download the latest Service Pack and the latest Processor Pack for whatever version of Visual C++ you are using to make sure you won't run into compiler bugs that prevent the compilation of ScummVM.  


Although Visual Studio 2013 or 2012 is preferred, older versions of Visual Studio may work so long as you have them updated to their latest Service Pack revisions. In fact, we suggest making sure that you always have the latest Service Packs and patches applied for these tool sets. In some cases, fixes were put into the free-to-download "Processor Pack" add-on for Visual C++. So, download the latest Service Pack and the latest Processor Pack for whatever version of Visual C++ you are using to make sure you won't run into compiler bugs that prevent the compilation of ScummVM.
The one exception is the later service packs for Visual Studio 2013. At least Service Pack 5, and maybe earlier packs will, if installed, cause ScummVM to give errors about duplicate 'snprintf' definitions. This is specially handled for Visual Studio 2015 with a special check in common/scummsys.h. If you're experiencing the problem in 2013, you can always manually comment out the method from scummsys.h.


=== Additional tools ===
=== Needed Libraries ===
In order to compile ScummVM, you will need to install some third party libraries that it needs. To make things simple, we've created a zip containing all the necessary library files, includes, DLLs, and executables. There are two versions available; download the correct one for the version of MSVC you're using:
* Download for Visual Studio [http://sourceforge.net/projects/scummvm/files/build/scummvm_libs_2015.zip/download 2015]
* Download for Visual Studio [http://sourceforge.net/projects/scummvm/files/build/scummvm_libs_2013.zip/download 2013] and earlier.


You will need to download and install [http://www.nasm.us/ nasm] which is used for assembler versions of our scalers.
Follow these steps to install the libraries on your system:
* Unzip the library zip file you downloaded into a folder on your system where it can permanently stay. For example, you could use "c:\Program Files (x86)\scummvm_libs".
* Go to Control Panel | Environment Variables and set up a new variable "SCUMMVM_LIBS" with a value of the path you extracted the zip in
* In the extracted folder's bin subfolder you'll find some DLL files. Copy all of them to Window's system folder, which is usually c:\windows\SysWow64
* Checkout a copy of the ScummVM source if you haven't already done so
* Under the ScummVM root folder, open the create_project Visual Studio 2015 project in devtools/create_project/msvc14
* Compile create_project. That should automatically copy the resulting create_project.exe to ScummVM's dists/msvc14 folder.
* Run the dists/msvc14/create_msvc14.bat batch file to create the Visual Studio 2015 project for ScummVM. You can choose to either only include projects for Stable engines (which are officially supported), or all engines, which includes experimental and incomplete game engines.
* Open up the created Visual Studio project for ScummVM in dists/msvc14, compile, and run ScummVM.


=== Precompiled libraries ===
That should be all that's required. The rest of this document has various instructions that may be helpful if you want to compile your own versions of the libraries, or if you really want to use an older version of Visual Studio.
To ease the whole process, a package of all the needed precompiled libraries has been created.  
 
All you need to do is:
=== Manually Installing Libraries ===
* Download the [http://sourceforge.net/projects/scummvm/files/build/scummvm_vs_libs.zip/download precompiled libraries].
If you feel like getting the various packages separately and compiling them yourself; following is some older instructions on getting the libraries individually:
 
* Download [http://www.nasm.us/ nasm] which is used for assembler versions of our scalers.
* Download the [http://sourceforge.net/projects/scummvm/files/build/scummvm_vs_libs.zip/download some of precompiled libraries for 2013 and earlier].
* Download the [http://www.libsdl.org/release/SDL-1.2.15-win32.zip latest SDL runtime library] - latest version is 1.2.15 at the time this was written, you can find the latest version [http://www.libsdl.org/download-1.2.php here].
* Download the [http://www.libsdl.org/release/SDL-1.2.15-win32.zip latest SDL runtime library] - latest version is 1.2.15 at the time this was written, you can find the latest version [http://www.libsdl.org/download-1.2.php here].
* Download the [http://gnuwin32.sourceforge.net/packages/freetype.htm FreeType library]. You'll need the [http://gnuwin32.sourceforge.net/downlinks/freetype.php complete package] and the [http://gnuwin32.sourceforge.net/downlinks/freetype-lib-zip.php developer libraries]. You'll need to copy the .lib files to your Visual Studio vc/lib folder, and the freetype6.dll and zlib1.dll files from the Freetype bin folder (default c:\Program Files (x86)\GnuWin32\bin) to your Windows folder.
* Download the [http://gnuwin32.sourceforge.net/packages/freetype.htm FreeType library]. You'll need the [http://gnuwin32.sourceforge.net/downlinks/freetype.php complete package] and the [http://gnuwin32.sourceforge.net/downlinks/freetype-lib-zip.php developer libraries]. You'll need to copy the .lib files to your Visual Studio vc/lib folder, and the freetype6.dll and zlib1.dll files from the Freetype bin folder (default c:\Program Files (x86)\GnuWin32\bin) to your Windows folder.
272

edits

Navigation menu