(svn r11979) -Codechange: drop MSVC 2003 support because MSVC 2003 is broken in such a manner that it triggers an internal compiler error without any clue what of the code is wrong. Even trying to bisect the problem does not give a single line of code that causes the trouble.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 17 years ago
parent 4991dcecc7
commit bbdc5a9314

@ -6,11 +6,11 @@ PLEASE READ THE ENTIRE DOCUMENT BEFORE DOING ANY ACTUAL CHANGES!!
SUPPORTED MSVC COMPILERS
------------------------
OpenTTD includes projects for MSVC 2003.NET and MSVC 2005.NET. Both will
OpenTTD includes projects for MSVC 2005.NET and MSVC 2008.NET. Both will
compile out of the box, providing you have the required libraries/headers;
which ones, see below. There is no support for VS6, you are therefore
strongly encouraged to either upgrade to MSVC 2005 Express (free) or use GCC.
MSVC 2002 probably works as well, but it has not been tested.
which ones, see below. There is no support for VS6 or MSVC 2002, or
MSVC 2003.NET. You are therefore strongly encouraged to either upgrade to
MSVC 2005 Express (free) or use GCC.
1) REQUIRED FILES
@ -74,20 +74,6 @@ NOTE: make sure that the directory for the DirectX SDK is the first one in the
list, above all others, otherwise compilation will most likely fail!!
2.3) DEBUGGING - WORKING DIRECTORY (MSVC 2003 ONLY!)
----------------------------------------------------
The very first time you check out and compile OpenTTD with Visual Studio 2003, running
the binary will complain about missing files. You need to go into and change a setting
OpenTTD > Project > Properties > Configuration (All Configurations) > ...
Configuration Properties > Debugging >
* Working Directory: ..\bin
VS 2005 works out of the box because Microsoft allowed a user to supply a humanly-
readable defaults file (openttd_vs80.vcproj.user), whereas 2003 is braindead.
3) TTD GRAPHICS FILES
---------------------
Copy the following files from Transport Tycoon Deluxe to the bin/data folder
@ -102,12 +88,12 @@ Copy the following files from Transport Tycoon Deluxe to the bin/data folder
4) COMPILING
------------
Open trunk/openttd[_vs80].sln
Open trunk/openttd_vs[89]0.sln
Set the build mode to 'Release' in
Build > Configuration manager > Active solution configuration > select "Release"
Compile...
If everything works well the binary should be in trunk/objs/[Win32]/Release/openttd.exe
If everything works well the binary should be in trunk/objs/Win[32|64]/Release/openttd.exe
5) EDITING, CHANGING SOURCE CODE
@ -126,4 +112,4 @@ to ask about reasons; or just wait. The problem will most likely solve itself
within a few days as the problem is noticed and fixed.
An up-to-date version of this README can be found on the wiki:
http://wiki.openttd.org/index.php/MicrosoftVisualCExpress
http://wiki.openttd.org/index.php/MicrosoftVisualCExpress

