Permalink
Browse files

Add: Visual Studio 2019 project files

  • Loading branch information...
nielsmh committed Jan 26, 2019
1 parent b6de8c0 commit 65782af2f40973a71ab33f4437faeb5b3859c49b
@@ -593,8 +593,7 @@ no graphical user interface; you would be building a dedicated server.
The following compilers are known to compile OpenTTD:
- Microsoft Visual C++ (MSVC) 2005, 2008 and 2010.
Version 2005 gives bogus warnings about scoping issues.
- Microsoft Visual C++ (MSVC) 2015, 2017 and 2019.
- GNU Compiler Collection (GCC) 3.3 - 4.4, 4.6 - 4.8.
- Versions 4.1 and earlier give bogus warnings about uninitialised variables.
- Versions 4.4, 4.6 give bogus warnings about freeing non-heap objects.
@@ -605,7 +604,8 @@ The following compilers are known to compile OpenTTD:
The following compilers are known not to compile OpenTTD:
- Microsoft Visual C++ (MSVC) 2003 and earlier.
- Microsoft Visual C++ (MSVC) 2013 and earlier.
These old versions do not support modern C++ language features.
- GNU Compiler Collection (GCC) 3.2 and earlier.
These old versions fail due to OpenTTD's template usage.
- GNU Compiler Collection (GCC) 4.5. It optimizes enums too aggressively.
@@ -18,7 +18,7 @@ done during installing Visual Studio, by selecting
`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)
- [MS Windows Platform SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)

Install the SDK by following the instructions as given.

@@ -55,6 +55,7 @@ Open the appropriate `sln` (Solution) file for your version of Visual Studio:

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

Set the build mode to `Release` in
`Build > Configuration manager > Active solution configuration`.
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>basesets</ProjectName>
<ProjectGuid>{E12E77CA-C0F1-4ADA-943F-4929274249D3}</ProjectGuid>
<RootNamespace>basesets</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<Langs>..\src\lang\afrikaans.txt;..\src\lang\arabic_egypt.txt;..\src\lang\basque.txt;..\src\lang\belarusian.txt;..\src\lang\brazilian_portuguese.txt;..\src\lang\bulgarian.txt;..\src\lang\catalan.txt;..\src\lang\croatian.txt;..\src\lang\czech.txt;..\src\lang\danish.txt;..\src\lang\dutch.txt;..\src\lang\english.txt;..\src\lang\english_AU.txt;..\src\lang\english_US.txt;..\src\lang\esperanto.txt;..\src\lang\estonian.txt;..\src\lang\faroese.txt;..\src\lang\finnish.txt;..\src\lang\french.txt;..\src\lang\gaelic.txt;..\src\lang\galician.txt;..\src\lang\german.txt;..\src\lang\greek.txt;..\src\lang\hebrew.txt;..\src\lang\hungarian.txt;..\src\lang\icelandic.txt;..\src\lang\indonesian.txt;..\src\lang\irish.txt;..\src\lang\italian.txt;..\src\lang\japanese.txt;..\src\lang\korean.txt;..\src\lang\latin.txt;..\src\lang\latvian.txt;..\src\lang\lithuanian.txt;..\src\lang\luxembourgish.txt;..\src\lang\malay.txt;..\src\lang\norwegian_bokmal.txt;..\src\lang\norwegian_nynorsk.txt;..\src\lang\polish.txt;..\src\lang\portuguese.txt;..\src\lang\romanian.txt;..\src\lang\russian.txt;..\src\lang\serbian.txt;..\src\lang\simplified_chinese.txt;..\src\lang\slovak.txt;..\src\lang\slovenian.txt;..\src\lang\spanish.txt;..\src\lang\spanish_MX.txt;..\src\lang\swedish.txt;..\src\lang\tamil.txt;..\src\lang\thai.txt;..\src\lang\traditional_chinese.txt;..\src\lang\turkish.txt;..\src\lang\ukrainian.txt;..\src\lang\vietnamese.txt;..\src\lang\welsh.txt</Langs>
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\baseset\</IntDir>
</PropertyGroup>
<ItemGroup>
<CustomBuild Include="..\media\baseset\no_music.obm">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating no_music.obm baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_music.obm" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\no_music.obm;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\no_sound.obs">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating no_sound.obs baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_sound.obs" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\no_sound.obs;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obg">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_dos.obg baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obg" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_dos.obg;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obm">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_dos.obm baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obm" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_dos.obm;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obs">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_dos.obs baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obs" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_dos.obs;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos_de.obg">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_dos_de.obg baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos_de.obg" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_dos_de.obg;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_tto.obm">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_tto.obm baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_tto.obm" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_tto.obm;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obg">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_win.obg baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obg" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_win.obg;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obm">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_win.obm baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obm" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_win.obm;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obs">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating orig_win.obs baseset metadata file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obs" ..\src\lang ..\bin\baseset\orig_extra.grf</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\orig_win.obs;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Baseset Metadata">
<UniqueIdentifier>{b5a3ac67-19a9-4276-80e9-2360367d2680}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\media\baseset\no_music.obm">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\no_sound.obs">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obg">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obm">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos.obs">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_dos_de.obg">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_tto.obm">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obg">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obm">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
<CustomBuild Include="..\media\baseset\orig_win.obs">
<Filter>Baseset Metadata</Filter>
</CustomBuild>
</ItemGroup>
</Project>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Baseset Metadata">
<UniqueIdentifier>{b5a3ac67-19a9-4276-80e9-2360367d2680}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
</Project>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>basesets</ProjectName>
<ProjectGuid>{E12E77CA-C0F1-4ADA-943F-4929274249D3}</ProjectGuid>
<RootNamespace>basesets</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
!!FILTERS!!
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\baseset\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\baseset\</IntDir>
</PropertyGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -22,6 +22,16 @@ then
exit 1
fi

# openttd_vs142.sln is for MSVC 2019
# openttd_vs142.vcxproj is for MSVC 2019
# openttd_vs142.vcxproj.filters is for MSVC 2019
# langs_vs142.vcxproj is for MSVC 2019
# strgen_vs142.vcxproj is for MSVC 2019
# strgen_vs142.vcxproj.filters is for MSVC 2019
# generate_vs142.vcxproj is for MSVC 2019
# version_vs142.vcxproj is for MSVC 2019
# basesets_vs142.vcxproj is for MSVC 2019

# openttd_vs141.sln is for MSVC 2017
# openttd_vs141.vcxproj is for MSVC 2017
# openttd_vs141.vcxproj.filters is for MSVC 2017
@@ -312,15 +322,23 @@ generate "$openttdvcxproj" "openttd_vs140.vcxproj"
generate "$openttdfiles" "openttd_vs140.vcxproj.filters" "$openttdfilters"
generate "$openttdvcxproj" "openttd_vs141.vcxproj"
generate "$openttdfiles" "openttd_vs141.vcxproj.filters" "$openttdfilters"
generate "$openttdvcxproj" "openttd_vs142.vcxproj"
generate "$openttdfiles" "openttd_vs142.vcxproj.filters" "$openttdfilters"
generate "$langvcxproj" "langs_vs140.vcxproj"
generate "$langfiles" "langs_vs140.vcxproj.filters"
generate "$langvcxproj" "langs_vs141.vcxproj"
generate "$langfiles" "langs_vs141.vcxproj.filters"
generate "$langvcxproj" "langs_vs142.vcxproj"
generate "$langfiles" "langs_vs142.vcxproj.filters"
generate "$settingsvcxproj" "settings_vs140.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs140.vcxproj.filters"
generate "$settingsvcxproj" "settings_vs141.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs141.vcxproj.filters"
generate "$settingsvcxproj" "settings_vs142.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs142.vcxproj.filters"
generate "$basesetvcxproj" "basesets_vs140.vcxproj" "$basesetlangs"
generate "$basesetfiles" "basesets_vs140.vcxproj.filters"
generate "$basesetvcxproj" "basesets_vs141.vcxproj" "$basesetlangs"
generate "$basesetfiles" "basesets_vs141.vcxproj.filters"
generate "$basesetvcxproj" "basesets_vs142.vcxproj" "$basesetlangs"
generate "$basesetfiles" "basesets_vs142.vcxproj.filters"
Oops, something went wrong.

0 comments on commit 65782af

Please sign in to comment.