Changeset - r23086:d804a57afe25
[Not reviewed]
master
1 1 1
Patric Stout - 5 years ago 2018-12-26 09:08:57
truebrain@openttd.org
Update: Readme_Windows_MSVC documentation now reflects the current reality again

It was not updated for a while, and kinda out-of-date. This should
bring it back to reality.
3 files changed with 71 insertions and 110 deletions:
0 comments (0 inline, 0 general)
README.md
Show inline comments
 
@@ -519,7 +519,7 @@ PNG (WITH_PNG), ZLIB (WITH_ZLIB), LZO (W
 
LZMA (WITH_LZMA) support is enabled by default. For these to work you need their
 
development files. To get them just use vcpkg from https://github.com/Microsoft/vcpkg
 
using x86-windows-static and x64-windows-static triplets.
 
For more help with VS see docs/Readme_Windows_MSVC.txt.
 
For more help with VS see docs/Readme_Windows_MSVC.md.
 

	
 
You can also build it using the Makefile with MSYS/MinGW or Cygwin/MinGW.
 
Please read the Makefile for more information.
docs/Readme_Windows_MSVC.md
Show inline comments
 
new file 100644
 
# Compiling OpenTTD using Microsoft Visual C++
 

	
 
Last updated: 2018-12-27
 

	
 
## Supported MSVC compilers
 

	
 
OpenTTD includes projects for Visual Studio 2015 Update 3 or more recent.
 
You can download the free Visual Studio Community Edition from Microsoft at
 
https://visualstudio.microsoft.com/vs/community/.
 

	
 
## Required files
 

	
 
### Microsoft platform files
 

	
 
OpenTTD needs the Platform SDK, if it isn't installed already. This can be
 
done during installing Visual Studio, by selecting
 
`Visual C++ MFC for x86 and x64` (and possibly
 
`Visual C++ ATL for x86 and x64` depending on your version). If not, you
 
can get it at this location:
 

	
 
- [MS Windows Platform SDK](http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en)
 

	
 
Install the SDK by following the instructions as given.
 

	
 
### OpenTTD dependencies
 

	
 
Dependencies for OpenTTD on Windows are handled via
 
[vcpkg](https://github.com/Microsoft/vcpkg/). First you need to install vcpkg
 
by following the `Quick Start` intructions of their
 
[README](https://github.com/Microsoft/vcpkg/blob/master/README.md).
 

	
 
After this, you can install the dependencies OpenTTD needs. We advise to use
 
the `static` versions, and OpenTTD currently needs the following dependencies:
 

	
 
- freetype
 
- liblzma
 
- libpng
 
- lzo
 
- zlib
 

	
 
To install both the x64 (64bit) and x86 (32bit) variants, you can use:
 

	
 
```ps
 
.\vcpkg install freetype:x64-windows-static liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
 
.\vcpkg install freetype:x86-windows-static liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
 
```
 

	
 
## TTD Graphics files
 

	
 
See section 4.1 of README.md for the required 3rdparty files and how to install them.
 

	
 
## Compiling
 

	
 
Open the appropriate `sln` (Solution) file for your version of Visual Studio:
 

	
 
- VS 2015: projects/openttd_vs140.sln
 
- VS 2017: projects/openttd_vs141.sln
 

	
 
Set the build mode to `Release` in
 
`Build > Configuration manager > Active solution configuration`.
 
You can now compile.
 

	
 
If everything works well the binary should be in `objs\Win[32|64]\Release\openttd.exe`
 
and in `bin\openttd.exe`
 

	
 
## Problems
 

	
 
If compilation fails, double-check that you are using the latest github
 
source. If it still doesn't work, check in on IRC (irc://irc.oftc.net/openttd),
 
to ask for help.
docs/Readme_Windows_MSVC.txt
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)