@ -25,13 +25,6 @@ fi
# langs_vs80.vcproj is for MSVC 2005
# strgen_vs80.vcproj is for MSVC 2005
# openttd.sln is for MSVC 2003
# openttd.vcproj is for MSVC 2003
# langs.vcproj is for MSVC 2003
# strgen.vcproj is for MSVC 2003
# openttd.tgt is for WatCom
# First, collect the list of Windows files
@ -110,7 +103,7 @@ load_main_data() {
print " <Filter";
print " Name=\\""$0"\\"";
print " Filter=\\"\\">";
print " >";
}
next;
@ -121,7 +114,8 @@ load_main_data() {
gsub(" ", "", $0);
gsub("/", "\\\\", $0);
print " <File";
print " RelativePath=\\".\\\\'$file_prefix'"$0"\\">";
print " RelativePath=\\".\\\\'$file_prefix'"$0"\\"";
print " >";
print " </File>";
}
}
@ -138,15 +132,18 @@ load_lang_data() {
i=`basename $i | sed s/.txt$//g`
RES="$RES
<File
RelativePath=\"..\\src\\lang\\"$i".txt\">
RelativePath=\"..\\src\\lang\\"$i".txt\"
>
<FileConfiguration
Name=\"Debug|Win32\">
Name=\"Debug|Win32\"
>
<Tool
Name=\"VCCustomBuildTool\"
Description=\"Generating "$i" language file\"
CommandLine=\"..\\objs\\strgen\\strgen.exe -s ..\\src\\lang -d ..\\bin\\lang &quot;\$(InputPath)&quot;&#x0D;&#x0A;\"
AdditionalDependencies=\"\"
Outputs=\"..\\bin\\lang\\"$i".lng\"/>
Outputs=\"..\\bin\\lang\\"$i".lng\"
/>
</FileConfiguration>
</File>"
done
@ -165,22 +162,7 @@ generate() {
}
' > "$ROOT_DIR/projects/$2"
# The files-list
echo "$1" | awk -v type="$3" '
/&#x0D;&#x0A;/ {
if (type == "msvc2003") gsub("&#x0D;&#x0A;", "\n", $0);
}
/Filter="">/ {
if (type == "msvc2005") gsub("Filter=\"\">", ">", $0);
}
/"\/>/ {
if (type == "msvc2005") gsub("/>", "\n" substr($0, 1, index($0, $1) - 2) "/>", $0);
}
/">/ {
if (type == "msvc2005") gsub(">", "\n" substr($0, 1, index($0, $1) - 1) ">", $0);
}
{ print $0 }
' >> "$ROOT_DIR/projects/$2"
echo "$1" >> "$ROOT_DIR/projects/$2"
# Everything below the !!FILES!! marker
cat "$ROOT_DIR/projects/$2".in | tr '\r' '\n' | awk '
@ -199,9 +181,7 @@ safety_check "$ROOT_DIR/source.list"
load_main_data "$ROOT_DIR/source.list" openttd
load_lang_data "$ROOT_DIR/src/lang/*.txt" lang
generate "$openttd" "openttd.vcproj" "msvc2003"
generate "$openttd" "openttd_vs80.vcproj" "msvc2005"
generate "$openttd" "openttd_vs90.vcproj" "msvc2005"
generate "$lang" "langs.vcproj" "msvc2003"
generate "$lang" "langs_vs80.vcproj" "msvc2005"
generate "$lang" "langs_vs90.vcproj" "msvc2005"
generate "$openttd" "openttd_vs80.vcproj"
generate "$openttd" "openttd_vs90.vcproj"
generate "$lang" "langs_vs80.vcproj"
generate "$lang" "langs_vs90.vcproj"

