1,489
edits
(Simplify instructions) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | == Installing the needed software and libraries == | ||
In this page, we guide you through the steps to compile ScummVM with Visual Studio. | |||
=== Visual Studio === | === Visual Studio === | ||
You can get the free Community version of Visual Studio [https://visualstudio.microsoft.com/vs/ here]. | |||
Professional Visual Studio versions are working fine too. | Professional Visual Studio versions are working fine too. | ||
When installing Visual Studio 2017 or later, make sure to select the "Desktop Development with C++" workload. | When installing Visual Studio 2017 or later, make sure to select the "Desktop Development with C++" workload. | ||
Building ScummVM with Visual Studio versions older than 2008 will require additional work which is not described here. | |||
=== Needed Libraries === | === Needed Libraries === | ||
ScummVM relies on third-party libraries | ScummVM relies on third-party libraries for common features, such as MP3 decoding. Some of these libraries, like SDL, are required, whereas others like libtheora are optional. | ||
We supply a set of prebuilt libraries for Visual Studio 2015 and later, which can be found [http://downloads.scummvm.org/frs/build/scummvm_libs_2015.zip here]. | |||
These libraries have been built on Windows 8.1 using the Visual Studio 2015 Community Edition. | |||
If you want to build libraries for use with Visual Studio yourself, please refer to the [[Compiling_ScummVM/Visual_Studio/Compiling_Libraries|instructions for compiling the libraries yourself]]. | |||
=== Installing Libraries === | === Installing Libraries === | ||
The easiest way to make Visual Studio find the supplied libraries is by using the environment variable "SCUMMVM_LIBS". | The easiest way to make Visual Studio find the supplied libraries is by using the environment variable "SCUMMVM_LIBS". You can set it by performing the following steps: | ||
* Unzip the library zip to a directory of your choice, for example "C:\Users\YourUsername\Documents\scummvm_libs_2015". | |||
* Unzip the library zip to a directory of your choice | |||
* Go to Start Menu > Control Panel > System > Advanced Settings > Environment Variables and add a new variable "SCUMMVM_LIBS" with a value of the path you extracted the zip in. It is important that you do point the variable to the folder containing the "bin", "include", and "lib" directories. | * Go to Start Menu > Control Panel > System > Advanced Settings > Environment Variables and add a new variable "SCUMMVM_LIBS" with a value of the path you extracted the zip in. It is important that you do point the variable to the folder containing the "bin", "include", and "lib" directories. | ||
== Preparing the Project Files == | == Preparing the Project Files == | ||
Line 32: | Line 31: | ||
ScummVM uses a configure/Make based build system. We have a tool to generate Visual Studio project files from this build system. The first step you need to take is building this tool called "create_project". | ScummVM uses a configure/Make based build system. We have a tool to generate Visual Studio project files from this build system. The first step you need to take is building this tool called "create_project". | ||
First, open the solution file "devtools\create_project\msvc\create_project.sln". Then simply build the solution. The project file should automatically assure that the resulting "create_project.exe" is copied to "dists\msvc" | First, open the solution file "devtools\create_project\msvc\create_project.sln". Then simply build the solution. The project file should automatically assure that the resulting "create_project.exe" is copied to "dists\msvc". | ||
=== Generating the Project Files === | === Generating the Project Files === | ||
Line 50: | Line 49: | ||
NOTE: Several people have had errors about structure packing under Visual Studio 2019. In such cases, you need to update [http://libsdl.org/download-2.0.php SDL2] with the latest version. | NOTE: Several people have had errors about structure packing under Visual Studio 2019. In such cases, you need to update [http://libsdl.org/download-2.0.php SDL2] with the latest version. | ||
== Compiling | == Compiling with Console/Text Output == | ||
If you | By default ScummVM is compiled as a Windows subsystem application with no console output. If you need the console, you can do one of the following: | ||
* In the Project Options for the scummvm project, go to the Linker | System | SubSystem line, and change the /SUBSYSTEM: | * In the create_project command, add <code>--enable-text-console</code>. | ||
* In the Project Options for the scummvm project, go to the Linker | System | SubSystem line, and change the /SUBSYSTEM:WINDOWS to /SUBSYSTEM:CONSOLE | |||
edits