@ -1,538 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="langs"
ProjectGUID="{0F066B23-18DF-4284-8265-F4A5E7E3B966}"
RootNamespace="langs"
SccProjectName=""
SccLocalPath=""
Keyword="MakeFileProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\bin\lang\"
IntermediateDirectory="..\objs\langs\"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="./langs.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Generating strings.h"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\src\lang\afrikaans.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating afrikaans language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\afrikaans.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\brazilian_portuguese.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating brazilian_portuguese language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\brazilian_portuguese.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\bulgarian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating bulgarian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\bulgarian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\catalan.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating catalan language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\catalan.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\croatian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating croatian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\croatian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\czech.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating czech language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\czech.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\danish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating danish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\danish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\dutch.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating dutch language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\dutch.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\english.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating english language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\english.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\english_US.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating english_US language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\english_US.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\esperanto.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating esperanto language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\esperanto.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\estonian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating estonian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\estonian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\finnish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating finnish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\finnish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\french.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating french language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\french.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\galician.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating galician language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\galician.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\german.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating german language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\german.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\hungarian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating hungarian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\hungarian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\icelandic.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating icelandic language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\icelandic.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\italian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating italian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\italian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\japanese.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating japanese language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\japanese.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\korean.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating korean language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\korean.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\lithuanian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating lithuanian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\lithuanian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\norwegian_bokmal.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating norwegian_bokmal language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\norwegian_bokmal.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\norwegian_nynorsk.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating norwegian_nynorsk language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\norwegian_nynorsk.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\origveh.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating origveh language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\origveh.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\piglatin.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating piglatin language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\piglatin.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\polish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating polish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\polish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\portuguese.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating portuguese language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\portuguese.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\romanian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating romanian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\romanian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\russian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating russian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\russian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\simplified_chinese.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating simplified_chinese language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\simplified_chinese.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\slovak.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating slovak language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\slovak.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\slovenian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating slovenian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\slovenian.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\spanish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating spanish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\spanish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\swedish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating swedish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\swedish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\traditional_chinese.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating traditional_chinese language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\traditional_chinese.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\turkish.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating turkish language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\turkish.lng"/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\ukrainian.txt">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating ukrainian language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;
"
AdditionalDependencies=""
Outputs="..\bin\lang\ukrainian.lng"/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="langs"
ProjectGUID="{0F066B23-18DF-4284-8265-F4A5E7E3B966}"
RootNamespace="langs"
SccProjectName=""
SccLocalPath=""
Keyword="MakeFileProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\bin\lang\"
IntermediateDirectory="..\objs\langs\"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="./langs.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Generating strings.h"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
!!FILES!!
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -1,43 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd.vcproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}"
ProjectSection(ProjectDependencies) = postProject
{0F066B23-18DF-4284-8265-F4A5E7E3B966} = {0F066B23-18DF-4284-8265-F4A5E7E3B966}
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs.vcproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}"
ProjectSection(ProjectDependencies) = postProject
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug.ActiveCfg = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug.Build.0 = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release.ActiveCfg = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release.Build.0 = Release|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug.ActiveCfg = Release|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug.Build.0 = Release|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release.ActiveCfg = Release|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release.Build.0 = Release|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,177 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="openttd"
RootNamespace="openttd"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="..\objs\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="..\objs\$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="1"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="TRUE"
FavorSizeOrSpeed="2"
OmitFramePointers="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="..\objs\langs"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_EXCEPTION_TRACKER;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="TRUE"
ExceptionHandling="TRUE"
RuntimeLibrary="0"
StructMemberAlignment="3"
BufferSecurityCheck="FALSE"
EnableFunctionLevelLinking="TRUE"
DefaultCharIsUnsigned="TRUE"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile=""
AssemblerOutput="2"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/$(TargetName).pdb"
BrowseInformation="1"
BrowseInformationFile="$(IntDir)/"
WarningLevel="3"
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CallingConvention="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
OptimizeForWindows98="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Release/openttd.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1053"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\objs\$(PlatformName)\$(ConfigurationName)\"
IntermediateDirectory="..\objs\$(PlatformName)\$(ConfigurationName)\"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_PNG;WITH_FREETYPE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/$(TargetName).pdb"
WarningLevel="3"
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"
CallingConvention="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="unicows.lib winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib"
LinkIncremental="0"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="LIBCMT.lib"
GenerateDebugInformation="TRUE"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/openttd.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
!!FILES!!
<File
RelativePath=".\..\media\mainicon.ico">
</File>
<File
RelativePath=".\..\media\openttd.ico">
</File>
<File
RelativePath=".\..\readme.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="strgen"
RootNamespace="strgen"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="..\objs\strgen\"
IntermediateDirectory="..\objs\strgen\"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="1"
GlobalOptimizations="TRUE"
FavorSizeOrSpeed="2"
PreprocessorDefinitions="STRGEN;WIN32;NDEBUG;_CONSOLE"
BasicRuntimeChecks="0"
RuntimeLibrary="5"
PrecompiledHeaderFile=""
AssemblerOutput="2"
AssemblerListingLocation="$(IntDir)"
ObjectFile="$(IntDir)"
ProgramDataBaseFileName="$(IntDir)\$(TargetName).pdb"
WarningLevel="3"
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(IntDir)\strgen.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(IntDir)\strgen.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/strgen.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1053"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\src\strgen\strgen.cpp">
</File>
<File
RelativePath="..\src\string.cpp">
</File>
</Filter>
<File
RelativePath="..\src\macros.h">
</File>
<File
RelativePath="..\src\stdafx.h">
</File>
<File
RelativePath="..\src\string.h">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -59,50 +59,34 @@ struct DebugLevel {
#if !defined(NO_DEBUG_MESSAGES)
/** Functionized DEBUG macro for compilers that don't support
* variadic macros (__VA_ARGS__) such as...yes MSVC2003 and lower */
#if defined(NO_VARARG_MACRO)
void CDECL DEBUG(int name, int level, ...)
{
va_list va;
const char *dbg;
const DebugLevel *dl = &debug_level[name];
if (level != 0 && *dl->level < level) return;
dbg = dl->name;
va_start(va, level);
#else
void CDECL debug(const char *dbg, ...)
{
va_list va;
va_start(va, dbg);
#endif /* NO_VARARG_MACRO */
{
const char *s;
char buf[1024];
const char *s;
char buf[1024];
s = va_arg(va, const char*);
vsnprintf(buf, lengthof(buf), s, va);
va_end(va);
s = va_arg(va, const char*);
vsnprintf(buf, lengthof(buf), s, va);
va_end(va);
#if defined(ENABLE_NETWORK)
if (_debug_socket != INVALID_SOCKET) {
char buf2[lengthof(buf) + 32];
if (_debug_socket != INVALID_SOCKET) {
char buf2[lengthof(buf) + 32];
snprintf(buf2, lengthof(buf2), "dbg: [%s] %s\n", dbg, buf);
send(_debug_socket, buf2, strlen(buf2), 0);
} else
snprintf(buf2, lengthof(buf2), "dbg: [%s] %s\n", dbg, buf);
send(_debug_socket, buf2, strlen(buf2), 0);
} else
#endif /* ENABLE_NETWORK */
{
{
#if defined(WINCE)
/* We need to do OTTD2FS twice, but as it uses a static buffer, we need to store one temporary */
TCHAR tbuf[512];
_sntprintf(tbuf, sizeof(tbuf), _T("%s"), OTTD2FS(dbg));
NKDbgPrintfW(_T("dbg: [%s] %s\n"), tbuf, OTTD2FS(buf));
/* We need to do OTTD2FS twice, but as it uses a static buffer, we need to store one temporary */
TCHAR tbuf[512];
_sntprintf(tbuf, sizeof(tbuf), _T("%s"), OTTD2FS(dbg));
NKDbgPrintfW(_T("dbg: [%s] %s\n"), tbuf, OTTD2FS(buf));
#else
fprintf(stderr, "dbg: [%s] %s\n", dbg, buf);
fprintf(stderr, "dbg: [%s] %s\n", dbg, buf);
#endif
IConsoleDebug(dbg, buf);
}
IConsoleDebug(dbg, buf);
}
}
#endif /* NO_DEBUG_MESSAGES */

@ -19,44 +19,14 @@
* 6.. - extremely detailed spamming
*/
/* Of course MSVC 2003 and lower has no support for variadic macros
* so we need to work around this... *sigh* */
#if defined(_MSC_VER) && (_MSC_VER < 1400)
#define NO_VARARG_MACRO
#endif
#if defined(NO_VARARG_MACRO)
enum DebugLevelType {
ai,
driver,
grf,
map,
misc,
ms,
net,
sprite,
oldloader,
ntp,
npf,
yapf,
freetype,
sl,
station,
};
#endif /* NO_VARARG_MACRO */
#ifdef NO_DEBUG_MESSAGES
#if defined(NO_VARARG_MACRO)
static inline void DEBUG(int name, int level, ...) {}
#elif defined(__GNUC__) && (__GNUC__ < 3)
#if defined(__GNUC__) && (__GNUC__ < 3)
#define DEBUG(name, level, args...)
#else
#define DEBUG(name, level, ...)
#endif
#else /* NO_DEBUG_MESSAGES */
#if defined(NO_VARARG_MACRO)
void CDECL DEBUG(int name, int level, ...);
#elif defined(__GNUC__) && (__GNUC__ < 3)
#if defined(__GNUC__) && (__GNUC__ < 3)
#define DEBUG(name, level, args...) if ((level == 0) || ( _debug_ ## name ## _level >= level)) debug(#name, args)
#else
#define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__)
@ -78,9 +48,7 @@
extern int _debug_sl_level;
extern int _debug_station_level;
#if !defined(NO_VARARG_MACRO)
void CDECL debug(const char *dbg, ...);
#endif /* NO_VARARG_MACRO */
void CDECL debug(const char *dbg, ...);
#endif /* NO_DEBUG_MESSAGES */
void SetDebugString(const char *s);

@ -43,7 +43,7 @@ enum {
};
/* Apparently these don't play well with enums. */
static const OverflowSafeInt64 INVALID_DATAPOINT = INT64_MAX; // Value used for a datapoint that shouldn't be drawn.
static const OverflowSafeInt64 INVALID_DATAPOINT(INT64_MAX); // Value used for a datapoint that shouldn't be drawn.
static const uint INVALID_DATAPOINT_POS = UINT_MAX; // Used to determine if the previous point was drawn.
struct GraphDrawer {

@ -156,19 +156,17 @@
#pragma warning(disable: 4761) // integral size mismatch in argument : conversion supplied
#pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
#if (_MSC_VER >= 1400) // MSVC 2005 safety checks
#pragma warning(disable: 4996) // 'strdup' was declared deprecated
#define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions
#pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
#pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001
#pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant
#pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
#pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
#pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
#else /* _MSC_VER >= 1400 ( <1400 for MSVC2003) */
#pragma warning(disable: 4288) // nonstandard extension used : 'y' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
#pragma warning(disable: 4292) // compiler limit : terminating debug information emission for enum 'StringIdEnum' with member 'STR_801D_COAL_CAR'
#endif /* _MSC_VER >= 1400 */
#if (_MSC_VER < 1400) // MSVC 2005 safety checks
#error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not!. Upgrade your compiler."
#endif /* (_MSC_VER < 1400) */
#pragma warning(disable: 4996) // 'strdup' was declared deprecated
#define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions
#pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
#pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001
#pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant
#pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
#pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
#pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
#include <malloc.h> // alloca()
#define NORETURN __declspec(noreturn)

Loading…
Cancel
Save