diff --git a/.gitignore b/.gitignore index 3e74133dfe..156a9f7a66 100644 --- a/.gitignore +++ b/.gitignore @@ -21,18 +21,13 @@ bin/scripts/* !bin/scripts/*.example !bin/scripts/readme.txt -*.aps bundle/* bundles/* docs/aidocs/* docs/gamedocs/* docs/source/* -.kdev4 -.kdev4/* -*.kdev4 media/openttd.desktop media/openttd.desktop.install -objs/* projects/.vs projects/Debug projects/Release @@ -44,8 +39,6 @@ projects/*.vcproj.*.user projects/*.vcxproj.user projects/*.VC.db projects/*.VC.opendb -src/rev.cpp -src/os/windows/ottdres.rc /Makefile* !/Makefile.msvc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..825ba3dcd4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,237 @@ +cmake_minimum_required(VERSION 3.5) + +project(OpenTTD) + +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the bin directory") +endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") + +# Use GNUInstallDirs to allow customisation +# but set our own default data dir +if (NOT CMAKE_INSTALL_DATADIR) + set(CMAKE_INSTALL_DATADIR "share/games") +endif (NOT CMAKE_INSTALL_DATADIR) +include(GNUInstallDirs) + +include(Options) +set_options() +set_directory_options() + +include(Static) +set_static_if_needed() + +# Prefer -pthread over -lpthread, which is often the better option of the two. +set(CMAKE_THREAD_PREFER_PTHREAD YES) +# Make sure we have Threads available. +find_package(Threads REQUIRED) + +find_package(ZLIB) +find_package(LibLZMA) +find_package(LZO) +find_package(PNG) +if (NOT WIN32) + find_package(SDL2) + if (NOT SDL2_FOUND) + find_package(SDL) + endif( NOT SDL2_FOUND) + find_package(Allegro) + find_package(Fluidsynth) + find_package(Freetype) + find_package(Fontconfig) + find_package(ICU OPTIONAL_COMPONENTS i18n lx) + find_package(XDG_basedir) +endif (NOT WIN32) +if (APPLE) + find_package(Iconv) + + find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) + find_library(AUDIOUNIT_LIBRARY AudioUnit) + find_library(COCOA_LIBRARY Cocoa) +endif (APPLE) + +if (MSVC) + find_package(Editbin REQUIRED) +endif (MSVC) + +find_package(SSE) +find_package(Xaudio2) + +find_package(Grfcodec) + +# IPO is only properly supported from CMake 3.9. Despite the fact we are +# CMake 3.5, still enable IPO if we detect we are 3.9+. +if (POLICY CMP0069) + cmake_policy(SET CMP0069 NEW) + include(CheckIPOSupported) + check_ipo_supported(RESULT IPO_FOUND) +endif (POLICY CMP0069) + +show_options() + +if (UNIX AND NOT APPLE AND NOT OPTION_DEDICATED) + if (NOT SDL_FOUND AND NOT SDL2_FOUND) + message(FATAL_ERROR "SDL or SDL2 is required for this platform") + endif (NOT SDL_FOUND AND NOT SDL2_FOUND) +endif (UNIX AND NOT APPLE AND NOT OPTION_DEDICATED) +if (APPLE) + if (NOT AUDIOTOOLBOX_LIBRARY) + message(FATAL_ERROR "AudioToolbox is required for this platform") + endif (NOT AUDIOTOOLBOX_LIBRARY) + if (NOT AUDIOUNIT_LIBRARY) + message(FATAL_ERROR "AudioUnit is required for this platform") + endif (NOT AUDIOUNIT_LIBRARY) + if (NOT COCOA_LIBRARY) + message(FATAL_ERROR "Cocoa is required for this platform") + endif (NOT COCOA_LIBRARY) +endif (APPLE) + +if (MSVC) + # C++17 for MSVC + set(CMAKE_CXX_STANDARD 17) +else (MSVC) + # C++11 for all other targets + set(CMAKE_CXX_STANDARD 11) +endif (MSVC) + +set(CMAKE_CXX_STANDARD_REQUIRED YES) +set(CMAKE_CXX_EXTENSIONS NO) + +set(CMAKE_EXPORT_COMPILE_COMMANDS YES) + +list(APPEND GENERATED_SOURCE_FILES "${CMAKE_BINARY_DIR}/generated/rev.cpp") +if (WIN32) + list(APPEND GENERATED_SOURCE_FILES "${CMAKE_BINARY_DIR}/generated/ottdres.rc") +endif (WIN32) + +# Generate a target to determine version, which is execute every 'make' run +add_custom_target(find_version + ${CMAKE_COMMAND} + -DFIND_VERSION_BINARY_DIR=${CMAKE_BINARY_DIR}/generated + -DCPACK_BINARY_DIR=${CMAKE_BINARY_DIR} + -P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + BYPRODUCTS ${GENERATED_SOURCE_FILES} +) + +include(SourceList) +include(Endian) +add_endian_definition() + +# Needed by rev.cpp +include_directories(${CMAKE_SOURCE_DIR}/src) +# Needed by everything that uses Squirrel +include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/squirrel/include) + +include(CompileFlags) +compile_flags() + +add_executable(openttd WIN32 ${GENERATED_SOURCE_FILES}) +# All other files are added via target_sources() + +include(AddCustomXXXTimestamp) +add_subdirectory(${CMAKE_SOURCE_DIR}/src) +add_subdirectory(${CMAKE_SOURCE_DIR}/media/baseset) + +add_dependencies(openttd + find_version) + +target_link_libraries(openttd + openttd::languages + openttd::settings + openttd::basesets + Threads::Threads +) + +if (IPO_FOUND) + set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE True) + set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL True) + set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO True) +endif (IPO_FOUND) +set_target_properties(openttd PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/bin") +process_compile_flags() + +if (APPLE OR UNIX) + add_definitions(-DUNIX) +endif (APPLE OR UNIX) + +include(LinkPackage) +link_package(PNG TARGET PNG::PNG ENCOURAGED) +link_package(ZLIB TARGET ZLIB::ZLIB ENCOURAGED) +link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGED) +link_package(LZO ENCOURAGED) +link_package(XDG_basedir) + +if (NOT OPTION_DEDICATED) + link_package(Fluidsynth) + link_package(SDL) + link_package(SDL2 TARGET SDL2::SDL2) + link_package(Allegro) + link_package(FREETYPE TARGET Freetype::Freetype) + link_package(Fontconfig TARGET Fontconfig::Fontconfig) + link_package(ICU_lx) + link_package(ICU_i18n) +endif (NOT OPTION_DEDICATED) + +if (APPLE) + link_package(Iconv TARGET Iconv::Iconv) + + target_link_libraries(openttd + ${AUDIOTOOLBOX_LIBRARY} + ${AUDIOUNIT_LIBRARY} + ${COCOA_LIBRARY} + ) + + add_definitions( + -DWITH_COCOA + -DENABLE_COCOA_QUARTZ + ) +endif (APPLE) + +if (NOT PERSONAL_DIR STREQUAL "(not set)") + add_definitions( + -DWITH_PERSONAL_DIR + -DPERSONAL_DIR="${PERSONAL_DIR}" + ) +endif (NOT PERSONAL_DIR STREQUAL "(not set)") + +if (NOT SHARED_DIR STREQUAL "(not set)") + add_definitions( + -DWITH_SHARED_DIR + -DSHARED_DIR="${SHARED_DIR}" + ) +endif (NOT SHARED_DIR STREQUAL "(not set)") + +if (NOT GLOBAL_DIR STREQUAL "(not set)") + add_definitions( + -DGLOBAL_DATA_DIR="${GLOBAL_DIR}" + ) +endif (NOT GLOBAL_DIR STREQUAL "(not set)") + +link_package(SSE) + +add_definitions_based_on_options() + +if (WIN32) + add_definitions( + -DUNICODE + -D_UNICODE + -DWITH_UNISCRIBE + ) + + target_link_libraries(openttd + ws2_32 + winmm + imm32 + ) +endif (WIN32) + +if (CMAKE_SIZEOF_VOID_P EQUAL 8) + add_definitions(-D_SQ64) +endif (CMAKE_SIZEOF_VOID_P EQUAL 8) + +include(CreateRegression) +create_regression() + +include(InstallAndPackage) diff --git a/COMPILING.md b/COMPILING.md index 46de5e09e2..64f25f9c22 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -23,7 +23,7 @@ no graphical user interface; you would be building a dedicated server. ## Windows: -You need Microsoft Visual Studio 2015 Update 3 or newer. +You need Microsoft Visual Studio 2017 or more recent. You can download the free Visual Studio Community Edition from Microsoft at https://visualstudio.microsoft.com/vs/community/. @@ -56,86 +56,66 @@ To install both the x64 (64bit) and x86 (32bit) variants (though only one is nec .\vcpkg install liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static ``` -Open the relevant project file and it should build automatically. -- VS 2015: projects/openttd_vs140.sln -- VS 2017: projects/openttd_vs141.sln -- VS 2019: projects/openttd_vs142.sln +You can open the folder (as a CMake project). CMake will be detected, and you can compile from there. -Set the build mode to `Release` in -`Build > Configuration manager > Active solution configuration`. -You can now compile. +Alternatively, you can create a MSVC project file via CMake. For this +either download CMake from https://cmake.org/download/ or use the version +that comes with vcpkg. After that, you can run something similar to this: -If everything works well the binary should be in `objs\Win[32|64]\Release\openttd.exe` -and in `bin\openttd.exe` - -The OpenTTD wiki may provide additional help with [compiling for Windows](https://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C%2B%2B_2015). - -You can also build OpenTTD with MSYS2/MinGW-w64 or Cygwin/MinGW using the Makefile. The OpenTTD wiki may provide additional help with [MSYS2](https://wiki.openttd.org/Compiling_on_Windows_using_MSYS2) - -## Linux, Unix, Solaris: - -OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'. -However, for the first build one has to do a '`./configure`' first. - -The OpenTTD wiki may provide additional help with: - -- [compiling for Linux and *BSD](https://wiki.openttd.org/Compiling_on_%28GNU/%29Linux_and_*BSD) -- [compiling for Solaris](https://wiki.openttd.org/Compiling_on_Solaris) - - -## macOS: - -Use '`make`' or Xcode (which will then call make for you) -This will give you a binary for your CPU type (PPC/Intel) -However, for the first build one has to do a '`./configure`' first. -To make a universal binary type '`./configure --enable-universal`' -instead of '`./configure`'. - -The OpenTTD wiki may provide additional help with [compiling for macOS](https://wiki.openttd.org/Compiling_on_Mac_OS_X). - -## Haiku: - -Use '`make`', but do a '`./configure`' before the first build. - -The OpenTTD wiki may provide additional help with [compiling for Haiku](https://wiki.openttd.org/Compiling_on_Haiku). +```powershell +mkdir build +cd build +cmake.exe .. -G'Visual Studio 16 2019' -DCMAKE_TOOLCHAIN_FILE="\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static" +``` -## OS/2: +Change `` to where you have installed vcpkg. After this +in the build folder are MSVC project files. MSVC can rebuild the project +files himself via the `ZERO_CHECK` project. -A comprehensive GNU build environment is required to build the OS/2 version. +## All other platforms -The OpenTTD wiki may provide additional help with [compiling for OS/2](https://wiki.openttd.org/Compiling_on_OS/2). +```bash +mkdir build +cd build +cmake .. +make +``` ## Supported compilers -The following compilers are tested with and known to compile OpenTTD: +Every compiler that is supported by CMake and supports C++11, should be +able to compile OpenTTD. As the exact list of compilers changes constantly, +we refer to the compiler manual to see if it supports C++11, and to CMake +to see if it supports your compiler. -- Microsoft Visual C++ (MSVC) 2015, 2017 and 2019. -- GNU Compiler Collection (GCC) 4.8 - 9. -- Clang/LLVM 3.9 - 8 +## Compilation of base sets -The following compilers are known not to compile OpenTTD: +To recompile the extra graphics needed to play with the original Transport +Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well. +GRFCodec can be found at +https://www.openttd.org/downloads/grfcodec-releases/latest.html. -In general, this is because these old versions do not (fully) support modern -C++11 language features. +Having GRFCodec installed can cause regeneration of the `.grf` files, which +are written in the source directory. This can leave your repository in a +modified state, as different GRFCodec versions can cause binary differences +in the resulting `.grf` files. Also translations might have been added for +the base sets which are not yet included in the base set information files. +To avoid this behaviour, disable GRFCodec (and NFORenum) in CMake cache +(`GRFCODEC_EXECUTABLE` and `NFORENUM_EXECUTABLE`). -- Microsoft Visual C++ (MSVC) 2013 and earlier. -- GNU Compiler Collection (GCC) 4.7 and earlier. -- Clang/LLVM 3.8 and earlier. +## Developers settings -If any of these, or any other, compilers can compile OpenTTD, let us know. -Pull requests to support more compilers are welcome. +You can control some flags directly via `CXXFLAGS` (any combination +of these flags will work fine too): -## Compilation of base sets +- `-DRANDOM_DEBUG`: this helps with debugging desyncs. +- `-fno-inline`: this avoids creating inline functions; this can make + debugging a lot easier. +- `-O0`: this disables all optimizations; this can make debugging a + lot easier. +- `-p`: this enables profiling. -To recompile the extra graphics needed to play with the original Transport -Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well. -GRFCodec can be found at https://www.openttd.org/download-grfcodec. -The compilation of these extra graphics does generally not happen, unless -you remove the graphics file using '`make maintainer-clean`'. - -Re-compilation of the base sets, thus also use of '`--maintainer-clean`' can -leave the repository in a modified state as different grfcodec versions can -cause binary differences in the resulting grf. Also translations might have -been added for the base sets which are not yet included in the base set -information files. Use the configure option '`--without-grfcodec`' to avoid -modification of the base set files by the build process. +Always use a clean buildfolder if you changing `CXXFLAGS`, as this +value is otherwise cached. Example use: + +`CXXFLAGS="-fno-inline" cmake ..` diff --git a/CPackProperties.cmake.in b/CPackProperties.cmake.in new file mode 100644 index 0000000000..824c50f93e --- /dev/null +++ b/CPackProperties.cmake.in @@ -0,0 +1,12 @@ +# Make the current version available to CPack +set(CPACK_PACKAGE_VERSION "@REV_VERSION@") + +# Name the output file with the correct version +string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}") + +if (CPACK_BUNDLE_PLIST_SOURCE) + # Rewrite the Info.plist.in to contain the correct version + file(READ ${CPACK_BUNDLE_PLIST_SOURCE} INFO_PLIST_CONTENT) + string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" INFO_PLIST_CONTENT "${INFO_PLIST_CONTENT}") + file(WRITE ${CPACK_BUNDLE_PLIST} "${INFO_PLIST_CONTENT}") +endif (CPACK_BUNDLE_PLIST_SOURCE) diff --git a/Makefile.bundle.in b/Makefile.bundle.in deleted file mode 100644 index 8a27ee1561..0000000000 --- a/Makefile.bundle.in +++ /dev/null @@ -1,232 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# -# Creation of bundles -# - -# The revision is needed for the bundle name and creating an OSX application bundle. -# Detect the revision -VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh") -VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') - -# Make sure we have something in VERSION -ifeq ($(VERSION),) -VERSION := norev000 -endif - -ifndef BUNDLE_NAME -BUNDLE_NAME = openttd-custom-$(VERSION)-$(OS) -ifeq ($(OS),MINGW) -BUNDLE_NAME := $(BUNDLE_NAME)-win$(CPU_TYPE) -endif -endif - -# An OSX application bundle needs the data files, lang files and openttd executable in a different location. -ifdef OSXAPP -AI_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/ai -GAME_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/game -BASESET_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/baseset -LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang -DATA_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/data -TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS -else -AI_DIR = $(BUNDLE_DIR)/ai -GAME_DIR = $(BUNDLE_DIR)/game -BASESET_DIR = $(BUNDLE_DIR)/baseset -LANG_DIR = $(BUNDLE_DIR)/lang -DATA_DIR = $(BUNDLE_DIR)/data -TTD_DIR = $(BUNDLE_DIR) -endif - -bundle: all - @echo '[BUNDLE] Constructing bundle' - $(Q)rm -rf "$(BUNDLE_DIR)" - $(Q)mkdir -p "$(BUNDLE_DIR)" - $(Q)mkdir -p "$(BUNDLE_DIR)/docs" - $(Q)mkdir -p "$(BUNDLE_DIR)/media" - $(Q)mkdir -p "$(BUNDLE_DIR)/scripts" - $(Q)mkdir -p "$(TTD_DIR)" - $(Q)mkdir -p "$(AI_DIR)" - $(Q)mkdir -p "$(GAME_DIR)" - $(Q)mkdir -p "$(BASESET_DIR)" - $(Q)mkdir -p "$(LANG_DIR)" - $(Q)mkdir -p "$(DATA_DIR)" -ifdef OSXAPP - $(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources" - $(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo" - $(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns" - $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(VERSION)" - $(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(BASESET_DIR)" -endif -ifeq ($(OS),UNIX) - $(Q)cp "$(ROOT_DIR)/media/openttd.32.bmp" "$(BASESET_DIR)/" -endif - $(Q)cp "$(BIN_DIR)/$(TTD)" "$(TTD_DIR)/" - $(Q)cp "$(BIN_DIR)/ai/"compat_*.nut "$(AI_DIR)/" - $(Q)cp "$(BIN_DIR)/game/"compat_*.nut "$(GAME_DIR)/" - $(Q)cp "$(BIN_DIR)/baseset/"*.grf "$(BASESET_DIR)/" - $(Q)cp "$(BIN_DIR)/baseset/"*.obg "$(BASESET_DIR)/" - $(Q)cp "$(BIN_DIR)/baseset/"*.obs "$(BASESET_DIR)/" - $(Q)cp "$(BIN_DIR)/baseset/opntitle.dat" "$(BASESET_DIR)/" - $(Q)cp "$(BIN_DIR)/baseset/"*.obm "$(BASESET_DIR)/" - $(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/" - $(Q)cp "$(BIN_DIR)/data/"*.grf "$(DATA_DIR)/" - $(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/" - $(Q)cp "$(ROOT_DIR)/COPYING.md" "$(BUNDLE_DIR)/" - $(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/" - $(Q)cp "$(ROOT_DIR)/docs/multiplayer.md" "$(BUNDLE_DIR)/docs/" - $(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/" - $(Q)cp "$(ROOT_DIR)/jgrpp-changelog.md" "$(BUNDLE_DIR)/" -ifdef MAN_DIR - $(Q)mkdir -p "$(BUNDLE_DIR)/man/" - $(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/" - $(Q)gzip -9 "$(BUNDLE_DIR)/man/openttd.6" -endif - $(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/" - $(Q)cp "$(ROOT_DIR)/media/openttd."*.png "$(BUNDLE_DIR)/media/" - $(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/" -ifdef MENU_DIR - $(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/" - $(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | LC_ALL=C $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop" - $(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install" -endif -ifeq ($(TTD), openttd.exe) - $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"*.md -endif - -### Packing the current bundle into several compressed file formats ### -# -# Zips & dmgs do not contain a root folder, i.e. they have files in the root of the zip/dmg. -# gzip, bzip2 and lha archives have a root folder, with the same name as the bundle. -# -# One can supply a custom name by adding BUNDLE_NAME:= to the make command. -# -bundle_zip: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).zip' - $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)cd "$(BUNDLE_DIR)" && zip -r $(shell if test -z "$(VERBOSE)"; then echo '-q'; fi) "$(BUNDLES_DIR)/$(BUNDLE_NAME).zip" . - -bundle_7z: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).7z' - $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)cd "$(BUNDLE_DIR)" && 7z a "$(BUNDLES_DIR)/$(BUNDLE_NAME).7z" . - -bundle_gzip: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.gz' - $(Q)mkdir -p "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)" - $(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)/" - $(Q)cd "$(BUNDLES_DIR)/.gzip" && tar -zc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.gz" "$(BUNDLE_NAME)" - $(Q)rm -rf "$(BUNDLES_DIR)/.gzip" - -bundle_bzip2: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.bz2' - $(Q)mkdir -p "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)" - $(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)/" - $(Q)cd "$(BUNDLES_DIR)/.bzip2" && tar -jc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.bz2" "$(BUNDLE_NAME)" - $(Q)rm -rf "$(BUNDLES_DIR)/.bzip2" - -bundle_lzma: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.lzma' - $(Q)mkdir -p "$(BUNDLES_DIR)/.lzma/$(BUNDLE_NAME)" - $(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lzma/$(BUNDLE_NAME)/" - $(Q)cd "$(BUNDLES_DIR)/.lzma" && tar --lzma -c$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.lzma" "$(BUNDLE_NAME)" - $(Q)rm -rf "$(BUNDLES_DIR)/.lzma" - -bundle_xz: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.xz' - $(Q)mkdir -p "$(BUNDLES_DIR)/.xz/$(BUNDLE_NAME)" - $(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.xz/$(BUNDLE_NAME)/" - $(Q)cd "$(BUNDLES_DIR)/.xz" && tar --xz -c$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.xz" "$(BUNDLE_NAME)" - $(Q)rm -rf "$(BUNDLES_DIR)/.xz" - -bundle_lha: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).lha' - $(Q)mkdir -p "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)" - $(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)/" - $(Q)cd "$(BUNDLES_DIR)/.lha" && lha ao6 "$(BUNDLES_DIR)/$(BUNDLE_NAME).lha" "$(BUNDLE_NAME)" - $(Q)rm -rf "$(BUNDLES_DIR)/.lha" - -bundle_dmg: bundle - @echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg' - $(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(VERSION)" - $(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(VERSION)" - $(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(VERSION)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg" - $(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(VERSION)" - -bundle_exe: all - @echo '[BUNDLE] Creating $(BUNDLE_NAME).exe' - $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)unix2dos "$(ROOT_DIR)/docs/"* "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt" "$(ROOT_DIR)/"*.md - $(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi - $(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe" - -ifdef OSXAPP -install: - @echo '[INSTALL] Cannot install the OSX Application Bundle' -else -install: bundle - @echo '[INSTALL] Installing OpenTTD' - $(Q)install -d "$(INSTALL_BINARY_DIR)" - $(Q)install -d "$(INSTALL_ICON_DIR)" - $(Q)install -d "$(INSTALL_DATA_DIR)/ai" - $(Q)install -d "$(INSTALL_DATA_DIR)/game" - $(Q)install -d "$(INSTALL_DATA_DIR)/baseset" - $(Q)install -d "$(INSTALL_DATA_DIR)/lang" - $(Q)install -d "$(INSTALL_DATA_DIR)/scripts" - $(Q)install -d "$(INSTALL_DATA_DIR)/data" -ifeq ($(TTD), openttd.exe) - $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}.exe" -else - $(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}" -endif - $(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang" - $(Q)install -m 644 "$(BUNDLE_DIR)/ai/"* "$(INSTALL_DATA_DIR)/ai" - $(Q)install -m 644 "$(BUNDLE_DIR)/game/"* "$(INSTALL_DATA_DIR)/game" - $(Q)install -m 644 "$(BUNDLE_DIR)/baseset/"* "$(INSTALL_DATA_DIR)/baseset" - $(Q)install -m 644 "$(BUNDLE_DIR)/data/"* "$(INSTALL_DATA_DIR)/data" - $(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts" -ifndef DO_NOT_INSTALL_DOCS - $(Q)install -d "$(INSTALL_DOC_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/known-bugs.txt" "$(INSTALL_DOC_DIR)" -endif -ifndef DO_NOT_INSTALL_CHANGELOG - $(Q)install -d "$(INSTALL_DOC_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/changelog.txt" "$(INSTALL_DOC_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/jgrpp-changelog.md" "$(INSTALL_DOC_DIR)" -endif -ifndef DO_NOT_INSTALL_LICENSE - $(Q)install -d "$(INSTALL_DOC_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/COPYING.md" "$(INSTALL_DOC_DIR)" -endif - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm" -ifdef ICON_THEME_DIR - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps/${BINARY_NAME}.png" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps/${BINARY_NAME}.png" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps/${BINARY_NAME}.png" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps/${BINARY_NAME}.png" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps/${BINARY_NAME}.png" - $(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps" - $(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps/${BINARY_NAME}.png" -else - $(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)" -endif -ifdef MAN_DIR -ifndef DO_NOT_INSTALL_MAN - $(Q)install -d "$(INSTALL_MAN_DIR)" - $(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz" -endif -endif -ifdef MENU_DIR - $(Q)install -d "$(INSTALL_MENU_DIR)" - $(Q)install -m 644 "$(ROOT_DIR)/media/openttd.desktop.install" "$(INSTALL_MENU_DIR)/${BINARY_NAME}.desktop" -endif -endif # OSXAPP diff --git a/Makefile.grf.in b/Makefile.grf.in deleted file mode 100644 index be382d708d..0000000000 --- a/Makefile.grf.in +++ /dev/null @@ -1,116 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . -# -# Building requires GRFCodec. -# -# Recent versions (including sources) can be found at: -# http://www.openttd.org/download-grfcodec -# -# The mercurial repository can be found at: -# http://hg.openttdcoop.org/grfcodec -# - - -ROOT_DIR = !!ROOT_DIR!! -GRF_DIR = $(ROOT_DIR)/media/extra_grf -BASESET_DIR = $(ROOT_DIR)/media/baseset -LANG_DIR = $(ROOT_DIR)/src/lang -BIN_DIR = !!BIN_DIR!!/baseset -OBJS_DIR = !!GRF_OBJS_DIR!! -OS = !!OS!! -STAGE = !!STAGE!! - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = - E = @true -else - Q = @ - E = @echo -endif - -GRFCODEC := !!GRFCODEC!! -NFORENUM := !!NFORENUM!! -CC_BUILD := !!CC_BUILD!! -MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum") - -# Some "should not be changed" settings. -NFO_FILES := $(GRF_DIR)/*.nfo $(GRF_DIR)/rivers/*.nfo -PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png - -# List of target files. -OBT_FILES := $(BIN_DIR)/orig_dos.obg -OBT_FILES += $(BIN_DIR)/orig_dos_de.obg -OBT_FILES += $(BIN_DIR)/orig_win.obg -OBT_FILES += $(BIN_DIR)/orig_dos.obs -OBT_FILES += $(BIN_DIR)/orig_win.obs -OBT_FILES += $(BIN_DIR)/no_sound.obs -OBT_FILES += $(BIN_DIR)/orig_dos.obm -OBT_FILES += $(BIN_DIR)/orig_win.obm -OBT_FILES += $(BIN_DIR)/no_music.obm -OBT_FILES += $(BIN_DIR)/orig_tto.obm - -# Build the GRF. -all: $(OBT_FILES) -ifdef GRFCODEC -all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf -endif - -$(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt - $(E) '$(STAGE) Collecting baseset translations' - $(Q) cat $^ > $@ - -$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/orig_extra.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk - $(E) '$(STAGE) Updating $(notdir $@)' - $(Q) sed 's/^ORIG_EXTRA.GRF = *[0-9a-f]*$$/ORIG_EXTRA.GRF = '`$(MD5SUM) $(BIN_DIR)/orig_extra.grf | sed 's@ .*@@'`'/' $< > $@.tmp - $(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $@.tmp >$@ - $(Q) rm $@.tmp - -$(BIN_DIR)/%.obs: $(BASESET_DIR)/%.obs $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk - $(E) '$(STAGE) Updating $(notdir $@)' - $(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@ - -$(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk - $(E) '$(STAGE) Updating $(notdir $@)' - $(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@ - -# Guard against trying to run GRFCODEC/NFORENUM without either being set. -ifdef GRFCODEC -ifdef NFORENUM - -# Compile extra grf -$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk - $(E) '$(STAGE) Assembling openttd.nfo' - $(Q)-mkdir -p $(OBJS_DIR)/sprites - $(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null - $(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo - $(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo - $(E) '$(STAGE) Compiling openttd.grf' - $(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf - $(Q)cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf - -# The copy operation of PNG_FILES is duplicated from the target 'openttd.grf', thus those targets may not run in parallel. -$(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk | $(BIN_DIR)/openttd.grf - $(E) '$(STAGE) Assembling orig_extra.nfo' - $(Q)-mkdir -p $(OBJS_DIR)/sprites - $(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null - $(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/orig_extra.nfo > $(OBJS_DIR)/sprites/orig_extra.nfo - $(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/orig_extra.nfo - $(E) '$(STAGE) Compiling orig_extra.grf' - $(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf - $(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf - -endif -endif - -# Clean up temporary files. -clean: - $(Q)rm -f *.bak *.grf $(OBT_FILES) - -# Clean up temporary files -mrproper: clean - $(Q)rm -fr sprites - -.PHONY: all mrproper depend clean diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index f76d741226..0000000000 --- a/Makefile.in +++ /dev/null @@ -1,186 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = -else - Q = @ -endif - -include Makefile.am - -CONFIG_CACHE_PWD = !!CONFIG_CACHE_PWD!! -CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!! -BIN_DIR = !!BIN_DIR!! -ICON_THEME_DIR = !!ICON_THEME_DIR!! -MAN_DIR = !!MAN_DIR!! -MENU_DIR = !!MENU_DIR!! -SRC_DIR = !!SRC_DIR!! -ROOT_DIR = !!ROOT_DIR!! -BUNDLE_DIR = "$(ROOT_DIR)/bundle" -BUNDLES_DIR = "$(ROOT_DIR)/bundles" -INSTALL_DIR = !!INSTALL_DIR!! -INSTALL_BINARY_DIR = "$(INSTALL_DIR)/"!!BINARY_DIR!! -INSTALL_MAN_DIR = "$(INSTALL_DIR)/$(MAN_DIR)" -INSTALL_MENU_DIR = "$(INSTALL_DIR)/$(MENU_DIR)" -INSTALL_ICON_DIR = "$(INSTALL_DIR)/"!!ICON_DIR!! -INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)" -INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!! -INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!! -SOURCE_LIST = !!SOURCE_LIST!! -CONFIGURE_FILES = !!CONFIGURE_FILES!! -BINARY_NAME = !!BINARY_NAME!! -STRIP = !!STRIP!! -TTD = !!TTD!! -TTDS = $(SRC_DIRS:%=%/$(TTD)) -OS = !!OS!! -CPU_TYPE = !!CPU_TYPE!! -OSXAPP = !!OSXAPP!! -LIPO = !!LIPO!! -AWK = !!AWK!! -SORT = !!SORT!! -DISTCC = !!DISTCC!! - -RES := $(shell if [ ! -f $(CONFIG_CACHE_PWD) ] || [ "`pwd`" != "`cat $(CONFIG_CACHE_PWD)`" ]; then echo "`pwd`" > $(CONFIG_CACHE_PWD); fi ) -RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST) 2>/dev/null`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi ) - -all: config.pwd config.cache -ifdef DISTCC - @if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN parameter"; echo; fi -endif - @for dir in $(DIRS); do \ - $(MAKE) -C $$dir all || exit 1; \ - done -ifdef LIPO -# Lipo is an OSX thing. If it is defined, it means we are building for universal, -# and so we have have to combine the binaries into one big binary - -# Remove the last binary made by the last compiled target - $(Q)rm -f $(BIN_DIR)/$(TTD) -# Make all the binaries into one - $(Q)$(LIPO) -create -output $(BIN_DIR)/$(TTD) $(TTDS) -endif - -help: - @echo "Available make commands:" - @echo "" - @echo "Compilation:" - @echo " all compile the executable and the lang files" - @echo " lang compile the lang files only" - @echo "Clean up:" - @echo " clean remove the files generated during compilation" - @echo " mrproper remove the files generated during configuration and compilation" - @echo "Run after compilation:" - @echo " run execute openttd after the compilation" - @echo " run-gdb execute openttd in debug mode after the compilation" - @echo " run-prof execute openttd in profiling mode after the compilation" - @echo "Installation:" - @echo " install install the compiled files and the data-files after the compilation" - @echo " bundle create the base for an installation bundle" - @echo " bundle_zip create the zip installation bundle" - @echo " bundle_gzip create the gzip installation bundle" - @echo " bundle_bzip2 create the bzip2 installation bundle" - @echo " bundle_lha create the lha installation bundle" - @echo " bundle_dmg create the dmg installation bundle" - -config.pwd: $(CONFIG_CACHE_PWD) - $(MAKE) reconfigure - -config.cache: $(CONFIG_CACHE_SOURCE_LIST) $(CONFIGURE_FILES) - $(MAKE) reconfigure - -reconfigure: -ifeq ($(shell if test -f config.cache; then echo 1; fi), 1) - @echo "----------------" - @echo "The system detected that source.list or any configure file is altered." - @echo " Going to reconfigure with last known settings..." - @echo "----------------" -# Make sure we don't lock config.cache - @$(shell cat config.cache | sed 's@\\ @\\\\ @g') || exit 1 - @echo "----------------" - @echo "Reconfig done. Please re-execute make." - @echo "----------------" -else - @echo "----------------" - @echo "Have not found a configuration, please run configure first." - @echo "----------------" - @exit 1 -endif - -clean: - @for dir in $(DIRS); do \ - $(MAKE) -C $$dir clean; \ - done - $(Q)rm -rf $(BUNDLE_TARGET) - -lang: - @for dir in $(LANG_DIRS); do \ - $(MAKE) -C $$dir all; \ - done - -mrproper: - @for dir in $(DIRS); do \ - $(MAKE) -C $$dir mrproper; \ - done -# Don't be tempted to merge these two for loops. Doing that breaks make -# --dry-run, since make has this "feature" that it always runs commands -# containing $(MAKE), even when --dry-run is passed. The objective is of -# course to also get a dry-run of submakes, but make is not smart enough -# to see that a for loop runs both a submake and an actual command. - @for dir in $(DIRS); do \ - rm -f $$dir/Makefile; \ - done - $(Q)rm -rf objs - $(Q)rm -f Makefile Makefile.am Makefile.bundle - $(Q)rm -f media/openttd.desktop media/openttd.desktop.install - $(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.pwd config.log $(CONFIG_CACHE_PWD) -# directories for bundle generation - $(Q)rm -rf $(BUNDLE_DIR) - $(Q)rm -rf $(BUNDLES_DIR) -# output of profiling - $(Q)rm -f $(BIN_DIR)/gmon.out -# output of generating 'API' documentation - $(Q)rm -rf $(ROOT_DIR)/docs/source - $(Q)rm -rf $(ROOT_DIR)/docs/aidocs - $(Q)rm -rf $(ROOT_DIR)/docs/gamedocs -# directories created by OpenTTD on regression testing - $(Q)rm -rf $(BIN_DIR)/ai/regression/content_download $(BIN_DIR)/ai/regression/save $(BIN_DIR)/ai/regression/scenario -distclean: mrproper - -maintainer-clean: distclean - $(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/orig_extra.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm - -depend: - @for dir in $(SRC_DIRS); do \ - $(MAKE) -C $$dir depend; \ - done - -run: all - $(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS) - -run-gdb: all - $(Q)cd !!BIN_DIR!! && gdb --ex run --args ./!!TTD!! $(OPENTTD_ARGS) - -run-prof: all - $(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS) && gprof !!TTD!! | less - -regression: all - $(Q)cd !!BIN_DIR!! && sh ai/regression/run.sh -test: regression - -%.o: - @for dir in $(SRC_DIRS); do \ - $(MAKE) -C $$dir $(@:src/%=%); \ - done - -%.lng: - @for dir in $(LANG_DIRS); do \ - $(MAKE) -C $$dir $@; \ - done - -.PHONY: test distclean mrproper clean - -include Makefile.bundle diff --git a/Makefile.lang.in b/Makefile.lang.in deleted file mode 100644 index bce43b8466..0000000000 --- a/Makefile.lang.in +++ /dev/null @@ -1,87 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -STRGEN = !!STRGEN!! -SRC_DIR = !!SRC_DIR!! -LANG_DIR = !!LANG_DIR!! -BIN_DIR = !!BIN_DIR!! -LANGS_SRC = $(shell ls $(LANG_DIR)/*.txt) -LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng) -CXX_BUILD = !!CXX_BUILD!! -CFLAGS_BUILD = !!CFLAGS_BUILD!! -CXXFLAGS_BUILD= !!CXXFLAGS_BUILD!! -LDFLAGS_BUILD = !!LDFLAGS_BUILD!! -STRGEN_FLAGS = !!STRGEN_FLAGS!! -STAGE = !!STAGE!! -LANG_SUPPRESS = !!LANG_SUPPRESS!! -LANG_OBJS_DIR = !!LANG_OBJS_DIR!! - -ifeq ($(LANG_SUPPRESS), yes) -LANG_ERRORS = >/dev/null 2>&1 -endif - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = - E = @true -else - Q = @ - E = @echo -endif - -RES := $(shell mkdir -p $(BIN_DIR)/lang ) - -all: table/strings.h $(LANGS) - -strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< - -strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< - -string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< - -alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< - -getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $< - -lang/english.txt: $(LANG_DIR)/english.txt - $(Q)mkdir -p lang - $(Q)cp $(LANG_DIR)/english.txt lang/english.txt - -$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o - $(E) '$(STAGE) Compiling and Linking $@' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@ - -table/strings.h: lang/english.txt $(STRGEN) - $(E) '$(STAGE) Generating $@' - @mkdir -p table - $(Q)./$(STRGEN) -s $(LANG_DIR) -d table - -$(LANGS): %.lng: $(LANG_DIR)/%.txt $(STRGEN) lang/english.txt - $(E) '$(STAGE) Compiling language $(*F)' - $(Q)./$(STRGEN) $(STRGEN_FLAGS) -s $(LANG_DIR) -d $(LANG_OBJS_DIR) $< $(LANG_ERRORS) && cp $@ $(BIN_DIR)/lang || true # Do not fail all languages when one fails - -depend: - -clean: - $(E) '$(STAGE) Cleaning up language files' - $(Q)rm -f strgen_base.o strgen.o string.o alloc_func.o getoptdata.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.* - -mrproper: clean - $(Q)rm -rf $(BIN_DIR)/lang - -%.lng: - @echo '$(STAGE) No such language: $(@:%.lng=%)' - -.PHONY: all mrproper depend clean diff --git a/Makefile.msvc b/Makefile.msvc deleted file mode 100644 index 8070062acf..0000000000 --- a/Makefile.msvc +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# -# Makefile for creating bundles of MSVC's binaries in the same way as we make -# the zip bundles for ALL other OSes. -# -# Usage: make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=openttd--win[32|64] -# or make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=OTTD-win[32|64]-nightly- -# - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = -else - Q = @ -endif - -AWK = "awk" -ROOT_DIR := $(shell pwd) -BIN_DIR = "$(ROOT_DIR)/bin" -SRC_DIR = "$(ROOT_DIR)/src" -BUNDLE_DIR = "$(ROOT_DIR)/bundle" -BUNDLES_DIR = "$(ROOT_DIR)/bundles" -TTD = openttd.exe -PDB = openttd.pdb -MODE = Release -TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@") - -all: - $(Q)cp objs/$(TARGET)/$(MODE)/$(TTD) $(BIN_DIR)/$(TTD) - -include Makefile.bundle.in - -bundle_pdb: - @echo '[BUNDLE] Creating $(BUNDLE_NAME).pdb.xz' - $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)cp objs/$(TARGET)/Release/$(PDB) $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb - $(Q)xz -9 $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb - -regression: all - $(Q)cp bin/$(TTD) bin/openttd - $(Q)cd bin && sh ai/regression/run.sh diff --git a/Makefile.setting.in b/Makefile.setting.in deleted file mode 100644 index 987a882db1..0000000000 --- a/Makefile.setting.in +++ /dev/null @@ -1,63 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -SETTINGSGEN = !!SETTINGSGEN!! -SRC_DIR = !!SRC_DIR!! -CXX_BUILD = !!CXX_BUILD!! -CFLAGS_BUILD = !!CFLAGS_BUILD!! -CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!! -LDFLAGS_BUILD = !!LDFLAGS_BUILD!! -STAGE = !!STAGE!! -SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!! - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = - E = @true -else - Q = @ - E = @echo -endif - -all: table/settings.h - -settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $(SRC_DIR)/strings_type.h $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/ini_type.h $(SRC_DIR)/core/smallvec_type.hpp $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< - -alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< - -getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< - -string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< - -ini_load.o: $(SRC_DIR)/ini_load.cpp $(SRC_DIR)/core/alloc_func.hpp $(SRC_DIR)/core/mem_func.hpp $(SRC_DIR)/ini_type.h $(SRC_DIR)/string_func.h $(SRC_DIR)/safeguards.h - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $< - -$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o - $(E) '$(STAGE) Compiling and Linking $@' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@ - -table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini - $(E) '$(STAGE) Generating $@' - @mkdir -p table - $(Q)./$(SETTINGSGEN) -o table/settings.h -b $(SRC_DIR)/table/settings.h.preamble -a $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini - -depend: - -clean: - $(E) '$(STAGE) Cleaning up settings files' - $(Q)rm -f settingsgen.o alloc_func.o getoptdata.o string.o ini_load.o $(SETTINGSGEN) table/settings.h - -mrproper: clean - -.PHONY: all mrproper depend clean diff --git a/Makefile.src.in b/Makefile.src.in deleted file mode 100644 index ec5deada49..0000000000 --- a/Makefile.src.in +++ /dev/null @@ -1,302 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -CC_HOST = !!CC_HOST!! -CXX_HOST = !!CXX_HOST!! -CC_BUILD = !!CC_BUILD!! -CXX_BUILD = !!CXX_BUILD!! -WINDRES = !!WINDRES!! -STRIP = !!STRIP!! -CFLAGS = !!CFLAGS!! -CFLAGS_BUILD = !!CFLAGS_BUILD!! -CXXFLAGS = !!CXXFLAGS!! -CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!! -LIBS = !!LIBS!! -LDFLAGS = !!LDFLAGS!! -LDFLAGS_BUILD = !!LDFLAGS_BUILD!! -ROOT_DIR = !!ROOT_DIR!! -BIN_DIR = !!BIN_DIR!! -LANG_DIR = !!LANG_DIR!! -SRC_OBJS_DIR = !!SRC_OBJS_DIR!! -LANG_OBJS_DIR = !!LANG_OBJS_DIR!! -SETTING_OBJS_DIR= !!SETTING_OBJS_DIR!! -SRC_DIR = !!SRC_DIR!! -SCRIPT_SRC_DIR = !!SCRIPT_SRC_DIR!! -MEDIA_DIR = !!MEDIA_DIR!! -TTD = !!TTD!! -STRGEN = !!STRGEN!! -DEPEND = !!DEPEND!! -OS = !!OS!! -STAGE = !!STAGE!! -MAKEDEPEND = !!MAKEDEPEND!! -CFLAGS_MAKEDEP = !!CFLAGS_MAKEDEP!! -SORT = !!SORT!! -AWK = !!AWK!! -CONFIGURE_INVOCATION = !!CONFIGURE_INVOCATION!! -CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!! -CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!! -CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!! -CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!! -CONFIG_CACHE_INVOCATION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_INVOCATION!! - -OBJS_C := !!OBJS_C!! -OBJS_CPP := !!OBJS_CPP!! -OBJS_MM := !!OBJS_MM!! -OBJS_RC := !!OBJS_RC!! -OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC) -SRCS := !!SRCS!! - -# All C-files depend on those 3 files -FILE_DEP := $(CONFIG_CACHE_COMPILER) -# Create all dirs and subdirs -RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS)))) - -CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) -CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) -ifdef SCRIPT_SRC_DIR - CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR) -endif - -# Check if we want to show what we are doing -ifdef VERBOSE - Q = - E = @true -else - Q = @ - E = @echo -endif - -# Our default target -all: $(BIN_DIR)/$(TTD) - -# This are 2 rules that are pointing back to STRGEN stuff. -# There is not really a need to have them here, but in case -# some weirdo wants to run 'make' in the 'src' dir and expects -# the languages to be recompiled, this catches that case and -# takes care of it nicely. -$(LANG_OBJS_DIR)/$(STRGEN): - $(MAKE) -C $(LANG_OBJS_DIR) $(STRGEN) - -$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN) - $(MAKE) -C $(LANG_OBJS_DIR) table/strings.h - -# Always run version detection, so we always have an accurate modified -# flag -VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh") -MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ') - -# Use autodetected revisions -VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') -ISODATE := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ') -GITHASH := $(shell echo "$(VERSIONS)" | cut -f 4 -d' ') -ISTAG := $(shell echo "$(VERSIONS)" | cut -f 5 -d' ') -ISSTABLETAG := $(shell echo "$(VERSIONS)" | cut -f 6 -d' ') -YEAR := $(shell echo "$(VERSIONS)" | cut -f 7 -d' ') - -# Make sure we have something in VERSION and ISODATE -ifeq ($(VERSION),) -VERSION := norev000 -endif -ifeq ($(ISODATE),) -ISODATE := 00000000 -endif - -# This helps to recompile if flags change -RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CFLAGS) $(CXXFLAGS)" ]; then echo "$(CFLAGS) $(CXXFLAGS)" > $(CONFIG_CACHE_COMPILER); fi ) -RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi ) - -# If there is a change in the source-file-list, make sure we recheck the deps -RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi ) -# If there is a change in the revision, make sure we recompile rev.cpp -RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(VERSION) $(MODIFIED)" ]; then echo "$(VERSION) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi ) -# If there is a change in the configure invocation, make sure we recompile rev.cpp -RES := $(shell if [ "`cat $(CONFIG_CACHE_INVOCATION) 2>/dev/null`" != "$(CONFIGURE_INVOCATION)" ]; then echo "$(CONFIGURE_INVOCATION)" > $(CONFIG_CACHE_INVOCATION); fi ) - -FILTER_OUT = $(foreach v,$(2),$(if $(findstring $(1),$(v)),,$(v))) -CONFIGURE_DEFINES := $(strip $(call FILTER_OUT,_DIR=,$(patsubst -D%,%,$(filter -D%,$(CFLAGS))))) - -ifndef MAKEDEPEND -# The slow, but always correct, dep-check -DEP_MASK := %.d -DEPS := $(OBJS:%.o=%.d) - -# Only include the deps if we are compiling everything -ifeq ($(filter %.o clean mrproper, $(MAKECMDGOALS)),) --include $(DEPS) -else -# In case we want to compile a single target, include the .d file for it -ifneq ($(filter %.o, $(MAKECMDGOALS)),) -SINGLE_DEP := $(filter %.o, $(MAKECMDGOALS)) --include $(SINGLE_DEP:%.o=%.d) -endif -endif - -# Find the deps via GCC. Rarely wrong, but a bit slow - -$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP) - $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)' - $(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ - -$(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP) - $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ - -$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP) - $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ - -$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP) - $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.rc=%.rc)' - $(Q)touch $@ - -else -# The much faster, but can be wrong, dep-check -DEP_MASK := -DEPS := Makefile.dep - -# Only include the deps if we are not cleaning -ifeq ($(filter depend clean mrproper, $(MAKECMDGOALS)),) --include Makefile.dep -endif - -ifeq ("$(SRC_OBJS_DIR)/$(DEPEND)","$(MAKEDEPEND)") -DEP := $(MAKEDEPEND) -$(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp - $(E) '$(STAGE) Compiling and linking $(DEPEND)' - $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) -o $@ $< -endif - -# Macro for invoking a command on groups of 100 words at a time -# (analogous to xargs(1)). The macro invokes itself recursively -# until the list of words is depleted. -# -# Usage: $(call xargs,COMMAND,LIST) -# -# COMMAND should be a shell command to which the words will be -# appended as arguments in groups of 100. -define xargs -$(1) $(wordlist 1,100,$(2)) -$(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) -endef - -# Make sure that only 'make depend' ALWAYS triggers a recheck -ifeq ($(filter depend, $(MAKECMDGOALS)),) -Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP) -else -Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(DEP) FORCE -endif - $(E) '$(STAGE) DEP CHECK (all files)' - $(Q)rm -f Makefile.dep.tmp - $(Q)touch Makefile.dep.tmp - -# Calculate the deps via makedepend - $(call xargs,$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -a -- $(CFLAGS_MAKEDEP) -- 2>/dev/null,$(SRCS:%=$(SRC_DIR)/%)) - -# Remove all comments and includes that don't start with $(SRC_DIR) -# Remove $(SRC_DIR) from object-file-name - @$(AWK) ' \ - /^# DO NOT/ { print $$0 ; next} \ - /^#/ {next} \ - /: / { \ - left = NF - 1; \ - for (n = 2; n <= NF; n++) { \ - if (match($$n, "^$(ROOT_DIR)") == 0) { \ - $$n = ""; \ - left--; \ - } \ - } \ - gsub("$(SRC_DIR)/", "", $$1); \ - if (left > 0) { \ - print $$0; \ - $$1 = "Makefile.dep:"; \ - print $$0; \ - } \ - next \ - } \ - { \ - print $$0 \ - } \ - ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | LC_ALL=C $(SORT) > Makefile.dep - - $(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak - -endif - -# Avoid problems with deps if a .h/.hpp/.hpp.sq file is deleted without the deps -# being updated. Now the Makefile continues, the deps are recreated -# and all will be fine. -%.h %.hpp %.hpp.sq: - @true - - -# Compile all the files according to the targets - -$(OBJS_C): %.o: $(SRC_DIR)/%.c $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.c=%.c)' - $(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $< - -$(filter-out %sse2.o, $(filter-out %ssse3.o, $(filter-out %sse4.o, $(OBJS_CPP)))): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $< - -$(filter %sse2.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse2 -o $@ $< - -$(filter %ssse3.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -mssse3 -o $@ $< - -$(filter %sse4.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse4.1 -o $@ $< - -$(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP) - $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)' - $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $< - -$(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP) - $(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)' - $(Q)$(WINDRES) -o $@ $< - -$(BIN_DIR)/$(TTD): $(TTD) - $(Q)cp $(TTD) $(BIN_DIR)/$(TTD) -ifeq ($(OS), UNIX) - $(Q)cp $(MEDIA_DIR)/openttd.32.bmp $(BIN_DIR)/baseset/ -endif -ifeq ($(OS), OSX) - $(Q)cp $(ROOT_DIR)/os/macosx/splash.png $(BIN_DIR)/baseset/ -endif - -$(TTD): $(OBJS) $(CONFIG_CACHE_LINKER) - $(E) '$(STAGE) Linking $@' - $(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ -ifdef STRIP - $(Q)$(STRIP) $@ -endif - -# Revision files - -$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(CONFIG_CACHE_INVOCATION) $(SRC_DIR)/rev.cpp.in - $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g;s@!!YEAR!!@$(YEAR)@g;s@\!\!CONFIGURE_INVOCATION\!\!@$(subst \",\\\\\\\",$(subst @,\\@,$(CONFIGURE_INVOCATION)))@g;s@\!\!CONFIGURE_DEFINES\!\!@$(subst \",\\\\\\\",$(subst @,\\@,$(subst \\,\\\\,$(CONFIGURE_DEFINES))))@g;" > $(SRC_DIR)/rev.cpp - -$(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in - $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g;s@!!YEAR!!@$(YEAR)@g" > $(SRC_DIR)/os/windows/ottdres.rc - -FORCE: - -depend: $(DEPS) - -clean: - $(E) '$(STAGE) Cleaning up object files' - $(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(BIN_DIR)/baseset/openttd.32.bmp $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_SOURCE) - -mrproper: clean - $(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc - -%.o: - @echo '$(STAGE) No such source-file: $(@:%.o=%).[c|cpp|mm|rc]' - -.PHONY: all mrproper depend clean FORCE diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 719ac84b56..463d09b8b4 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -14,23 +14,34 @@ jobs: strategy: matrix: Win32: - BuildPlatform: 'Win32' + BuildArch: 'Win32' + VcpkgTargetTriplet: 'x86-windows-static' Win64: - BuildPlatform: 'x64' + BuildArch: 'x64' + VcpkgTargetTriplet: 'x64-windows-static' steps: - template: azure-pipelines/templates/ci-git-rebase.yml - template: azure-pipelines/templates/windows-dependencies.yml - template: azure-pipelines/templates/ci-opengfx.yml + parameters: + SharedFolder: C:/Users/Public/Documents/OpenTTD - template: azure-pipelines/templates/windows-build.yml parameters: - BuildPlatform: $(BuildPlatform) - BuildConfiguration: Debug - - script: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 - cd projects - call regression.bat + BuildArch: $(BuildArch) + VcpkgTargetTriplet: $(VcpkgTargetTriplet) + BuildConfiguration: 'Debug' + - task: VSBuild@1 + displayName: 'Prepare regression files' + inputs: + solution: build/regression_files.vcxproj + configuration: 'Debug' + - task: VSBuild@1 displayName: 'Test' + inputs: + solution: build/RUN_TESTS.vcxproj + configuration: 'Debug' + - job: linux displayName: 'Linux' @@ -49,7 +60,10 @@ jobs: steps: - template: azure-pipelines/templates/ci-git-rebase.yml # The dockers already have the dependencies installed - # The dockers already have OpenGFX installed + - template: azure-pipelines/templates/ci-opengfx.yml + parameters: + SharedFolder: /usr/local/share/games/openttd + PrefixCommand: sudo - template: azure-pipelines/templates/linux-build.yml parameters: Image: compile-farm-ci @@ -67,6 +81,13 @@ jobs: - template: azure-pipelines/templates/ci-git-rebase.yml - template: azure-pipelines/templates/osx-dependencies.yml - template: azure-pipelines/templates/ci-opengfx.yml + parameters: + SharedFolder: /Library/Application Support/OpenTTD + PrefixCommand: sudo - template: azure-pipelines/templates/osx-build.yml - - script: 'make regression' + - script: | + set -ex + + cd build + CTEST_OUTPUT_ON_FAILURE=1 make test displayName: 'Test' diff --git a/azure-pipelines/templates/ci-opengfx.yml b/azure-pipelines/templates/ci-opengfx.yml index cdee9feca8..60231e3869 100644 --- a/azure-pipelines/templates/ci-opengfx.yml +++ b/azure-pipelines/templates/ci-opengfx.yml @@ -1,8 +1,13 @@ +parameters: + SharedFolder: '/usr/local/share/games/openttd' + PrefixCommand: '' + steps: - bash: | set -ex - cd bin/baseset - curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip > opengfx-all.zip - unzip opengfx-all.zip - rm -f opengfx-all.zip + ${{ parameters.PrefixCommand }} mkdir -p "${{ parameters.SharedFolder }}/baseset" + cd "${{ parameters.SharedFolder }}/baseset" + ${{ parameters.PrefixCommand }} curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip + ${{ parameters.PrefixCommand }} unzip opengfx-all.zip + ${{ parameters.PrefixCommand }} rm -f opengfx-all.zip displayName: 'Install OpenGFX' diff --git a/azure-pipelines/templates/linux-build.yml b/azure-pipelines/templates/linux-build.yml index a173f3364d..88095c9d32 100644 --- a/azure-pipelines/templates/linux-build.yml +++ b/azure-pipelines/templates/linux-build.yml @@ -28,9 +28,12 @@ steps: inputs: command: 'Run an image' imageName: openttd/${{ parameters.Image }}:${{ parameters.Tag }} - volumes: '$(Build.SourcesDirectory):$(Build.SourcesDirectory)' + volumes: | + $(Build.SourcesDirectory):$(Build.SourcesDirectory) + /usr/local/share/games/openttd:/usr/local/share/games/openttd workingDirectory: '$(Build.SourcesDirectory)' containerCommand: ${{ parameters.ContainerCommand }} runInBackground: false envVars: | TARGET_BRANCH + CTEST_OUTPUT_ON_FAILURE=1 diff --git a/azure-pipelines/templates/linux-claim-bundles.yml b/azure-pipelines/templates/linux-claim-bundles.yml index 4434dfcc7d..162584f237 100644 --- a/azure-pipelines/templates/linux-claim-bundles.yml +++ b/azure-pipelines/templates/linux-claim-bundles.yml @@ -1,5 +1,5 @@ steps: # Because we run the compile in a docker (under root), we are not owner # of the 'bundles' folder. Fix that by executing a chown on it. -- bash: sudo chown -R $(id -u):$(id -g) bundles +- bash: sudo chown -R $(id -u):$(id -g) build/bundles displayName: 'Claim bundles folder back' diff --git a/azure-pipelines/templates/osx-build.yml b/azure-pipelines/templates/osx-build.yml index ae1724125d..2baabf9327 100644 --- a/azure-pipelines/templates/osx-build.yml +++ b/azure-pipelines/templates/osx-build.yml @@ -1,5 +1,9 @@ steps: -- script: './configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-static' - displayName: 'Configure' -- script: 'make -j2' +- script: | + set -ex + + mkdir build + cd build + cmake .. + make -j2 displayName: 'Build' diff --git a/azure-pipelines/templates/osx-dependencies.yml b/azure-pipelines/templates/osx-dependencies.yml index 0393a56621..d918d12c52 100644 --- a/azure-pipelines/templates/osx-dependencies.yml +++ b/azure-pipelines/templates/osx-dependencies.yml @@ -2,11 +2,4 @@ steps: - script: | set -ex HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng freetype - # Remove the dynamic libraries of these libraries, to ensure we use - # the static versions. That is important, as it is unlikely any - # end-user has these brew libraries installed. - rm /usr/local/Cellar/lzo/*/lib/*.dylib - rm /usr/local/Cellar/xz/*/lib/*.dylib - rm /usr/local/Cellar/libpng/*/lib/*.dylib - rm /usr/local/Cellar/freetype/*/lib/*.dylib displayName: 'Install dependencies' diff --git a/azure-pipelines/templates/release-bundles.yml b/azure-pipelines/templates/release-bundles.yml index 9c5a48b966..f9f9fdcdd9 100644 --- a/azure-pipelines/templates/release-bundles.yml +++ b/azure-pipelines/templates/release-bundles.yml @@ -5,7 +5,14 @@ steps: - ${{ if eq(parameters.CalculateChecksums, true) }}: - bash: | set -ex - cd bundles + cd build/bundles + + # CPack generates sha256, but with a slightly different name than + # our own convention. Also, because we rename files, the content + # might be out of date. To be safe, we remove it and replace it + # with our own version. + rm -f *.sha256 + for i in $(ls); do openssl dgst -r -md5 -hex $i > $i.md5sum openssl dgst -r -sha1 -hex $i > $i.sha1sum @@ -15,5 +22,5 @@ steps: - task: PublishBuildArtifacts@1 displayName: 'Publish bundles' inputs: - PathtoPublish: bundles/ + PathtoPublish: build/bundles/ ArtifactName: bundles diff --git a/azure-pipelines/templates/release-manifest.yml b/azure-pipelines/templates/release-manifest.yml index 9e8b486d5c..9fe30717b4 100644 --- a/azure-pipelines/templates/release-manifest.yml +++ b/azure-pipelines/templates/release-manifest.yml @@ -15,6 +15,6 @@ steps: - script: | set -ex ./azure-pipelines/manifest.sh ../a/bundles/ - mkdir -p bundles - mv manifest.yaml bundles/ + mkdir -p build/bundles + mv manifest.yaml build/bundles/ displayName: 'Create manifest.yaml' diff --git a/azure-pipelines/templates/release-prepare-source.yml b/azure-pipelines/templates/release-prepare-source.yml index b20bf0b350..3eb148aef5 100644 --- a/azure-pipelines/templates/release-prepare-source.yml +++ b/azure-pipelines/templates/release-prepare-source.yml @@ -17,7 +17,9 @@ steps: git checkout -B ${BUILD_SOURCEBRANCHNAME} fi - ./findversion.sh > .ottdrev + # Generate .ottdrev, which contains the version information + cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake + ./azure-pipelines/changelog.sh > .changelog TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date cat .ottdrev | cut -f 1 -d$'\t' > .version diff --git a/azure-pipelines/templates/release.yml b/azure-pipelines/templates/release.yml index b9a5597269..f6a00b7cf2 100644 --- a/azure-pipelines/templates/release.yml +++ b/azure-pipelines/templates/release.yml @@ -22,9 +22,9 @@ jobs: # Copy back release_date, as it is needed for the template 'release-bundles' cp openttd-$(Build.BuildNumber)/.release_date .release_date - mkdir bundles - tar --xz -cf bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber) - zip -9 -r -q bundles/openttd-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber) + mkdir -p build/bundles + tar --xz -cf build/bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber) + zip -9 -r -q build/bundles/openttd-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber) displayName: 'Create bundle' - template: release-bundles.yml @@ -39,10 +39,10 @@ jobs: - script: | set -ex - mkdir -p bundles - cp .changelog bundles/changelog.txt - cp .release_date bundles/released.txt - cp README.md bundles/README.md + mkdir -p build/bundles + cp .changelog build/bundles/changelog.txt + cp .release_date build/bundles/released.txt + cp README.md build/bundles/README.md displayName: 'Copy meta files' - template: release-bundles.yml parameters: @@ -73,33 +73,36 @@ jobs: strategy: matrix: Win32: - BuildPlatform: 'Win32' BundlePlatform: 'win32' + BuildArch: 'Win32' + VcpkgTargetTriplet: 'x86-windows-static' Win64: - BuildPlatform: 'x64' BundlePlatform: 'win64' + BuildArch: 'x64' + VcpkgTargetTriplet: 'x64-windows-static' steps: - template: release-fetch-source.yml - template: windows-dependencies.yml - template: windows-dependency-zip.yml - - ${{ if eq(parameters.IsStableRelease, true) }}: - - template: windows-dependency-nsis.yml - template: windows-build.yml parameters: - BuildPlatform: $(BuildPlatform) - BuildConfiguration: Release + BuildArch: $(BuildArch) + VcpkgTargetTriplet: $(VcpkgTargetTriplet) + BuildConfiguration: 'RelWithDebInfo' + ${{ if eq(parameters.IsStableRelease, true) }}: + OptionUseNSIS: "ON" + - task: VSBuild@1 + displayName: 'Create bundles' + inputs: + solution: build/PACKAGE.vcxproj + configuration: 'RelWithDebInfo' - bash: | set -ex - make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform) - displayName: 'Create bundles' - - ${{ if eq(parameters.IsStableRelease, true) }}: - - bash: | - set -ex - # NSIS will be part of the Hosted image in the next update. Till then, we set the PATH ourself - export PATH="${PATH}:/c/Program Files (x86)/NSIS" - make -f Makefile.msvc bundle_exe PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform) - displayName: 'Create installer bundle' + + cp build/RelWithDebInfo/openttd.pdb build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb + xz -9 build/bundles/openttd-$(Build.BuildNumber)-windows-$(BundlePlatform).pdb + displayName: 'Copy PDB to bundles folder' - template: release-bundles.yml - ${{ if eq(parameters.IsStableRelease, true) }}: @@ -153,7 +156,11 @@ jobs: - template: release-fetch-source.yml - template: osx-dependencies.yml - template: osx-build.yml - - script: 'make bundle_zip bundle_dmg BUNDLE_NAME=openttd-$(Build.BuildNumber)-macosx' + - script: | + set -ex + + cd build + make package displayName: 'Create bundles' - template: release-bundles.yml diff --git a/azure-pipelines/templates/windows-build.yml b/azure-pipelines/templates/windows-build.yml index 117dd062c1..ae3b894144 100644 --- a/azure-pipelines/templates/windows-build.yml +++ b/azure-pipelines/templates/windows-build.yml @@ -1,11 +1,17 @@ parameters: - BuildPlatform: '' + BuildArch: '' + VcpkgTargetTriplet: '' + BuildConfiguration: '' + OptionUseNSIS: 'OFF' steps: +- task: CMake@1 + displayName: 'Configure' + inputs: + cmakeArgs: '.. -G "Visual Studio 15 2017" -A ${{ parameters.BuildArch }} -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="${{ parameters.VcpkgTargetTriplet }}" -DOPTION_USE_NSIS="${{ parameters.OptionUseNSIS }}"' - task: VSBuild@1 displayName: 'Build' inputs: - solution: 'projects/openttd_vs141.sln' - platform: ${{ parameters.BuildPlatform }} + solution: build/openttd.vcxproj configuration: ${{ parameters.BuildConfiguration }} maximumCpuCount: true diff --git a/azure-pipelines/templates/windows-dependency-nsis.yml b/azure-pipelines/templates/windows-dependency-nsis.yml deleted file mode 100644 index 9b54a3ac5f..0000000000 --- a/azure-pipelines/templates/windows-dependency-nsis.yml +++ /dev/null @@ -1,26 +0,0 @@ -parameters: - condition: true - -steps: -- bash: | - set -ex - - mkdir nsis-plugin; cd nsis-plugin - curl -L https://devs.openttd.org/~truebrain/nsis-plugins/Nsis7z.zip > Nsis7z.zip - unzip Nsis7z.zip - cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/" - cd ..; rm -rf nsis-plugin - - mkdir nsis-plugin; cd nsis-plugin - curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisGetVersion.zip > NsisGetVersion.zip - unzip NsisGetVersion.zip - cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/" - cd ..; rm -rf nsis-plugin - - mkdir nsis-plugin; cd nsis-plugin - curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisFindProc.zip > NsisFindProc.zip - unzip NsisFindProc.zip - cp -R *.dll "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/" - cd ..; rm -rf nsis-plugin - displayName: 'Install NSIS with the 7z, GetVersion, and FindProc plugins' - condition: and(succeeded(), ${{ parameters.condition }}) diff --git a/bin/ai/regression/completeness.sh b/bin/ai/regression/completeness.sh deleted file mode 100755 index 46cee4ed3e..0000000000 --- a/bin/ai/regression/completeness.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -if ! [ -f ai/regression/completeness.sh ]; then - echo "Make sure you are in the root of OpenTTD before starting this script." - exit 1 -fi - -cat ai/regression/tst_*/main.nut | tr ';' '\n' | awk ' -/^function/ { - for (local in locals) { - delete locals[local] - } - if (match($0, "function Regression::Start") || match($0, "function Regression::Stop")) next - locals["this"] = "AIControllerSquirrel" -} - -/local/ { - gsub(".*local", "local") - if (match($4, "^AI")) { - sub("\\(.*", "", $4) - locals[$2] = $4 - } -} - -/Valuate/ { - gsub(".*Valuate\\(", "") - gsub("\\).*", "") - gsub(",.*", "") - gsub("\\.", "::") - print $0 -} - -/\./ { - for (local in locals) { - if (match($0, local ".")) { - fname = substr($0, index($0, local ".")) - sub("\\(.*", "", fname) - sub("\\.", "::", fname) - sub(local, locals[local], fname) - print fname - if (match(locals[local], "List")) { - sub(locals[local], "AIAbstractList", fname) - print fname - } - } - } - # We want to remove everything before the FIRST occurrence of AI. - # If we do not remove any other occurrences of AI from the string - # we will remove everything before the LAST occurrence of AI, so - # do some little magic to make it work the way we want. - sub("AI", "AXXXXY") - gsub("AI", "AXXXXX") - sub(".*AXXXXY", "AI") - if (match($0, "^AI") && match($0, ".")) { - sub("\\(.*", "", $0) - sub("\\.", "::", $0) - print $0 - } -} -' | sed 's/ //g' | sort | uniq > tmp.in_regression - -grep 'DefSQ.*Method' ../src/script/api/ai/*.hpp.sq | grep -v 'AIError::' | grep -v 'AIAbstractList::Valuate' | grep -v '::GetClassName' | sed 's/^[^,]*, &//g;s/,[^,]*//g' | sort > tmp.in_api - -diff -u tmp.in_regression tmp.in_api | grep -v '^+++' | grep '^+' | sed 's/^+//' - -rm -f tmp.in_regression tmp.in_api - diff --git a/bin/ai/regression/run.sh b/bin/ai/regression/run.sh deleted file mode 100755 index 7574b0b388..0000000000 --- a/bin/ai/regression/run.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -if ! [ -f ai/regression/run.sh ]; then - echo "Make sure you are in the root of OpenTTD before starting this script." - exit 1 -fi - -if [ -f scripts/game_start.scr ]; then - mv scripts/game_start.scr scripts/game_start.scr.regression -fi - -params="" -gdb="" -if [ "$1" != "-r" ]; then - params="-snull -mnull -vnull:ticks=30000" -fi -if [ "$1" = "-g" ]; then - gdb="gdb --ex run --args " -fi - -if [ -d "ai/regression/tst_$1" ]; then - tests="ai/regression/tst_$1" -elif [ -d "ai/regression/tst_$2" ]; then - tests="ai/regression/tst_$2" -else - tests=ai/regression/tst_* -fi - -ret=0 -for tst in $tests; do - echo -n "Running $tst... " - - # Make sure that only one info.nut is present for each test run. Otherwise openttd gets confused. - cp ai/regression/regression_info.nut $tst/info.nut - - sav=$tst/test.sav - if ! [ -f $sav ]; then - sav=ai/regression/empty.sav - fi - - if [ -n "$gdb" ]; then - $gdb ./openttd -x -c ai/regression/regression.cfg $params -g $sav - else - ./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > $tst/tmp.regression - fi - - if [ -z "$gdb" ]; then - res="`diff -ub $tst/result.txt $tst/tmp.regression`" - if [ -z "$res" ]; then - echo "passed!" - else - echo "failed! Difference:" - echo "$res" - ret=1 - fi - fi - - rm $tst/info.nut - - if [ "$1" != "-k" ]; then - rm -f $tst/tmp.regression - fi -done - -if [ -f scripts/game_start.scr.regression ]; then - mv scripts/game_start.scr.regression scripts/game_start.scr -fi - -exit $ret diff --git a/bin/ai/regression/run.vbs b/bin/ai/regression/run.vbs deleted file mode 100644 index b4bdef4c17..0000000000 --- a/bin/ai/regression/run.vbs +++ /dev/null @@ -1,152 +0,0 @@ -Option Explicit - -' This file is part of OpenTTD. -' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -Dim FSO -Set FSO = CreateObject("Scripting.FileSystemObject") - -Function GetTestList() - Dim retests, i, tests, dir - Set retests = New RegExp - Set GetTestList = CreateObject("Scripting.Dictionary") - - retests.Pattern = "ai/regression/tst_*" - retests.Global = True - For i = 0 To WScript.Arguments.Count - 1 - Dim test - test = "ai/regression/tst_" & WScript.Arguments.Item(i) - If FSO.FolderExists(test) Then - retests.Pattern = test - Exit For - End If - Next - - For Each dir In FSO.GetFolder("ai/regression/").SubFolders - Dim name - name = "ai/regression/" & dir.Name - If retests.Test(name) Then - GetTestList.Add name, name - End If - Next -End Function - -Function GetParams() - GetParams = "-snull -mnull -vnull:ticks=30000" - If WScript.Arguments.Count = 0 Then Exit Function - If WScript.Arguments.Item(0) <> "-r" Then Exit Function - GetParams = "" -End Function - -Sub FilterFile(filename) - Dim lines, filter, file - - Set file = FSO.OpenTextFile(filename, 1) - If Not file.AtEndOfStream Then - lines = file.ReadAll - End If - file.Close - - Set filter = New RegExp - filter.Global = True - filter.Multiline = True - filter.Pattern = "0x(\(nil\)|0+)(x0)?" - lines = filter.Replace(lines, "0x00000000") - filter.Pattern = "^dbg: \[script\]" - lines = filter.Replace(lines, "") - filter.Pattern = "^ " - lines = filter.Replace(lines, "ERROR: ") - filter.Pattern = "ERROR: \[1\] \[P\] " - lines = filter.Replace(lines, "") - filter.Pattern = "^dbg: .*\r\n" - lines = filter.Replace(lines, "") - - Set file = FSO.OpenTextFile(filename, 2) - file.Write lines - file.Close -End Sub - -Function CompareFiles(filename1, filename2) - Dim file, lines1, lines2 - Set file = FSO.OpenTextFile(filename1, 1) - If Not file.AtEndOfStream Then - lines1 = file.ReadAll - End IF - file.Close - Set file = FSO.OpenTextFile(filename2, 1) - If Not file.AtEndOfStream Then - lines2 = file.ReadAll - End IF - file.Close - CompareFiles = (lines1 = lines2) -End Function - -Function RunTest(test, params, ret) - Dim WshShell, oExec, sav, command - Set WshShell = CreateObject("WScript.Shell") - - ' Make sure that only one info.nut is present for each test run. Otherwise openttd gets confused. - FSO.CopyFile "ai/regression/regression_info.nut", test & "/info.nut" - - sav = test & "/test.sav" - If Not FSO.FileExists(sav) Then - sav = "ai/regression/empty.sav" - End If - - command = ".\openttd -x -c ai/regression/regression.cfg " & params & " -g " & sav & " -d script=2 -d misc=9" - ' 2>&1 must be after >tmp.regression, else stderr is not redirected to the file - WshShell.Run "cmd /c " & command & " >"& test & "/tmp.regression 2>&1", 0, True - - FilterFile test & "/tmp.regression" - - If CompareFiles(test & "/result.txt", test & "/tmp.regression") Then - RunTest = "passed!" - Else - RunTest = "failed!" - ret = 1 - End If - - FSO.DeleteFile test & "/info.nut" - - If WScript.Arguments.Count > 0 Then - If WScript.Arguments.Item(0) = "-k" Then - Exit Function - End If - End If - - FSO.DeleteFile test & "/tmp.regression" -End Function - -On Error Resume Next -WScript.StdOut.WriteLine "" -If Err.Number <> 0 Then - WScript.Echo "This script must be started with cscript." - WScript.Quit 1 -End If -On Error Goto 0 - -If Not FSO.FileExists("ai/regression/run.vbs") Then - WScript.Echo "Make sure you are in the root of OpenTTD before starting this script." - WScript.Quit 1 -End If - -If FSO.FileExists("scripts/game_start.scr") Then - FSO.MoveFile "scripts/game_start.scr", "scripts/game_start.scr.regression" -End If - -Dim params, test, ret -params = GetParams() -ret = 0 - -For Each test in GetTestList() - WScript.StdOut.Write "Running " & test & "... " - WScript.StdOut.WriteLine RunTest(test, params, ret) -Next - -If FSO.FileExists("scripts/game_start.scr.regression") Then - FSO.MoveFile "scripts/game_start.scr.regression", "scripts/game_start.scr" -End If - -WScript.Quit ret diff --git a/bin/ai/regression/tst_stationlist/test.sav b/bin/ai/regression/tst_stationlist/test.sav deleted file mode 100644 index ef551c74ff..0000000000 Binary files a/bin/ai/regression/tst_stationlist/test.sav and /dev/null differ diff --git a/cmake/AddCustomXXXTimestamp.cmake b/cmake/AddCustomXXXTimestamp.cmake new file mode 100644 index 0000000000..ca93988731 --- /dev/null +++ b/cmake/AddCustomXXXTimestamp.cmake @@ -0,0 +1,145 @@ +macro(_parse_arguments_with_multi_hack ORIGINAL_COMMAND_LINE) + # cmake_parse_arguments() put all the MULTIS in a single variable; you + # lose the ability to see for example multiple COMMANDs. To be able to + # passthrough multiple MULTIS, we add a marker after every MULTI. This + # allows us to reassemble the correct amount again before giving it to + # the wrapped command with _reassemble_command_line(). + + set(COMMAND_LINE "${ORIGINAL_COMMAND_LINE}") + + foreach(MULTI IN LISTS MULTIS) + string(REPLACE "${MULTI}" "${MULTI};:::" COMMAND_LINE "${COMMAND_LINE}") + endforeach(MULTI) + + cmake_parse_arguments(PARAM "${OPTIONS}" "${SINGLES}" "${MULTIS}" ${COMMAND_LINE}) +endmacro() + +macro(_reassemble_command_line) + # Reassemble the command line as we original got it. + set(NEW_COMMAND_LINE ${PARAM_UNPARSED_ARGUMENTS}) + + foreach(OPTION IN LISTS OPTIONS) + if (PARAM_${OPTION}) + list(APPEND NEW_COMMAND_LINE "${OPTION}") + endif (PARAM_${OPTION}) + endforeach(OPTION) + + foreach(SINGLE IN LISTS SINGLES) + if (PARAM_${SINGLE}) + list(APPEND NEW_COMMAND_LINE "${SINGLE}" "${PARAM_${SINGLE}}") + endif (PARAM_${SINGLE}) + endforeach(SINGLE) + + foreach(MULTI IN LISTS MULTIS) + if (PARAM_${MULTI}) + # Replace our special marker with the name of the MULTI again. This + # restores for example multiple COMMANDs again. + string(REPLACE ":::" "${MULTI}" PARAM_${MULTI} "${PARAM_${MULTI}}") + list(APPEND NEW_COMMAND_LINE "${PARAM_${MULTI}}") + endif (PARAM_${MULTI}) + endforeach(MULTI) +endmacro() + +# Generated files can be older than their dependencies, causing useless +# regenerations. This function replaces each file in OUTPUT with a .timestamp +# file, adds a command to touch it and move the original file in BYPRODUCTS, +# before calling add_custom_command(). +# +# Note: Any add_custom_target() depending on files in original OUTPUT must use +# add_custom_target_timestamp() instead to have the correct dependencies. +# +# add_custom_command_timestamp(OUTPUT output1 [output2 ...] +# COMMAND command1 [ARGS] [args1...] +# [COMMAND command2 [ARGS] [args2...] ...] +# [MAIN_DEPENDENCY depend] +# [DEPENDS [depends...]] +# [BYPRODUCTS [files...]] +# [IMPLICIT_DEPENDS depend1 +# [ depend2] ...] +# [WORKING_DIRECTORY dir] +# [COMMENT comment] +# [VERBATIM] [APPEND] [USES_TERMINAL]) +function(add_custom_command_timestamp) + set(OPTIONS VERBATIM APPEND USES_TERMINAL) + set(SINGLES MAIN_DEPENDENCY WORKING_DIRECTORY COMMENT) + set(MULTIS OUTPUT COMMAND DEPENDS BYPRODUCTS IMPLICIT_DEPENDS) + + _parse_arguments_with_multi_hack("${ARGN}") + + # Create a list of all the OUTPUTs (by removing our magic marker) + string(REPLACE ":::;" "" OUTPUTS "${PARAM_OUTPUT}") + + # Reset the OUTPUT and BYPRODUCTS as an empty list (if needed). + # Because they are MULTIS, we need to add our special marker here. + set(PARAM_OUTPUT ":::") + if (NOT PARAM_BYPRODUCTS) + set(PARAM_BYPRODUCTS ":::") + endif () + + foreach(OUTPUT IN LISTS OUTPUTS) + # For every output, we add a 'cmake -E touch' entry to update the + # timestamp on each run. + get_filename_component(OUTPUT_FILENAME ${OUTPUT} NAME) + string(APPEND PARAM_COMMAND ";:::;${CMAKE_COMMAND};-E;touch;${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp") + + # We change the OUTPUT to a '.timestamp' variant, and make the real + # output a byproduct. + list(APPEND PARAM_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp) + list(APPEND PARAM_BYPRODUCTS ${OUTPUT}) + + # Mark this file as being a byproduct; we use this again with + # add_custom_target_timestamp() to know if we should point to the + # '.timestamp' variant or not. + set_source_files_properties(${OUTPUT} PROPERTIES BYPRODUCT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp) + endforeach(OUTPUT) + + # Reassemble and call the wrapped command + _reassemble_command_line() + add_custom_command(${NEW_COMMAND_LINE}) +endfunction(add_custom_command_timestamp) + +# Generated files can be older than their dependencies, causing useless +# regenerations. This function adds a .timestamp file for each file in DEPENDS +# replaced by add_custom_command_timestamp(), before calling add_custom_target(). +# +# add_custom_target_timestamp(Name [ALL] [command1 [args1...]] +# [COMMAND command2 [args2...] ...] +# [DEPENDS depend depend depend ... ] +# [BYPRODUCTS [files...]] +# [WORKING_DIRECTORY dir] +# [COMMENT comment] +# [VERBATIM] [USES_TERMINAL] +# [SOURCES src1 [src2...]]) +function(add_custom_target_timestamp) + set(OPTIONS VERBATIM USES_TERMINAL) + set(SINGLES WORKING_DIRECTORY COMMENT) + set(MULTIS COMMAND DEPENDS BYPRODUCTS SOURCES) + # ALL is missing, as the order is important here. It will be picked up + # by ${PARAM_UNPARSED_ARGUMENTS} when reassembling the command line. + + _parse_arguments_with_multi_hack("${ARGN}") + + # Create a list of all the DEPENDs (by removing our magic marker) + string(REPLACE ":::;" "" DEPENDS "${PARAM_DEPENDS}") + + # Reset the DEPEND as an empty list. + # Because it is a MULTI, we need to add our special marker here. + set(PARAM_DEPENDS ":::") + + foreach(DEPEND IN LISTS DEPENDS) + # Check if the output is produced by add_custom_command_timestamp() + get_source_file_property(BYPRODUCT ${DEPEND} BYPRODUCT) + + if (BYPRODUCT STREQUAL "NOTFOUND") + # If it is not, just keep it as DEPEND + list(APPEND PARAM_DEPENDS "${DEPEND}") + else (BYPRODUCT STREQUAL "NOTFOUND") + # If it is, the BYPRODUCT property points to the timestamp we want to depend on + list(APPEND PARAM_DEPENDS "${BYPRODUCT}") + endif (BYPRODUCT STREQUAL "NOTFOUND") + endforeach(DEPEND) + + # Reassemble and call the wrapped command + _reassemble_command_line() + add_custom_target(${NEW_COMMAND_LINE}) +endfunction(add_custom_target_timestamp) diff --git a/cmake/CompileFlags.cmake b/cmake/CompileFlags.cmake new file mode 100644 index 0000000000..05c19abab9 --- /dev/null +++ b/cmake/CompileFlags.cmake @@ -0,0 +1,120 @@ +# Macro which contains all bits to setup the compile flags correctly. +# +# compile_flags() +# +macro(compile_flags) + if (MSVC) + # Switch to MT (static) instead of MD (dynamic) binary + + # For MSVC two generators are available + # - a command line generator (Ninja) using CMAKE_BUILD_TYPE to specify the + # configuration of the build tree + # - an IDE generator (Visual Studio) using CMAKE_CONFIGURATION_TYPES to + # specify all configurations that will be available in the generated solution + list(APPEND MSVC_CONFIGS "${CMAKE_BUILD_TYPE}" "${CMAKE_CONFIGURATION_TYPES}") + + # Set usage of static runtime for all configurations + foreach(MSVC_CONFIG ${MSVC_CONFIGS}) + string(TOUPPER "CMAKE_CXX_FLAGS_${MSVC_CONFIG}" MSVC_FLAGS) + string(REPLACE "/MD" "/MT" ${MSVC_FLAGS} "${${MSVC_FLAGS}}") + endforeach() + + # "If /Zc:rvalueCast is specified, the compiler follows section 5.4 of the + # C++11 standard". We need C++11 for the way we use threads. + add_compile_options(/Zc:rvalueCast) + + # Add DPI manifest to project; other WIN32 targets get this via ottdres.rc + list(APPEND GENERATED_SOURCE_FILES "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest") + endif (MSVC) + + # Add some -D flags for Debug builds. We cannot use add_definitions(), because + # it does not appear to support the $<> tags. + add_compile_options( + "$<$:-D_DEBUG>" + "$<$:-D_FORTIFY_SOURCE=2>" + ) + + # Prepare a generator that checks if we are not a debug, and don't have asserts + # on. We need this later on to set some compile options for stable releases. + set(IS_STABLE_RELEASE "$>,$>>") + + if (MSVC) + add_compile_options(/W3) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + add_compile_options( + -W + -Wall + -Wcast-qual + -Wextra + -Wsign-compare + -Wundef + -Wpointer-arith + -Wwrite-strings + -Wredundant-decls + -Wformat-security + -Wformat=2 + -Winit-self + -Wnon-virtual-dtor + + # Often parameters are unused, which is fine. + -Wno-unused-parameter + # We use 'ABCD' multichar for SaveLoad chunks identifiers + -Wno-multichar + + # Compilers complains about that we break strict-aliasing. + # On most places we don't see how to fix it, and it doesn't + # break anything. So disable strict-aliasing to make the + # compiler all happy. + -fno-strict-aliasing + ) + + add_compile_options( + # When we are a stable release (Release build + USE_ASSERTS not set), + # assertations are off, which trigger a lot of warnings. We disable + # these warnings for these releases. + "$<${IS_STABLE_RELEASE}:-Wno-unused-variable>" + "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>" + "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>" + ) + + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("-flifetime-dse=1" LIFETIME_DSE_FOUND) + + add_compile_options( + # GCC 4.2+ automatically assumes that signed overflows do + # not occur in signed arithmetics, whereas we are not + # sure that they will not happen. It furthermore complains + # about its own optimized code in some places. + "-fno-strict-overflow" + + # Prevent optimisation supposing enums are in a range specified by the standard + # For details, see http://gcc.gnu.org/PR43680 + "-fno-tree-vrp" + + # -flifetime-dse=2 (default since GCC 6) doesn't play + # well with our custom pool item allocator + "$<$:-flifetime-dse=1>" + ) + endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + add_compile_options( + -Wall + # warning #873: function ... ::operator new ... has no corresponding operator delete ... + -wd873 + # warning #1292: unknown attribute "fallthrough" + -wd1292 + # warning #1899: multicharacter character literal (potential portability problem) + -wd1899 + # warning #2160: anonymous union qualifier is ignored + -wd2160 + ) + else () + message(FATAL_ERROR "No warning flags are set for this compiler yet; please consider creating a Pull Request to add support for this compiler.") + endif () + + if (NOT WIN32) + # rdynamic is used to get useful stack traces from crash reports. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") + endif (NOT WIN32) +endmacro() diff --git a/cmake/CreateGrfCommand.cmake b/cmake/CreateGrfCommand.cmake new file mode 100644 index 0000000000..25e599f568 --- /dev/null +++ b/cmake/CreateGrfCommand.cmake @@ -0,0 +1,50 @@ +# Macro which contains all bits and pieces to create a single grf file based +# on NFO and PNG files. +# +# create_grf_command() +# +function(create_grf_command) + set(EXTRA_PNG_SOURCE_FILES ${ARGV}) + + get_filename_component(GRF_SOURCE_FOLDER_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME) + get_filename_component(GRF_BINARY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${GRF_SOURCE_FOLDER_NAME}.grf ABSOLUTE) + file(GLOB_RECURSE GRF_PNG_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.png) + file(GLOB_RECURSE GRF_NFO_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nfo) + set(GRF_PNG_SOURCE_FILES ${GRF_PNG_SOURCE_FILES} ${EXTRA_PNG_SOURCE_FILES}) + + # Copy over all the PNG files to the correct folder + foreach(GRF_PNG_SOURCE_FILE IN LISTS GRF_PNG_SOURCE_FILES) + get_filename_component(GRF_PNG_SOURCE_FILE_NAME "${GRF_PNG_SOURCE_FILE}" NAME) + set(GRF_PNG_BINARY_FILE "${CMAKE_CURRENT_BINARY_DIR}/sprites/${GRF_PNG_SOURCE_FILE_NAME}") + + add_custom_command(OUTPUT ${GRF_PNG_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} -E copy + ${GRF_PNG_SOURCE_FILE} + ${GRF_PNG_BINARY_FILE} + MAIN_DEPENDENCY ${GRF_PNG_SOURCE_FILE} + COMMENT "Copying ${GRF_PNG_SOURCE_FILE_NAME} sprite file" + ) + + list(APPEND GRF_PNG_BINARY_FILES ${GRF_PNG_BINARY_FILE}) + endforeach(GRF_PNG_SOURCE_FILE) + + add_custom_command(OUTPUT ${GRF_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} + -DGRF_SOURCE_FOLDER=${CMAKE_CURRENT_SOURCE_DIR} + -DGRF_BINARY_FILE=${GRF_BINARY_FILE} + -DNFORENUM_EXECUTABLE=${NFORENUM_EXECUTABLE} + -DGRFCODEC_EXECUTABLE=${GRFCODEC_EXECUTABLE} + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake + MAIN_DEPENDENCY ${GRF_NFO_SOURCE_FILES} + DEPENDS ${GRF_PNG_BINARY_FILES} + ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating ${GRF_SOURCE_FOLDER_NAME}.grf" + ) + + # For conviance, if you want to only test building the GRF + add_custom_target(${GRF_SOURCE_FOLDER_NAME}.grf + DEPENDS + ${GRF_BINARY_FILE} + ) +endfunction() diff --git a/cmake/CreateRegression.cmake b/cmake/CreateRegression.cmake new file mode 100644 index 0000000000..443332368a --- /dev/null +++ b/cmake/CreateRegression.cmake @@ -0,0 +1,86 @@ +# Macro which contains all bits and pieces to create the regression tests. +# This creates both a standalone target 'regression', and it integrates with +# 'ctest'. The first is prefered, as it is more verbose, and takes care of +# dependencies correctly. +# +# create_regression() +# +macro(create_regression) + # Find all the files in the regression folder; they need to be copied to the + # build folder before we can run the regression + file(GLOB_RECURSE REGRESSION_SOURCE_FILES ${CMAKE_SOURCE_DIR}/regression/*) + foreach(REGRESSION_SOURCE_FILE IN LISTS REGRESSION_SOURCE_FILES) + string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/regression/" "${CMAKE_BINARY_DIR}/ai/" REGRESSION_BINARY_FILE "${REGRESSION_SOURCE_FILE}") + string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}") + + if ("${REGRESSION_SOURCE_FILE_NAME}" STREQUAL "regression.cfg") + continue() + endif ("${REGRESSION_SOURCE_FILE_NAME}" STREQUAL "regression.cfg") + + add_custom_command(OUTPUT ${REGRESSION_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} -E copy + ${REGRESSION_SOURCE_FILE} + ${REGRESSION_BINARY_FILE} + MAIN_DEPENDENCY ${REGRESSION_SOURCE_FILE} + COMMENT "Copying ${REGRESSION_SOURCE_FILE_NAME} regression file" + ) + + list(APPEND REGRESSION_BINARY_FILES ${REGRESSION_BINARY_FILE}) + endforeach(REGRESSION_SOURCE_FILE) + + # Copy the regression configuration in a special folder, so all autogenerated + # folders end up in the same place after running regression. + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/regression/regression.cfg + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_SOURCE_DIR}/regression/regression.cfg + ${CMAKE_BINARY_DIR}/regression/regression.cfg + MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/regression/regression.cfg + COMMENT "Copying ${REGRESSION_SOURCE_FILE_NAME} regression file" + ) + list(APPEND REGRESSION_BINARY_FILES ${CMAKE_BINARY_DIR}/regression/regression.cfg) + + # Create a new target which copies all regression files + add_custom_target(regression_files + ALL # this is needed because 'make test' doesn't resolve dependencies, and otherwise this is never executed + DEPENDS + ${REGRESSION_BINARY_FILES} + ) + + enable_testing() + + # Find all the tests we have, and create a target for them + file(GLOB REGRESSION_TESTS ${CMAKE_SOURCE_DIR}/regression/*) + foreach(REGRESSION_TEST IN LISTS REGRESSION_TESTS) + get_filename_component(REGRESSION_TEST_NAME "${REGRESSION_TEST}" NAME) + + if ("${REGRESSION_TEST_NAME}" STREQUAL "regression.cfg") + continue() + endif ("${REGRESSION_TEST_NAME}" STREQUAL "regression.cfg") + + add_custom_target(regression_${REGRESSION_TEST_NAME} + COMMAND ${CMAKE_COMMAND} + -DOPENTTD_EXECUTABLE=$ + -DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE} + -DREGRESSION_TEST=${REGRESSION_TEST_NAME} + -P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake" + DEPENDS openttd regression_files + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Running regression test ${REGRESSION_TEST_NAME}" + ) + + # Also make sure that 'make test' runs the regression + add_test(NAME regression_${REGRESSION_TEST_NAME} + COMMAND ${CMAKE_COMMAND} + -DOPENTTD_EXECUTABLE=$ + -DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE} + -DREGRESSION_TEST=${REGRESSION_TEST_NAME} + -P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + + list(APPEND REGRESSION_TARGETS regression_${REGRESSION_TEST_NAME}) + endforeach(REGRESSION_TEST) + + # Create a new target which runs the regression + add_custom_target(regression + DEPENDS ${REGRESSION_TARGETS}) +endmacro() diff --git a/cmake/Endian.cmake b/cmake/Endian.cmake new file mode 100644 index 0000000000..00cb975445 --- /dev/null +++ b/cmake/Endian.cmake @@ -0,0 +1,14 @@ +# Add the definitions to indicate which endian we are building for. +# +# add_endian_definition() +# +function(add_endian_definition) + include(TestBigEndian) + TEST_BIG_ENDIAN(IS_BIG_ENDIAN) + + if (IS_BIG_ENDIAN) + add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN) + else (IS_BIG_ENDIAN) + add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN) + endif (IS_BIG_ENDIAN) +endfunction() diff --git a/cmake/FindAllegro.cmake b/cmake/FindAllegro.cmake new file mode 100644 index 0000000000..85b2ffd392 --- /dev/null +++ b/cmake/FindAllegro.cmake @@ -0,0 +1,65 @@ +#[=======================================================================[.rst: +FindAllegro +------- + +Finds the allegro library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``Allegro_FOUND`` + True if the system has the allegro library. +``Allegro_INCLUDE_DIRS`` + Include directories needed to use allegro. +``Allegro_LIBRARIES`` + Libraries needed to link to allegro. +``Allegro_VERSION`` + The version of the allegro library which was found. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``Allegro_INCLUDE_DIR`` + The directory containing ``allegro.h``. +``Allegro_LIBRARY`` + The path to the allegro library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_Allegro QUIET allegro) + +find_path(Allegro_INCLUDE_DIR + NAMES allegro.h + PATHS ${PC_Allegro_INCLUDE_DIRS} +) + +find_library(Allegro_LIBRARY + NAMES alleg + PATHS ${PC_Allegro_LIBRARY_DIRS} +) + +set(Allegro_VERSION ${PC_Allegro_VERSION}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Allegro + FOUND_VAR Allegro_FOUND + REQUIRED_VARS + Allegro_LIBRARY + Allegro_INCLUDE_DIR + VERSION_VAR Allegro_VERSION +) + +if (Allegro_FOUND) + set(Allegro_LIBRARIES ${Allegro_LIBRARY}) + set(Allegro_INCLUDE_DIRS ${Allegro_INCLUDE_DIR}) +endif () + +mark_as_advanced( + Allegro_INCLUDE_DIR + Allegro_LIBRARY +) diff --git a/cmake/FindEditbin.cmake b/cmake/FindEditbin.cmake new file mode 100644 index 0000000000..363bc00539 --- /dev/null +++ b/cmake/FindEditbin.cmake @@ -0,0 +1,13 @@ +# Autodetect editbin. Only useful for MSVC. + +get_filename_component(MSVC_COMPILE_DIRECTORY ${CMAKE_CXX_COMPILER} DIRECTORY) +find_program( + EDITBIN_EXECUTABLE editbin.exe + HINTS ${MSVC_COMPILE_DIRECTORY} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Editbin + FOUND_VAR EDITBIN_FOUND + REQUIRED_VARS EDITBIN_EXECUTABLE +) diff --git a/cmake/FindFluidsynth.cmake b/cmake/FindFluidsynth.cmake new file mode 100644 index 0000000000..063726dbe5 --- /dev/null +++ b/cmake/FindFluidsynth.cmake @@ -0,0 +1,65 @@ +#[=======================================================================[.rst: +FindFluidsynth +------- + +Finds the fluidsynth library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``Fluidsynth_FOUND`` + True if the system has the fluidsynth library. +``Fluidsynth_INCLUDE_DIRS`` + Include directories needed to use fluidsynth. +``Fluidsynth_LIBRARIES`` + Libraries needed to link to fluidsynth. +``Fluidsynth_VERSION`` + The version of the fluidsynth library which was found. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``Fluidsynth_INCLUDE_DIR`` + The directory containing ``fluidsynth.h``. +``Fluidsynth_LIBRARY`` + The path to the fluidsynth library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_Fluidsynth QUIET fluidsynth) + +find_path(Fluidsynth_INCLUDE_DIR + NAMES fluidsynth.h + PATHS ${PC_Fluidsynth_INCLUDE_DIRS} +) + +find_library(Fluidsynth_LIBRARY + NAMES fluidsynth + PATHS ${PC_Fluidsynth_LIBRARY_DIRS} +) + +set(Fluidsynth_VERSION ${PC_Fluidsynth_VERSION}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Fluidsynth + FOUND_VAR Fluidsynth_FOUND + REQUIRED_VARS + Fluidsynth_LIBRARY + Fluidsynth_INCLUDE_DIR + VERSION_VAR Fluidsynth_VERSION +) + +if (Fluidsynth_FOUND) + set(Fluidsynth_LIBRARIES ${Fluidsynth_LIBRARY}) + set(Fluidsynth_INCLUDE_DIRS ${Fluidsynth_INCLUDE_DIR}) +endif () + +mark_as_advanced( + Fluidsynth_INCLUDE_DIR + Fluidsynth_LIBRARY +) diff --git a/cmake/FindFontconfig.cmake b/cmake/FindFontconfig.cmake new file mode 100644 index 0000000000..a6f0180b37 --- /dev/null +++ b/cmake/FindFontconfig.cmake @@ -0,0 +1,101 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindFontconfig +-------------- + +Find Fontconfig headers and library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +``Fontconfig::Fontconfig`` + The Fontconfig library, if found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables in your project: + +``Fontconfig_FOUND`` + true if (the requested version of) Fontconfig is available. +``Fontconfig_VERSION`` + the version of Fontconfig. +``Fontconfig_LIBRARIES`` + the libraries to link against to use Fontconfig. +``Fontconfig_INCLUDE_DIRS`` + where to find the Fontconfig headers. +``Fontconfig_COMPILE_OPTIONS`` + this should be passed to target_compile_options(), if the + target is not used for linking + +#]=======================================================================] + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig QUIET) +pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig) +set(Fontconfig_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER}) +set(Fontconfig_VERSION ${PKG_FONTCONFIG_VERSION}) + +find_path( Fontconfig_INCLUDE_DIR + NAMES + fontconfig/fontconfig.h + HINTS + ${PKG_FONTCONFIG_INCLUDE_DIRS} + /usr/X11/include +) + +find_library( Fontconfig_LIBRARY + NAMES + fontconfig + PATHS + ${PKG_FONTCONFIG_LIBRARY_DIRS} +) + +if (Fontconfig_INCLUDE_DIR AND NOT Fontconfig_VERSION) + file(STRINGS ${Fontconfig_INCLUDE_DIR}/fontconfig/fontconfig.h _contents REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$") + unset(Fontconfig_VERSION) + foreach(VPART MAJOR MINOR REVISION) + foreach(VLINE ${_contents}) + if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$") + set(Fontconfig_VERSION_PART "${CMAKE_MATCH_1}") + if(Fontconfig_VERSION) + string(APPEND Fontconfig_VERSION ".${Fontconfig_VERSION_PART}") + else() + set(Fontconfig_VERSION "${Fontconfig_VERSION_PART}") + endif() + endif() + endforeach() + endforeach() +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Fontconfig + FOUND_VAR + Fontconfig_FOUND + REQUIRED_VARS + Fontconfig_LIBRARY + Fontconfig_INCLUDE_DIR + VERSION_VAR + Fontconfig_VERSION +) + + +if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig) + add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED) + set_target_properties(Fontconfig::Fontconfig PROPERTIES + IMPORTED_LOCATION "${Fontconfig_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${Fontconfig_COMPILE_OPTIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(Fontconfig_LIBRARY Fontconfig_INCLUDE_DIR) + +if(Fontconfig_FOUND) + set(Fontconfig_LIBRARIES ${Fontconfig_LIBRARY}) + set(Fontconfig_INCLUDE_DIRS ${Fontconfig_INCLUDE_DIR}) +endif() diff --git a/cmake/FindGrfcodec.cmake b/cmake/FindGrfcodec.cmake new file mode 100644 index 0000000000..089f956706 --- /dev/null +++ b/cmake/FindGrfcodec.cmake @@ -0,0 +1,13 @@ +# Autodetect grfcodec and nforenum. +# + +find_program(GRFCODEC_EXECUTABLE grfcodec) +find_program(NFORENUM_EXECUTABLE nforenum) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Grfcodec + FOUND_VAR GRFCODEC_FOUND + REQUIRED_VARS + GRFCODEC_EXECUTABLE + NFORENUM_EXECUTABLE +) diff --git a/cmake/FindICU.cmake b/cmake/FindICU.cmake new file mode 100644 index 0000000000..471e43c1d9 --- /dev/null +++ b/cmake/FindICU.cmake @@ -0,0 +1,64 @@ +#[=======================================================================[.rst: +FindICU +------- + +Finds components of the ICU library. + +Accepted components are: uc, i18n, le, lx, io + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``ICU_FOUND`` + True if components of ICU library are found. +``ICU_VERSION`` + The version of the ICU library which was found. +``ICU__FOUND`` + True if the system has the component of ICU library. +``ICU__INCLUDE_DIRS`` + Include directories needed to use the component of ICU library. +``ICU__LIBRARIES`` + Libraries needed to link to the component of ICU library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) + +set(ICU_KNOWN_COMPONENTS "uc" "i18n" "le" "lx" "io") + +foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS) + if (NOT MOD_NAME IN_LIST ICU_KNOWN_COMPONENTS) + message(FATAL_ERROR "Unknown ICU component: ${MOD_NAME}") + endif() + pkg_check_modules(PC_ICU_${MOD_NAME} QUIET icu-${MOD_NAME}) + + # Check the libraries returned by pkg-config really exist. + unset(PC_LIBRARIES) + foreach(LIBRARY IN LISTS PC_ICU_${MOD_NAME}_LIBRARIES) + unset(PC_LIBRARY CACHE) + find_library(PC_LIBRARY NAMES ${LIBRARY}) + if (NOT PC_LIBRARY) + unset(PC_ICU_${MOD_NAME}_FOUND) + endif() + list(APPEND PC_LIBRARIES ${PC_LIBRARY}) + endforeach() + unset(PC_LIBRARY CACHE) + + if (${PC_ICU_${MOD_NAME}_FOUND}) + set(ICU_COMPONENT_FOUND TRUE) + set(ICU_${MOD_NAME}_FOUND TRUE) + set(ICU_${MOD_NAME}_LIBRARIES ${PC_LIBRARIES}) + set(ICU_${MOD_NAME}_INCLUDE_DIRS ${PC_ICU_${MOD_NAME}_INCLUDE_DIRS}) + set(ICU_VERSION ${PC_ICU_${MOD_NAME}_VERSION}) + endif() +endforeach() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ICU + FOUND_VAR ICU_FOUND + REQUIRED_VARS ICU_COMPONENT_FOUND + VERSION_VAR ICU_VERSION + HANDLE_COMPONENTS +) diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake new file mode 100644 index 0000000000..5185601ab7 --- /dev/null +++ b/cmake/FindIconv.cmake @@ -0,0 +1,133 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindIconv +--------- + +This module finds the ``iconv()`` POSIX.1 functions on the system. +These functions might be provided in the regular C library or externally +in the form of an additional library. + +The following variables are provided to indicate iconv support: + +.. variable:: Iconv_FOUND + + Variable indicating if the iconv support was found. + +.. variable:: Iconv_INCLUDE_DIRS + + The directories containing the iconv headers. + +.. variable:: Iconv_LIBRARIES + + The iconv libraries to be linked. + +.. variable:: Iconv_IS_BUILT_IN + + A variable indicating whether iconv support is stemming from the + C library or not. Even if the C library provides `iconv()`, the presence of + an external `libiconv` implementation might lead to this being false. + +Additionally, the following :prop_tgt:`IMPORTED` target is being provided: + +.. variable:: Iconv::Iconv + + Imported target for using iconv. + +The following cache variables may also be set: + +.. variable:: Iconv_INCLUDE_DIR + + The directory containing the iconv headers. + +.. variable:: Iconv_LIBRARY + + The iconv library (if not implicitly given in the C library). + +.. note:: + On POSIX platforms, iconv might be part of the C library and the cache + variables ``Iconv_INCLUDE_DIR`` and ``Iconv_LIBRARY`` might be empty. + +#]=======================================================================] + +include(CMakePushCheckState) +if(CMAKE_C_COMPILER_LOADED) + include(CheckCSourceCompiles) +elseif(CMAKE_CXX_COMPILER_LOADED) + include(CheckCXXSourceCompiles) +else() + # If neither C nor CXX are loaded, implicit iconv makes no sense. + set(Iconv_IS_BUILT_IN FALSE) +endif() + +# iconv can only be provided in libc on a POSIX system. +# If any cache variable is already set, we'll skip this test. +if(NOT DEFINED Iconv_IS_BUILT_IN) + if(UNIX AND NOT DEFINED Iconv_INCLUDE_DIR AND NOT DEFINED Iconv_LIBRARY) + cmake_push_check_state(RESET) + # We always suppress the message here: Otherwise on supported systems + # not having iconv in their C library (e.g. those using libiconv) + # would always display a confusing "Looking for iconv - not found" message + set(CMAKE_FIND_QUIETLY TRUE) + # The following code will not work, but it's sufficient to see if it compiles. + # Note: libiconv will define the iconv functions as macros, so CheckSymbolExists + # will not yield correct results. + set(Iconv_IMPLICIT_TEST_CODE + " + #include + #include + int main() { + char *a, *b; + size_t i, j; + iconv_t ic; + ic = iconv_open(\"to\", \"from\"); + iconv(ic, &a, &i, &b, &j); + iconv_close(ic); + } + " + ) + if(CMAKE_C_COMPILER_LOADED) + check_c_source_compiles("${Iconv_IMPLICIT_TEST_CODE}" Iconv_IS_BUILT_IN) + else() + check_cxx_source_compiles("${Iconv_IMPLICIT_TEST_CODE}" Iconv_IS_BUILT_IN) + endif() + cmake_pop_check_state() + else() + set(Iconv_IS_BUILT_IN FALSE) + endif() +endif() + +if(NOT Iconv_IS_BUILT_IN) + find_path(Iconv_INCLUDE_DIR + NAMES "iconv.h" + DOC "iconv include directory") + set(Iconv_LIBRARY_NAMES "iconv" "libiconv") +else() + set(Iconv_INCLUDE_DIR "" CACHE FILEPATH "iconv include directory") + set(Iconv_LIBRARY_NAMES "c") +endif() + +find_library(Iconv_LIBRARY + NAMES ${Iconv_LIBRARY_NAMES} + DOC "iconv library (potentially the C library)") + +mark_as_advanced(Iconv_INCLUDE_DIR) +mark_as_advanced(Iconv_LIBRARY) + +include(FindPackageHandleStandardArgs) +if(NOT Iconv_IS_BUILT_IN) + find_package_handle_standard_args(Iconv REQUIRED_VARS Iconv_LIBRARY Iconv_INCLUDE_DIR) +else() + find_package_handle_standard_args(Iconv REQUIRED_VARS Iconv_LIBRARY) +endif() + +if(Iconv_FOUND) + set(Iconv_INCLUDE_DIRS "${Iconv_INCLUDE_DIR}") + set(Iconv_LIBRARIES "${Iconv_LIBRARY}") + if(NOT TARGET Iconv::Iconv) + add_library(Iconv::Iconv INTERFACE IMPORTED) + endif() + set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${Iconv_INCLUDE_DIRS}") + set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_LINK_LIBRARIES "${Iconv_LIBRARIES}") +endif() diff --git a/cmake/FindLZO.cmake b/cmake/FindLZO.cmake new file mode 100644 index 0000000000..9a409002df --- /dev/null +++ b/cmake/FindLZO.cmake @@ -0,0 +1,89 @@ +#[=======================================================================[.rst: +FindLZO +------- + +Finds the LZO library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``LZO_FOUND`` + True if the system has the LZO library. +``LZO_INCLUDE_DIRS`` + Include directories needed to use LZO. +``LZO_LIBRARIES`` + Libraries needed to link to LZO. +``LZO_VERSION`` + The version of the LZO library which was found. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``LZO_INCLUDE_DIR`` + The directory containing ``lzo/lzo1x.h``. +``LZO_LIBRARY`` + The path to the LZO library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_LZO QUIET lzo2) + +find_path(LZO_INCLUDE_DIR + NAMES lzo/lzo1x.h + PATHS ${PC_LZO_INCLUDE_DIRS} +) + +find_library(LZO_LIBRARY + NAMES lzo2 + PATHS ${PC_LZO_LIBRARY_DIRS} +) + +# With vcpkg, the library path should contain both 'debug' and 'optimized' +# entries (see target_link_libraries() documentation for more information) +# +# NOTE: we only patch up when using vcpkg; the same issue might happen +# when not using vcpkg, but this is non-trivial to fix, as we have no idea +# what the paths are. With vcpkg we do. And we only official support vcpkg +# with Windows. +# +# NOTE: this is based on the assumption that the debug file has the same +# name as the optimized file. This is not always the case, but so far +# experiences has shown that in those case vcpkg CMake files do the right +# thing. +if (VCPKG_TOOLCHAIN AND LZO_LIBRARY) + if (LZO_LIBRARY MATCHES "/debug/") + set(LZO_LIBRARY_DEBUG ${LZO_LIBRARY}) + string(REPLACE "/debug/lib/" "/lib/" LZO_LIBRARY_RELEASE ${LZO_LIBRARY}) + else() + set(LZO_LIBRARY_RELEASE ${LZO_LIBRARY}) + string(REPLACE "/lib/" "/debug/lib/" LZO_LIBRARY_DEBUG ${LZO_LIBRARY}) + endif() + include(SelectLibraryConfigurations) + select_library_configurations(LZO) +endif() + +set(LZO_VERSION ${PC_LZO_VERSION}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LZO + FOUND_VAR LZO_FOUND + REQUIRED_VARS + LZO_LIBRARY + LZO_INCLUDE_DIR + VERSION_VAR LZO_VERSION +) + +if (LZO_FOUND) + set(LZO_LIBRARIES ${LZO_LIBRARY}) + set(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR}) +endif () + +mark_as_advanced( + LZO_INCLUDE_DIR + LZO_LIBRARY +) diff --git a/cmake/FindSSE.cmake b/cmake/FindSSE.cmake new file mode 100644 index 0000000000..d0a57ccbb2 --- /dev/null +++ b/cmake/FindSSE.cmake @@ -0,0 +1,17 @@ +# Autodetect if SSE4.1 can be used. If so, the assumption is, so can the other +# SSE version (SSE 2.0, SSSE 3.0). + +include(CheckCXXSourceCompiles) +set(CMAKE_REQUIRED_FLAGS "") + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set(CMAKE_REQUIRED_FLAGS "-msse4.1") +endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + +check_cxx_source_compiles(" + #include + #include + #include + int main() { return 0; }" + SSE_FOUND +) diff --git a/cmake/FindXDG_basedir.cmake b/cmake/FindXDG_basedir.cmake new file mode 100644 index 0000000000..913b425e20 --- /dev/null +++ b/cmake/FindXDG_basedir.cmake @@ -0,0 +1,65 @@ +#[=======================================================================[.rst: +FindXDG_basedir +------- + +Finds the xdg-basedir library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``XDG_basedir_FOUND`` + True if the system has the xdg-basedir library. +``XDG_basedir_INCLUDE_DIRS`` + Include directories needed to use xdg-basedir. +``XDG_basedir_LIBRARIES`` + Libraries needed to link to xdg-basedir. +``XDG_basedir_VERSION`` + The version of the xdg-basedir library which was found. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``XDG_basedir_INCLUDE_DIR`` + The directory containing ``xdg-basedir.h``. +``XDG_basedir_LIBRARY`` + The path to the xdg-basedir library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_XDG_basedir QUIET libxdg-basedir) + +find_path(XDG_basedir_INCLUDE_DIR + NAMES basedir.h + PATHS ${PC_XDG_basedir_INCLUDE_DIRS} +) + +find_library(XDG_basedir_LIBRARY + NAMES xdg-basedir + PATHS ${PC_XDG_basedir_LIBRARY_DIRS} +) + +set(XDG_basedir_VERSION ${PC_XDG_basedir_VERSION}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XDG_basedir + FOUND_VAR XDG_basedir_FOUND + REQUIRED_VARS + XDG_basedir_LIBRARY + XDG_basedir_INCLUDE_DIR + VERSION_VAR XDG_basedir_VERSION +) + +if (XDG_basedir_FOUND) + set(XDG_basedir_LIBRARIES ${XDG_basedir_LIBRARY}) + set(XDG_basedir_INCLUDE_DIRS ${XDG_basedir_INCLUDE_DIR}) +endif () + +mark_as_advanced( + XDG_basedir_INCLUDE_DIR + XDG_basedir_LIBRARY +) diff --git a/cmake/FindXaudio2.cmake b/cmake/FindXaudio2.cmake new file mode 100644 index 0000000000..065e2d3589 --- /dev/null +++ b/cmake/FindXaudio2.cmake @@ -0,0 +1,18 @@ +# Autodetect if xaudio2 can be used. + +include(CheckCXXSourceCompiles) +set(CMAKE_REQUIRED_FLAGS "") + +check_cxx_source_compiles(" + #include + + #undef NTDDI_VERSION + #undef _WIN32_WINNT + + #define NTDDI_VERSION NTDDI_WIN8 + #define _WIN32_WINNT _WIN32_WINNT_WIN8 + + #include + int main() { return 0; }" + XAUDIO2_FOUND +) diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake new file mode 100644 index 0000000000..5508744adb --- /dev/null +++ b/cmake/InstallAndPackage.cmake @@ -0,0 +1,116 @@ +include(GNUInstallDirs) + +# If requested, use FHS layout; otherwise fall back to a flat layout. +if (OPTION_INSTALL_FHS) + set(BINARY_DESTINATION_DIR "${CMAKE_INSTALL_BINDIR}") + set(DATA_DESTINATION_DIR "${CMAKE_INSTALL_DATADIR}/openttd") + set(DOCS_DESTINATION_DIR "${CMAKE_INSTALL_DOCDIR}") + set(MAN_DESTINATION_DIR "${CMAKE_INSTALL_MANDIR}") +else (OPTION_INSTALL_FHS) + set(BINARY_DESTINATION_DIR ".") + set(DATA_DESTINATION_DIR ".") + set(DOCS_DESTINATION_DIR ".") + set(MAN_DESTINATION_DIR ".") +endif (OPTION_INSTALL_FHS) + +install(TARGETS openttd + RUNTIME + DESTINATION ${BINARY_DESTINATION_DIR} + COMPONENT Runtime + ) + +install(DIRECTORY + ${CMAKE_BINARY_DIR}/lang + ${CMAKE_BINARY_DIR}/baseset + ${CMAKE_SOURCE_DIR}/bin/ai + ${CMAKE_SOURCE_DIR}/bin/game + ${CMAKE_SOURCE_DIR}/bin/scripts + ${CMAKE_SOURCE_DIR}/bin/data + DESTINATION ${DATA_DESTINATION_DIR} + COMPONENT language_files) + +install(FILES + ${CMAKE_SOURCE_DIR}/COPYING.md + ${CMAKE_SOURCE_DIR}/README.md + ${CMAKE_SOURCE_DIR}/changelog.txt + ${CMAKE_SOURCE_DIR}/docs/multiplayer.md + ${CMAKE_SOURCE_DIR}/known-bugs.txt + ${CMAKE_SOURCE_DIR}/jgrpp-changelog.md + DESTINATION ${DOCS_DESTINATION_DIR} + COMPONENT docs) + +# A Linux manual only makes sense when using FHS. Otherwise it is a very odd +# file with little context to what it is. +if (OPTION_INSTALL_FHS) + install(FILES + ${CMAKE_SOURCE_DIR}/docs/openttd.6 + DESTINATION ${MAN_DESTINATION_DIR}/man6 + COMPONENT manual) +endif (OPTION_INSTALL_FHS) + +# TODO -- Media files +# TODO -- Menu files + +if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(ARCHITECTURE "amd64") +else (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCHITECTURE) +endif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + +# Windows is a bit more annoying to detect; using the size of void pointer +# seems to be the most robust. +if (WIN32) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(ARCHITECTURE "win64") + else (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(ARCHITECTURE "win32") + endif (CMAKE_SIZEOF_VOID_P EQUAL 8) +endif (WIN32) + +set(CPACK_SYSTEM_NAME "${ARCHITECTURE}") + +set(CPACK_PACKAGE_NAME "openttd") +set(CPACK_PACKAGE_VENDOR "OpenTTD") +set(CPACK_PACKAGE_DESCRIPTION "OpenTTD") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenTTD") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.openttd.org/") +set(CPACK_PACKAGE_CONTACT "OpenTTD ") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenTTD") +set(CPACK_PACKAGE_CHECKSUM "SHA256") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.md") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") +set(CPACK_MONOLITHIC_INSTALL YES) +set(CPACK_PACKAGE_EXECUTABLES "openttd;OpenTTD") +set(CPACK_STRIP_FILES YES) +set(CPACK_OUTPUT_FILE_PREFIX "bundles") + +if (APPLE) + set(CPACK_GENERATOR "Bundle") + include(PackageBundle) + + set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macosx") +elseif (WIN32) + set(CPACK_GENERATOR "ZIP") + if (OPTION_USE_NSIS) + list(APPEND CPACK_GENERATOR "NSIS") + include(PackageNSIS) + endif (OPTION_USE_NSIS) + + set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}") +elseif (UNIX) + # With FHS, we can create deb/rpm/... Without it, they would be horribly broken + # and not work. The other way around is also true; with FHS they are not + # usable, and only flat formats work. + if (OPTION_INSTALL_FHS) + set(CPACK_GENERATOR "DEB") + include(PackageDeb) + else (OPTION_INSTALL_FHS) + set(CPACK_GENERATOR "TXZ") + endif (OPTION_INSTALL_FHS) + + set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-linux-${CPACK_SYSTEM_NAME}") +else () + message(FATAL_ERROR "Unknown OS found for packaging; please consider creating a Pull Request to add support for this OS.") +endif () + +include(CPack) diff --git a/cmake/LinkPackage.cmake b/cmake/LinkPackage.cmake new file mode 100644 index 0000000000..f64ccfd51f --- /dev/null +++ b/cmake/LinkPackage.cmake @@ -0,0 +1,18 @@ +function(link_package NAME) + cmake_parse_arguments(LP "ENCOURAGED" "TARGET" "" ${ARGN}) + + if (${NAME}_FOUND) + string(TOUPPER "${NAME}" UCNAME) + add_definitions(-DWITH_${UCNAME}) + if (LP_TARGET AND TARGET ${LP_TARGET}) + target_link_libraries(openttd ${LP_TARGET}) + message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${LP_TARGET}") + else() + include_directories(${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR}) + target_link_libraries(openttd ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY}) + message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR} -- ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY}") + endif() + elseif (LP_ENCOURAGED) + message(WARNING "${NAME} not found; compiling OpenTTD without ${NAME} is strongly disencouraged") + endif() +endfunction() diff --git a/cmake/Options.cmake b/cmake/Options.cmake new file mode 100644 index 0000000000..478f1b2b24 --- /dev/null +++ b/cmake/Options.cmake @@ -0,0 +1,88 @@ +include(GNUInstallDirs) + +# Set the options for the directories (personal, shared, global). +# +# set_directory_options() +# +function(set_directory_options) + if (APPLE) + set(DEFAULT_PERSONAL_DIR "Documents/OpenTTD") + set(DEFAULT_SHARED_DIR "/Library/Application Support/OpenTTD") + set(DEFAULT_GLOBAL_DIR "(not set)") + elseif (WIN32) + set(DEFAULT_PERSONAL_DIR "OpenTTD") + set(DEFAULT_SHARED_DIR "(not set)") + set(DEFAULT_GLOBAL_DIR "(not set)") + elseif (UNIX) + set(DEFAULT_PERSONAL_DIR ".openttd") + set(DEFAULT_SHARED_DIR "(not set)") + set(DEFAULT_GLOBAL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/openttd") + else () + message(FATAL_ERROR "Unknown OS found; please consider creating a Pull Request to add support for this OS.") + endif () + + if (NOT PERSONAL_DIR) + set(PERSONAL_DIR "${DEFAULT_PERSONAL_DIR}" CACHE STRING "Personal directory") + message(STATUS "Detecting Personal Data directory - ${PERSONAL_DIR}") + endif (NOT PERSONAL_DIR) + + if (NOT SHARED_DIR) + set(SHARED_DIR "${DEFAULT_SHARED_DIR}" CACHE STRING "Shared directory") + message(STATUS "Detecting Shared Data directory - ${SHARED_DIR}") + endif (NOT SHARED_DIR) + + if (NOT GLOBAL_DIR) + set(GLOBAL_DIR "${DEFAULT_GLOBAL_DIR}" CACHE STRING "Global directory") + message(STATUS "Detecting Global Data directory - ${GLOBAL_DIR}") + endif (NOT GLOBAL_DIR) +endfunction() + +# Set some generic options that influence what is being build. +# +# set_options() +# +function(set_options) + if (UNIX AND NOT APPLE) + set(DEFAULT_OPTION_INSTALL_FHS ON) + else (UNIX AND NOT APPLE) + set(DEFAULT_OPTION_INSTALL_FHS OFF) + endif (UNIX AND NOT APPLE) + + option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF) + option(OPTION_INSTALL_FHS "Install with Filesstem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS}) + option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON) + option(OPTION_USE_THREADS "Use threads" ON) + option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF) +endfunction() + +# Show the values of the generic options. +# +# show_options() +# +function(show_options) + message(STATUS "Option Dedicated - ${OPTION_DEDICATED}") + message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}") + message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}") + message(STATUS "Option Use threads - ${OPTION_USE_THREADS}") + message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}") +endfunction() + +# Add the definitions for the options that are selected. +# +# add_definitions_based_on_options() +# +function(add_definitions_based_on_options) + if (OPTION_DEDICATED) + add_definitions(-DDEDICATED) + endif (OPTION_DEDICATED) + + if (NOT OPTION_USE_THREADS) + add_definitions(-DNO_THREADS) + endif (NOT OPTION_USE_THREADS) + + if (OPTION_USE_ASSERTS) + add_definitions(-DWITH_ASSERT) + else (OPTION_USE_ASSERTS) + add_definitions(-DNDEBUG) + endif (OPTION_USE_ASSERTS) +endfunction() diff --git a/cmake/PackageBundle.cmake b/cmake/PackageBundle.cmake new file mode 100644 index 0000000000..a443da3c4b --- /dev/null +++ b/cmake/PackageBundle.cmake @@ -0,0 +1,25 @@ +string(TIMESTAMP CURRENT_YEAR "%Y") + +set(CPACK_BUNDLE_NAME "OpenTTD") +set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns") +set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist") +set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/os/macosx/launch.sh") +set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png") + +# Create a temporary Info.plist.in, where we will fill in the version via +# CPackProperties.cmake.in. This because at this point in time the version +# is not yet known. +configure_file("${CMAKE_SOURCE_DIR}/os/macosx/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in") +set(CPACK_BUNDLE_PLIST_SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in") + +# Delay fixup_bundle() till the install step; this makes sure all executables +# exists and it can do its job. +install( + CODE + " + include(BundleUtilities) + set(BU_CHMOD_BUNDLE_ITEMS TRUE) + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/openttd\" \"\" \"\") + " + DESTINATION . + COMPONENT Runtime) diff --git a/cmake/PackageDeb.cmake b/cmake/PackageDeb.cmake new file mode 100644 index 0000000000..0d635ebcb3 --- /dev/null +++ b/cmake/PackageDeb.cmake @@ -0,0 +1,4 @@ +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${ARCHITECTURE}") +set(CPACK_DEBIAN_PACKAGE_SECTION "games") +# TODO -- Fix depends +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.15)") diff --git a/cmake/PackageNSIS.cmake b/cmake/PackageNSIS.cmake new file mode 100644 index 0000000000..1af38271f5 --- /dev/null +++ b/cmake/PackageNSIS.cmake @@ -0,0 +1,39 @@ +set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) +set(CPACK_NSIS_HELP_LINK "${CPACK_PACKAGE_HOMEPAGE_URL}") +set(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_PACKAGE_HOMEPAGE_URL}") +set(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}") + +# NSIS uses this for the icon in the top left of the installer +set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/os/windows\\\\nsis-top.bmp") + +# Set other icons and bitmaps for NSIS +set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/os/windows\\\\openttd.ico") +set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/os/windows\\\\openttd.ico") +set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}/os/windows\\\\nsis-welcome.bmp") +set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}/os/windows\\\\nsis-welcome.bmp") + +# Use the icon of the application +set(CPACK_NSIS_INSTALLED_ICON_NAME "openttd.exe") +# Tell NSIS the binary will be in the root +set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") + +# Add detail information on the NSIS installer executable. CPack doesn't +# support this out of the box, so we use CPACK_NSIS_DEFINES for this. + +# \\\ are needed, because this value is generated in another CPack file, +# which is used. So one \ is to escape here, the second to escape in the +# CPack file, which we have to escape here (hence: 3 \). +set(CPACK_NSIS_DEFINES " +; Version Info +Var AddWinPrePopulate +VIProductVersion \\\"0.0.0.0\\\" +VIAddVersionKey \\\"ProductName\\\" \\\"OpenTTD Installer for Windows\\\" +VIAddVersionKey \\\"Comments\\\" \\\"Installs OpenTTD \\\${VERSION}\\\" +VIAddVersionKey \\\"CompanyName\\\" \\\"OpenTTD Developers\\\" +VIAddVersionKey \\\"FileDescription\\\" \\\"Installs OpenTTD \\\${VERSION}\\\" +VIAddVersionKey \\\"ProductVersion\\\" \\\"\\\${VERSION}\\\" +VIAddVersionKey \\\"InternalName\\\" \\\"InstOpenTTD\\\" +VIAddVersionKey \\\"FileVersion\\\" \\\"0.0.0.0\\\" +VIAddVersionKey \\\"LegalCopyright\\\" \\\" \\\" +" +) diff --git a/cmake/SourceList.cmake b/cmake/SourceList.cmake new file mode 100644 index 0000000000..6300a19a43 --- /dev/null +++ b/cmake/SourceList.cmake @@ -0,0 +1,63 @@ +# Add a file to be compiled. +# +# add_files([file1 ...] CONDITION condition [condition ...]) +# +# CONDITION is a complete statement that can be evaluated with if(). +# If it evaluates true, the source files will be added; otherwise not. +# For example: ADD_IF SDL_FOUND AND Allegro_FOUND +# +function(add_files) + cmake_parse_arguments(PARAM "" "" "CONDITION" ${ARGN}) + set(PARAM_FILES "${PARAM_UNPARSED_ARGUMENTS}") + + if (PARAM_CONDITION) + if (NOT (${PARAM_CONDITION})) + return() + endif (NOT (${PARAM_CONDITION})) + endif (PARAM_CONDITION) + + foreach(FILE IN LISTS PARAM_FILES) + target_sources(openttd PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) + endforeach() +endfunction(add_files) + +# This function works around an 'issue' with CMake, where +# set_source_files_properties() only works in the scope of the file. We want +# to set properties for the source file on a more global level. To solve this, +# this function records the flags you want, and a macro adds them in the root +# CMakeLists.txt. +# See this URL for more information on the issue: +# http://cmake.3232098.n2.nabble.com/scope-of-set-source-files-properties-td4766111.html +# +# set_compile_flags([file1 ...] COMPILE_FLAGS cflag [cflag ...]) +# +function(set_compile_flags) + cmake_parse_arguments(PARAM "" "" "COMPILE_FLAGS" ${ARGN}) + set(PARAM_FILES "${PARAM_UNPARSED_ARGUMENTS}") + + get_property(SOURCE_PROPERTIES GLOBAL PROPERTY source_properties) + + foreach(FILE IN LISTS PARAM_FILES) + list(APPEND SOURCE_PROPERTIES "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}::${PARAM_COMPILE_FLAGS}") + endforeach() + + set_property(GLOBAL PROPERTY source_properties "${SOURCE_PROPERTIES}") +endfunction(set_compile_flags) + +# Call this macro in the same CMakeLists.txt and after add_executable(). +# This makes sure all the COMPILE_FLAGS of set_compile_flags() are set +# correctly. +# +# process_compile_flags() +# +function(process_compile_flags) + get_property(SOURCE_PROPERTIES GLOBAL PROPERTY source_properties) + + foreach(ENTRY ${SOURCE_PROPERTIES}) + string(REPLACE "::" ";" ENTRY "${ENTRY}") + list(GET ENTRY 0 FILE) + list(GET ENTRY 1 PROPERTIES) + + set_source_files_properties(${FILE} PROPERTIES COMPILE_FLAGS ${PROPERTIES}) + endforeach() +endfunction(process_compile_flags) diff --git a/cmake/Static.cmake b/cmake/Static.cmake new file mode 100644 index 0000000000..7648d05e7f --- /dev/null +++ b/cmake/Static.cmake @@ -0,0 +1,14 @@ +# Set static linking if the platform requires it. +# +# set_static() +# +function(set_static_if_needed) + if (MINGW) + # Let exectutables run outside MinGW environment + # Force searching static libs + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE) + + # Force static linking + link_libraries(-static -static-libgcc -static-libstdc++) + endif() +endfunction() diff --git a/cmake/scripts/Baseset.cmake b/cmake/scripts/Baseset.cmake new file mode 100644 index 0000000000..4329dbdf8c --- /dev/null +++ b/cmake/scripts/Baseset.cmake @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.5) + +# +# Create a single baseset meta file with the correct translations. +# + +set(ARGC 1) +set(ARG_READ NO) + +# Read all the arguments given to CMake; we are looking for -- and everything +# that follows. Those are our language files. +while(ARGC LESS CMAKE_ARGC) + set(ARG ${CMAKE_ARGV${ARGC}}) + + if (ARG_READ) + list(APPEND LANG_SOURCE_FILES "${ARG}") + endif (ARG_READ) + + if (ARG STREQUAL "--") + set(ARG_READ YES) + endif (ARG STREQUAL "--") + + math(EXPR ARGC "${ARGC} + 1") +endwhile() + +# Place holder format is @_@ +file(STRINGS "${BASESET_SOURCE_FILE}" PLACE_HOLDER REGEX "^@") +string(REGEX REPLACE "@([^_]+).*@" "\\1" INI_KEY "${PLACE_HOLDER}") +string(REGEX REPLACE "@[^_]+_(.*)@" "\\1" STR_ID "${PLACE_HOLDER}") +string(REGEX REPLACE "@(.*)@" "\\1" PLACE_HOLDER "${PLACE_HOLDER}") + +# Get the translations +foreach(LANGFILE IN LISTS LANG_SOURCE_FILES) + file(STRINGS "${LANGFILE}" LANGLINES REGEX "^(##isocode|${STR_ID})" ENCODING UTF-8) + string(FIND "${LANGLINES}" "${STR_ID}" HAS_STR_ID) + if (HAS_STR_ID LESS 0) + continue() + endif (HAS_STR_ID LESS 0) + string(REGEX REPLACE "##isocode ([^;]+).*" "\\1" ISOCODE "${LANGLINES}") + if ("${ISOCODE}" STREQUAL "en_GB") + string(REGEX REPLACE "[^:]*:(.*)" "${INI_KEY} = \\1" LANGLINES "${LANGLINES}") + else() + string(REGEX REPLACE "[^:]*:(.*)" "${INI_KEY}.${ISOCODE} = \\1" LANGLINES "${LANGLINES}") + endif() + list(APPEND ${PLACE_HOLDER} ${LANGLINES}) +endforeach(LANGFILE) +list(SORT ${PLACE_HOLDER}) +string(REPLACE ";" "\n" ${PLACE_HOLDER} "${${PLACE_HOLDER}}") + +# Get the grf md5 +file(MD5 ${BASESET_EXTRAGRF_FILE} ORIG_EXTRA_GRF_MD5) + +configure_file(${BASESET_SOURCE_FILE} ${BASESET_BINARY_FILE}) diff --git a/cmake/scripts/CreateGRF.cmake b/cmake/scripts/CreateGRF.cmake new file mode 100644 index 0000000000..f5811daf9f --- /dev/null +++ b/cmake/scripts/CreateGRF.cmake @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.5) + +# +# Create a single GRF file based on sprites/.nfo and sprites/*.png +# files. +# + +if (NOT NFORENUM_EXECUTABLE) + message(FATAL_ERROR "Script needs NFORENUM_EXECUTABLE defined") +endif (NOT NFORENUM_EXECUTABLE) +if (NOT GRFCODEC_EXECUTABLE) + message(FATAL_ERROR "Script needs GRFCODEC_EXECUTABLE defined") +endif (NOT GRFCODEC_EXECUTABLE) +if (NOT GRF_SOURCE_FOLDER) + message(FATAL_ERROR "Script needs GRF_SOURCE_FOLDER defined") +endif (NOT GRF_SOURCE_FOLDER) +if (NOT GRF_BINARY_FILE) + message(FATAL_ERROR "Script needs GRF_BINARY_FILE defined") +endif (NOT GRF_BINARY_FILE) + +get_filename_component(GRF_SOURCE_FOLDER_NAME "${GRF_SOURCE_FOLDER}" NAME) + +file(WRITE sprites/${GRF_SOURCE_FOLDER_NAME}.nfo "") +file(READ ${GRF_SOURCE_FOLDER}/${GRF_SOURCE_FOLDER_NAME}.nfo NFO_LINES) +# Replace ; with \;, and make a list out of this based on \n +string(REPLACE ";" "\\;" NFO_LINES "${NFO_LINES}") +string(REPLACE "\n" ";" NFO_LINES "${NFO_LINES}") + +foreach(NFO_LINE IN LISTS NFO_LINES) + # Recover the ; that was really in the text (and not a newline) + string(REPLACE "\\;" ";" NFO_LINE "${NFO_LINE}") + + if (NFO_LINE MATCHES "^#include") + string(REGEX REPLACE "^#include \"(.*)\"$" "\\1" INCLUDE_FILE ${NFO_LINE}) + file(READ ${GRF_SOURCE_FOLDER}/${INCLUDE_FILE} INCLUDE_LINES) + file(APPEND sprites/${GRF_SOURCE_FOLDER_NAME}.nfo "${INCLUDE_LINES}") + else (NFO_LINE MATCHES "^#include") + file(APPEND sprites/${GRF_SOURCE_FOLDER_NAME}.nfo "${NFO_LINE}\n") + endif (NFO_LINE MATCHES "^#include") +endforeach(NFO_LINE) + +execute_process(COMMAND ${NFORENUM_EXECUTABLE} -s sprites/${GRF_SOURCE_FOLDER_NAME}.nfo) +execute_process(COMMAND ${GRFCODEC_EXECUTABLE} -n -s -e -p1 ${GRF_SOURCE_FOLDER_NAME}.grf) +execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${GRF_SOURCE_FOLDER_NAME}.grf ${GRF_BINARY_FILE}) diff --git a/cmake/scripts/FindVersion.cmake b/cmake/scripts/FindVersion.cmake new file mode 100644 index 0000000000..ebc137f5ee --- /dev/null +++ b/cmake/scripts/FindVersion.cmake @@ -0,0 +1,140 @@ +cmake_minimum_required(VERSION 3.5) + +# +# Finds the current version of the current folder. +# + +find_package(Git QUIET) +# ${CMAKE_SOURCE_DIR}/.git may be a directory or a regular file +if (GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git") + # Make sure LC_ALL is set to something desirable + set(SAVED_LC_ALL "$ENV{LC_ALL}") + set(ENV{LC_ALL} C) + + # Assume the dir is not modified + set(REV_MODIFIED 0) + + # Refresh the index to make sure file stat info is in sync, then look for modifications + execute_process(COMMAND ${GIT_EXECUTABLE} update-index --refresh + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_QUIET + ) + + # See if git tree is modified + execute_process(COMMAND ${GIT_EXECUTABLE} diff-index HEAD + OUTPUT_VARIABLE IS_MODIFIED + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + if (NOT IS_MODIFIED STREQUAL "") + set(REV_MODIFIED 2) + endif() + + # Get last commit hash + execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --verify HEAD + OUTPUT_VARIABLE FULLHASH + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ERROR_QUIET + ) + set(REV_HASH "${FULLHASH}") + + string(SUBSTRING "${FULLHASH}" 0 10 SHORTHASH) + + # Get the last commit date + execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%ci HEAD + OUTPUT_VARIABLE COMMITDATE + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + string(REGEX REPLACE "([0-9]+)-([0-9]+)-([0-9]+).*" "\\1\\2\\3" COMMITDATE "${COMMITDATE}") + set(REV_ISODATE "${COMMITDATE}") + string(SUBSTRING "${REV_ISODATE}" 0 4 REV_YEAR) + + # Get the branch + execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q HEAD + OUTPUT_VARIABLE BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ERROR_QUIET + ) + string(REGEX REPLACE ".*/" "" BRANCH "${BRANCH}") + + # Get the tag + execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags + OUTPUT_VARIABLE TAG + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ERROR_QUIET + ) + string(REGEX REPLACE "\^0$" "" TAG "${TAG}") + + if (REV_MODIFIED EQUAL 0) + set(HASHPREFIX "-g") + elseif (REV_MODIFIED EQUAL 2) + set(HASHPREFIX "-m") + else () + set(HASHPREFIX "-u") + endif() + + # Set the version string + if (NOT TAG STREQUAL "") + set(REV_VERSION "${TAG}") + set(REV_ISTAG 1) + + string(REGEX REPLACE "^[0-9.]*$" "" STABLETAG "${TAG}") + if (NOT STABLETAG STREQUAL "") + set(REV_ISSTABLETAG 1) + else () + set(REV_ISSTABLETAG 0) + endif () + else () + set(REV_VERSION "${REV_ISODATE}-${BRANCH}${HASHPREFIX}${SHORTHASH}") + set(REV_ISTAG 0) + set(REV_ISSTABLETAG 0) + endif () + + # Restore LC_ALL + set(ENV{LC_ALL} "${SAVED_LC_ALL}") +elseif (EXISTS "${CMAKE_SOURCE_DIR}/.ottdrev") + file(READ "${CMAKE_SOURCE_DIR}/.ottdrev" OTTDREV) + string(REPLACE "\n" "" OTTDREV "${OTTDREV}") + string(REPLACE "\t" ";" OTTDREV "${OTTDREV}") + list(GET OTTDREV 0 REV_VERSION) + list(GET OTTDREV 1 REV_ISODATE) + list(GET OTTDREV 2 REV_MODIFIED) + list(GET OTTDREV 3 REV_HASH) + list(GET OTTDREV 4 REV_ISTAG) + list(GET OTTDREV 5 REV_ISSTABLETAG) + list(GET OTTDREV 6 REV_YEAR) +else () + message(WARNING "No version detected; this build will NOT be network compatible") + set(REV_VERSION "norev0000") + set(REV_ISODATE "19700101") + set(REV_MODIFIED 1) + set(REV_HASH "unknown") + set(REV_ISTAG 0) + set(REV_ISSTABLETAG 0) + set(REV_YEAR "1970") +endif () + +message(STATUS "Version string: ${REV_VERSION}") + +if (GENERATE_OTTDREV) + message(STATUS "Generating .ottdrev") + file(WRITE ${CMAKE_SOURCE_DIR}/.ottdrev "${REV_VERSION}\t${REV_ISODATE}\t${REV_MODIFIED}\t${REV_HASH}\t${REV_ISTAG}\t${REV_ISSTABLETAG}\t${REV_YEAR}\n") +else (GENERATE_OTTDREV) + message(STATUS "Generating rev.cpp") + configure_file("${CMAKE_SOURCE_DIR}/src/rev.cpp.in" + "${FIND_VERSION_BINARY_DIR}/rev.cpp") + + if (WIN32) + message(STATUS "Generating ottdres.rc") + configure_file("${CMAKE_SOURCE_DIR}/src/os/windows/ottdres.rc.in" + "${FIND_VERSION_BINARY_DIR}/ottdres.rc") + endif (WIN32) + + message(STATUS "Generating CPackProperties.cmake") + configure_file("${CMAKE_SOURCE_DIR}/CPackProperties.cmake.in" + "${CPACK_BINARY_DIR}/CPackProperties.cmake" @ONLY) +endif (GENERATE_OTTDREV) diff --git a/cmake/scripts/Regression.cmake b/cmake/scripts/Regression.cmake new file mode 100644 index 0000000000..0b4e522d3e --- /dev/null +++ b/cmake/scripts/Regression.cmake @@ -0,0 +1,97 @@ +cmake_minimum_required(VERSION 3.5) + +# +# Runs a single regressoion test +# + +if (NOT REGRESSION_TEST) + message(FATAL_ERROR "Script needs REGRESSION_TEST defined (tip: use -DREGRESSION_TEST=..)") +endif (NOT REGRESSION_TEST) +if (NOT OPENTTD_EXECUTABLE) + message(FATAL_ERROR "Script needs OPENTTD_EXECUTABLE defined (tip: use -DOPENTTD_EXECUTABLE=..)") +endif (NOT OPENTTD_EXECUTABLE) + +if (NOT EXISTS ai/${REGRESSION_TEST}/test.sav) + message(FATAL_ERROR "Regression test ${REGRESSION_TEST} does not exist (tip: check regression folder for the correct spelling)") +endif () + +# If editbin is given, copy the executable to a new folder, and change the +# subsystem to console. The copy is needed as multiple regressions can run +# at the same time. +if (EDITBIN_EXECUTABLE) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${OPENTTD_EXECUTABLE} regression/${REGRESSION_TEST}.exe) + set(OPENTTD_EXECUTABLE "regression/${REGRESSION_TEST}.exe") + + execute_process(COMMAND ${EDITBIN_EXECUTABLE} /nologo /subsystem:console ${OPENTTD_EXECUTABLE}) +endif (EDITBIN_EXECUTABLE) + +# Run the regression test +execute_process(COMMAND ${OPENTTD_EXECUTABLE} + -x + -c regression/regression.cfg + -g ai/${REGRESSION_TEST}/test.sav + -snull + -mnull + -vnull:ticks=30000 + -d script=2 + -d misc=9 + OUTPUT_VARIABLE REGRESSION_OUTPUT + ERROR_VARIABLE REGRESSION_RESULT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE +) + +if (REGRESSION_OUTPUT) + message(FATAL_ERROR "Unexpected output: ${REGRESSION_OUTPUT}") +endif (REGRESSION_OUTPUT) + +if (NOT REGRESSION_RESULT) + message(FATAL_ERROR "Regression did not output anything; did the compilation fail?") +endif (NOT REGRESSION_RESULT) + +# For some reason pointer can be printed as '0x(nil)', '0x0000000000000000', or '0x0x0' +string(REPLACE "0x(nil)" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "0x0000000000000000" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "0x0x0" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}") + +# Convert the output to a format that is expected (and more readable) by result.txt +string(REPLACE "\ndbg: [script]" "\n" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "\n " "\nERROR: " REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "\nERROR: [1] " "\n" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "\n[P] " "\n" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REGEX REPLACE "dbg: ([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}") + +# Read the expected result +file(READ ai/${REGRESSION_TEST}/result.txt REGRESSION_EXPECTED) + +# Convert the string to a list +string(REPLACE "\n" ";" REGRESSION_RESULT "${REGRESSION_RESULT}") +string(REPLACE "\n" ";" REGRESSION_EXPECTED "${REGRESSION_EXPECTED}") + +set(ARGC 0) +set(ERROR NO) + +list(LENGTH REGRESSION_EXPECTED REGRESSION_EXPECTED_LENGTH) + +# Compare the output +foreach(RESULT IN LISTS REGRESSION_RESULT) + list(GET REGRESSION_EXPECTED ${ARGC} EXPECTED) + + if (NOT RESULT STREQUAL EXPECTED) + message("${ARGC}: - ${EXPECTED}") + message("${ARGC}: + ${RESULT}'") + set(ERROR YES) + endif (NOT RESULT STREQUAL EXPECTED) + + math(EXPR ARGC "${ARGC} + 1") +endforeach(RESULT) + +if (NOT REGRESSION_EXPECTED_LENGTH EQUAL ARGC) + math(EXPR MISSING "${REGRESSION_EXPECTED_LENGTH} - ${ARGC}") + message("(${MISSING} more lines were expected than found)") + set(ERROR YES) +endif (NOT REGRESSION_EXPECTED_LENGTH EQUAL ARGC) + +if (ERROR) + message(FATAL_ERROR "Regression failed") +endif (ERROR) diff --git a/config.lib b/config.lib deleted file mode 100644 index 57404fbbc3..0000000000 --- a/config.lib +++ /dev/null @@ -1,4045 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -log() { - if [ $1 = "1" ]; then - shift - echo "$@" - else - shift - fi - echo "$@" >> $config_log -} - -set_default() { - ignore_extra_parameters="0" - # We set all kinds of defaults for params. Later on the user can override - # most of them; but if they don't, this default is used. - build="" - host="" - cc_build="" - cc_host="" - cxx_build="" - cxx_host="" - windres="" - strip="" - lipo="" - awk="awk" - pkg_config="pkg-config" - os="DETECT" - cpu_type="DETECT" - config_log="config.log" - prefix_dir="/usr/local" - binary_dir="games" - data_dir="share/games/openttd" - doc_dir="1" - icon_dir="share/pixmaps" - icon_theme_dir="1" - personal_dir="1" - shared_dir="1" - install_dir="/" - man_dir="1" - menu_dir="1" - menu_group="Game;" - menu_name="OpenTTD" - binary_name="openttd" - enable_debug="0" - enable_desync_debug="0" - enable_profiling="0" - enable_lto="0" - enable_dedicated="0" - enable_static="1" - enable_translator="0" - enable_unicode="1" - enable_console="1"; - enable_assert="1" - enable_strip="0" - enable_universal="0" - enable_osx_g5="0" - enable_cocoa_quartz="1" - with_osx_sysroot="1" - with_application_bundle="1" - with_menu_entry="1" - with_allegro="1" - with_sdl="1" - with_cocoa="1" - with_zlib="1" - with_lzma="1" - with_lzo2="1" - with_xdg_basedir="1" - with_fcitx="1" - with_png="1" - enable_builtin_depend="1" - with_makedepend="0" - with_direct_music="1" - with_xaudio2="1" - with_sort="1" - with_iconv="1" - with_midi="" - with_midi_arg="" - with_fluidsynth="1" - with_freetype="1" - with_fontconfig="1" - with_icu_layout="1" - with_icu_sort="1" - static_icu="0" - with_uniscribe="1" - with_threads="1" - with_distcc="1" - with_ccache="1" - with_nforenum="1" - with_grfcodec="1" - with_sse="1" - with_libbfd="1" - with_bfd_extra_debug="1" - with_self_gdb_debug="1" - with_self_lldb_debug="1" - with_sigaltstack="1" - - save_params_array=" - build - host - cc_build - cc_host - cxx_build - cxx_host - windres - strip - lipo - awk - pkg_config - os - cpu_type - config_log - prefix_dir - binary_dir - data_dir - doc_dir - icon_dir - icon_theme_dir - man_dir - menu_dir - personal_dir - shared_dir - install_dir - menu_group - menu_name - binary_name - enable_debug - enable_desync_debug - enable_profiling - enable_lto - enable_dedicated - enable_static - enable_translator - enable_unicode - enable_console - enable_assert - enable_strip - enable_universal - enable_osx_g5 - enable_cocoa_quartz - with_osx_sysroot - with_application_bundle - with_allegro - with_sdl - with_cocoa - with_zlib - with_lzma - with_lzo2 - with_xdg_basedir - with_fcitx - with_png - enable_builtin_depend - with_makedepend - with_direct_music - with_xaudio2 - with_sort - with_iconv - with_midi - with_midi_arg - with_fluidsynth - with_freetype - with_fontconfig - with_icu_layout - with_icu_sort - static_icu - with_uniscribe - with_threads - with_distcc - with_ccache - with_grfcodec - with_nforenum - with_sse - with_libbfd - with_bfd_extra_debug - with_self_gdb_debug - with_self_lldb_debug - with_sigaltstack - CC CXX CFLAGS CXXFLAGS LDFLAGS CFLAGS_BUILD CXXFLAGS_BUILD LDFLAGS_BUILD PKG_CONFIG_PATH PKG_CONFIG_LIBDIR" -} - -detect_params() { - # Walk over all params from the user and override any default settings if - # needed. This also handles any invalid option. - for p in "$@"; do - if [ -n "$prev_p" ]; then - eval "$prev_p=\$p" - prev_p= - continue - fi - - optarg=`expr "x$p" : 'x[^=]*=\(.*\)'` - - case "$p" in - --help | -h | -\?) showhelp; exit 0;; - - --config-log) prev_p="config_log";; - --config-log=*) config_log="$optarg";; - - --build) prev_p="build";; - --build=*) build="$optarg";; - - --host) prev_p="host";; - --host=*) host="$optarg";; - - --os) prev_p="os";; - --os=*) os="$optarg";; - - --cpu-type) prev_p="cpu_type";; - --cpu-type=*) cpu_type="$optarg";; - - --cc-build) prev_p="cc_build";; - --cc-build=*) cc_build="$optarg";; - --cc-host) prev_p="cc_host";; - --cc-host=*) cc_host="$optarg";; - --cxx-build) prev_p="cxx_build";; - --cxx-build=*) cxx_build="$optarg";; - --cxx-host) prev_p="cxx_host";; - --cxx-host=*) cxx_host="$optarg";; - --windres) prev_p="windres";; - --windres=*) windres="$optarg";; - --awk) prev_p="awk";; - --awk=*) awk="$optarg";; - --pkg-config) prev_p="pkg_config";; - --pkg-config=*) pkg_config="$optarg";; - --strip) prev_p="strip";; - --strip=*) strip="$optarg";; - --lipo) prev_p="lipo";; - --lipo=*) lipo="$optarg";; - - - - # Alias --prefix with --prefix-dir, for compatibility with GNU autotools - --prefix-dir | --prefix) prev_p="prefix_dir";; - --prefix-dir=* | --prefix=*) prefix_dir="$optarg";; - - --binary-dir) prev_p="binary_dir";; - --binary-dir=*) binary_dir="$optarg";; - - --data-dir) prev_p="data_dir";; - --data-dir=*) data_dir="$optarg";; - - --doc-dir) prev_p="doc_dir";; - --doc-dir=*) doc_dir="$optarg";; - - --icon-dir) prev_p="icon_dir";; - --icon-dir=*) icon_dir="$optarg";; - - --icon-theme-dir) prev_p="icon_theme_dir";; - --icon-theme-dir=*) icon_theme_dir="$optarg";; - --without-icon-theme) icon_theme_dir="";; - - --menu-dir) prev_p="menu_dir";; - --menu-dir=*) menu_dir="$optarg";; - --without-menu-entry) menu_dir="";; - - --menu-name) prev_p="menu_name";; - --menu-name=*) menu_name="$optarg";; - - --binary-name) prev_p="binary_name";; - --binary-name=*) binary_name="$optarg";; - - --man-dir) prev_p="man_dir";; - --man-dir=*) man_dir="$optarg";; - - --personal-dir) prev_p="personal_dir";; - --personal-dir=*) personal_dir="$optarg";; - --without-personal-dir) personal_dir="";; - - --shared-dir) prev_p="shared_dir";; - --shared-dir=*) shared_dir="$optarg";; - --without-shared-dir) shared_dir="";; - - --install-dir) prev_p="install_dir";; - --install-dir=*) install_dir="$optarg";; - - - - --menu-group) prev_p="menu_group";; - --menu-group=*) menu_group="$optarg";; - - - - --enable-debug) enable_debug="1";; - --enable-debug=*) enable_debug="$optarg";; - --enable-desync-debug) enable_desync_debug="1";; - --enable-desync-debug=*) enable_desync_debug="$optarg";; - --enable-profiling) enable_profiling="1";; - --enable-profiling=*) enable_profiling="$optarg";; - --enable-lto) enable_lto="1";; - --enable-lto=*) enable_lto="$optarg";; - --enable-ipo) enable_lto="1";; - --enable-ipo=*) enable_lto="$optarg";; - --enable-dedicated) enable_dedicated="1";; - --enable-dedicated=*) enable_dedicated="$optarg";; - --disable-static) enable_static="0";; - --enable-static) enable_static="2";; - --enable-static=*) enable_static="$optarg";; - --disable-translator) enable_translator="0";; - --enable-translator) enable_translator="2";; - --enable-translator=*) enable_translator="$optarg";; - --disable-assert) enable_assert="0";; - --enable-assert) enable_assert="2";; - --enable-assert=*) enable_assert="$optarg";; - --disable-strip) enable_strip="0";; - --enable-strip) enable_strip="2";; - --enable-strip=*) enable_strip="$optarg";; - --disable-universal) enable_universal="0";; - --enable-universal) enable_universal="i386 ppc";; - --enable-universal=*) enable_universal="$optarg";; - --disable-osx-g5) enable_osx_g5="0";; - --enable-osx-g5) enable_osx_g5="2";; - --enable-osx-g5=*) enable_osx_g5="$optarg";; - --disable-unicode) enable_unicode="0";; - --enable-unicode) enable_unicode="2";; - --enable-unicode=*) enable_unicode="$optarg";; - --disable-console) enable_console="0";; - --enable-console) enable_console="2";; - --enable-console=*) enable_console="$optarg";; - - --disable-cocoa-quartz) enable_cocoa_quartz="0";; - --enable-cocoa-quartz) enable_cocoa_quartz="2";; - --enable-cocoa-quartz=*) enable_cocoa_quartz="$optarg";; - - --with-allegro) with_allegro="2";; - --without-allegro) with_allegro="0";; - --with-allegro=*) with_allegro="$optarg";; - - --with-sdl) with_sdl="2";; - --without-sdl) with_sdl="0";; - --with-sdl=*) with_sdl="$optarg";; - - --with-cocoa) with_cocoa="2";; - --without-cocoa) with_cocoa="0";; - --with-cocoa=*) with_cocoa="$optarg";; - - --with-zlib) with_zlib="2";; - --without-zlib) with_zlib="0";; - --with-zlib=*) with_zlib="$optarg";; - - --with-lzma) with_lzma="2";; - --without-lzma) with_lzma="0";; - --with-lzma=*) with_lzma="$optarg";; - --with-liblzma) with_lzma="2";; - --without-liblzma) with_lzma="0";; - --with-liblzma=*) with_lzma="$optarg";; - - --with-lzo2) with_lzo2="2";; - --without-lzo2) with_lzo2="0";; - --with-lzo2=*) with_lzo2="$optarg";; - --with-liblzo2) with_lzo2="2";; - --without-liblzo2) with_lzo2="0";; - --with-liblzo2=*) with_lzo2="$optarg";; - - --with-xdg-basedir) with_xdg_basedir="2";; - --without-xdg-basedir) with_xdg_basedir="0";; - --with-xdg-basedir=*) with_xdg_basedir="$optarg";; - --with-libxdg-basedir) with_xdg_basedir="2";; - --without-libxdg-basedir) with_xdg_basedir="0";; - --with-libxdg-basedir=*) with_xdg_basedir="$optarg";; - - --with-fcitx) with_fcitx="2";; - --without-fcitx) with_fcitx="0";; - --with-fcitx=*) with_fcitx="$optarg";; - - --with-png) with_png="2";; - --without-png) with_png="0";; - --with-png=*) with_png="$optarg";; - --with-libpng) with_png="2";; - --without-libpng) with_png="0";; - --with-libpng=*) with_png="$optarg";; - - --with-fluidsynth) with_fluidsynth="2";; - --without-fluidsynth) with_fluidsynth="0";; - --with-fluidsynth=*) with_fluidsynth="$optarg";; - - --with-freetype) with_freetype="2";; - --without-freetype) with_freetype="0";; - --with-freetype=*) with_freetype="$optarg";; - --with-libfreetype) with_freetype="2";; - --without-libfreetype) with_freetype="0";; - --with-libfreetype=*) with_freetype="$optarg";; - - --with-fontconfig) with_fontconfig="2";; - --without-fontconfig) with_fontconfig="0";; - --with-fontconfig=*) with_fontconfig="$optarg";; - --with-libfontconfig) with_fontconfig="2";; - --without-libfontconfig) with_fontconfig="0";; - --with-libfontconfig=*) with_fontconfig="$optarg";; - - --with-icu) with_icu_layout="2";with_icu_sort="2";; - --without-icu) with_icu_layout="0";with_icu_sort="0";; - --with-icu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";; - --with-libicu) with_icu_layout="2";with_icu_sort="2";; - --without-libicu) with_icu_layout="0";with_icu_sort="0";; - --with-libicu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";; - --with-icu-layout) with_icu_layout="2";; - --without-icu-layout) with_icu_layout="0";; - --with-icu-layout=*) with_icu_layout="$optarg";; - --with-icu-sort) with_icu_sort="2";; - --without-icu-sort) with_icu_sort="0";; - --with-icu-sort=*) with_icu_sort="$optarg";; - --static-icu) static_icu="1";; - --static-icu=*) static_icu="$optarg";; - --static-libicu) static_icu="1";; - --static-libicu=*) static_icu="$optarg";; - - --with-uniscribe) with_uniscribe="2";; - --without-uniscribe) with_uniscribe="0";; - --with-uniscribe=*) with_uniscribe="$optarg";; - - --disable-builtin-depend) enable_builtin_depend="0";; - --enable-builtin-depend) enable_builtin_depend="2";; - --enable-builtin-depend=*) enable_builtin_depend="$optarg";; - - --with-makedepend) with_makedepend="2";; - --without-makedepend) with_makedepend="0";; - --with-makedepend=*) with_makedepend="$optarg";; - - --with-direct-music) with_direct_music="2";; - --without-direct-music) with_direct_music="0";; - --with-direct-music=*) with_direct_music="$optarg";; - - --with-xaudio2) with_xaudio2="2";; - --without-xaudio2) with_xaudio2="0";; - --with-xaudio2=*) with_xaudio2="$optarg";; - - --with-sort) with_sort="2";; - --without-sort) with_sort="0";; - --with-sort=*) with_sort="$optarg";; - - --with-iconv) with_iconv="2";; - --without-iconv) with_iconv="0";; - --with-iconv=*) with_iconv="$optarg";; - - --with-midi=*) with_midi="$optarg";; - --with-midi-arg=*) with_midi_arg="$optarg";; - - --without-distcc) with_distcc="0";; - --with-distcc) with_distcc="2";; - --with-distcc=*) with_distcc="$optarg";; - - --without-ccache) with_ccache="0";; - --with-ccache) with_ccache="2";; - --with-ccache=*) with_ccache="$optarg";; - - --without-nforenum) with_nforenum="0";; - --with-nforenum) with_nforenum="2";; - --with-nforenum=*) with_nforenum="$optarg";; - - --without-grfcodec) with_grfcodec="0";; - --with-grfcodec) with_grfcodec="2";; - --with-grfcodec=*) with_grfcodec="$optarg";; - - --without-osx-sysroot) with_osx_sysroot="0";; - --with-osx-sysroot) with_osx_sysroot="2";; - --with-osx-sysroot=*) with_osx_sysroot="$optarg";; - - --without-application-bundle) with_application_bundle="0";; - --with-application-bundle) with_application_bundle="1";; - --with-application-bundle=*) with_application_bundle="$optarg";; - - --without-threads) with_threads="0";; - --with-threads) with_threads="1";; - --with-threads=*) with_threads="$optarg";; - - --without-sse) with_sse="0";; - --with-sse) with_sse="1";; - --with-sse=*) with_sse="$optarg";; - - --without-libbfd) with_libbfd="0";; - --with-libbfd) with_libbfd="1";; - --with-libbfd=*) with_libbfd="$optarg";; - - --without-bfd-extra-debug) with_bfd_extra_debug="0";; - --with-bfd-extra-debug) with_bfd_extra_debug="1";; - --with-bfd-extra-debug=*) with_bfd_extra_debug="$optarg";; - - --without-self-gdb-debug) with_self_gdb_debug="0";; - --with-self-gdb-debug) with_self_gdb_debug="1";; - --with-self-gdb-debug=*) with_self_gdb_debug="$optarg";; - - --without-self-lldb-debug) with_self_lldb_debug="0";; - --with-self-lldb-debug) with_self_lldb_debug="1";; - --with-self-lldb-debug=*) with_self_lldb_debug="$optarg";; - - --without-sigaltstack) with_sigaltstack="0";; - --with-sigaltstack) with_sigaltstack="1";; - --with-sigaltstack=*) with_sigaltstack="$optarg";; - - CC=* | --CC=*) CC="$optarg";; - CXX=* | --CXX=*) CXX="$optarg";; - CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";; - CXXFLAGS=* | --CXXFLAGS=*) CXXFLAGS="$optarg";; - LDFLAGS=* | --LDFLAGS=*) LDFLAGS="$optarg";; - CFLAGS_BUILD=* | --CFLAGS_BUILD=* | --CFLAGS-BUILD=*) CFLAGS_BUILD="$optarg";; - CXXFLAGS_BUILD=* | --CXXFLAGS_BUILD=* | --CXXFLAGS-BUILD=*) CXXFLAGS_BUILD="$optarg";; - LDFLAGS_BUILD=* | --LDFLAGS_BUILD=* | --LDFLAGS-BUILD=*) LDFLAGS_BUILD="$optarg";; - PKG_CONFIG_PATH=* | --PKG_CONFIG_PATH=* | --PKG-CONFIG-PATH=*) PKG_CONFIG_PATH="$optarg";; - PKG_CONFIG_LIBDIR=* | --PKG_CONFIG_LIBDIR=* | --PKG-CONFIG-LIBDIR=*) PKG_CONFIG_LIBDIR="$optarg";; - - --ignore-extra-parameters) ignore_extra_parameters="1";; - - --* | -*) - if [ "$ignore_extra_parameters" = "0" ]; then - log 1 "Unknown option $p" - exit 1 - else - log 1 "Unknown option $p ignored" - fi - ;; - esac - done - - if [ -n "$prev_p" ]; then - log 1 "configure: error: missing argument to --$prev_p" - exit 1 - fi - - # Clean the logfile - echo "" > $config_log - log 2 "Invocation: $0 $*" - if [ "$ignore_extra_parameters" = "0" -o ! -f config.invocation ]; then - echo "$0 $*" > config.invocation - CONFIGURE_INVOCATION="$0 $*" - else - CONFIGURE_INVOCATION="`cat config.invocation`" - fi -} - -save_params() { - # Here we save all params, so we can later on do an exact redo of this - # configuration, without having the user to re-input stuff - - echo "Running configure with following options:" >> $config_log - echo "" >> $config_log - - configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters" - for p in $save_params_array; do - eval "v=\"\$$p\"" - p=`echo "$p" | sed 's@_@-@g;s@\n@@g;s@ @\\ @g'` - # Only save those params that aren't empty - configure="$configure --$p=\"$v\"" - done - - echo "$configure" >> $config_log - echo "$configure" > config.cache - echo "" >> $config_log -} - -# Export a variable so tools like pkg-config can see it when invoked. -# If the variable contains an empty string then unset it. -# $1 - name of the variable to export or unset -export_or_unset() { - eval local value=\$$1 - if [ -n "$value" ]; then - export $1; - log 2 "using $1=$value"; - else - unset $1; - log 2 "not using $1"; - fi -} - -check_params() { - # Some params want to be in full uppercase, else they might not work as - # expected.. fix that here - - os=`echo $os | tr '[a-z]' '[A-Z]'` - cpu_type=`echo $cpu_type | tr '[a-z]' '[A-Z]'` - - # Export some variables to be used by pkg-config - # - # PKG_CONFIG_LIBDIR variable mustn't be set if we are not willing to - # override the default pkg-config search path, it mustn't be an empty - # string. If the variable is empty (e.g. when an empty string comes - # from config.cache) then unset it. This way the "don't override" state - # will be properly preserved when (re)configuring. - export_or_unset PKG_CONFIG_PATH - export_or_unset PKG_CONFIG_LIBDIR - - # Check if all params have valid values - - # OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HAIKU, SUNOS, CYGWIN, MINGW, and OS2 - if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|HAIKU|SUNOS|CYGWIN|MINGW|OS2)$'`" ]; then - log 1 "configure: error: invalid option --os=$os" - log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|HAIKU|SUNOS|CYGWIN|MINGW|OS2]" - exit 1 - fi - # cpu_type can be either 32 or 64 - if [ -z "`echo $cpu_type | egrep '^(32|64|DETECT)$'`" ]; then - log 1 "configure: error: invalid option --cpu-type=$cpu_type" - log 1 " Available options are: --cpu-type[=DETECT|32|64]" - exit 1 - fi - # enable_debug should be between 0 and 4 - if [ -z "`echo $enable_debug | egrep '^[0123]$'`" ]; then - log 1 "configure: error: invalid option --enable-debug=$enable_debug" - log 1 " Available options are: --enable-debug[=0123]" - exit 1 - fi - - # enable_desync_debug should be between 0 and 3 - if [ -z "`echo $enable_desync_debug | egrep '^[012]$'`" ]; then - log 1 "configure: error: invalid option --enable-desync-debug=$enable_desync_debug" - log 1 " Available options are: --enable-desync-debug[=012]" - exit 1 - fi - - detect_awk - - detect_os - - check_build - check_host - - # Check for universal builds; they only make sense for OSX, so fail if enabled for another OS - if [ "$enable_universal" = "0" ]; then - log 1 "checking universal build... no" - else - if [ "$os" != "OSX" ]; then - log 1 "configure: error: --enable-universal only works on OSX" - exit 1 - fi - log 1 "checking universal build... yes, for: $enable_universal" - fi - - # Already detected by check_build - log 1 "checking build cc... $cc_build" - log 1 "checking host cc... $cc_host" - - check_cxx_build - check_cxx_host - check_windres - if [ "$enable_strip" != "0" ]; then - check_strip - else - log 1 "checking strip... disabled" - fi - check_lipo - - if [ "$enable_builtin_depend" != "0" ]; then - log 1 "checking builtin depend... yes" - makedepend="\$(SRC_OBJS_DIR)/\$(DEPEND)" - else - log 1 "checking builtin depend... no" - fi - - check_makedepend - detect_cputype - detect_sse_capable_architecture - - if [ "$enable_static" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - enable_static="2" - else - enable_static="0" - fi - fi - - if [ "$enable_static" != "0" ]; then - log 1 "checking static... yes" - - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ]; then - log 1 "WARNING: static is only known to work on Windows, and MacOSX" - log 1 "WARNING: use static at your own risk on this platform" - - sleep 5 - fi - else - log 1 "checking static... no" - fi - - if [ "$enable_unicode" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - enable_unicode="2" - else - enable_unicode="0" - fi - fi - - if [ "$enable_unicode" != "0" ]; then - log 1 "checking unicode... yes" - else - log 1 "checking unicode... no" - fi - - # Show what we configured - if [ "$enable_debug" = "0" ]; then - log 1 "using debug level... no" - elif [ "$enable_profiling" != "0" ]; then - log 1 "using debug level... profiling (debug level $enable_debug)" - else - log 1 "using debug level... level $enable_debug" - fi - - if [ "$enable_desync_debug" = "0" ]; then - log 1 "using desync debug level... no" - else - log 1 "using desync debug level... level $enable_desync_debug" - log 1 "WARNING: desync debug functions slow down the game considerably." - log 1 "WARNING: use only when you are instructed to do so" - log 1 " or when you know what you are doing." - - sleep 5 - fi - - if [ "$enable_lto" != "0" ]; then - # GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}' - has_lto=`($cxx_build -dumpspecs 2>&1 | grep '\%{flto') || ($cxx_build -help ipo 2>&1 | grep '\-ipo')` - if [ -n "$has_lto" ]; then - log 1 "using link time optimization... yes" - else - enable_lto="0" - log 1 "using link time optimization... no" - log 1 "WARNING: you selected link time optimization but it is not found." - sleep 5 - fi - else - log 1 "using link time optimization... no" - fi - - - if [ "$os" != "OSX" ] && [ "$with_osx_sysroot" != "0" ]; then - if [ "$with_osx_sysroot" = "1" ]; then - with_osx_sysroot="0" - - log 1 "checking OSX sysroot... not OSX, skipping" - else - log 1 "configure: error: --with-osx-sysroot only works if OSX is the target" - exit 1 - fi - fi - - if [ "$with_osx_sysroot" != "0" ]; then - if [ "$enable_universal" = "0" ] && [ "$with_osx_sysroot" != "1" ] && [ "$with_osx_sysroot" != "2" ]; then - # Sysroot manually specified? Check for usability - log 1 "checking OSX sysroot... $with_osx_sysroot" - if ! check_osx_sdk "$with_osx_sysroot"; then - log 1 "Passed sysroot not found/not functional" - exit 1 - fi - else - # If autodetect and no universal, use system default - if [ "$with_osx_sysroot" = "1" ] && [ "$enable_universal" = "0" ]; then - log 1 "checking OSX sysroot... no (use system default)" - else - log 1 "checking OSX sysroot... automatically" - detect_osx_sdk - fi - fi - - if [ -n "$osx_sdk_path" ]; then - if [ "$enable_universal" != "0" ]; then - if [ -z "$osx_sdk_104_path" ]; then - log 1 "WARNING: Could not find a usable 10.4u SDK, the resulting" - log 1 "WARNING: binary will only run on OSX 10.5 or later" - osx_sdk_104_path="$osx_sdk_path" - fi - OSX_SYSROOT="-isysroot $osx_sdk_104_path" - OSX_LD_SYSROOT="-Wl,-syslibroot,$osx_sdk_104_path" - else - OSX_SYSROOT="-isysroot $osx_sdk_path" - OSX_LD_SYSROOT="-Wl,-syslibroot,$osx_sdk_path" - fi - fi - else - if [ "$os" = "OSX" ]; then - log 1 "checking OSX sysroot... no (use system default)" - fi - fi - - detect_allegro - detect_sdl - detect_cocoa - - if [ "$enable_dedicated" != "0" ]; then - log 1 "checking GDI video driver... dedicated server, skipping" - log 1 "checking dedicated... found" - else - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - log 1 "checking GDI video driver... found" - else - log 1 "checking GDI video driver... not Windows, skipping" - fi - - if [ -z "$allegro_config" ] && [ -z "$sdl2_config" ] && [ -z "$sdl_config" ] && [ "$with_cocoa" = 0 ] && [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - log 1 "configure: error: no video driver development files found" - log 1 " If you want a dedicated server use --enable-dedicated as parameter" - exit 1 - else - log 1 "checking dedicated... not selected" - fi - fi - - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - log 1 "checking console application... not Windows, skipping" - elif [ "$enable_console" = "1" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "checking console application... dedicated server, enabled" - enable_console="2" - elif [ "$enable_console" = "1" ]; then - log 1 "checking console application... disabled (only used when forced)" - enable_console="0" - elif [ "$enable_console" = "0" ]; then - log 1 "checking console application... disabled" - else - log 1 "checking console application... enabled" - fi - - log 1 "checking squirrel... found" - SCRIPT_SRC_DIR="$ROOT_DIR/src/3rdparty/squirrel/include" - - if [ "$enable_translator" != "0" ]; then - log 1 "checking translator... debug" - # -t shows TODO items, normally they are muted - strgen_flags="-t" - else - log 1 "checking translator... no" - strgen_flags="" - fi - - if [ "$enable_assert" != "0" ]; then - log 1 "checking assert... enabled" - else - log 1 "checking assert... disabled" - fi - - pre_detect_with_zlib=$with_zlib - detect_zlib - - if [ "$with_zlib" = "0" ] || [ -z "$zlib_config" ]; then - log 1 "WARNING: zlib was not detected or disabled" - log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features" - log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps," - log 1 "WARNING: using PNG, or using fonts, ...) will be disabled." - if [ "$pre_detect_with_zlib" = "0" ]; then - log 1 "WARNING: We strongly suggest you to install zlib." - else - log 1 "configure: error: no zlib detected" - log 1 " If you want to compile without zlib use --without-zlib as parameter" - exit - fi - fi - - pre_detect_with_lzma=$with_lzma - detect_lzma - - if [ "$with_lzma" = "0" ] || [ -z "$lzma_config" ]; then - log 1 "WARNING: lzma was not detected or disabled" - log 1 "WARNING: OpenTTD doesn't require lzma, but it does mean that many features" - log 1 "WARNING: (like loading most savegames/scenarios and joining most servers)" - log 1 "WARNING: will be disabled." - if [ "$pre_detect_with_lzma" = "0" ]; then - log 1 "WARNING: We strongly suggest you to install liblzma." - log 1 "configure: error: no liblzma detected" - else - log 1 " If you want to compile without lzma use --without-lzma as parameter" - exit - fi - fi - - pre_detect_with_lzo2=$with_lzo2 - detect_lzo2 - - if [ "$with_lzo2" = "0" ] || [ -z "$lzo2" ]; then - log 1 "WARNING: liblzo2 was not detected or disabled" - log 1 "WARNING: OpenTTD doesn't require liblzo2, but it does mean that" - log 1 "WARNING: loading old savegames/scenarios will be disabled." - if [ "$pre_detect_with_lzo2" = "0" ]; then - log 1 "WARNING: We strongly suggest you to install liblzo2." - else - log 1 "configure: error: no liblzo2 detected" - log 1 " If you want to compile without liblzo2 use --without-liblzo2 as parameter" - exit - fi - fi - - if [ "$with_uniscribe" != "0" ]; then - if [ "$os" != "MINGW" ]; then - if [ "$with_uniscribe" != "1" ]; then - log 1 "configure: error: Uniscribe is only supported on native Win32 targets" - exit 1 - fi - with_uniscribe="0" - - log 1 "checking Uniscribe text layout... not Windows, skipping" - else - log 1 "checking Uniscribe text layout... found" - - # Don't use ICU unless forced. - if [ "$with_icu_layout" = "1" ]; then - with_icu_layout="0" - fi - if [ "$with_icu_sort" = "1" ]; then - with_icu_sort="0" - fi - fi - fi - - detect_xdg_basedir - detect_fcitx - detect_png - detect_freetype - detect_fontconfig - detect_icu_layout - detect_icu_sort - detect_fluidsynth - - if [ "$with_direct_music" != "0" ]; then - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - if [ "$with_direct_music" != "1" ]; then - log 1 "configure: error: direct-music is only supported on Win32 targets" - exit 1 - fi - with_direct_music="0" - - log 1 "checking direct-music... not Windows, skipping" - else - check_direct_music - fi - fi - - if [ "$with_xaudio2" != "0" ]; then - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - if [ "$with_xaudio2" != "1" ]; then - log 1 "configure: error: xaudio2 is only supported on Win32 targets" - exit 1 - fi - with_xaudio2="0" - - log 1 "checking xaudio2... not Windows, skipping" - else - check_xaudio2 - fi - fi - - detect_sort - - # Suppress language errors when there is a version defined, indicating a release - # It just isn't pretty if any release produces warnings in the languages. - if [ -f "$ROOT_DIR/version" ]; then - lang_suppress="yes" - log 1 "suppress language errors... yes" - else - lang_suppress="" - log 1 "suppress language errors... no" - fi - - if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ]; then - if [ "$os" = "OSX" ]; then - strip_arg="" - elif [ "$os" = "OS2" ]; then - strip_arg="" - # OS2 uses strip via gcc, because it needs to be feed to emxbind - LDFLAGS="$LDFLAGS -s" - elif [ "$os" = "SUNOS" ]; then - # The GNU strip does know -s, the non-GNU doesn't - # So try to detect it (in a bit of an ugly way) - strip_arg="`$strip -s strip.test 2>/dev/null && echo \"-s\"`" - else - strip_arg="-s" - fi - - log 1 "checking stripping... $strip $strip_arg" - else - strip="" - log 1 "checking stripping... skipped" - fi - - if [ "$with_distcc" = "0" ]; then - log 1 "checking distcc... no" - elif [ "$with_distcc" = "1" ]; then - with_distcc="0" - - log 1 "checking distcc... no (only used when forced)" - elif [ "$with_distcc" = "2" ]; then - distcc="distcc" - else - distcc="$with_distcc" - fi - if [ "$with_distcc" != "0" ]; then - res="`$distcc --version 2>/dev/null | head -n 1 | cut -b 1-6`" - if [ "$res" != "distcc" ]; then - distcc="" - log 1 "checking distcc... no" - if [ "$with_distcc" = "2" ]; then - log 1 "configure: error: no distcc detected, but was forced to be used" - exit 1 - fi - if [ "$with_distcc" != "1" ]; then - log 1 "configure: error: '$with_distcc' doesn't seem a distcc to me" - exit 1 - fi - fi - - log 1 "checking distcc... $distcc" - fi - - if [ "$with_ccache" = "0" ]; then - log 1 "checking ccache... no" - elif [ "$with_ccache" = "1" ]; then - with_ccache="0" - - log 1 "checking ccache... no (only used when forced)" - elif [ "$with_ccache" = "2" ]; then - ccache="ccache" - else - ccache="$with_ccache" - fi - if [ "$with_ccache" != "0" ]; then - res="`$ccache --version 2>/dev/null | head -n 1 | cut -b 1-6`" - if [ "$res" != "ccache" ]; then - ccache="" - log 1 "checking ccache... no" - if [ "$with_ccache" = "2" ]; then - log 1 "configure: error: no ccache detected, but was forced to be used" - exit 1 - fi - if [ "$with_ccache" != "1" ]; then - log 1 "configure: error: '$with_ccache' doesn't seem a ccache to me" - exit 1 - fi - fi - - log 1 "checking ccache... $ccache" - fi - - detect_grfcodec - detect_nforenum - - if [ -z "$grfcodec" ] && [ -n "$nforenum" ]; then - log 1 "checking nforenum/grfcodec... nforenum needs grfcodec enabled, disabling nforenum" - nforenum="" - fi - - if [ -z "$nforenum" ] && [ -n "$grfcodec" ]; then - log 1 "checking nforenum/grfcodec... grfcodec needs nforenum enabled, disabling grfcodec" - grfcodec="" - fi - - if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ]; then - if [ "$with_application_bundle" = "1" ]; then - with_application_bundle="0" - - log 1 "checking OSX application bundle... not OSX, skipping" - else - log 1 "configure: error: --with-application-bundle only works if OSX is the target" - exit 1 - fi - fi - - if [ "$os" = "OSX" ] && [ "$with_application_bundle" = "1" ]; then - OSXAPP="OpenTTD.app" - else - OSXAPP="" - fi - - if [ "$os" = "OSX" ]; then - # Test on ppc970 (G5) - we can optimize there - - if [ "$enable_osx_g5" != "0" ]; then - log 1 "detecting ppc970 (G5)... yes (forced)" - else - # First, are we a real OSX system, else we can't detect it - native=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | grep darwin` - # If $host doesn't match $build , we are cross-compiling - if [ -n "$native" ] && [ "$build" = "$host" ]; then - $cxx_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector - res=`./G5_detector` - rm -f G5_detector - if [ -n "$res" ]; then - # This is G5, add flags for it - enable_osx_g5="2" - - log 1 "detecting ppc970 (G5)... yes" - else - enable_osx_g5="0" - - log 1 "detecting ppc970 (G5)... no" - fi - else - enable_osx_g5="0" - - log 1 "detecting ppc970 (G5)... no (cross-compiling)" - fi - fi - else - if [ "$enable_osx_g5" != "0" ]; then - log 1 "configure: error: ppc970 (OSX G5) selected, but not compiling for OSX" - log 1 "configure: error: either select OSX as OS, or deselect ppc970" - - exit 1 - fi - fi - - if { [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; } && [ -n "`git help 2>/dev/null`" ]; then - log 1 "checking revision... git detection" - elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then - log 1 "checking revision... source release version" - elif [ -f "$ROOT_DIR/.ottdrev" ]; then - log 1 "checking revision... source tarball" - else - log 1 "checking revision... no detection" - log 1 "WARNING: there is no means to determine the version." - log 1 "WARNING: please use a subversion, mercurial, or git checkout of OpenTTD." - log 1 "WARNING: you can only join game servers that have been compiled without" - log 1 "WARNING: version detection." - log 1 "WARNING: there is a great chance you desync." - log 1 "WARNING: USE WITH CAUTION!" - - sleep 5 - fi - - if [ "$doc_dir" = "1" ]; then - if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then - doc_dir="share/doc/openttd" - else - doc_dir="$data_dir/docs" - fi - else - doc_dir="`echo $doc_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - if [ "$icon_theme_dir" = "1" ]; then - if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then - icon_theme_dir="share/icons/hicolor" - else - icon_theme_dir="" - fi - else - icon_theme_dir="`echo $icon_theme_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - if [ "$personal_dir" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "HAIKU" ]; then - personal_dir="OpenTTD" - elif [ "$os" = "OSX" ]; then - personal_dir="Documents/OpenTTD" - else - personal_dir=".openttd" - fi - else - personal_dir="`echo $personal_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - if [ "$shared_dir" = "1" ]; then - # we are using default values - if [ "$os" = "OSX" ]; then - shared_dir="/Library/Application\\\\ Support/OpenTTD" - else - shared_dir="" - fi - else - shared_dir="`echo $shared_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - if [ "$man_dir" = "1" ]; then - # add manpage on UNIX systems - if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then - man_dir="share/man/man6" - else - man_dir="" - fi - else - man_dir="`echo $man_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - if [ "$menu_dir" = "1" ]; then - # add a freedesktop menu item only for some UNIX systems - if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then - menu_dir="share/applications" - else - menu_dir="" - fi - else - menu_dir="`echo $menu_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`" - fi - - detect_iconv - - if [ -n "$personal_dir" ] - then - log 1 "personal home directory... $personal_dir" - else - log 1 "personal home directory... none" - fi - - if [ -n "$shared_dir" ] - then - log 1 "shared data directory... $shared_dir" - else - log 1 "shared data directory... none" - fi - - if [ -n "$install_dir" ] - then - log 1 "installation directory... $install_dir" - else - log 1 "installation directory... none" - fi - - if [ -n "$icon_theme_dir" ] - then - log 1 "icon theme directory... $icon_theme_dir" - else - log 1 "icon theme directory... none" - fi - - if [ -n "$man_dir" ] - then - log 1 "manual page directory... $man_dir" - else - log 1 "manual page directory... none" - fi - - if [ -n "$menu_dir" ] - then - log 1 "menu item directory... $menu_dir" - else - log 1 "menu item directory... none" - fi -} - -make_compiler_cflags() { - # Params: - # $1 - compiler - # $2 - name of the cflags variable - # $3 - name of the cxxflags variable - # $4 - name of the ldflags variable - # $5 - name of the features variable - - # Get the compiler to tell us who it is - version_line="`$1 --version | head -n1`" - - eval eval "flags=\\\$$2" - eval eval "cxxflags=\\\$$3" - eval eval "ldflags=\\\$$4" - eval eval "features=\\\$$5" - - cppstd="-std=c++11" - - if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then - # Enable some things only for certain ICC versions - cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` - - flags="$flags -rdynamic" - ldflags="$ldflags -rdynamic" - - if [ -z "$first_time_icc_check" ]; then - first_time_icc_check=no - if [ $cc_version -lt 90 ]; then - log 1 "WARNING: you seem to be using a very old version of ICC" - log 1 "WARNING: OpenTTD hasn't been tested with this version" - sleep 5 - elif [ $cc_version -lt 120 ]; then - log 1 "WARNING: you seem to be using an unsupported ICC version" - log 1 "WARNING: ICC older than 12.0 is known to fail to compile OpenTTD" - sleep 5 - fi - fi - - flags="$flags -Wall" - # remark #111: statement is unreachable - flags="$flags -wd111" - # remark #181: argument is incompatible with corresponding format string conversion - # ICC is very picky about signedness of operands, warnings provided by GCC are enough - flags="$flags -wd181" - # remark #271: trailing comma is nonstandard - flags="$flags -wd271" - # remark #280: selector expression is constant - flags="$flags -wd280" - # remark #304: access control not specified ("public" by default) - flags="$flags -wd304" - # remark #383: value copied to temporary, reference to temporary used - flags="$flags -wd383" - # remark #444: destructor for base class ... is not virtual - flags="$flags -wd444" - # remark #593: variable ... was set but never used - flags="$flags -wd593" - # warning #654: overloaded virtual function ... is only partially overridden in class ... - flags="$flags -wd654" - # remark #810: conversion from ... to ... may lose significant bits - flags="$flags -wd810" - # remark #869: parameter ... was never referenced - flags="$flags -wd869" - # warning #873: function ... ::operator new ... has no corresponding operator delete ... - flags="$flags -wd873" - # remark #981: operands are evaluated in unspecified order - flags="$flags -wd981" - # remark #1418: external function definition with no prior declaration - flags="$flags -wd1418" - # remark #1419: external declaration in primary source file - flags="$flags -wd1419" - # remark #1572: floating-point equality and inequality - flags="$flags -wd1572" - # remark #1599: declaration hides variable/parameter ... - flags="$flags -wd1599" - # remark #1720: function ... ::operator new ... has no corresponding member operator delete ... - flags="$flags -wd1720" - - if [ $cc_version -lt 110 ]; then - # warns about system headers with recent glibc: - # warning #1292: attribute "__nonnull__" ignored - flags="$flags -wd1292" - fi - - if [ $cc_version -ge 100 ]; then - # warning #1899: multicharacter character literal (potential portability problem) - flags="$flags -wd1899" - # vec report defaults to telling where it did loop vectorisation, which is not very important - flags="$flags -vec-report=0 " - fi - - if [ $cc_version -ge 110 ]; then - # remark #2259: non-pointer conversion from ... to ... may lose significant bits - flags="$flags -wd2259" - fi - - if [ $cc_version -lt 140 ]; then - log 1 "configure: error: ICC version is too old: `$1 -dumpversion`, minumum: 14.0" - exit 1 - fi - - if [ "$enable_lto" != "0" ]; then - has_ipo=`$1 -help ipo | grep '\-ipo'` - if [ -n "$has_ipo" ]; then - # Use IPO (only if we see IPO exists and is requested) - flags="$flags -ipo" - features="$features lto" - fi - fi - elif echo "$version_line" | grep -q "clang"; then - # Enable some things only for certain clang versions - # Need to try really hard to get the version line, because OSX clang likes to hide its true version - cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9.]@@g | $awk -F . '{printf "%d%02d\n", $1, $2}'`" - - # aliasing rules are not held in openttd code - flags="$flags -fno-strict-aliasing" - - # -W alone doesn't enable all warnings enabled by -Wall; on the other hand, - # -Weverything enables too many useless warnings that can't be disabled (as of 3.0) - flags="$flags -Wall -W -Wextra" - - # warning: unused parameter '...' - flags="$flags -Wno-unused-parameter" - - # warning: expression result unused - flags="$flags -Wno-unused-value" - - # warning: multi-character character constant - flags="$flags -Wno-multichar" - - # warning: explicitly assigning a variable of type '...' to itself - # it happens when using the FOR_ALL_WINDOWS_FROM_BACK_FROM macro - flags="$flags -Wno-self-assign" - - # warning: is a C++11 extension - flags="$flags -Wno-c++11-extensions" - - if [ "$cc_version" -lt "300" ]; then - # warning: equality comparison with extraneous parentheses - flags="$flags -Wno-parentheses" - # warning: operands of ? are integers of different signs: 'unsigned int' and 'int' - flags="$flags -Wno-sign-compare" - fi - - if [ "$cc_version" -ge "300" ]; then - # warning: equality comparison with extraneous parentheses - # this warning could be useful, but it warns about code in squirrel - flags="$flags -Wno-parentheses-equality" - fi - - if [ "$with_ccache" != "0" -o "$with_distcc" != "0" ]; then - # ccache and distcc run separate preprocess and compile passes, - # both are fed with the same CFLAGS. Unfortunately, clang - # complains about -I when compiling preprocessed files: - # "clang: warning: argument unused during compilation: '-I /usr/include'" - flags="$flags -Qunused-arguments" - fi - - if [ "$enable_assert" -eq "0" ]; then - # do not warn about unused variables when building without asserts - flags="$flags -Wno-unused-variable" - fi - - if [ "$cc_version" -lt "303" ]; then - log 1 "configure: error: clang version is too old: `$1 -v 2>&1 | grep -i version | head -n 1`, minumum: 3.3" - exit 1 - fi - - # rdynamic is used to get useful stack traces from crash reports. - ldflags="$ldflags -rdynamic" - - # Assume gcc, since it just uses argv[0] in its --version output - else - # Enable some things only for certain GCC versions - # cc_version = major_version * 100 + minor_version - # For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305 - cc_version=`$1 -dumpversion | $awk -F . '{printf "%d%02d", $1, $2}'` - - if [ $cc_version -lt 303 ]; then - log 1 "configure: error: gcc older than 3.3 can't compile OpenTTD because of its poor template support" - exit 1 - fi - - flags="$flags -Wall -Wno-multichar -Wsign-compare -Wundef" - flags="$flags -Wwrite-strings -Wpointer-arith" - flags="$flags -W -Wno-unused-parameter -Wredundant-decls" - flags="$flags -Wformat=2 -Wformat-security" - cppstd="-std=gnu++11" - - if [ $enable_assert -eq 0 ]; then - # Do not warn about unused variables when building without asserts - flags="$flags -Wno-unused-variable" - if [ $cc_version -ge 406 ]; then - # GCC 4.6 gives more warnings, disable them too - flags="$flags -Wno-unused-but-set-variable" - flags="$flags -Wno-unused-but-set-parameter" - fi - fi - - if [ $cc_version -ge 304 ]; then - # Warn when a variable is used to initialise itself: - # int a = a; - flags="$flags -Winit-self" - fi - - if [ $cc_version -ge 400 ]; then - # GCC 4.0+ complains about that we break strict-aliasing. - # On most places we don't see how to fix it, and it doesn't - # break anything. So disable strict-aliasing to make the - # compiler all happy. - flags="$flags -fno-strict-aliasing" - # Warn about casting-out 'const' with regular C-style cast. - # The preferred way is const_cast<>() which doesn't warn. - flags="$flags -Wcast-qual" - fi - - if [ $cc_version -ge 402 ]; then - # GCC 4.2+ automatically assumes that signed overflows do - # not occur in signed arithmetic, whereas we are not - # sure that they will not happen. It furthermore complains - # about its own optimized code in some places. - flags="$flags -fno-strict-overflow" - # GCC 4.2 no longer includes -Wnon-virtual-dtor in -Wall. - # Enable it in order to be consistent with older GCC versions. - flags="$flags -Wnon-virtual-dtor" - fi - - if [ $cc_version -eq 405 ]; then - # Prevent optimisation supposing enums are in a range specified by the standard - # For details, see http://gcc.gnu.org/PR43680 - flags="$flags -fno-tree-vrp" - fi - - if [ $cc_version -eq 407 ]; then - # Disable -Wnarrowing which gives many warnings, such as: - # warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing] - # They are valid according to the C++ standard, but useless. - cxxflags="$cxxflags -Wno-narrowing" - fi - - if [ $cc_version -ge 407 ]; then - # Disable bogus 'attempt to free a non-heap object' warning - flags="$flags -Wno-free-nonheap-object" - else - log 1 "configure: error: GCC version is too old: `$1 -dumpversion`, minumum: 4.7" - exit 1 - fi - - if [ $cc_version -ge 600 ]; then - # -flifetime-dse=2 (default since GCC 6) doesn't play - # well with our custom pool item allocator - cxxflags="$cxxflags -flifetime-dse=1" - fi - - if [ "$enable_lto" != "0" ]; then - # GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}' - has_lto=`$1 -dumpspecs | grep '\%{flto'` - if [ -n "$has_lto" ]; then - # Use LTO only if we see LTO exists and is requested - if [ $cc_version -lt 406 ]; then - flags="$flags -flto" - else - flags="$flags -flto=jobserver" - fi - ldflags="$ldflags -fwhole-program" - features="$features lto" - fi - fi - - has_rdynamic=`$1 -dumpspecs | grep rdynamic` - if [ -n "$has_rdynamic" ]; then - # rdynamic is used to get useful stack traces from crash reports. - flags="$flags -rdynamic" - ldflags="$ldflags -rdynamic" - fi - fi - - eval "$2=\"$flags\"" - eval "$3=\"$cxxflags $cppstd\"" - eval "$4=\"$ldflags\"" - eval "$5=\"$features\"" -} - -test_compile_libbfd() { - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.bfd -x c++ - $1" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.bfd -x c++ - $1 2> /dev/null << EOL - #define PACKAGE 1 - #define PACKAGE_VERSION 1 - #include - #include - int main() { - bfd_init(); - bfd *abfd = bfd_openr("test", "test"); - bfd_check_format(abfd, bfd_object); - bfd_get_file_flags(abfd); - bfd_map_over_sections(abfd, (void (*)(bfd*, asection*, void*)) 0, (void *) 0); - asymbol *syms = 0; - long symcount = bfd_read_minisymbols(abfd, false, (void**) &syms, (unsigned int *) 0); - bfd_get_section_flags(abfd, (asection*) 0); - bfd_get_section_vma(abfd, (asection*) 0); - bfd_section_size(abfd, (asection*) 0); - bfd_find_nearest_line(abfd, (asection*) 0, (asymbol **) 0, (bfd_vma) 0, (const char **) 0, (const char **) 0, (unsigned int *) 0); - return (int) symcount; - } -EOL - ret=$? - rm -f tmp.config.bfd - log 2 " exit code $ret" - return $ret -} - -make_cflags_and_ldflags() { - # General CFlags for BUILD - CFLAGS_BUILD_ENV="$CFLAGS_BUILD" - CFLAGS_BUILD="" - # Special CXXFlags for BUILD - CXXFLAGS_BUILD_ENV="$CXXFLAGS_BUILD" - CXXFLAGS_BUILD="" - # LDFLAGS for BUILD - LDFLAGS_BUILD_ENV="$LDFLAGS_BUILD" - LDFLAGS_BUILD="" - # FEATURES for BUILD (lto) - FEATURES_BUILD="" - # General CFlags for HOST - CFLAGS_ENV="$CFLAGS" - CFLAGS="" - # Special CXXFlags for HOST - CXXFLAGS_ENV="$CXXFLAGS" - CXXFLAGS="" - # Libs to compile. In fact this is just LDFLAGS - LIBS="" - # LDFLAGS used for HOST - LDFLAGS_ENV="$LDFLAGS" - LDFLAGS="" - # FEATURES for HOST (lto) - FEATURES="" - - make_compiler_cflags "$cc_build" "CFLAGS_BUILD" "CXXFLAGS_BUILD" "LDFLAGS_BUILD" "FEATURES_BUILD" - make_compiler_cflags "$cc_host" "CFLAGS" "CXXFLAGS" "LDFLAGS" "FEATURES" - - CFLAGS="$CFLAGS -D$os" - CFLAGS_BUILD="$CFLAGS_BUILD -D$os" - - if [ "$enable_static" != "0" ]; then - STATIC_FLAGS="--static" - else - STATIC_FLAGS="" - fi - - if [ "$enable_debug" = "0" ]; then - # No debug, add default stuff - OBJS_SUBDIR="release" - - if [ "$enable_profiling" = "0" ]; then - # -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible) - CFLAGS="-fomit-frame-pointer $CFLAGS" - fi - CFLAGS="-O2 $CFLAGS" - else - OBJS_SUBDIR="debug" - - # Each debug level reduces the optimization by a bit - if [ $enable_debug -ge 1 ]; then - CFLAGS="$CFLAGS -g -D_DEBUG" - fi - if [ $enable_debug -ge 2 ]; then - CFLAGS="$CFLAGS -fno-inline" - fi - if [ $enable_debug -ge 3 ]; then - CFLAGS="$CFLAGS -O0" - else - CFLAGS="$CFLAGS -O2" - fi - fi - - if [ $enable_debug -le 2 ]; then - cc_host_is_gcc=`basename "$cc_host" | grep "gcc" 2>/dev/null` - if [ -n "$cc_host_is_gcc" ]; then - # Define only when compiling with GCC. Some GLIBC versions use GNU - # extensions in a way that breaks build with at least ICC. - # This requires -O1 or more, so debug level 3 (-O0) is excluded. - CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" - if [ "$os" = "MINGW" ]; then - # Prevent undefined references when _FORTIFY_SOURCE > 0 - LDFLAGS="$LDFLAGS -fstack-protector" - fi - fi - - cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null` - if [ -n "$cc_build_is_gcc" ]; then - # Add -O1 and fortify source to the tools needed for building, on gcc - CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1" - if [ "$os" = "MINGW" ]; then - # Prevent undefined references when _FORTIFY_SOURCE > 0 - LDFLAGS_BUILD="$LDFLAGS_BUILD -fstack-protector" - fi - elif [ -n "`basename "$cc_build" | grep "clang" 2>/dev/null`" ]; then - # Add -O1 to the tools needed for building, on clang - CFLAGS_BUILD="$CFLAGS_BUILD -O1" - fi - fi - - if [ "$os" = "OSX" ] && [ $cc_version -eq 400 ]; then - # Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization, - # wrongly optimizing ^= in loops. This disables the failing optimisation. - CFLAGS="$CFLAGS -fno-expensive-optimizations" - fi - - if [ "$enable_profiling" != "0" ]; then - CFLAGS="$CFLAGS -pg" - LDFLAGS="$LDFLAGS -pg" - fi - - if [ "$with_threads" = "0" ]; then - CFLAGS="$CFLAGS -DNO_THREADS" - fi - if [ "$with_sse" = "1" ]; then - CFLAGS="$CFLAGS -DWITH_SSE" - fi - - if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then - if [ "$os" = "CYGWIN" ]; then - flags="$flags -mwin32" - LDFLAGS="$LDFLAGS -mwin32" - fi - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - if [ $cc_version -lt 406 ]; then - flags="$flags -mno-cygwin" - LDFLAGS="$LDFLAGS -mno-cygwin" - fi - - if [ "$enable_console" != "0" ]; then - LDFLAGS="$LDFLAGS -Wl,--subsystem,console" - else - LDFLAGS="$LDFLAGS -Wl,--subsystem,windows" - fi - - LIBS="$LIBS -lws2_32 -lwinmm -lusp10 -lgdi32 -ldxguid -lole32 -limm32" - - if [ $cc_version -ge 404 ]; then - LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++" - fi - if [ $cc_version -ge 407 ]; then - CFLAGS="$CFLAGS -mno-ms-bitfields" - fi - fi - fi - - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "OSX" ] && [ "$os" != "OS2" ]; then - LIBS="$LIBS -lpthread" - fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.libdl -x c++ - -ldl" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.libdl -x c++ - -ldl 2> /dev/null << EOL - #include - int main() { - Dl_info info; - return dladdr(0, &info); - } -EOL - ret=$? - rm -f tmp.config.libdl - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking libdl... no" - else - log 1 "checking libdl... found" - LIBS="$LIBS -ldl" - CFLAGS="$CFLAGS -DWITH_DL" - fi - - LIBBFD_LIBS= - if [ "$with_libbfd" = "1" ]; then - if test_compile_libbfd "-lbfd -lz"; then - LIBBFD_LIBS="-lbfd -lz" - elif test_compile_libbfd "-lbfd -liberty -lz"; then - LIBBFD_LIBS="-lbfd -liberty -lz" - elif test_compile_libbfd "-lbfd -liberty -lintl -lz"; then - LIBBFD_LIBS="-lbfd -liberty -lintl -lz" - fi - if [ -n "$LIBBFD_LIBS" ]; then - log 1 "checking libbfd... found" - LIBS="$LIBS $LIBBFD_LIBS" - CFLAGS="$CFLAGS -DWITH_BFD" - else - log 1 "checking libbfd... no" - fi - else - log 1 "checking libbfd... disabled" - fi - - HAVE_GDB_DBG= - if [ "$with_self_gdb_debug" = "1" ]; then - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdb -x c++ -" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdb -x c++ - 2> /dev/null << EOL - #include - #include - #include - #include - #include - #include - int main() { - pid_t tid = syscall(SYS_gettid); - int status; - waitpid((pid_t) 0, &status, 0); - return WIFEXITED(status) && WEXITSTATUS(status); - } -EOL - ret=$? - rm -f tmp.config.dbggdb - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking dbg gdb... no" - else - log 1 "checking dbg gdb... found" - CFLAGS="$CFLAGS -DWITH_DBG_GDB" - HAVE_GDB_DBG=1 - - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ -" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.dbggdbprctl -x c++ - 2> /dev/null << EOL - #include - int main() { - return prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0); - } -EOL - ret=$? - rm -f tmp.config.dbggdbprctl - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking dbg gdb (prctl)... no" - else - log 1 "checking dbg gdb (prctl)... found" - CFLAGS="$CFLAGS -DWITH_PRCTL_PT" - fi - fi - else - log 1 "checking dbg gdb... disabled" - fi - - if [ -n "$LIBBFD_LIBS" -o -n "$HAVE_GDB_DBG" ]; then - if [ $enable_debug -lt 1 ] && [ "$with_bfd_extra_debug" = "1" ]; then - if [ -n "`basename "$cc_host" | grep "clang" 2>/dev/null`" ]; then - CFLAGS="$CFLAGS -gline-tables-only" - else - CFLAGS="$CFLAGS -g1" - fi - fi - fi - - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaction -x c++ - -ldl 2> /dev/null << EOL - #include - void *addr; - int code; - void handler(int sig, siginfo_t *si, void *context) { - addr = si->si_addr; - code = si->si_code; - } - int main() { - struct sigaction sa; - sa.sa_flags = SA_SIGINFO; - sigemptyset(&sa.sa_mask); - sa.sa_sigaction = handler; - sigaction(SIGSEGV, &sa, 0); - return 0; - } -EOL - ret=$? - rm -f tmp.config.sigaction - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking sigaction... no" - else - log 1 "checking sigaction... found" - CFLAGS="$CFLAGS -DWITH_SIGACTION" - fi - - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl 2> /dev/null << EOL - #include - int main() { - ucontext_t context; -#if defined(__x86_64__) - void *ptr = (void *) context.uc_mcontext.gregs[REG_RIP]; -#elif defined(__i386) - void *ptr = (void *) context.uc_mcontext.gregs[REG_EIP]; -#else -#error Unknown arch -#endif - return 0; - } -EOL - ret=$? - rm -f tmp.config.ucontext - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking ucontext... no" - else - log 1 "checking ucontext... found" - CFLAGS="$CFLAGS -DWITH_UCONTEXT" - fi - - if [ "$with_sigaltstack" = "1" ]; then - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.sigaltstack -x c++ - -ldl 2> /dev/null << EOL - #include - #include - int main() { - stack_t ss; - ss.ss_sp = calloc(SIGSTKSZ, 1); - ss.ss_size = SIGSTKSZ; - ss.ss_flags = 0; - sigaltstack(&ss, nullptr); - return 0; - } -EOL - ret=$? - rm -f tmp.config.sigaltstack - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking sigaltstack... no" - else - log 1 "checking sigaltstack... found" - CFLAGS="$CFLAGS -DWITH_SIGALTSTACK" - fi - else - log 1 "checking sigaltstack... disabled" - fi - fi - - if [ "$os" = "MINGW" ]; then - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.dbghelp -x c++ -" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.dbghelp -x c++ - 2> /dev/null << EOL - #include - #include - int main() { - STACKFRAME64 frame; - IMAGEHLP_SYMBOL64 *sym_info; - IMAGEHLP_MODULE64 module; - IMAGEHLP_LINE64 line; - return 0; - } -EOL - ret=$? - rm -f tmp.config.dbghelp - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking dbghelp... no" - else - log 1 "checking dbghelp... found" - CFLAGS="$CFLAGS -DWITH_DBGHELP" - - if [ "$with_libbfd" = "1" ]; then - test_compile_libbfd "-lbfd -liberty -lintl -lz" - if [ $? -ne 0 ]; then - log 1 "checking libbfd... no" - else - log 1 "checking libbfd... found" - LIBS="$LIBS -lbfd -liberty -lintl -lz" - CFLAGS="$CFLAGS -DWITH_BFD" - - if [ $enable_debug -lt 1 ] && [ "$with_bfd_extra_debug" = "1" ]; then - CFLAGS="$CFLAGS -g1" - fi - fi - else - log 1 "checking libbfd... disabled" - fi - fi - fi - - log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.bitmath-builtins -x c++ -" - "$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.bitmath-builtins -x c++ - 2> /dev/null << EOL - int main() { - return __builtin_popcountll(__builtin_popcountl(__builtin_popcount(__builtin_ctz(1)))); - } -EOL - ret=$? - rm -f tmp.config.bitmath-builtins - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking bitmath builtins... no" - else - log 1 "checking bitmath builtins... found" - CFLAGS="$CFLAGS -DWITH_BITMATH_BUILTINS" - fi - - log 2 "executing $cc_host $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.overflow-builtins -x c++ -" - "$cc_host" $CFLAGS $LDFLAGS $STATIC_FLAGS -o tmp.config.overflow-builtins -x c++ - 2> /dev/null << EOL - #include - int main() { - int64_t a = 0; - int64_t b = 0; - int64_t c = 0; - bool res1 = __builtin_add_overflow(a, b, &c); - bool res2 = __builtin_sub_overflow(a, b, &c); - bool res3 = __builtin_mul_overflow(a, b, &c); - return (res1 || res2 || res3) ? 1 : 0; - } -EOL - ret=$? - rm -f tmp.config.overflow-builtins - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking overflow builtins... no" - else - log 1 "checking overflow builtins... found" - CFLAGS="$CFLAGS -DWITH_OVERFLOW_BUILTINS" - fi - - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.demangle -x c++ - -lstdc++" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV -o tmp.config.demangle -x c++ - -lstdc++ 2> /dev/null << EOL - #include - int main() { - int status = -1; - char *demangled = abi::__cxa_demangle("test", 0, 0, &status); - return 0; - } -EOL - ret=$? - rm -f tmp.config.demangle - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking abi::__cxa_demangle... no" - else - log 1 "checking abi::__cxa_demangle... found" - CFLAGS="$CFLAGS -DWITH_DEMANGLE" - fi - fi - - if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ]; then - LIBS="$LIBS -lc" - fi - - if [ "$os" = "OPENBSD" ]; then - LIBS="$LIBS -pthread" - fi - - if [ "$os" = "OSX" ]; then - LDFLAGS="$LDFLAGS -framework Cocoa" - - # Add macports include dir which is not always set a default system dir. This avoids zillions of bogus warnings. - CFLAGS="$CFLAGS -isystem/opt/local/include" - - if [ "$enable_universal" = "0" ]; then - # Universal builds set this elsewhere - CFLAGS="$OSX_SYSROOT $CFLAGS" - LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS" - fi - - if [ "$with_self_lldb_debug" = "0" ]; then - log 1 "using dbg lldb... disabled" - CFLAGS="$CFLAGS -DWITHOUT_DBG_LLDB" - else - log 1 "using dbg lldb... yes" - if [ $enable_debug -lt 1 ]; then - if [ -n "`"$cc_host" --version | head -n1 | grep "clang" 2>/dev/null`" ]; then - CFLAGS="$CFLAGS -gline-tables-only" - else - CFLAGS="$CFLAGS -g1" - fi - fi - fi - - log 2 "executing $cc_host $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl" - "$cc_host" $CFLAGS $CFLAGS_ENV $LDFLAGS $LDFLAGS_ENV $STATIC_FLAGS -o tmp.config.ucontext -x c++ - -ldl 2> /dev/null << EOL - #include - int main() { - ucontext_t context; -#if defined(__x86_64__) - void *ptr = (void *) context.uc_mcontext->__ss.__rip; -#elif defined(__i386) - void *ptr = (void *) context.uc_mcontext->__ss.__rip; -#else -#error Unknown arch -#endif - return 0; - } -EOL - ret=$? - rm -f tmp.config.ucontext - log 2 " exit code $ret" - if [ $ret -ne 0 ]; then - log 1 "checking ucontext... no" - else - log 1 "checking ucontext... found" - CFLAGS="$CFLAGS -DWITH_UCONTEXT" - fi - - # workaround for issues with MacOS 10.15 Catalina and stack_not_16_byte_aligned_error issues - CFLAGS="$CFLAGS -fno-stack-check" - fi - - if [ "$os" = "HAIKU" ]; then - LIBS="$LIBS -lmidi -lbe" - fi - - # Most targets act like UNIX, just with some additions - if [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then - CFLAGS="$CFLAGS -DUNIX" - fi - # And others like Windows - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - CFLAGS="$CFLAGS -DWIN" - fi - - if [ -n "$allegro_config" ]; then - CFLAGS="$CFLAGS -DWITH_ALLEGRO" - CFLAGS="$CFLAGS `$allegro_config --cflags`" - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$allegro_config --static --libs`" - else - LIBS="$LIBS `$allegro_config --libs`" - fi - fi - fi - - if [ -n "$sdl2_config" ]; then - CFLAGS="$CFLAGS -DWITH_SDL2" - # SDL must not add _GNU_SOURCE as it breaks many platforms - CFLAGS="$CFLAGS `$sdl2_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$sdl2_config --static --libs`" - else - LIBS="$LIBS `$sdl2_config --libs`" - fi - elif [ -n "$sdl_config" ]; then - CFLAGS="$CFLAGS -DWITH_SDL" - # SDL must not add _GNU_SOURCE as it breaks many platforms - CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$sdl_config --static --libs`" - else - LIBS="$LIBS `$sdl_config --libs`" - fi - fi - - if [ "$with_cocoa" != "0" ]; then - CFLAGS="$CFLAGS -DWITH_COCOA" - LIBS="$LIBS -F$osx_sdk_path/System/Library/Frameworks -framework Cocoa -framework AudioUnit -framework AudioToolbox" - - if [ "$enable_cocoa_quartz" != "0" ]; then - CFLAGS="$CFLAGS -DENABLE_COCOA_QUARTZ" - fi - fi - - if [ "$with_zlib" != "0" ]; then - CFLAGS="$CFLAGS -DWITH_ZLIB" - CFLAGS="$CFLAGS `$zlib_config --cflags | tr '\n\r' ' '`" - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$zlib_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$zlib_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$lzma_config" ]; then - CFLAGS="$CFLAGS -DWITH_LIBLZMA" - CFLAGS="$CFLAGS `$lzma_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - CFLAGS="$CFLAGS -DLZMA_API_STATIC" - LIBS="$LIBS `$lzma_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$lzma_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ "$with_lzo2" != "0" ]; then - if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then - LIBS="$LIBS $lzo2" - else - LIBS="$LIBS -llzo2" - fi - CFLAGS="$CFLAGS -DWITH_LZO" - fi - - if [ -n "$xdg_basedir_config" ]; then - CFLAGS="$CFLAGS -DWITH_XDG_BASEDIR" - CFLAGS="$CFLAGS `$xdg_basedir_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$xdg_basedir_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$xdg_basedir_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$dbus_config" ]; then - CFLAGS="$CFLAGS -DWITH_DBUS" - CFLAGS="$CFLAGS `$dbus_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$dbus_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$dbus_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$x11_config" ]; then - CFLAGS="$CFLAGS -DWITH_X11" - CFLAGS="$CFLAGS `$x11_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$x11_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$x11_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$fcitx_config" ]; then - CFLAGS="$CFLAGS -DWITH_FCITX" - CFLAGS="$CFLAGS `$fcitx_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$fcitx_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$fcitx_config --libs | tr '\n\r' ' '`" - fi - fi - - # 64bit machines need -D_SQ64 - if [ "$cpu_type" = "64" ] && [ "$enable_universal" = "0" ]; then - CFLAGS="$CFLAGS -D_SQ64" - fi - CFLAGS="$CFLAGS -I$SCRIPT_SRC_DIR" - - if [ -n "$png_config" ]; then - CFLAGS="$CFLAGS -DWITH_PNG" - CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$fontconfig_config" ]; then - CFLAGS="$CFLAGS -DWITH_FONTCONFIG" - CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" - else - LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$freetype_config" ]; then - CFLAGS="$CFLAGS -DWITH_FREETYPE" - CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" - - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '` -lfreetype" - else - LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$icu_layout_config" ]; then - CFLAGS="$CFLAGS -DWITH_ICU_LX" - CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`" - - if [ "$static_icu" != "0" ]; then - LIBS="$LIBS `$icu_layout_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`" - else - LIBS="$LIBS `$icu_layout_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ -n "$icu_sort_config" ]; then - CFLAGS="$CFLAGS -DWITH_ICU_I18N" - CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`" - - if [ "$static_icu" != "0" ]; then - LIBS="$LIBS `$icu_sort_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`" - else - LIBS="$LIBS `$icu_sort_config --libs | tr '\n\r' ' '`" - fi - fi - - if [ "$with_uniscribe" != "0" ]; then - CFLAGS="$CFLAGS -DWITH_UNISCRIBE" - LIBS="$LIBS -lusp10" - fi - - if [ "$with_direct_music" != "0" ]; then - CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT" - # GCC 4.0+ doesn't like the DirectX includes (gives tons of - # warnings on it we won't be able to fix). For now just - # suppress those warnings. - if [ $cc_version -ge 400 ]; then - CFLAGS="$CFLAGS -Wno-non-virtual-dtor" - fi - fi - - if [ "$with_xaudio2" != "0" ]; then - CFLAGS="$CFLAGS -DWITH_XAUDIO2" - fi - - if [ -n "$fluidsynth" ]; then - LIBS="$LIBS -lfluidsynth" - CFLAGS="$CFLAGS -DFLUIDSYNTH" - fi - - if [ "$with_iconv" != "0" ]; then - CFLAGS="$CFLAGS -DWITH_ICONV" - if [ "$link_to_iconv" = "yes" ]; then - LIBS="$LIBS -liconv" - if [ "$with_iconv" != "2" ]; then - CFLAGS="$CFLAGS -I$with_iconv/include" - LIBS="$LIBS -L$with_iconv/lib" - fi - fi - - if [ "$os" != "OSX" ] && [ "$have_non_const_iconv" != "no" ]; then - CFLAGS="$CFLAGS -DHAVE_NON_CONST_ICONV" - fi - fi - - if [ -n "$with_midi" ]; then - CFLAGS="$CFLAGS -DEXTERNAL_PLAYER=\\\\\"$with_midi\\\\\"" - fi - if [ -n "$with_midi_arg" ]; then - CFLAGS="$CFLAGS -DMIDI_ARG=\\\\\"$with_midi_arg\\\\\"" - fi - - if [ "$enable_dedicated" != "0" ]; then - CFLAGS="$CFLAGS -DDEDICATED" - fi - - if [ "$enable_unicode" != "0" ]; then - CFLAGS="$CFLAGS -DUNICODE -D_UNICODE" - fi - - if [ "$os" = "HAIKU" ]; then - LDFLAGS="$LDFLAGS -lnetwork" - fi - - if [ "$os" = "SUNOS" ]; then - LDFLAGS="$LDFLAGS -lnsl -lsocket" - fi - - if [ "$enable_static" != "0" ]; then - # OSX can't handle -static in LDFLAGS - if [ "$os" != "OSX" ]; then - LDFLAGS="$LDFLAGS -static" - fi - fi - - if [ "$enable_assert" = "0" ]; then - CFLAGS="$CFLAGS -DNDEBUG" - CFLAGS_BUILD="$CFLAGS_BUILD -DNDEBUG" - fi - - if [ "$enable_desync_debug" != "0" ]; then - CFLAGS="$CFLAGS -DRANDOM_DEBUG" - fi - - if [ "$enable_osx_g5" != "0" ]; then - CFLAGS="$CFLAGS -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" - fi - - if [ -n "$personal_dir" ]; then - CFLAGS="$CFLAGS -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\\\\"$personal_dir\\\\\"" - fi - - if [ -n "$shared_dir" ]; then - CFLAGS="$CFLAGS -DWITH_SHARED_DIR -DSHARED_DIR=\\\\\"$shared_dir\\\\\"" - fi - - CFLAGS="$CFLAGS -DGLOBAL_DATA_DIR=\\\\\"$prefix_dir/$data_dir\\\\\"" - - if [ "$enable_lto" != "0" ]; then - lto_build=`echo "$FEATURES_BUILD" | grep "lto"` - lto_host=`echo "$FEATURES" | grep "lto"` - if [ -z "$lto_build$lto_host" ]; then - log 1 "WARNING: you enabled LTO/IPO, but neither build nor host compiler supports it" - log 1 "WARNING: LTO/IPO has been disabled" - fi - if [ -n "$lto_build" ]; then - LDFLAGS_BUILD="$LDFLAGS_BUILD $CFLAGS_BUILD $CXXFLAGS_BUILD" - fi - if [ -n "$lto_host" ]; then - LDFLAGS="$LDFLAGS $CFLAGS $CXXFLAGS" - fi - fi - - # All flags to be extended via the env - CFLAGS_BUILD="$CFLAGS_BUILD $CFLAGS_BUILD_ENV" - CXXFLAGS_BUILD="$CXXFLAGS_BUILD $CXXFLAGS_BUILD_ENV" - LDFLAGS_BUILD="$LDFLAGS_BUILD $LDFLAGS_BUILD_ENV" - CFLAGS="$CFLAGS $CFLAGS_ENV" - CXXFLAGS="$CXXFLAGS $CXXFLAGS_ENV" - LDFLAGS="$LDFLAGS $LDFLAGS_ENV" - - log 1 "using CFLAGS_BUILD... $CFLAGS_BUILD" - log 1 "using CXXFLAGS_BUILD... $CXXFLAGS_BUILD" - log 1 "using LDFLAGS_BUILD... $LDFLAGS_BUILD" - log 1 "using CFLAGS... $CFLAGS" - log 1 "using CXXFLAGS... $CXXFLAGS" - log 1 "using LDFLAGS... $LIBS $LDFLAGS" - - # Makedepend doesn't like something like: -isysroot /OSX/blabla - # so convert it to: -isysroot -OSX/blabla. makedepend just ignores - # any - command it doesn't know, so we are pretty save. - # Lovely hackish, not? - # Btw, this almost always comes from outside the configure, so it is - # not something we can control. - # Also make makedepend aware of compiler's built-in defines. - if [ "$with_makedepend" != "0" ] || [ "$enable_builtin_depend" != "0" ]; then - # Append CXXFLAGS possibly containing -std=c++0x - cflags_makedep="`echo | $cxx_host $CXXFLAGS -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`" - - # Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations - cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g;s@[ ]*-[^D][^ ]*@@g'`" - else - makedepend="" - fi - - if [ "$with_distcc" != "0" ]; then - cc_host="$distcc $cc_host" - cxx_host="$distcc $cxx_host" - log 1 "" - log 1 " NOTICE: remind yourself to use 'make -jN' to make use of distcc" - log 1 "" - fi - - if [ "$with_ccache" != "0" ]; then - cc_host="$ccache $cc_host" - cxx_host="$ccache $cxx_host" - fi -} - -check_compiler() { - # Params: - # $1 - Type for message (build / host) - # $2 - What to fill with the found compiler - # $3 - System to try - # $4 - Compiler to try - # $5 - Env-setting to try - # $6 - GCC alike to try (array) - # $7 - CC alike to try - # $8 - "0" gcc, "1" g++, "2" windres, "3" strip, "4" lipo - # $9 - What the command is to check for - - if [ -n "$4" ]; then - # Check for manual compiler - machine=`$4 $9 2>/dev/null` - ret=$? - eval "$2=\"$4\"" - - log 2 "executing $4 $9" - log 2 " returned $machine" - log 2 " exit code $ret" - - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - log 1 "checking $1... $4 not found" - log 1 "the selected binary doesn't seem to be a $6 binary" - exit 1 - fi - elif [ -n "$3" ]; then - # Check for system - for val in $6; do - if [ -z "$6" ]; then - compiler="$3" - else - compiler="$3-$val" - fi - machine=`eval $compiler $9 2>/dev/null` - ret=$? - eval "$2=\"$compiler\"" - - log 2 "executing $compiler $9" - log 2 " returned $machine" - log 2 " exit code $ret" - if [ -n "$machine" ] && [ "$ret" = "0" ]; then - break - fi - done - - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - if [ -z "$5" ]; then - log 1 "checking $1... $compiler not found" - log 1 "I couldn't detect any '$6' binary for $3" - exit 1 - else - compiler="$3-$5" - fi - machine=`eval $compiler $9 2>/dev/null` - ret=$? - eval "$2=\"$compiler\"" - - log 2 "executing $compiler $9" - log 2 " returned $machine" - log 2 " exit code $ret" - - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - log 1 "checking $1... $compiler not found" - log 1 "I couldn't detect any $5 binary for $3" - exit 1 - fi - fi - - if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then - log 1 "checking $1... expected $3, found $machine" - log 1 "the compiler suggests it doesn't build code for the machine you specified" - exit 1 - fi - else - # Nothing given, autodetect - - if [ -n "$5" ]; then - machine=`$5 $9 2>/dev/null` - ret=$? - eval "$2=\"$5\"" - - log 2 "executing $5 $9" - log 2 " returned $machine" - log 2 " exit code $ret" - - # The user defined a GCC that doesn't reply to $9.. abort - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - log 1 "checking $1... $5 unusable" - log 1 "the CC environment variable is set, but it doesn't seem to be a '$6' binary" - log 1 "please redefine the CC/CXX environment to a $6 binary" - exit 1 - fi - else - log 2 "checking $1... CC/CXX not set (skipping)" - - for val in $6; do - # No $5, so try next item in '$6' - machine=`$val $9 2>/dev/null` - ret=$? - eval "$2=\"$val\"" - - log 2 "executing $val $9" - log 2 " returned $machine" - log 2 " exit code $ret" - if [ -n "$machine" ] && [ "$ret" = "0" ]; then - break - fi - done - - if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then - # Maybe '$7'? - machine=`$7 $9 2>/dev/null` - ret=$? - eval "$2=\"$7\"" - - log 2 "executing $7 $9" - log 2 " returned $machine" - log 2 " exit code $ret" - - # All failed, abort - if [ -z "$machine" ]; then - log 1 "checking $1... $6 not found" - log 1 "I couldn't detect any '$6' binary on your system" - log 1 "please define the CC/CXX environment to where it is located" - - exit 1 - fi - fi - fi - fi - - if [ "$8" != "0" ]; then - eval "res=\$$2" - log 1 "checking $1... $res" - else - log 1 "checking $1... $machine" - fi -} - -check_build() { - check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "$default_cc" "cc" "0" "-dumpmachine" -} - -check_host() { - # By default the host is the build - if [ -z "$host" ]; then host="$build"; fi - - check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "$default_cc" "cc" "0" "-dumpmachine" -} - -check_cxx_build() { - check_compiler "build c++" "cxx_build" "$build" "$cxx_build" "$CXX" "$default_cxx" "c++" 1 "-dumpmachine" -} - -check_cxx_host() { - # By default the host is the build - if [ -z "$host" ]; then host="$build"; fi - check_compiler "host c++" "cxx_host" "$host" "$cxx_host" "$CXX" "$default_cxx" "c++" 1 "-dumpmachine" -} - -check_windres() { - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - check_compiler "host windres" "windres" "$host" "$windres" "$WINDRES" "windres" "windres" "2" "-V" - fi -} - -check_strip() { - if [ "$os" = "OS2" ]; then - # OS2 via gcc is a bit weird.. stripping HAS to be done via emxbind, which is via gcc directly - log 1 "checking host strip... using gcc -s option" - elif [ "$os" = "OSX" ]; then - # Most targets have -V in strip, to see if they exists... OSX doesn't.. so execute something - echo "int main(int argc, char *argv[]) { }" > strip.test.c - $cxx_host strip.test.c -o strip.test - check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "strip.test" - rm -f strip.test.c strip.test - else - check_compiler "host strip" "strip" "$host" "$strip" "$STRIP" "strip" "strip" "3" "-V" - fi -} - -check_lipo() { - if [ "$os" = "OSX" ] && [ "$enable_universal" != "0" ]; then - echo "int main(int argc, char *argv[]) { }" > lipo.test.c - $cxx_host lipo.test.c -o lipo.test - check_compiler "host lipo" "lipo" "$host" "$lipo" "$LIPO" "lipo" "lipo" "4" "-info lipo.test" - rm -f lipo.test.c lipo.test - fi -} - -check_osx_sdk() { - local sysroot="" - if [ -n "$1" ]; then - if echo "$1" | grep -q / ; then - # Seems to be a file system path - osx_sdk_path="$1" - else - osx_sdk_path="/Developer/SDKs/MacOSX$1.sdk" - fi - if [ ! -d "$osx_sdk_path" ]; then - # No directory, not present or garbage - return 1 - fi - - # Set minimum version to 10.4 as that's when kCGBitmapByteOrder32Host was introduced - sysroot="-isysroot $osx_sdk_path -Wl,-syslibroot,$osx_sdk_path -mmacosx-version-min=10.4" - fi - -cat > tmp.osx.mm << EOF -#include -int main() { - kCGBitmapByteOrder32Host; - return 0; -} -EOF - execute="$cxx_host $sysroot $CFLAGS tmp.osx.mm -framework Cocoa -o tmp.osx 2>&1" - eval $execute > /dev/null - ret=$? - log 2 "executing $execute" - log 2 " exit code $ret" - rm -f tmp.osx.mm tmp.osx - return $ret -} - -check_direct_music() { - echo " - #include - #include - #include - int main(int argc, char *argv[]) { }" > direct_music.test.c - $cxx_host $CFLAGS direct_music.test.c -o direct_music.test 2> /dev/null - res=$? - rm -f direct_music.test.c direct_music.test - - if [ "$res" != "0" ]; then - if [ "$with_direct_music" != "1" ]; then - log 1 "configure: error: direct-music is not available on this system" - exit 1 - fi - with_direct_music="0" - - log 1 "checking direct-music... not found" - else - log 1 "checking direct-music... found" - fi -} - -check_xaudio2() { - echo " - #include - - #undef NTDDI_VERSION - #undef _WIN32_WINNT - - #define NTDDI_VERSION NTDDI_WIN8 - #define _WIN32_WINNT _WIN32_WINNT_WIN8 - - #include - int main(int argc, char *argv[]) { }" > xaudio2.test.c - $cxx_host $CFLAGS xaudio2.test.c -o xaudio2.test 2> /dev/null - res=$? - rm -f xaudio2.test.c xaudio2.test - - if [ "$res" != "0" ]; then - if [ "$with_xaudio2" != "1" ]; then - log 1 "configure: error: xaudio2 is not available on this system" - exit 1 - fi - with_xaudio2="0" - - log 1 "checking xaudio2... not found" - else - log 1 "checking xaudio2... found" - fi -} - -check_makedepend() { - if [ "$enable_builtin_depend" != "0" ]; then - with_makedepend="0" - fi - - if [ "$with_makedepend" = "0" ]; then - log 1 "checking makedepend... disabled" - return - fi - - if [ "$with_makedepend" = "1" ] || [ "$with_makedepend" = "2" ]; then - makedepend="makedepend" - else - makedepend="$with_makedepend" - fi - - rm -f makedepend.tmp - touch makedepend.tmp - res=`$makedepend -fmakedepend.tmp 2>/dev/null` - res=$? - log 2 "executing $makedepend -f makedepend.tmp" - log 2 " returned `cat makedepend.tmp`" - log 2 " exit code $ret" - - if [ ! -s makedepend.tmp ]; then - rm -f makedepend.tmp makedepend.tmp.bak - - if [ "$with_makedepend" = "2" ]; then - log 1 "checking makedepend... not found" - - log 1 "I couldn't detect any makedepend on your system" - log 1 "please locate it via --makedepend=[binary]" - - exit 1 - elif [ "$with_makedepend" != "1" ]; then - log 1 "checking makedepend... $makedepend not found" - - log 1 "the selected file doesn't seem to be a valid makedepend binary" - - exit 1 - else - log 1 "checking makedepend... not found" - - with_makedepend="0" - return - fi - fi - - rm -f makedepend.tmp makedepend.tmp.bak - - log 1 "checking makedepend... $makedepend" -} - -check_version() { - # $1 - requested version (major.minor) - # $2 - version we got (major.minor) - - if [ -z "$2" ]; then - return 0 - fi - - req_major=`echo $1 | cut -d. -f1` - got_major=`echo $2 | cut -d. -f1` - if [ $got_major -lt $req_major ]; then - return 0 - elif [ $got_major -gt $req_major ]; then - return 1 - fi - - req_minor=`echo $1 | cut -d. -f2` - got_minor=`echo $2 | cut -d. -f2` - if [ $got_minor -lt $req_minor ]; then - return 0 - elif [ $got_minor -gt $req_minor ]; then - return 1 - fi - - req_micro=`echo $1 | cut -d. -f3` - got_micro=`echo $2 | cut -d. -f3` - if [ -z "$req_micro" ]; then - return 1 - elif [ -z "$got_micro" ]; then - return 0 - elif [ $got_micro -lt $req_micro ]; then - return 0 - else - return 1 - fi -} - -detect_awk() { - # Not all awks allow gsub(), so we test for that here! It is in fact all we need... - - # These awks are known to work. Test for them explicit - awks="gawk mawk nawk" - - awk_prefix="echo \"a.c b.c c.c\" | tr ' ' \\\\n | " - awk_param="' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", \$0); print \$0; }' 2>/dev/null" - awk_result="a.o b.o c.o " - log 2 "Detecing awk..." - - log 2 "Trying: $awk_prefix $awk $awk_param" - res=`eval $awk_prefix $awk $awk_param` - log 2 "Result: '$res'" - if [ "$res" != "$awk_result" ] && [ "$awk" = "awk" ]; then - # User didn't supply his own awk, so try to detect some other known working names for an awk - for awk in $awks; do - log 2 "Trying: $awk_prefix $awk $awk_param" - res=`eval $awk_prefix $awk $awk_param` - log 2 "Result: '$res'" - if [ "$res" = "$awk_result" ]; then break; fi - done - - if [ "$res" != "$awk_result" ]; then - log 1 "checking awk... not found" - log 1 "configure: error: no awk found" - log 1 "configure: error: please install one of the following: $awks" - exit 1 - fi - fi - if [ "$res" != "$awk_result" ]; then - log 1 "checking awk... not found" - log 1 "configure: error: you supplied '$awk' but it doesn't seem a valid gawk or mawk" - exit 1 - fi - - log 1 "checking awk... $awk" -} - -detect_os() { - if [ "$os" = "DETECT" ]; then - # Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, SUNOS, CYGWIN, MINGW, and OS2 - - # Try first via dumpmachine, then via uname - os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' - /linux/ { print "UNIX"; exit} - /darwin/ { print "OSX"; exit} - /freebsd/ { print "FREEBSD"; exit} - /dragonfly/ { print "DRAGONFLY"; exit} - /openbsd/ { print "OPENBSD"; exit} - /netbsd/ { print "NETBSD"; exit} - /hp-ux/ { print "HPUX"; exit} - /haiku/ { print "HAIKU"; exit} - /sunos/ { print "SUNOS"; exit} - /solaris/ { print "SUNOS"; exit} - /cygwin/ { print "CYGWIN"; exit} - /mingw/ { print "MINGW"; exit} - /os2/ { print "OS2"; exit} - '` - - if [ -z "$os" ]; then - os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk ' - /linux/ { print "UNIX"; exit} - /darwin/ { print "OSX"; exit} - /freebsd/ { print "FREEBSD"; exit} - /dragonfly/ { print "DRAGONFLY"; exit} - /openbsd/ { print "OPENBSD"; exit} - /netbsd/ { print "NETBSD"; exit} - /hp-ux/ { print "HPUX"; exit} - /haiku/ { print "HAIKU"; exit} - /sunos/ { print "SUNOS"; exit} - /cygwin/ { print "CYGWIN"; exit} - /mingw/ { print "MINGW"; exit} - /os\/2/ { print "OS2"; exit} - /gnu/ { print "UNIX"; exit} - '` - fi - - if [ -z "$os" ]; then - log 1 "detecting OS... none detected" - log 1 "I couldn't detect your OS. Please use --os=OS to force one" - log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, HAIKU, SUNOS, CYGWIN, MINGW, and OS2" - exit 1 - fi - - log 1 "detecting OS... $os" - else - log 1 "forcing OS... $os" - fi - if [ "$os" = "OSX" ]; then - default_cc="clang gcc" - default_cxx="clang++ g++" - else - default_cc="gcc clang" - default_cxx="g++ clang++" - fi -} - -detect_allegro() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_allegro" = "0" ]; then - log 1 "checking Allegro... disabled" - - allegro_config="" - return 0 - fi - - if [ "$with_allegro" = "2" ] && [ "$with_cocoa" = "2" ]; then - log 1 "configure: error: it is impossible to compile both Allegro and COCOA" - log 1 "configure: error: please deselect one of them and try again" - exit 1 - fi - - if [ "$with_allegro" = "2" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "configure: error: it is impossible to compile a dedicated with Allegro" - log 1 "configure: error: please deselect one of them and try again" - exit 1 - fi - - if [ "$enable_dedicated" != "0" ]; then - log 1 "checking Allegro... dedicated server, skipping" - - allegro_config="" - return 0 - fi - - # By default on OSX we don't use Allegro. The rest is auto-detect - if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then - log 1 "checking Allegro... OSX, skipping" - - allegro_config="" - return 0 - fi - - detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4" -} - - -detect_sdl() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_sdl" = "0" ]; then - log 1 "checking SDL... disabled" - - sdl_config="" - sdl2_config="" - return 0 - fi - - if [ "$with_sdl" != "1" ] && [ "$with_cocoa" = "2" ]; then - log 1 "configure: error: it is impossible to compile both SDL and COCOA" - log 1 "configure: error: please deselect one of them and try again" - exit 1 - fi - - if [ "$with_sdl" != "1" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "configure: error: it is impossible to compile a dedicated with SDL" - log 1 "configure: error: please deselect one of them and try again" - exit 1 - fi - - if [ "$enable_dedicated" != "0" ]; then - log 1 "checking SDL... dedicated server, skipping" - - sdl_config="" - sdl2_config="" - return 0 - fi - - # By default on OSX we don't use SDL. The rest is auto-detect - if [ "$with_sdl" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then - log 1 "checking SDL... OSX, skipping" - - sdl_config="" - return 0 - fi - - if [ "$os" = "OSX" ]; then - log 1 "WARNING: sdl is known to fail on some versions of Mac OS X" - log 1 "WARNING: with some hardware configurations. Use at own risk!" - sleep 5 - fi - - if [ $with_sdl = "sdl1" ]; then - detect_pkg_config "2" "sdl" "sdl_config" "1.2" - elif [ $with_sdl = "sdl2" ]; then - detect_pkg_config "2" "sdl2" "sdl2_config" "2.0" - else - sdl2_config="" - if [ -x "`which sdl2-config`" ]; then - detect_pkg_config "$with_sdl" "sdl2" "sdl2_config" "2.0" - fi - if [ -z "$sdl2_config" ]; then - detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2" - fi - fi -} - -detect_osx_sdk() { - # Try to find the best SDK available. For a normal build this - # is currently the 10.5 SDK as this is needed to compile all - # optional code. Because such an executable won't run on 10.4 - # or lower, also check for the 10.4u SDK when doing an universal - # build. - - # Check for the 10.5 SDK, but try 10.6 if that fails - check_osx_sdk "10.5" || check_osx_sdk "10.6" || osx_sdk_path="" - - if [ -z "$osx_sdk_path" ] || [ "$enable_universal" != "0" ]; then - # No better SDK or universal build enabled? Check 10.4u SDK as well - local old_sdk="$osx_sdk_path" - if check_osx_sdk "10.4u"; then - osx_sdk_104_path="$osx_sdk_path" - else - osx_sdk_104_path="" - fi - if [ -z "$old_sdk" ]; then - osx_sdk_path="$osx_sdk_104_path" - else - osx_sdk_path="$old_sdk" - fi - fi - - if [ -z "$osx_sdk_path" ]; then - log 1 "Your system SDK is probably too old" - log 1 "Please install/upgrade your Xcode to >= 2.5" - - exit 1 - fi -} - -detect_cocoa() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_cocoa" = "0" ]; then - log 1 "checking COCOA... disabled" - - return 0 - fi - - if [ "$with_cocoa" = "2" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "configure: error: it is impossible to compile a dedicated with COCOA" - log 1 "configure: error: please deselect one of them and try again" - exit 1 - fi - - if [ "$enable_dedicated" != "0" ]; then - log 1 "checking COCOA... dedicated server, skipping" - - with_cocoa="0" - return 0 - fi - - # By default on OSX we use COCOA. The rest doesn't support it - if [ "$with_cocoa" = "1" ] && [ "$os" != "OSX" ]; then - log 1 "checking COCOA... not OSX, skipping" - - with_cocoa="0" - return 0 - fi - - if [ "$os" != "OSX" ]; then - log 1 "checking COCOA... not OSX" - - log 1 "configure: error: COCOA video driver is only supported for OSX" - exit 1 - fi - - log 1 "checking COCOA... found" - - - if [ "$enable_cocoa_quartz" != "0" ]; then - log 1 "checking whether to enable the Quartz window subdriver... yes" - else - log 1 "checking whether to enable the Quartz window subdriver... no" - fi -} - -detect_library() { - # $1 - config-param ($with_zlib value) - # $2 - library name ('zlib', sets $zlib) - # $3 - static library name (libz.a) - # $4 - header directory () - # $5 - header name (zlib.h) - # $6 - force static (if non-empty) - - if [ -n "$6" ]; then force_static="1"; fi - - # 0 means no, 1 is auto-detect, 2 is force - if [ "$1" = "0" ]; then - log 1 "checking $2... disabled" - - eval "$2=\"\"" - return 0 - fi - - log 2 "detecting $2" - - if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then - eval "$2=`ls -1 /usr/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /usr/include/$4$5... no" - eval "$2=`ls -1 /usr/local/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /usr/local/include/$4$5... no" - eval "$2=`ls -1 /mingw/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /mingw/include/$4$5... no" - eval "$2=`ls -1 /mingw$cpu_type/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /mingw$cpu_type/include/$4$5... no" - eval "$2=`ls -1 /opt/local/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /opt/local/include/$4$5... no" - fi - if [ -z "$res" ] && [ "$os" = "NETBSD" ]; then - eval "$2=`ls -1 /usr/pkg/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /usr/pkg/include/$4$5... no" - fi - fi - if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then - if [ -z "$includeDir" ]; then - includeDir=`finddir B_SYSTEM_HEADERS_DIRECTORY` - fi - eval "$2=`ls -1 $includeDir/$4*.h 2>/dev/null | egrep \"\/$5\$\"`" - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying $includeDir/$4$5... no" - fi - fi - - eval "res=\$$2" - if [ -n "$res" ] && ( [ -n "$force_static" ] || ( [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] ) ); then - eval "res=\$$2" - log 2 " trying $res... found" - # Now find the static lib, if needed - eval "$2=`ls /lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /lib/$3... no" - eval "$2=`ls /usr/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /usr/lib/$3... no" - eval "$2=`ls /usr/local/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /usr/local/lib/$3... no" - eval "$2=`ls /mingw/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /mingw/lib/$3... no" - eval "$2=`ls /mingw$cpu_type/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" - fi - eval "res=\$$2" - if [ -z "$res" ]; then - log 2 " trying /mingw$cpu_type/lib/$3... no" - log 1 "configure: error: $2 couldn't be found" - log 1 "configure: error: you requested a static link, but I can't find $3" - - exit 1 - fi - fi - else - # Make sure it exists - if [ -f "$1" ]; then - eval "$2=`ls $1 2>/dev/null`" - else - eval "$2=`ls $1/$3 2>/dev/null`" - fi - fi - - eval "res=\$$2" - if [ -z "$res" ]; then - log 1 "checking $2... not found" - if [ "$1" = "2" ]; then - log 1 "configure: error: $2 couldn't be found" - - exit 1 - elif [ "$1" != "1" ]; then - log 1 "configure: error: $2 couldn't be found" - log 1 "configure: error: you supplied '$1', but it seems invalid" - - exit 1 - fi - - eval "with_$2=0" - - return 0 - fi - - eval "res=\$$2" - log 2 " trying $res... found" - - log 1 "checking $2... found" -} - -detect_zlib() { - detect_pkg_config "$with_zlib" "zlib" "zlib_config" "1.2" -} - -detect_lzo2() { - detect_library "$with_lzo2" "lzo2" "liblzo2.a" "lzo/" "lzo1x.h" -} - -detect_fluidsynth() { - detect_library "$with_fluidsynth" "fluidsynth" "" "" "fluidsynth.h" -} - -detect_pkg_config() { - # $1 - config-param ($with_lzma value) - # $2 - package name ('liblzma') - # $3 - config name ('lzma_config', sets $lzma_config) - # $4 - minimum module version ('2.3') - # $5 - check for dedicated, 1 is "skif if dedicated" - - # 0 means no, 1 is auto-detect, 2 is force - if [ "$1" = "0" ]; then - log 1 "checking $2... disabled" - - eval "$3=\"\"" - return 0 - fi - - if [ "$5" = "1" ] && [ "$1" = "1" ] && [ "$enable_dedicated" != "0" ]; then - log 1 "checking $2... dedicated server, skipping" - - eval "$3=\"\"" - return 0 - fi - - log 2 "detecting $2" - - if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then - pkg_config_call="$pkg_config $2" - else - pkg_config_call="$1" - fi - - version=`$pkg_config_call --modversion 2>/dev/null` - ret=$? - check_version "$4" "$version" - version_ok=$? - log 2 "executing $pkg_config_call --modversion" - log 2 " returned $version" - log 2 " exit code $ret" - - if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then - if [ -n "$version" ] && [ "$version_ok" != "1" ]; then - log 1 "checking $2... needs at least version $4, $2 NOT enabled" - else - log 1 "checking $2... not found" - fi - - # It was forced, so it should be found. - if [ "$1" != "1" ]; then - log 1 "configure: error: $pkg_config $2 couldn't be found" - log 1 "configure: error: you supplied '$1', but it seems invalid" - exit 1 - fi - - eval "$3=\"\"" - return 0 - fi - - eval "$3=\"$pkg_config_call\"" - log 1 "checking $2... found" -} - -detect_lzma() { - detect_pkg_config "$with_lzma" "liblzma" "lzma_config" "5.0" -} - -detect_xdg_basedir() { - detect_pkg_config "$with_xdg_basedir" "libxdg-basedir" "xdg_basedir_config" "1.2" -} - -detect_fcitx() { - if ([ "$with_fcitx" = "1" ] && [ "$enable_dedicated" = "0" ]) || [ "$with_fcitx" = "2" ]; then - if [ -z "$sdl2_config" ]; then - if [ "$with_fcitx" = "2" ]; then - log 1 "configure: error: fcitx requires sdl2" - log 1 "configure: error: you supplied --with-fcitx" - exit 1 - fi - log 1 "checking fcitx... no sdl2, skipping" - fcitx_config="" - dbus_config="" - x11_config="" - return 0 - fi - detect_pkg_config "$with_fcitx" "dbus-1" "dbus_config" "1.0" "1" - detect_pkg_config "$with_fcitx" "x11" "x11_config" "1.0" "1" - if [ -z "$dbus_config" ]; then - log 1 "checking fcitx... no dbus, skipping" - fcitx_config="" - dbus_config="" - x11_config="" - return 0 - elif [ -z "$x11_config" ]; then - log 1 "checking fcitx... no x11, skipping" - fcitx_config="" - dbus_config="" - x11_config="" - return 0 - fi - fi - detect_pkg_config "$with_fcitx" "fcitx" "fcitx_config" "4.0" "1" -} - -detect_png() { - detect_pkg_config "$with_png" "libpng" "png_config" "1.2" -} - -detect_freetype() { - if [ "$with_freetype" = "1" ] && ([ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]); then - log 1 "checking freetype2... WIN32, skipping" - freetype_config="" - return 0 - fi - - detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1" -} - -detect_fontconfig() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_fontconfig" = "0" ]; then - log 1 "checking libfontconfig... disabled" - - fontconfig_config="" - return 0 - fi - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - log 1 "checking libfontconfig... WIN32, skipping" - fontconfig_config="" - return 0 - fi - - if [ "$os" = "OSX" ]; then - log 1 "checking libfontconfig... OSX, skipping" - fontconfig_config="" - return 0 - fi - - detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1" -} - -detect_icu_layout() { - if [ "$with_cocoa" != "0" ] && [ "$with_icu_layout" = "1" ]; then - log 1 "checking icu-lx... OSX, skipping" - icu_layout_config="" - return 0 - fi - - detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1" -} - -detect_icu_sort() { - if [ "$with_cocoa" != "0" ] && [ "$with_icu_sort" = "1" ]; then - log 1 "checking icu-i18n... OSX, skipping" - icu_sort_config="" - return 0 - fi - - detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1" -} - -detect_iconv() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_iconv" = "0" ]; then - log 1 "checking iconv... disabled" - - return 0 - fi - - if [ "$with_iconv" = "1" ] && [ "$os" != "OSX" ]; then - log 1 "checking iconv... not OSX, skipping" - with_iconv="0" - - return 0 - fi - - # Try to find iconv.h, seems to only thing to detect iconv with - - if [ "$with_iconv" = "1" ] || [ "$with_iconv" = "" ] || [ "$with_iconv" = "2" ]; then - # Iterate over search paths - iconv="" - search_paths=`LC_ALL=C $cxx_host $OSX_SYSROOT $CFLAGS -E - -v &1 | \ - $awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag'` - for path in $search_paths; do - iconv=`ls -1 $path 2>/dev/null | grep "iconv.h"` - if [ -n "$iconv" ]; then - break - fi - done - else - # Make sure it exists - iconv=`ls $with_iconv/include/iconv.h 2>/dev/null` - fi - - if [ -z "$iconv" ]; then - log 1 "checking iconv... not found" - if [ "$with_iconv" = "2" ]; then - log 1 "configure: error: iconv couldn't be found" - - exit 1 - elif [ "$with_iconv" != "1" ]; then - log 1 "configure: error: iconv couldn't be found" - log 1 "configure: error: you supplied '$with_iconv', but I couldn't detect iconv in it" - - exit 1 - fi - - return 0 - fi - - if [ "$with_iconv" = "1" ]; then - with_iconv="2" - fi - - log 2 "found iconv in $iconv" - - log 1 "checking iconv... found" - - # There are different implementations of iconv. The older ones, - # e.g. SUSv2, pass a const pointer, whereas the newer ones, e.g. - # IEEE 1003.1 (2004), pass a non-const pointer. - - cat > tmp.iconv.cpp << EOF -#include "src/stdafx.h" -#include -int main() { - static char buf[1024]; - iconv_t convd = 0; - const char *inbuf = ""; - char *outbuf = buf; - size_t outlen = 1023; - size_t inlen = 0; - return iconv(convd, &inbuf, &inlen, &outbuf, &outlen); -} -EOF - execute="$cxx_host $OSX_SYSROOT $CFLAGS -c tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1" - eval $execute > /dev/null - ret=$? - log 2 "executing $execute" - log 2 " exit code $ret" - if [ "$ret" = "0" ]; then have_non_const_iconv="no"; else have_non_const_iconv="yes"; fi - log 1 "checking if iconv has non-const inbuf... $have_non_const_iconv" - - cat > tmp.iconv.cpp << EOF -#include "src/stdafx.h" -#include -int main() { - static char buf[1024]; - iconv_t convd = 0; - char *inbuf = ""; - char *outbuf = buf; - size_t outlen = 1023; - size_t inlen = 0; - return iconv(convd, &inbuf, &inlen, &outbuf, &outlen); -} -EOF - execute="$cxx_host $OSX_SYSROOT $OSX_LD_SYSROOT $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1" - eval $execute > /dev/null - ret=$? - log 2 "executing $execute" - log 2 " exit code $ret" - if [ "$ret" = "0" ]; then link_to_iconv="no"; else link_to_iconv="yes"; fi - log 1 "checking whether to link to iconv... $link_to_iconv" - rm -f tmp.iconv tmp.iconv.cpp -} - -_detect_sort() { - sort_test_in="d -a -c -b" - - sort_test_out="a -b -c -d" - - log 2 "running echo | $1" - - if [ "`echo \"$sort_test_in\" | $1 2>/dev/null`" = "$sort_test_out" ]; then - sort="$1" - log 2 " result was valid" - else - log 2 " result was invalid" - fi -} - -detect_sort() { - if [ "$with_sort" = "0" ]; then - log 1 "checking sort... disabled" - - return - fi - - if [ "$with_sort" = "1" ] || [ "$with_sort" = "2" ]; then - _detect_sort "sort" - if [ -z "$sort" ]; then _detect_sort "/sbin/sort"; fi - if [ -z "$sort" ]; then _detect_sort "/usr/sbin/sort"; fi - if [ -z "$sort" ]; then _detect_sort "/usr/local/sbin/sort"; fi - if [ -z "$sort" ]; then _detect_sort "/bin/sort"; fi - if [ -z "$sort" ]; then _detect_sort "/usr/bin/sort"; fi - if [ -z "$sort" ]; then _detect_sort "/usr/local/bin/sort"; fi - else - _detect_sort "$with_sort" - fi - - if [ -z "$sort" ]; then - if [ "$with_sort" = "2" ]; then - log 1 "checking sort... not found" - - log 1 "configure: error: couldn't detect sort on your system" - exit 1 - elif [ "$with_sort" != "1" ]; then - log 1 "checking sort... $with_sort not found" - - log 1 "configure: error: '$with_sort' doesn't look like a sort to me" - log 1 "configure: error: please verify its location and function and try again" - - exit 1 - else - log 1 "checking sort... not found" - fi - else - log 1 "checking sort... $sort" - fi -} - -detect_grfcodec() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_grfcodec" = "0" ]; then - log 1 "checking grfcodec... disabled" - - grfcodec="" - return 0 - fi - - if [ "$with_grfcodec" = "1" ] || [ "$with_grfcodec" = "" ] || [ "$with_grfcodec" = "2" ]; then - grfcodec="grfcodec" - else - grfcodec="$with_grfcodec" - fi - - version=`$grfcodec -v 2>/dev/null | $awk '{print $3}' | sed 's/[rM]//g;s/-/0/'` - ret=$? - log 2 "executing grfcodec -v" - log 2 " returned $version" - log 2 " exit code $ret" - - if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "985" ]; then - if [ -n "$version" ] && [ "$version" -lt "985" ]; then - log 1 "checking grfcodec... needs at least version 6.0.5 (r985), disabled" - else - log 1 "checking grfcodec... not found" - fi - - # It was forced, so it should be found. - if [ "$with_grfcodec" != "1" ]; then - log 1 "configure: error: grfcodec couldn't be found" - log 1 "configure: error: you supplied '$with_grfcodec', but it seems invalid" - exit 1 - fi - - grfcodec="" - return 0 - fi - - log 1 "checking grfcodec... found" -} - -detect_nforenum() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_nforenum" = "0" ]; then - log 1 "checking nforenum... disabled" - - nforenum="" - return 0 - fi - - if [ "$with_nforenum" = "1" ] || [ "$with_nforenum" = "" ] || [ "$with_nforenum" = "2" ]; then - nforenum="nforenum" - else - nforenum="$with_nforenum" - fi - - version=`$nforenum -v 2>/dev/null | $awk '{print $3}' | sed 's/[rM]//g;s/-/0/'` - ret=$? - log 2 "executing nforenum -v" - log 2 " returned $version" - log 2 " exit code $ret" - - if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "985" ]; then - if [ -n "$version" ] && [ "$version" -lt "985" ]; then - log 1 "checking nforenum... needs at least version 6.0.5 (r985), disabled" - else - log 1 "checking nforenum... not found" - fi - - # It was forced, so it should be found. - if [ "$with_nforenum" != "1" ]; then - log 1 "configure: error: nforenum couldn't be found" - log 1 "configure: error: you supplied '$with_nforenum', but it seems invalid" - exit 1 - fi - - nforenum="" - return 0 - fi - - log 1 "checking nforenum... found" -} - -_detect_cputype_width() { - echo "#define _SQ64 1" > $1.cpp - echo "#include \"src/stdafx.h\"" >> $1.cpp - echo "assert_compile(sizeof(size_t) == $2);" >> $1.cpp - echo "int main() { return 0; }" >> $1.cpp - execute="$cxx_host $CFLAGS -std=c++11 $1.cpp -o $1 -DTESTING 2>&1" - cpu_type="`eval $execute 2>/dev/null`" - ret=$? - log 2 "executing $execute" - log 2 " returned $cpu_type" - log 2 " exit code $ret" - rm -f $1 $1.cpp - return $ret -} - -detect_cputype() { - if [ -n "$cpu_type" ] && [ "$cpu_type" != "DETECT" ]; then - log 1 "forcing cpu-type... $cpu_type bits" - return; - fi - _detect_cputype_width tmp.32bit 4 - result32=$? - _detect_cputype_width tmp.64bit 8 - result64=$? - - if [ "$result32" = 0 ] && [ "$result64" != 0 ]; then - cpu_type="32" - elif [ "$result32" != 0 ] && [ "$result64" = 0 ]; then - cpu_type="64" - else - log 1 "configure: unable to determine cpu-type (pointer width)" - exit 1 - fi - log 1 "detecting cpu-type... $cpu_type bits" -} - -detect_sse_capable_architecture() { - # 0 means no, 1 is auto-detect, 2 is force - if [ "$with_sse" = "0" ]; then - log 1 "checking SSE... disabled" - return - fi - - echo "#define _SQ64 1" > tmp.sse.cpp - echo "#include " >> tmp.sse.cpp - echo "#include " >> tmp.sse.cpp - echo "#include " >> tmp.sse.cpp - echo "int main() { return 0; }" >> tmp.sse.cpp - execute="$cxx_host -msse4.1 $CFLAGS tmp.sse.cpp -o tmp.sse 2>&1" - sse="`eval $execute 2>/dev/null`" - ret=$? - log 2 "executing $execute" - log 2 " returned $sse" - log 2 " exit code $ret" - if [ "$ret" = "0" ]; then - log 1 "detecting SSE... found" - else - # It was forced, so it should be found. - if [ "$with_sse" != "1" ]; then - log 1 "configure: error: SSE couldn't be found" - log 1 "configure: error: you force enabled SSE, but it seems unavailable" - exit 1 - fi - - log 1 "detecting SSE... not found" - with_sse="0" - fi - rm -f tmp.sse tmp.exe tmp.sse.cpp -} - -make_sed() { - T_CFLAGS="$CFLAGS" - T_CXXFLAGS="$CXXFLAGS" - T_LDFLAGS="$LDFLAGS" - - SRC_OBJS_DIR="$BASE_SRC_OBJS_DIR/$OBJS_SUBDIR" - - # All the data needed to compile a single target - # Make sure if you compile multiple targets to - # use multiple OBJS_DIR, because all in-between - # binaries are stored in there, and nowhere else. - SRC_REPLACE=" - s@!!CC_HOST!!@$cc_host@g; - s@!!CXX_HOST!!@$cxx_host@g; - s@!!CC_BUILD!!@$cc_build@g; - s@!!CXX_BUILD!!@$cxx_build@g; - s@!!WINDRES!!@$windres@g; - s@!!STRIP!!@$strip $strip_arg@g; - s@!!LIPO!!@$lipo@g; - s@!!CFLAGS!!@$T_CFLAGS@g; - s@!!CFLAGS_BUILD!!@$CFLAGS_BUILD@g; - s@!!CXXFLAGS!!@$T_CXXFLAGS@g; - s@!!CXXFLAGS_BUILD!!@$CXXFLAGS_BUILD@g; - s@!!STRGEN_FLAGS!!@$strgen_flags@g; - s@!!LIBS!!@$LIBS@g; - s@!!LDFLAGS!!@$T_LDFLAGS@g; - s@!!LDFLAGS_BUILD!!@$LDFLAGS_BUILD@g; - s@!!BIN_DIR!!@$BIN_DIR@g; - s@!!ROOT_DIR!!@$ROOT_DIR@g; - s@!!MEDIA_DIR!!@$MEDIA_DIR@g; - s@!!SOURCE_LIST!!@$SOURCE_LIST@g; - s@!!SRC_OBJS_DIR!!@$SRC_OBJS_DIR@g; - s@!!LANG_OBJS_DIR!!@$LANG_OBJS_DIR@g; - s@!!GRF_OBJS_DIR!!@$GRF_OBJS_DIR@g; - s@!!SETTING_OBJS_DIR!!@$SETTING_OBJS_DIR@g; - s@!!SRC_DIR!!@$SRC_DIR@g; - s@!!SCRIPT_SRC_DIR!!@$SCRIPT_SRC_DIR@g; - s@!!OSXAPP!!@$OSXAPP@g; - s@!!LANG_DIR!!@$LANG_DIR@g; - s@!!TTD!!@$TTD@g; - s@!!BINARY_DIR!!@$prefix_dir/$binary_dir@g; - s@!!DATA_DIR!!@$prefix_dir/$data_dir@g; - s@!!DOC_DIR!!@$prefix_dir/$doc_dir@g; - s@!!MAN_DIR!!@$prefix_dir/$man_dir@g; - s@!!ICON_DIR!!@$prefix_dir/$icon_dir@g; - s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g; - s@!!PERSONAL_DIR!!@$personal_dir@g; - s@!!SHARED_DIR!!@$shared_dir@g; - s@!!INSTALL_DIR!!@$install_dir@g; - s@!!BINARY_NAME!!@$binary_name@g; - s@!!STRGEN!!@$STRGEN@g; - s@!!DEPEND!!@$DEPEND@g; - s@!!SETTINGSGEN!!@$SETTINGSGEN@g; - s@!!STAGE!!@$STAGE@g; - s@!!MAKEDEPEND!!@$makedepend@g; - s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g; - s@!!SORT!!@$sort@g; - s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g; - s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@g; - s@!!CONFIG_CACHE_SOURCE!!@config.cache.source@g; - s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g; - s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g; - s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g; - s@!!CONFIG_CACHE_INVOCATION!!@config.cache.invocation@g; - s@!!LANG_SUPPRESS!!@$lang_suppress@g; - s@!!OBJS_C!!@$OBJS_C@g; - s@!!OBJS_CPP!!@$OBJS_CPP@g; - s@!!OBJS_MM!!@$OBJS_MM@g; - s@!!OBJS_RC!!@$OBJS_RC@g; - s@!!SRCS!!@$SRCS@g; - s@!!OS!!@$os@g; - s@!!CPU_TYPE!!@$cpu_type@g; - s@!!CONFIGURE_FILES!!@$CONFIGURE_FILES@g; - s@!!AWK!!@$awk@g; - s@!!DISTCC!!@$distcc@g; - s@!!NFORENUM!!@$nforenum@g; - s@!!GRFCODEC!!@$grfcodec@g; - s@!!CONFIGURE_INVOCATION!!@`echo "$CONFIGURE_INVOCATION" | sed 's!@!\\\\@!g;s!"!\\\\\\\\"!g'`@g; - " - - if [ "$icon_theme_dir" != "" ]; then - SRC_REPLACE="$SRC_REPLACE - s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g; - " - else - SRC_REPLACE="$SRC_REPLACE - s@!!ICON_THEME_DIR!!@@g; - " - fi - - if [ "$man_dir" != "" ]; then - SRC_REPLACE="$SRC_REPLACE - s@!!MAN_DIR!!@$prefix_dir/$man_dir@g; - " - else - SRC_REPLACE="$SRC_REPLACE - s@!!MAN_DIR!!@@g; - " - fi - - if [ "$menu_dir" != "" ]; then - SRC_REPLACE="$SRC_REPLACE - s@!!MENU_DIR!!@$prefix_dir/$menu_dir@g; - " - else - SRC_REPLACE="$SRC_REPLACE - s@!!MENU_DIR!!@@g; - " - fi -} - -generate_menu_item() { - MENU_REPLACE=" - s@!!TTD!!@$TTD@g; - s@!!MENU_GROUP!!@$menu_group@g; - s@!!MENU_NAME!!@$menu_name@g - " - log 1 "Generating menu item..." - mkdir -p media - < $ROOT_DIR/media/openttd.desktop.in sed "$MENU_REPLACE" > media/openttd.desktop -} - -generate_main() { - STAGE="[MAIN]" - - make_sed - - # Create the main Makefile - log 1 "Generating Makefile..." - echo "# Auto-generated file from 'Makefile.in' -- DO NOT EDIT" > Makefile - < $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" >> Makefile - cp $ROOT_DIR/Makefile.bundle.in Makefile.bundle - echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am - echo >> Makefile.am - # Make the copy of the source-list, so we don't trigger an unwanted recompile - cp $SOURCE_LIST config.cache.source.list - # Add the current directory, so we don't trigger an unwanted recompile - echo "`pwd`" > config.cache.pwd - # Make sure config.cache is OLDER then config.cache.source.list - touch config.cache - touch config.pwd - - if [ "$menu_dir" != "" ]; then - generate_menu_item - fi -} - -generate_lang() { - STAGE="[LANG]" - - make_sed - - # Create the language file - mkdir -p $LANG_OBJS_DIR - - log 1 "Generating lang/Makefile..." - echo "# Auto-generated file from 'Makefile.lang.in' -- DO NOT EDIT" > $LANG_OBJS_DIR/Makefile - < $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" >> $LANG_OBJS_DIR/Makefile - echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am - echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am -} - -generate_settings() { - STAGE="[SETTING]" - - make_sed - - # Create the language file - mkdir -p $SETTING_OBJS_DIR - - log 1 "Generating setting/Makefile..." - echo "# Auto-generated file from 'Makefile.settings.in' -- DO NOT EDIT" > $SETTING_OBJS_DIR/Makefile - < $ROOT_DIR/Makefile.setting.in sed "$SRC_REPLACE" >> $SETTING_OBJS_DIR/Makefile - echo "DIRS += $SETTING_OBJS_DIR" >> Makefile.am -} - -generate_grf() { - STAGE="[BASESET]" - - make_sed - - # Create the language file - mkdir -p $GRF_OBJS_DIR - - log 1 "Generating grf/Makefile..." - echo "# Auto-generated file from 'Makefile.grf.in' -- DO NOT EDIT" > $GRF_OBJS_DIR/Makefile - < $ROOT_DIR/Makefile.grf.in sed "$SRC_REPLACE" >> $GRF_OBJS_DIR/Makefile - echo "DIRS += $GRF_OBJS_DIR" >> Makefile.am -} - -generate_src_normal() { - STAGE=$1 - - make_sed - - # Create the source file - mkdir -p $SRC_OBJS_DIR - - log 1 "Generating $2/Makefile..." - echo "# Auto-generated file from 'Makefile.src.in' -- DO NOT EDIT" > $SRC_OBJS_DIR/Makefile - < $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" >> $SRC_OBJS_DIR/Makefile - echo "DIRS += $SRC_OBJS_DIR" >> Makefile.am - echo "SRC_DIRS += $SRC_OBJS_DIR" >> Makefile.am -} - -generate_src_osx() { - cc_host_orig="$cc_host" - cxx_host_orig="$cxx_host" - CFLAGS_orig="$CFLAGS" - LDFLAGS_orig="$LDFLAGS" - - for type in $enable_universal; do - - if [ -n "$osx_sdk_104_path" ]; then - # Use 10.4 SDK for 32-bit targets - CFLAGS="-isysroot $osx_sdk_104_path $CFLAGS_orig" - LDFLAGS="-Wl,-syslibroot,$osx_sdk_104_path $LDFLAGS_orig" - fi - - # We don't want to duplicate the x86_64 stuff for each target, so do it once here - if [ "$type" = "ppc64" ] || [ "$type" = "x86_64" ]; then - # 64 bits is always 10.5 or higher. Furthermore it has a non const ICONV - # and they also removed support for QuickTime/QuickDraw - if [ -n "$osx_sdk_path" ]; then - CFLAGS="-isysroot $osx_sdk_path $CFLAGS_orig" - LDFLAGS="-Wl,-syslibroot,$osx_sdk_path $LDFLAGS_orig" - fi - CFLAGS="$CFLAGS -D_SQ64" - fi - - case $type in - ppc) - BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc" - cc_host="$cc_host_orig -arch ppc -mmacosx-version-min=10.3" - cxx_host="$cxx_host_orig -arch ppc -mmacosx-version-min=10.3" - generate_src_normal "[ppc]" "objs/ppc";; - ppc970) - BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc970" - cc_host="$cc_host_orig -arch ppc970 -mmacosx-version-min=10.3 -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" - cxx_host="$cxx_host_orig -arch ppc970 -mmacosx-version-min=10.3 -mcpu=G5 -mpowerpc64 -mtune=970 -mcpu=970 -mpowerpc-gpopt" - generate_src_normal "[ppc970]" "objs/ppc970";; - i386) - BASE_SRC_OBJS_DIR="$OBJS_DIR/i386" - cc_host="$cc_host_orig -arch i386 -mmacosx-version-min=10.4" - cxx_host="$cxx_host_orig -arch i386 -mmacosx-version-min=10.4" - generate_src_normal "[i386]" "objs/i386";; - ppc64) - BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc64" - cc_host="$cc_host_orig -arch ppc64 -mmacosx-version-min=10.5" - cxx_host="$cxx_host_orig -arch ppc64 -mmacosx-version-min=10.5" - generate_src_normal "[ppc64]" "objs/ppc64";; - x86_64) - BASE_SRC_OBJS_DIR="$OBJS_DIR/x86_64" - cc_host="$cc_host_orig -arch x86_64 -mmacosx-version-min=10.5" - cxx_host="$cxx_host_orig -arch x86_64 -mmacosx-version-min=10.5" - generate_src_normal "[x86_64]" "objs/x86_64";; - *) log 1 "Unknown architecture requested for universal build: $type";; - esac - done -} - -generate_src() { - if [ "$os" = "OSX" ] && [ "$enable_universal" != "0" ]; then - generate_src_osx - else - generate_src_normal "[SRC]" "objs" - fi -} - -showhelp() { - echo "'configure' configures OpenTTD." - echo "" - echo "Usage: $0 [OPTION]... [VAR=VALUE]..." - echo "" - echo "To assign environment variables (e.g., CC, CFLAGS...), specify them as" - echo "VAR=VALUE. See below for descriptions of some of the useful variables." - echo "" - echo "Defaults for the options are specified in brackets." - echo "" - echo "Configuration:" - echo " -h, --help display this help and exit" - echo "" - echo "System types:" - echo " --build=BUILD configure for building on BUILD [guessed]" - echo " --host=HOST cross-compile to build programs to run" - echo " on HOST [BUILD]" - echo " --windres=WINDRES the windres to use [HOST-windres]" - echo " --strip=STRIP the strip to use [HOST-strip]" - echo " --awk=AWK the awk to use in configure [awk]" - echo " --pkg-config=PKG-CONFIG the pkg-config to use in configure [pkg-config]" - echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]" - echo " --os=OS the OS we are compiling for [DETECT]" - echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/" - echo " NETBSD/HPUX/SUNOS/CYGWIN/" - echo " MINGW/OS2/HAIKU" - echo "" - echo "Paths:" - echo " --prefix-dir=dir specifies the prefix for all installed" - echo " files [/usr/local]" - echo " --binary-dir=dir location of the binary. Will be prefixed" - echo " with the prefix-dir [games]" - echo " --data-dir=dir location of data files (lang, data, gm)." - echo " Will be prefixed with the prefix-dir" - echo " [share/games/openttd]" - echo " --doc-dir=dir location of the doc files" - echo " Will be prefixed with the prefix-dir" - echo " [$doc_dir]" - echo " --icon-dir=dir location of icons. Will be prefixed" - echo " with the prefix-dir [share/pixmaps]" - echo " --icon-theme-dir=dir location of icon theme." - echo " Will be prefixed with the prefix-dir" - echo " and postfixed with size-dirs [$icon_theme_dir]" - echo " --man-dir=dir location of the manual page (UNIX only)" - echo " Will be prefixed with the prefix-dir" - echo " [$man_dir]" - echo " --menu-dir=dir location of the menu item. (UNIX only, except OSX)" - echo " Will be prefixed with the prefix-dir" - echo " [share/applications]" - echo " --personal-dir=dir location of the personal directory" - echo " [os-dependent default]" - echo " --shared-dir=dir location of shared data files" - echo " [os-dependent default]" - echo " --install-dir=dir specifies the root to install to." - echo " Useful to install into jails [/]" - echo " --binary-name the name used for the binary, icons," - echo " desktop file, etc. when installing [openttd]" - echo "" - echo "Features and packages:" - echo " --enable-debug[=LVL] enable debug-mode (LVL=[0123], 0 is release)" - echo " --enable-desync-debug=[LVL] enable desync debug options (LVL=[012], 0 is none" - echo " --enable-profiling enables profiling" - echo " --enable-lto enables GCC's Link Time Optimization (LTO)/ICC's" - echo " Interprocedural Optimization if available" - echo " --enable-dedicated compile a dedicated server (without video)" - echo " --enable-static enable static compile (doesn't work for" - echo " all HOSTs)" - echo " --enable-translator enable extra output for translators" - echo " --enable-universal[=ARCH] enable universal builds (OSX ONLY). Allowed is any combination" - echo " of architectures: i386 ppc ppc970 ppc64 x86_64" - echo " Default architectures are: i386 ppc" - echo " --enable-osx-g5 enables optimizations for ppc970 (G5) (OSX ONLY)" - echo " --disable-cocoa-quartz disable the quartz window mode driver for Cocoa (OSX ONLY)" - echo " --disable-unicode disable unicode support to build win9x" - echo " version (Win32 ONLY)" - echo " --enable-console compile as a console application instead of as a GUI application." - echo " If this setting is active, debug output will appear in the same" - echo " console instead of opening a new window. (Win32 ONLY)" - echo " --disable-assert disable asserts (continue on errors)" - echo " --enable-strip enable any possible stripping" - echo " --without-osx-sysroot disable the automatic adding of sysroot " - echo " (OSX ONLY)" - echo " --without-application-bundle disable generation of application bundle" - echo " (OSX ONLY)" - echo " --without-menu-entry Don't generate a menu item (Freedesktop based only)" - echo " --menu-group=group Category in which the menu item will be placed (Freedesktop based only)" - echo " --menu-name=name Name of the menu item when placed [OpenTTD]" - echo " --with-direct-music enable direct music support (Win32 ONLY)" - echo " --with-sort=sort define a non-default location for sort" - echo " --with-midi=midi define which midi-player to use" - echo " --with-midi-arg=arg define which args to use for the" - echo " midi-player" - echo " --with-fluidsynth enables fluidsynth support" - echo " --with-allegro[=\"pkg-config allegro\"]" - echo " enables Allegro video driver support" - echo " --with-cocoa enables COCOA video driver (OSX ONLY)" - echo " --with-sdl[=\"sdl1|sdl2\"] enables SDL video driver support" - echo " --with-zlib[=\"pkg-config zlib\"]" - echo " enables zlib support" - echo " --with-liblzma[=\"pkg-config liblzma\"]" - echo " enables liblzma support" - echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support" - echo " --with-png[=\"pkg-config libpng\"]" - echo " enables libpng support" - echo " --with-freetype[=\"pkg-config freetype2\"]" - echo " enables libfreetype support" - echo " --with-fontconfig[=\"pkg-config fontconfig\"]" - echo " enables fontconfig support" - echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]" - echo " enables XDG base directory support" - echo " --with-icu enables icu components for layout and sorting" - echo " --with-icu-layout[=\"pkg-config icu-lx\"]" - echo " enables icu components for layouting (right-to-left support)" - echo " --with-icu-sort[=\"pkg-config icu-i18n\"]" - echo " enables icu components for locale specific string sorting" - echo " --static-icu try to link statically (libsicu instead of" - echo " libicu; can fail as the new name is guessed)" - echo " --with-iconv[=iconv-path] enables iconv support" - echo " --disable-builtin-depend disable use of builtin deps finder" - echo " --with-makedepend[=makedepend] enables makedepend support" - echo " --with-ccache enables ccache support" - echo " --with-distcc enables distcc support" - echo " --without-grfcodec disable usage of grfcodec and re-generation of base sets" - echo " --without-threads disable threading support" - echo " --without-sse disable SSE support (x86/x86_64 only)" - echo " --without-libbfd disable libbfd support, used for improved crash logs (MinGW and Unix/glibc only)" - echo " --without-bfd-extra-debug disable extra debugging information when using libbfd (MinGW and Unix/glibc only)" - echo " --without-self-gdb-debug disable improved crash logs using gdb (Linux only)" - echo " --without-self-lldb-debug disable improved crash logs using lldb (OSX only)" - echo "" - echo "Some influential environment variables:" - echo " CC C compiler command" - echo " CXX C++ compiler command" - echo " CFLAGS C compiler flags" - echo " CXXFLAGS C++ compiler flags" - echo " WINDRES windres command" - echo " LDFLAGS linker flags, e.g. -L if you" - echo " have libraries in a nonstandard" - echo " directory " - echo " CFLAGS_BUILD C compiler flags for build time tool generation" - echo " CXXFLAGS_BUILD C++ compiler flags for build time tool generation" - echo " LDFLAGS_BUILD linker flags for build time tool generation" - echo " PKG_CONFIG_PATH additional library search paths (see \"man pkg-config\")" - echo " PKG_CONFIG_LIBDIR replace the default library search path (see \"man pkg-config\")" - echo "" - echo "Use these variables to override the choices made by 'configure' or to help" - echo "it to find libraries and programs with nonstandard names/locations." -} diff --git a/configure b/configure deleted file mode 100755 index 15a30723ff..0000000000 --- a/configure +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/sh - -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -check_path_characters() { - if [ -n "`echo $ROOT_DIR | grep '[^-_A-Za-z0-9\/\\\.:]'`" ]; then - echo "WARNING: The path contains a non-alphanumeric character that might cause" - echo " failures in subsequent build stages. Any failures with the build" - echo " will most likely be caused by this." - fi -} - -CONFIGURE_EXECUTABLE="$_" -# On *nix systems those two are equal when ./configure is done -if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then - # On some systems, when ./configure is triggered from 'make' - # the $_ is filled with 'make'. So if that is true, skip 'make' - # and use $0 (and hope that is correct ;)) - if [ -n "`echo $CONFIGURE_EXECUTABLE | grep make`" ]; then - CONFIGURE_EXECUTABLE="$0" - else - CONFIGURE_EXECUTABLE="$CONFIGURE_EXECUTABLE $0" - fi -fi -# Find out where configure is (in what dir) -ROOT_DIR="`dirname $0`" -# For MSYS/MinGW we want to know the FULL path. This as that path is generated -# once you call an outside binary. Having the same path for the rest is needed -# for dependency checking. -# pwd -W returns said FULL path, but doesn't exist on others so fall back. -ROOT_DIR="`cd $ROOT_DIR && (pwd -W 2>/dev/null || pwd 2>/dev/null)`" - -check_path_characters - -# Same here as for the ROOT_DIR above -PWD="`pwd -W 2>/dev/null || pwd 2>/dev/null`" -PREFIX="$PWD/bin" - -. $ROOT_DIR/config.lib - -# Set default dirs -OBJS_DIR="$PWD/objs" -BASE_SRC_OBJS_DIR="$OBJS_DIR" -LANG_OBJS_DIR="$OBJS_DIR/lang" -GRF_OBJS_DIR="$OBJS_DIR/extra_grf" -SETTING_OBJS_DIR="$OBJS_DIR/setting" -BIN_DIR="$PREFIX" -SRC_DIR="$ROOT_DIR/src" -LANG_DIR="$SRC_DIR/lang" -MEDIA_DIR="$ROOT_DIR/media" -SOURCE_LIST="$ROOT_DIR/source.list" - -if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then - if [ ! -f "config.cache" ]; then - echo "can't reconfigure, because never configured before" - exit 1 - fi - # Make sure we don't lock config.cache - cat config.cache | sed 's@\\ @\\\\ @g' > cache.tmp - sh cache.tmp - RET=$? - rm -f cache.tmp - exit $RET -fi - -set_default -detect_params "$@" -check_params -save_params -make_cflags_and_ldflags - -EXE="" -if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ]; then - EXE=".exe" -fi - -TTD="openttd$EXE" -STRGEN="strgen$EXE" -DEPEND="depend$EXE" -SETTINGSGEN="settings_gen$EXE" - -if [ -z "$sort" ]; then - PIPE_SORT="sed s@a@a@" -else - PIPE_SORT="$sort" -fi - -if [ ! -f "$LANG_DIR/english.txt" ]; then - echo "Languages not found in $LANG_DIR. Can't continue without it." - echo "Please make sure the dir exists and contains at least english.txt" -fi - -# Read the source.list and process it -AWKCOMMAND=' - { } - /^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; } - /^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; } - /^( *)#if/ { - gsub(" ", "", $0); - gsub("^#if ", "", $0); - - if (deep != skip) { deep += 1; next; } - - deep += 1; - - if ($0 == "ALLEGRO" && "'$allegro_config'" == "") { next; } - if ($0 == "SDL" && "'$sdl_config'" == "") { next; } - if ($0 == "SDL2" && "'$sdl2_config'" == "") { next; } - if ($0 == "PNG" && "'$png_config'" == "") { next; } - if ($0 == "OSX" && "'$os'" != "OSX") { next; } - if ($0 == "OS2" && "'$os'" != "OS2") { next; } - if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } - if ($0 == "AI" && "'$enable_ai'" == "0") { next; } - if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; } - if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; } - if ($0 == "WIN32" && "'$os'" != "MINGW" && - "'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; } - if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } - if ($0 == "MINGW" && "'$os'" != "MINGW") { next; } - if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; } - if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; } - if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; } - if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; } - if ($0 == "USE_SSE" && "'$with_sse'" != "1") { next; } - - skip += 1; - - next; - } - /^( *)#/ { next } - /^$/ { next } - /\.h$/ { next } - /\.hpp$/ { next } - { - if (deep == skip) { - gsub(" ", "", $0); - print $0; - } - } -' - -# Read the source.list and process it -# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations -SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`" - -OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`" -OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`" -OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.mm$/ { gsub(\".mm$\", \".o\", $0); print $0; }'`" -OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.rc$/ { gsub(\".rc$\", \".o\", $0); print $0; }'`" -SRCS="` echo \"$SRCS\" | $awk ' { ORS = \" \" } { print $0; }'`" - -# In makefiles, we always use -u for sort -if [ -z "$sort" ]; then - sort="sed s@a@a@" -else - sort="$sort -u" -fi - -CONFIGURE_FILES="$ROOT_DIR/configure $ROOT_DIR/config.lib $ROOT_DIR/Makefile.in $ROOT_DIR/Makefile.grf.in $ROOT_DIR/Makefile.lang.in $ROOT_DIR/Makefile.src.in $ROOT_DIR/Makefile.bundle.in $ROOT_DIR/Makefile.setting.in" - -generate_main -generate_lang -generate_settings -generate_grf -generate_src - -check_path_characters diff --git a/findversion.sh b/findversion.sh deleted file mode 100755 index fb62f92814..0000000000 --- a/findversion.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/sh - -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - - -# Arguments given? Show help text. -if [ "$#" != "0" ]; then - cat <\t\t\t -VERSION - a string describing what version of the code the current checkout is - based on. - This also includes the commit date, an indication of whether the checkout - was modified and which branch was checked out. This value is not - guaranteed to be sortable, but is mainly meant for identifying the - revision and user display. - - If no revision identifier could be found, this is left empty. -ISODATE - the commit date of the revision this checkout is based on. - The commit date may differ from the author date. - This can be used to decide upon the age of the source. - - If no timestamp could be found, this is left empty. -MODIFIED - Whether (the src directory of) this checkout is modified or not. A - value of 0 means not modified, a value of 2 means it was modified. - - A value of 1 means that the modified status is unknown, because this - is not an git checkout for example. - -HASH - the git revision hash - -By setting the AWK environment variable, a caller can determine which -version of "awk" is used. If nothing is set, this script defaults to -"awk". -EOF -exit 1; -fi - -# Allow awk to be provided by the caller. -if [ -z "$AWK" ]; then - AWK=awk -fi - -# Find out some dirs -cd `dirname "$0"` -ROOT_DIR=`pwd` - -# Determine if we are using a modified version -# Assume the dir is not modified -MODIFIED="0" -if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then - # We are a git checkout - # Refresh the index to make sure file stat info is in sync, then look for modifications - git update-index --refresh >/dev/null - if [ -n "`git diff-index HEAD`" ]; then - MODIFIED="2" - fi - HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null` - SHORTHASH=`echo ${HASH} | cut -c1-10` - ISODATE=`LC_ALL=C git show -s --pretty='format:%ci' HEAD | "$AWK" '{ gsub("-", "", $1); print $1 }'` - YEAR=`echo ${ISODATE} | cut -c1-4` - BRANCH="`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@'`" - TAG="`git describe --tags 2>/dev/null`" - - if [ "$MODIFIED" -eq "0" ]; then - hashprefix="-g" - elif [ "$MODIFIED" -eq "2" ]; then - hashprefix="-m" - else - hashprefix="-u" - fi - - if [ -n "$TAG" ]; then - VERSION="${TAG}" - ISTAG="1" - if [ -n "`echo \"${TAG}\" | grep \"^[0-9.]*$\"`" ]; then - ISSTABLETAG="1" - else - ISSTABLETAG="0" - fi - else - VERSION="${ISODATE}-${BRANCH}${hashprefix}${SHORTHASH}" - ISTAG="0" - ISSTABLETAG="0" - fi -elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then - VERSION_DATA="`cat "$ROOT_DIR/.ottdrev-vc" | sed -n -e '1 p;'`" - HASH_DATA="`cat "$ROOT_DIR/.ottdrev-vc" | sed -n -e '2 p;'`" - VERSION="`echo "$VERSION_DATA" | cut -f 1 -d' '`" - ISODATE="`echo "$VERSION_DATA" | cut -f 2 -d' '`" - MODIFIED="`echo "$VERSION_DATA" | cut -f 3 -d' '`" - HASH="`echo "$VERSION_DATA" | cut -f 4 -d' '`" - ISTAG="`echo "$VERSION_DATA" | cut -f 5 -d' '`" - ISSTABLETAG="`echo "$VERSION_DATA" | cut -f 6 -d' '`" - YEAR="`echo "$VERSION_DATA" | cut -f 7 -d' '`" - if [ -z "$ISTAG" ]; then - ISTAG="0" - fi - if [ -z "$ISSTABLETAG" ]; then - ISSTABLETAG="0" - fi - if [ -z "$YEAR" ]; then - YEAR=`echo ${ISODATE} | cut -c1-4` - fi - if [ "$MODIFIED" = "2" ]; then - VERSION="`echo "$VERSION" | sed -e 's/M$//'`" - fi - if ! $ROOT_DIR/version_utils.sh -o; then - MODIFIED="1" - else - CURRENT_HASH="`$ROOT_DIR/version_utils.sh -s`" - if [ "$CURRENT_HASH" != "$HASH_DATA" ]; then - MODIFIED="2" - VERSION="${VERSION}-H`echo "$CURRENT_HASH" | cut -c 1-8`" - fi - fi -elif [ -f "$ROOT_DIR/.ottdrev" ]; then - # We are an exported source bundle - cat $ROOT_DIR/.ottdrev - exit -else - # We don't know - MODIFIED="1" - HASH="" - SHORTHASH="" - BRANCH="" - ISODATE="" - YEAR="" - TAG="" - VERSION="" - ISTAG="0" - ISSTABLETAG="0" -fi - -if [ "$MODIFIED" -eq "2" ]; then - VERSION="${VERSION}M" -fi - -echo "$VERSION $ISODATE $MODIFIED $HASH $ISTAG $ISSTABLETAG $YEAR" diff --git a/media/baseset/CMakeLists.txt b/media/baseset/CMakeLists.txt new file mode 100644 index 0000000000..c3fe34ce4e --- /dev/null +++ b/media/baseset/CMakeLists.txt @@ -0,0 +1,87 @@ +add_subdirectory(openttd) +add_subdirectory(orig_extra) + +set(BASESET_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/orig_dos.obg + ${CMAKE_CURRENT_SOURCE_DIR}/orig_dos_de.obg + ${CMAKE_CURRENT_SOURCE_DIR}/orig_win.obg + ${CMAKE_CURRENT_SOURCE_DIR}/no_music.obm + ${CMAKE_CURRENT_SOURCE_DIR}/orig_dos.obm + ${CMAKE_CURRENT_SOURCE_DIR}/orig_tto.obm + ${CMAKE_CURRENT_SOURCE_DIR}/orig_win.obm + ${CMAKE_CURRENT_SOURCE_DIR}/no_sound.obs + ${CMAKE_CURRENT_SOURCE_DIR}/orig_dos.obs + ${CMAKE_CURRENT_SOURCE_DIR}/orig_win.obs +) +set(BASESET_OTHER_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/openttd.grf + ${CMAKE_CURRENT_SOURCE_DIR}/opntitle.dat + ${CMAKE_CURRENT_SOURCE_DIR}/orig_extra.grf +) + +# Done by the subdirectories, if nforenum / grfcodec is installed +if (GRFCODEC_FOUND) + set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/openttd.grf PROPERTIES GENERATED TRUE) + set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/orig_extra.grf PROPERTIES GENERATED TRUE) + + list(APPEND BASESET_BINARY_FILES openttd.grf) + list(APPEND BASESET_BINARY_FILES orig_extra.grf) +endif (GRFCODEC_FOUND) + +set(BASESET_EXTRAGRF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/orig_extra.grf) + +# Walk over all the baseset files, and generate a command to configure them +foreach(BASESET_SOURCE_FILE IN LISTS BASESET_SOURCE_FILES) + get_filename_component(BASESET_SOURCE_FILE_NAME "${BASESET_SOURCE_FILE}" NAME) + set(BASESET_BINARY_FILE "${CMAKE_BINARY_DIR}/baseset/${BASESET_SOURCE_FILE_NAME}") + + get_target_property(LANG_SOURCE_FILES language_files LANG_SOURCE_FILES) + + add_custom_command_timestamp(OUTPUT ${BASESET_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} + -DBASESET_SOURCE_FILE=${BASESET_SOURCE_FILE} + -DBASESET_BINARY_FILE=${BASESET_BINARY_FILE} + -DBASESET_EXTRAGRF_FILE=${BASESET_EXTRAGRF_FILE} + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/Baseset.cmake + -- + ${LANG_SOURCE_FILES} + MAIN_DEPENDENCY ${BASESET_SOURCE_FILE} + DEPENDS ${LANG_SOURCE_FILES} + ${BASESET_EXTRAGRF_FILE} + ${CMAKE_SOURCE_DIR}/cmake/scripts/Baseset.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating ${BASESET_SOURCE_FILE_NAME} baseset metadata file" + ) + + list(APPEND BASESET_BINARY_FILES ${BASESET_BINARY_FILE}) +endforeach(BASESET_SOURCE_FILE) + +# Walk over all the other baseset files, and generate a command to copy them +foreach(BASESET_OTHER_SOURCE_FILE IN LISTS BASESET_OTHER_SOURCE_FILES) + get_filename_component(BASESET_OTHER_SOURCE_FILE_NAME "${BASESET_OTHER_SOURCE_FILE}" NAME) + set(BASESET_OTHER_BINARY_FILE "${CMAKE_BINARY_DIR}/baseset/${BASESET_OTHER_SOURCE_FILE_NAME}") + + add_custom_command(OUTPUT ${BASESET_OTHER_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} -E copy + ${BASESET_OTHER_SOURCE_FILE} + ${BASESET_OTHER_BINARY_FILE} + MAIN_DEPENDENCY ${BASESET_OTHER_SOURCE_FILE} + COMMENT "Copying ${BASESET_OTHER_SOURCE_FILE_NAME} baseset file" + ) + + list(APPEND BASESET_BINARY_FILES ${BASESET_OTHER_BINARY_FILE}) +endforeach(BASESET_OTHER_SOURCE_FILE) + +# Create a new target which generates all baseset metadata files +add_custom_target_timestamp(baseset_files + DEPENDS + ${BASESET_BINARY_FILES} +) + +add_library(basesets + INTERFACE +) +add_dependencies(basesets + baseset_files +) +add_library(openttd::basesets ALIAS basesets) diff --git a/media/baseset/no_music.obm b/media/baseset/no_music.obm index e395ba0b0e..3b8b9657ae 100644 --- a/media/baseset/no_music.obm +++ b/media/baseset/no_music.obm @@ -5,7 +5,7 @@ name = NoMusic shortname = NULL version = 0 fallback = true -!! description STR_BASEMUSIC_NONE_DESCRIPTION +@description_STR_BASEMUSIC_NONE_DESCRIPTION@ [files] theme = diff --git a/media/baseset/no_sound.obs b/media/baseset/no_sound.obs index fd2430de54..3b546d5bb4 100644 --- a/media/baseset/no_sound.obs +++ b/media/baseset/no_sound.obs @@ -5,7 +5,7 @@ name = NoSound shortname = NULL version = 2 fallback = true -!! description STR_BASESOUNDS_NONE_DESCRIPTION +@description_STR_BASESOUNDS_NONE_DESCRIPTION@ [files] samples = diff --git a/bin/baseset/openttd.grf b/media/baseset/openttd.grf similarity index 100% rename from bin/baseset/openttd.grf rename to media/baseset/openttd.grf diff --git a/media/extra_grf/2ccmap.nfo b/media/baseset/openttd/2ccmap.nfo similarity index 100% rename from media/extra_grf/2ccmap.nfo rename to media/baseset/openttd/2ccmap.nfo diff --git a/media/baseset/openttd/CMakeLists.txt b/media/baseset/openttd/CMakeLists.txt new file mode 100644 index 0000000000..c4f8d61ade --- /dev/null +++ b/media/baseset/openttd/CMakeLists.txt @@ -0,0 +1,9 @@ +# In case both NFORenum and GRFCodec are found, generate the GRF. +# Otherwise, just use them from the cache (read: git). +# This is mainly because not many people have both of these tools installed, +# so it is cheaper to cache them in git, and only regenerate when you are +# working on it / have the tools installed. +if (GRFCODEC_FOUND) + include(CreateGrfCommand) + create_grf_command() +endif (GRFCODEC_FOUND) diff --git a/media/extra_grf/airport_preview.nfo b/media/baseset/openttd/airport_preview.nfo similarity index 100% rename from media/extra_grf/airport_preview.nfo rename to media/baseset/openttd/airport_preview.nfo diff --git a/media/extra_grf/airport_preview.png b/media/baseset/openttd/airport_preview.png similarity index 100% rename from media/extra_grf/airport_preview.png rename to media/baseset/openttd/airport_preview.png diff --git a/media/extra_grf/airports.nfo b/media/baseset/openttd/airports.nfo similarity index 100% rename from media/extra_grf/airports.nfo rename to media/baseset/openttd/airports.nfo diff --git a/media/extra_grf/airports.png b/media/baseset/openttd/airports.png similarity index 100% rename from media/extra_grf/airports.png rename to media/baseset/openttd/airports.png diff --git a/media/extra_grf/aqueduct.nfo b/media/baseset/openttd/aqueduct.nfo similarity index 100% rename from media/extra_grf/aqueduct.nfo rename to media/baseset/openttd/aqueduct.nfo diff --git a/media/extra_grf/aqueduct.png b/media/baseset/openttd/aqueduct.png similarity index 100% rename from media/extra_grf/aqueduct.png rename to media/baseset/openttd/aqueduct.png diff --git a/media/extra_grf/autorail.nfo b/media/baseset/openttd/autorail.nfo similarity index 100% rename from media/extra_grf/autorail.nfo rename to media/baseset/openttd/autorail.nfo diff --git a/media/extra_grf/autorail.png b/media/baseset/openttd/autorail.png similarity index 100% rename from media/extra_grf/autorail.png rename to media/baseset/openttd/autorail.png diff --git a/media/extra_grf/canal_locks.png b/media/baseset/openttd/canal_locks.png similarity index 100% rename from media/extra_grf/canal_locks.png rename to media/baseset/openttd/canal_locks.png diff --git a/media/extra_grf/canals.nfo b/media/baseset/openttd/canals.nfo similarity index 100% rename from media/extra_grf/canals.nfo rename to media/baseset/openttd/canals.nfo diff --git a/media/extra_grf/canals.png b/media/baseset/openttd/canals.png similarity index 100% rename from media/extra_grf/canals.png rename to media/baseset/openttd/canals.png diff --git a/media/extra_grf/chars.nfo b/media/baseset/openttd/chars.nfo similarity index 100% rename from media/extra_grf/chars.nfo rename to media/baseset/openttd/chars.nfo diff --git a/media/extra_grf/chars.png b/media/baseset/openttd/chars.png similarity index 100% rename from media/extra_grf/chars.png rename to media/baseset/openttd/chars.png diff --git a/media/extra_grf/elrails.nfo b/media/baseset/openttd/elrails.nfo similarity index 100% rename from media/extra_grf/elrails.nfo rename to media/baseset/openttd/elrails.nfo diff --git a/media/extra_grf/elrails.png b/media/baseset/openttd/elrails.png similarity index 100% rename from media/extra_grf/elrails.png rename to media/baseset/openttd/elrails.png diff --git a/media/extra_grf/flags.nfo b/media/baseset/openttd/flags.nfo similarity index 100% rename from media/extra_grf/flags.nfo rename to media/baseset/openttd/flags.nfo diff --git a/media/extra_grf/flags.png b/media/baseset/openttd/flags.png similarity index 100% rename from media/extra_grf/flags.png rename to media/baseset/openttd/flags.png diff --git a/media/extra_grf/foundations.nfo b/media/baseset/openttd/foundations.nfo similarity index 100% rename from media/extra_grf/foundations.nfo rename to media/baseset/openttd/foundations.nfo diff --git a/media/extra_grf/foundations.png b/media/baseset/openttd/foundations.png similarity index 100% rename from media/extra_grf/foundations.png rename to media/baseset/openttd/foundations.png diff --git a/media/extra_grf/mono.nfo b/media/baseset/openttd/mono.nfo similarity index 100% rename from media/extra_grf/mono.nfo rename to media/baseset/openttd/mono.nfo diff --git a/media/extra_grf/mono.png b/media/baseset/openttd/mono.png similarity index 100% rename from media/extra_grf/mono.png rename to media/baseset/openttd/mono.png diff --git a/media/extra_grf/oneway.nfo b/media/baseset/openttd/oneway.nfo similarity index 100% rename from media/extra_grf/oneway.nfo rename to media/baseset/openttd/oneway.nfo diff --git a/media/extra_grf/oneway.png b/media/baseset/openttd/oneway.png similarity index 100% rename from media/extra_grf/oneway.png rename to media/baseset/openttd/oneway.png diff --git a/media/extra_grf/openttd.nfo b/media/baseset/openttd/openttd.nfo similarity index 100% rename from media/extra_grf/openttd.nfo rename to media/baseset/openttd/openttd.nfo diff --git a/media/extra_grf/openttdgui.nfo b/media/baseset/openttd/openttdgui.nfo similarity index 100% rename from media/extra_grf/openttdgui.nfo rename to media/baseset/openttd/openttdgui.nfo diff --git a/media/extra_grf/openttdgui.png b/media/baseset/openttd/openttdgui.png similarity index 100% rename from media/extra_grf/openttdgui.png rename to media/baseset/openttd/openttdgui.png diff --git a/media/extra_grf/openttdgui_build_tram.png b/media/baseset/openttd/openttdgui_build_tram.png similarity index 100% rename from media/extra_grf/openttdgui_build_tram.png rename to media/baseset/openttd/openttdgui_build_tram.png diff --git a/media/extra_grf/openttdgui_convert_road.png b/media/baseset/openttd/openttdgui_convert_road.png similarity index 100% rename from media/extra_grf/openttdgui_convert_road.png rename to media/baseset/openttd/openttdgui_convert_road.png diff --git a/media/extra_grf/openttdgui_convert_tram.png b/media/baseset/openttd/openttdgui_convert_tram.png similarity index 100% rename from media/extra_grf/openttdgui_convert_tram.png rename to media/baseset/openttd/openttdgui_convert_tram.png diff --git a/media/extra_grf/openttdgui_group_livery.png b/media/baseset/openttd/openttdgui_group_livery.png similarity index 100% rename from media/extra_grf/openttdgui_group_livery.png rename to media/baseset/openttd/openttdgui_group_livery.png diff --git a/media/extra_grf/palette.nfo b/media/baseset/openttd/palette.nfo similarity index 100% rename from media/extra_grf/palette.nfo rename to media/baseset/openttd/palette.nfo diff --git a/media/extra_grf/roadstops.nfo b/media/baseset/openttd/roadstops.nfo similarity index 100% rename from media/extra_grf/roadstops.nfo rename to media/baseset/openttd/roadstops.nfo diff --git a/media/extra_grf/roadstops.png b/media/baseset/openttd/roadstops.png similarity index 100% rename from media/extra_grf/roadstops.png rename to media/baseset/openttd/roadstops.png diff --git a/media/extra_grf/signals.nfo b/media/baseset/openttd/signals.nfo similarity index 100% rename from media/extra_grf/signals.nfo rename to media/baseset/openttd/signals.nfo diff --git a/media/extra_grf/signals.png b/media/baseset/openttd/signals.png similarity index 100% rename from media/extra_grf/signals.png rename to media/baseset/openttd/signals.png diff --git a/media/extra_grf/sloped_tracks.nfo b/media/baseset/openttd/sloped_tracks.nfo similarity index 100% rename from media/extra_grf/sloped_tracks.nfo rename to media/baseset/openttd/sloped_tracks.nfo diff --git a/media/extra_grf/sloped_tracks.png b/media/baseset/openttd/sloped_tracks.png similarity index 100% rename from media/extra_grf/sloped_tracks.png rename to media/baseset/openttd/sloped_tracks.png diff --git a/media/extra_grf/tramtracks.nfo b/media/baseset/openttd/tramtracks.nfo similarity index 100% rename from media/extra_grf/tramtracks.nfo rename to media/baseset/openttd/tramtracks.nfo diff --git a/media/extra_grf/tramtracks.png b/media/baseset/openttd/tramtracks.png similarity index 100% rename from media/extra_grf/tramtracks.png rename to media/baseset/openttd/tramtracks.png diff --git a/media/extra_grf/tramtracks_bare_depot.png b/media/baseset/openttd/tramtracks_bare_depot.png similarity index 100% rename from media/extra_grf/tramtracks_bare_depot.png rename to media/baseset/openttd/tramtracks_bare_depot.png diff --git a/media/extra_grf/tunnel_portals.nfo b/media/baseset/openttd/tunnel_portals.nfo similarity index 100% rename from media/extra_grf/tunnel_portals.nfo rename to media/baseset/openttd/tunnel_portals.nfo diff --git a/media/extra_grf/tunnel_portals.png b/media/baseset/openttd/tunnel_portals.png similarity index 100% rename from media/extra_grf/tunnel_portals.png rename to media/baseset/openttd/tunnel_portals.png diff --git a/bin/baseset/opntitle.dat b/media/baseset/opntitle.dat similarity index 100% rename from bin/baseset/opntitle.dat rename to media/baseset/opntitle.dat diff --git a/media/baseset/orig_dos.obg b/media/baseset/orig_dos.obg index d56a63712f..ebb27ee7b5 100644 --- a/media/baseset/orig_dos.obg +++ b/media/baseset/orig_dos.obg @@ -6,7 +6,7 @@ name = original_dos shortname = TTDD version = 1 palette = DOS -!! description STR_BASEGRAPHICS_DOS_DESCRIPTION +@description_STR_BASEGRAPHICS_DOS_DESCRIPTION@ [files] base = TRG1.GRF @@ -22,7 +22,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8 TRGC.GRF = ed446637e034104c5559b32c18afe78d TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9 TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6 -ORIG_EXTRA.GRF = +ORIG_EXTRA.GRF = ${ORIG_EXTRA_GRF_MD5} [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/media/baseset/orig_dos.obm b/media/baseset/orig_dos.obm index 0b51c2db84..49c0f67703 100644 --- a/media/baseset/orig_dos.obm +++ b/media/baseset/orig_dos.obm @@ -5,7 +5,7 @@ name = original_dos shortname = TTDD version = 1 -!! description STR_BASEMUSIC_DOS_DESCRIPTION +@description_STR_BASEMUSIC_DOS_DESCRIPTION@ [files] theme = gm.cat diff --git a/media/baseset/orig_dos.obs b/media/baseset/orig_dos.obs index 60afc854f0..c500fe0e4d 100644 --- a/media/baseset/orig_dos.obs +++ b/media/baseset/orig_dos.obs @@ -5,7 +5,7 @@ name = original_dos shortname = TTDO version = 0 -!! description STR_BASESOUNDS_DOS_DESCRIPTION +@description_STR_BASESOUNDS_DOS_DESCRIPTION@ [files] samples = SAMPLE.CAT diff --git a/media/baseset/orig_dos_de.obg b/media/baseset/orig_dos_de.obg index 388d685025..b8251ab7b2 100644 --- a/media/baseset/orig_dos_de.obg +++ b/media/baseset/orig_dos_de.obg @@ -6,7 +6,7 @@ name = original_dos_de shortname = TTDD version = 0 palette = DOS -!! description STR_BASEGRAPHICS_DOS_DE_DESCRIPTION +@description_STR_BASEGRAPHICS_DOS_DE_DESCRIPTION@ [files] base = TRG1.GRF @@ -22,7 +22,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8 TRGC.GRF = ed446637e034104c5559b32c18afe78d TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9 TRGT.GRF = fcde1d7e8a74197d72a62695884b909e -ORIG_EXTRA.GRF = +ORIG_EXTRA.GRF = ${ORIG_EXTRA_GRF_MD5} [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/bin/baseset/orig_extra.grf b/media/baseset/orig_extra.grf similarity index 100% rename from bin/baseset/orig_extra.grf rename to media/baseset/orig_extra.grf diff --git a/media/baseset/orig_extra/CMakeLists.txt b/media/baseset/orig_extra/CMakeLists.txt new file mode 100644 index 0000000000..36a25329f5 --- /dev/null +++ b/media/baseset/orig_extra/CMakeLists.txt @@ -0,0 +1,14 @@ +# In case both NFORenum and GRFCodec are found, generate the GRF. +# Otherwise, just use them from the cache (read: git). +# This is mainly because not many people have both of these tools installed, +# so it is cheaper to cache them in git, and only regenerate when you are +# working on it / have the tools installed. +if (GRFCODEC_FOUND) + include(CreateGrfCommand) + create_grf_command( + # We share some files with 'openttd' grf + ${CMAKE_CURRENT_SOURCE_DIR}/../openttd/airports.png + ${CMAKE_CURRENT_SOURCE_DIR}/../openttd/canals.png + ${CMAKE_CURRENT_SOURCE_DIR}/../openttd/chars.png + ) +endif (GRFCODEC_FOUND) diff --git a/media/extra_grf/airports_orig_extra.nfo b/media/baseset/orig_extra/airports_orig_extra.nfo similarity index 100% rename from media/extra_grf/airports_orig_extra.nfo rename to media/baseset/orig_extra/airports_orig_extra.nfo diff --git a/media/extra_grf/canals_extra.nfo b/media/baseset/orig_extra/canals_extra.nfo similarity index 100% rename from media/extra_grf/canals_extra.nfo rename to media/baseset/orig_extra/canals_extra.nfo diff --git a/media/extra_grf/chars_orig_extra.nfo b/media/baseset/orig_extra/chars_orig_extra.nfo similarity index 100% rename from media/extra_grf/chars_orig_extra.nfo rename to media/baseset/orig_extra/chars_orig_extra.nfo diff --git a/media/extra_grf/fix_graphics.nfo b/media/baseset/orig_extra/fix_graphics.nfo similarity index 100% rename from media/extra_grf/fix_graphics.nfo rename to media/baseset/orig_extra/fix_graphics.nfo diff --git a/media/extra_grf/fix_graphics.png b/media/baseset/orig_extra/fix_graphics.png similarity index 100% rename from media/extra_grf/fix_graphics.png rename to media/baseset/orig_extra/fix_graphics.png diff --git a/media/extra_grf/orig_extra.nfo b/media/baseset/orig_extra/orig_extra.nfo similarity index 100% rename from media/extra_grf/orig_extra.nfo rename to media/baseset/orig_extra/orig_extra.nfo diff --git a/media/extra_grf/rivers/arctic.nfo b/media/baseset/orig_extra/rivers/arctic.nfo similarity index 100% rename from media/extra_grf/rivers/arctic.nfo rename to media/baseset/orig_extra/rivers/arctic.nfo diff --git a/media/extra_grf/rivers/arctic_brown.png b/media/baseset/orig_extra/rivers/arctic_brown.png similarity index 100% rename from media/extra_grf/rivers/arctic_brown.png rename to media/baseset/orig_extra/rivers/arctic_brown.png diff --git a/media/extra_grf/rivers/arctic_snowy.png b/media/baseset/orig_extra/rivers/arctic_snowy.png similarity index 100% rename from media/extra_grf/rivers/arctic_snowy.png rename to media/baseset/orig_extra/rivers/arctic_snowy.png diff --git a/media/extra_grf/rivers/rapids.nfo b/media/baseset/orig_extra/rivers/rapids.nfo similarity index 100% rename from media/extra_grf/rivers/rapids.nfo rename to media/baseset/orig_extra/rivers/rapids.nfo diff --git a/media/extra_grf/rivers/rapids.png b/media/baseset/orig_extra/rivers/rapids.png similarity index 100% rename from media/extra_grf/rivers/rapids.png rename to media/baseset/orig_extra/rivers/rapids.png diff --git a/media/extra_grf/rivers/temperate.nfo b/media/baseset/orig_extra/rivers/temperate.nfo similarity index 100% rename from media/extra_grf/rivers/temperate.nfo rename to media/baseset/orig_extra/rivers/temperate.nfo diff --git a/media/extra_grf/rivers/temperate.png b/media/baseset/orig_extra/rivers/temperate.png similarity index 100% rename from media/extra_grf/rivers/temperate.png rename to media/baseset/orig_extra/rivers/temperate.png diff --git a/media/extra_grf/rivers/toyland.nfo b/media/baseset/orig_extra/rivers/toyland.nfo similarity index 100% rename from media/extra_grf/rivers/toyland.nfo rename to media/baseset/orig_extra/rivers/toyland.nfo diff --git a/media/extra_grf/rivers/toyland.png b/media/baseset/orig_extra/rivers/toyland.png similarity index 100% rename from media/extra_grf/rivers/toyland.png rename to media/baseset/orig_extra/rivers/toyland.png diff --git a/media/extra_grf/rivers/tropic.nfo b/media/baseset/orig_extra/rivers/tropic.nfo similarity index 100% rename from media/extra_grf/rivers/tropic.nfo rename to media/baseset/orig_extra/rivers/tropic.nfo diff --git a/media/extra_grf/rivers/tropic_desert.png b/media/baseset/orig_extra/rivers/tropic_desert.png similarity index 100% rename from media/extra_grf/rivers/tropic_desert.png rename to media/baseset/orig_extra/rivers/tropic_desert.png diff --git a/media/extra_grf/rivers/tropic_forest.png b/media/baseset/orig_extra/rivers/tropic_forest.png similarity index 100% rename from media/extra_grf/rivers/tropic_forest.png rename to media/baseset/orig_extra/rivers/tropic_forest.png diff --git a/media/extra_grf/shore.nfo b/media/baseset/orig_extra/shore.nfo similarity index 100% rename from media/extra_grf/shore.nfo rename to media/baseset/orig_extra/shore.nfo diff --git a/media/extra_grf/shore.png b/media/baseset/orig_extra/shore.png similarity index 100% rename from media/extra_grf/shore.png rename to media/baseset/orig_extra/shore.png diff --git a/media/baseset/orig_tto.obm b/media/baseset/orig_tto.obm index c572bcf34b..ced9cf5807 100644 --- a/media/baseset/orig_tto.obm +++ b/media/baseset/orig_tto.obm @@ -5,7 +5,7 @@ name = original_tto shortname = TTOD version = 1 -!! description STR_BASEMUSIC_TTO_DESCRIPTION +@description_STR_BASEMUSIC_TTO_DESCRIPTION@ [files] theme = gm-tto.cat diff --git a/media/baseset/orig_win.obg b/media/baseset/orig_win.obg index f01624a25d..b1cc8437e2 100644 --- a/media/baseset/orig_win.obg +++ b/media/baseset/orig_win.obg @@ -6,7 +6,7 @@ name = original_windows shortname = TTDW version = 0 palette = Windows -!! description STR_BASEGRAPHICS_WIN_DESCRIPTION +@description_STR_BASEGRAPHICS_WIN_DESCRIPTION@ [files] base = TRG1R.GRF @@ -22,7 +22,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32 TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1 TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8 -ORIG_EXTRA.GRF = +ORIG_EXTRA.GRF = ${ORIG_EXTRA_GRF_MD5} [origin] default = You can find it on your Transport Tycoon Deluxe CD-ROM. diff --git a/media/baseset/orig_win.obm b/media/baseset/orig_win.obm index 11e363fabd..de269d65c8 100644 --- a/media/baseset/orig_win.obm +++ b/media/baseset/orig_win.obm @@ -5,7 +5,7 @@ name = original_windows shortname = TTDW version = 1 -!! description STR_BASEMUSIC_WIN_DESCRIPTION +@description_STR_BASEMUSIC_WIN_DESCRIPTION@ [files] theme = GM_TT00.GM diff --git a/media/baseset/orig_win.obs b/media/baseset/orig_win.obs index 7b02372207..66dd619a8a 100644 --- a/media/baseset/orig_win.obs +++ b/media/baseset/orig_win.obs @@ -5,7 +5,7 @@ name = original_windows shortname = TTDO version = 0 -!! description STR_BASESOUNDS_WIN_DESCRIPTION +@description_STR_BASESOUNDS_WIN_DESCRIPTION@ [files] samples = SAMPLE.CAT diff --git a/media/baseset/translations.awk b/media/baseset/translations.awk deleted file mode 100644 index af5f2b4a8d..0000000000 --- a/media/baseset/translations.awk +++ /dev/null @@ -1,67 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# -# Awk script to extract translations for baseset descriptions -# from lang files for insertion into .obg/obs/obm files. -# If there is no translation, there is no output. -# -# The input file is scanned for the pattern -# !! -# -# The lang files (passed as variable 'langfiles') are scanned for and -# the translations are added to the output file: -# . = -# - -# Simple insertion sort since not all AWKs have a sort implementation -function isort(A) { - n = 0 - for (val in A) { - n++; - } - - for (i = 2; i <= n; i++) { - j = i; - hold = A[j] - while (A[j - 1] > hold) { - j--; - A[j + 1] = A[j] - } - A[j] = hold - } - - return n -} - -/^!!/ { - ini_key = $2; - str_id = $3; - - file = langfiles - while ((getline < file) > 0) { - if (match($0, "##isocode") > 0) { - lang = $2; - } else if (match($0, "^" str_id " *:") > 0) { - sub("^[^:]*:", "", $0) - i++; - if (lang == "en_GB") { - texts[i] = ini_key " = "$0; - } else { - texts[i] = ini_key "." lang " = "$0; - } - } - } - close(file); - - count = isort(texts); - for (i = 1; i <= count; i++) { - print texts[i] - } - - next -} - -{ print } diff --git a/media/baseset/translations.vbs b/media/baseset/translations.vbs deleted file mode 100644 index c167886930..0000000000 --- a/media/baseset/translations.vbs +++ /dev/null @@ -1,145 +0,0 @@ -Option Explicit - -' This file is part of OpenTTD. -' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -Dim FSO -Set FSO = CreateObject("Scripting.FileSystemObject") - -Dim inputfile, outputfile, langpath, extra_grf -inputfile = WScript.Arguments(0) -outputfile = WScript.Arguments(1) -langpath = WScript.Arguments(2) - -If WScript.Arguments.Length > 3 Then - extra_grf = WScript.Arguments(3) -End If - -Function GetExtraGrfHash - Dim WSO, exe, line - - Set WSO = WScript.CreateObject("WScript.Shell") - Set exe = WSO.Exec("certutil -hashfile " & extra_grf & " MD5") - - Do Until exe.StdOut.AtEndOfStream - line = exe.StdOut.ReadLine - If Len(line) = 32 Then GetExtraGrfHash = line - Loop - - Set WSO = Nothing -End Function - -' Simple insertion sort, copied from translations.awk -Sub ISort(a) - Dim i, j, n, hold - n = UBound(a) - - For i = 1 To n - j = i - hold = a(j) - Do While a(j - 1) > hold - j = j - 1 - a(j + 1) = a(j) - - If j = 0 Then Exit Do - Loop - a(j) = hold - Next -End Sub - -Sub Lookup(ini_key, str_id, outfile) - Dim folder, file, line, p, lang, i - - ' Ensure only complete string matches - str_id = str_id & " " - - Set folder = FSO.GetFolder(langpath) - - Dim output() - ReDim output(folder.Files.Count) - - For Each file In folder.Files - If UCase(FSO.GetExtensionName(file.Name)) = "TXT" Then - Dim f - Set f = CreateObject("ADODB.Stream") - f.Charset = "utf-8" - f.LineSeparator = 10 ' Assume lines end with \n even for \r\n files - f.Open - f.LoadFromFile(file.Path) - - Do Until f.EOS - line = Replace(f.ReadText(-2), Chr(13), "") ' Read a line and remove any \r - - If InStr(1, line, "##isocode ") = 1 Then - p = Split(line) - lang = p(1) - ElseIf InStr(1, line, str_id) = 1 Then - p = Split(line, ":", 2) - If lang = "en_GB" Then - output(i) = ini_key & " = " & p(1) - Else - output(i) = ini_key & "." & lang & " = " & p(1) - End If - i = i + 1 - End If - Loop - - f.Close - End If - Next - - ReDim Preserve output(i - 1) - ISort output - - For Each line In output - outfile.WriteText line, 1 - Next - -End Sub - -Dim line, p - -Dim infile -Set infile = FSO.OpenTextFile(inputfile) - -Dim outfile -Set outfile = CreateObject("ADODB.Stream") -outfile.Charset = "utf-8" -outfile.Open - -Do Until infile.atEndOfStream - - line = infile.ReadLine() - - If InStr(1, line, "ORIG_EXTRA.GRF ") = 1 Then - p = Split(line, "=") - If Trim(p(1)) = "" Then - outfile.WriteText "ORIG_EXTRA.GRF = " & GetExtraGrfHash(), 1 - Else - outfile.WriteText line, 1 - End If - ElseIf InStr(1, line, "!! ") = 1 Then - p = Split(line) - Lookup p(1), p(2), outfile - Else - outfile.WriteText line, 1 - End If - -Loop - -' UTF-8 Text ADO Stream includes BOM, so we need to remove it -Dim outfile_noBOM -Set outfile_noBOM = CreateObject("ADODB.Stream") -outfile_noBOM.Type = 1 -outfile_noBOM.Open - -' Copy Text stream to Binary stream, skiping the BOM -outfile.Position = 3 -outfile.CopyTo outfile_noBOM -outfile.Close - -' Write the Binary stream -outfile_noBOM.SaveToFile outputfile, 2 -outfile_noBOM.Close diff --git a/media/extra_grf/assemble_nfo.awk b/media/extra_grf/assemble_nfo.awk deleted file mode 100644 index f39e6b6b43..0000000000 --- a/media/extra_grf/assemble_nfo.awk +++ /dev/null @@ -1,30 +0,0 @@ -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -BEGIN { - # Very basic variant function; barely any error checking. - # Just use the first argument as the file to start from when assembling everything - path = ARGV[1]; - gsub("[^/\\\\]*$", "", path); - assemble(ARGV[1]); -} - -# Recursive function for assembling by means of resolving the #includes. -function assemble(filename) { - while ((getline < filename) > 0) { - if (NF == 2 && $1 == "#include" ) { - # Remove the quotes. - gsub("[\"'<>]", "", $2); - assemble(path $2); - } else { - print $0; - } - } - - if (close(filename) < 0) { - print "Could not open " filename > "/dev/stderr"; - exit -1; - } -} diff --git a/os/debian/NEWS b/os/debian/NEWS deleted file mode 100644 index 2a5c811019..0000000000 --- a/os/debian/NEWS +++ /dev/null @@ -1,25 +0,0 @@ -openttd (1.0.0~rc3-2) unstable; urgency=low - - The openttd package has been moved from contrib into main. Since the - OpenGFX free graphics set has been packaged for Debian, one can now run - OpenTTD without needing any of the resources from the original game - (though the original resources are still supported). - - -- Matthijs Kooijman Thu, 18 Mar 2010 13:09:35 +0100 - -openttd (0.7.0-1) unstable; urgency=low - - Handling of AI players has changed in 0.7.0. This package no longer - contains any AI players, so playing against the computer is not possible - out of the box any longer. However, you can easily download AI players - through the new "Content Downloading Service", after which playing with - computer players is possible. - - Loading old savegames with computer players is supported (AI players will - be converted according to the current AI settings), but at this moment - there are no AIs that completely handle any existing infrastructure built - by the old AI, so starting a new game might be more fun (especially since - most of the new AIs are a lot less erratic). - - -- Matthijs Kooijman Mon, 13 Apr 2009 15:11:20 +0200 - diff --git a/os/debian/README.Debian b/os/debian/README.Debian deleted file mode 100644 index e7b4bdb135..0000000000 --- a/os/debian/README.Debian +++ /dev/null @@ -1,41 +0,0 @@ -OpenTTD for Debian ------------------- - -To properly play this game, you need a base graphics and sound set. -Currently, the graphics, sound and music files from the original -Transport Tycoon Deluxe game (Windows and DOS versions) are supported, -as well as the free graphics replacement set "OpenGFX", sound -replacement set "OpenSFX" (which is in non-free due to a restrictive -license) and the free music replacement set "OpenMSX". - -Normally, installing the openttd package should automatically install -openttd-opengfx as well, allowing OpenTTD to run out of the box. If you -want sound, you'll have to enable non-free sources and install the -openttd-opensfx package manually (or install the original Transport -Tyccon Deluxe sound files). - -The easiest way to install the OpenMSX music files is to use the in-game -content download system, which should offer the latest version of the -music files. - -To find out how to install the original Transport Tycoon Deluxe graphics -sound files and music files, see readme.txt, section 4.1. - --Playing Music - In addition to installing a music set (see above), you'll also need - to install the timidity midi player, available in the timidity - package. - - Remember that not all audio devices support multiple audiostreams - (music and sound), so you might have to use alsa software mixing or - pulseaudio. - --Scenarios - There are no scenarios included in this release. Scenarios can be - downloaded using OpenTTD's content service, which is available from - OpenTTD's main menu. If you have obtained a scenario through other - means, you can place it either in your ~/.openttd/scenario directory - or in the system-wide /usr/share/games/openttd/scenario directory. - - -- Matthijs Kooijman Mon, 01 Feb 2010 10:42:11 +0100 - diff --git a/os/debian/changelog b/os/debian/changelog deleted file mode 100644 index 6b24aaa7d5..0000000000 --- a/os/debian/changelog +++ /dev/null @@ -1,1087 +0,0 @@ -openttd (1.10.0~beta2-0) unstable; urgency=low - - * New upstream release 1.10.0-beta2 - - -- OpenTTD Wed, 25 Dec 2019 00:00:00 +0000 - -openttd (1.10.0~beta1-0) unstable; urgency=low - - * New upstream release 1.10.0-beta1 - - -- OpenTTD Tue, 29 Oct 2019 00:00:00 +0000 - -openttd (1.9.3-0) unstable; urgency=low - - * New upstream release 1.9.3 - - -- OpenTTD Mon, 16 Sep 2019 21:00:00 +0200 - -openttd (1.9.3~RC1-0) unstable; urgency=low - - * New upstream release 1.9.3-RC1 - -- OpenTTD Sat, 07 Sep 2019 23:30:00 +0200 - -openttd (1.9.2-0) unstable; urgency=low - - * New upstream release 1.9.2 - - -- OpenTTD Sun, 07 Jul 2019 23:00:00 +0200 - -openttd (1.9.1-0) unstable; urgency=low - - * New upstream release 1.9.1 - - -- OpenTTD Mon, 08 Apr 2019 20:00:00 +0100 - -openttd (1.9.0-0) unstable; urgency=low - - * New upstream release 1.9.0 - - -- OpenTTD Mon, 01 Apr 2019 00:00:00 +0200 - -openttd (1.9.0~RC2-0) unstable; urgency=low - - * New upstream release 1.9.0-RC2 - - -- OpenTTD Sun, 24 Mar 2019 23:00:00 +0000 - -openttd (1.9.0~RC1-0) unstable; urgency=low - - * New upstream release 1.9.0-RC1 - - -- OpenTTD Sun, 3 Mar 2019 23:00:00 +0000 - -openttd (1.9.0~beta3-0) unstable; urgency=low - - * New upstream release 1.9.0-beta3 - - -- OpenTTD Sun, 24 Feb 2019 23:00:00 +0000 - -openttd (1.9.0~beta2-0) unstable; urgency=low - - * New upstream release 1.9.0-beta2 - - -- OpenTTD Sat, 09 Feb 2019 23:00:00 +0000 - -openttd (1.9.0~beta1-0) unstable; urgency=low - - * New upstream release 1.9.0-beta1 - - -- OpenTTD Sat, 09 Feb 2019 16:00:00 +0000 - -openttd (1.8.0-0) unstable; urgency=low - - * New upstream release 1.8.0 - - -- OpenTTD Sun, 01 Apr 2018 14:00:00 +0200 - -openttd (1.8.0~RC1-0) unstable; urgency=low - - * New upstream release 1.8.0-RC1 - - -- OpenTTD Wed, 21 Mar 2018 21:00:00 +0100 - -openttd (1.7.2-0) unstable; urgency=low - - * New upstream release 1.7.2 - - -- OpenTTD Sun, 24 Dec 2017 14:00:00 +0100 - -openttd (1.7.2~RC1-0) unstable; urgency=low - - * New upstream release 1.7.2-RC1 - - -- OpenTTD Mon, 11 Dec 2017 21:30:00 +0100 - -openttd (1.7.1-0) unstable; urgency=low - - * New upstream release 1.7.1 - - -- OpenTTD Tue, 13 Jun 2017 21:00:00 +0200 - -openttd (1.7.1~RC1-0) unstable; urgency=low - - * New upstream release 1.7.1-RC1 - - -- OpenTTD Thu, 04 Mai 2017 21:00:00 +0200 - -openttd (1.7.0-0) unstable; urgency=low - - * New upstream release 1.7.0 - - -- OpenTTD Sat, 01 Apr 2017 19:00:00 +0200 - -openttd (1.7.0~RC1-0) unstable; urgency=low - - * New upstream release 1.7.0-RC1 - - -- OpenTTD Sat, 11 Mar 2017 22:30:00 +0100 - -openttd (1.6.1-0) unstable; urgency=low - - * New upstream release 1.6.1 - - -- OpenTTD Fri, 01 Jul 2016 00:00:00 +0200 - -openttd (1.6.1~RC1-0) unstable; urgency=low - - * New upstream release 1.6.1-RC1 - - -- OpenTTD Wed, 01 Jun 2016 21:00:00 +0200 - -openttd (1.6.0-0) unstable; urgency=low - - * New upstream release 1.6.0 - - -- OpenTTD Fri, 01 Apr 2016 21:00:00 +0200 - -openttd (1.6.0~RC1-0) unstable; urgency=low - - * New upstream release 1.6.0-RC1 - - -- OpenTTD Tue, 01 Mar 2016 21:00:00 +0100 - -openttd (1.5.3-0) unstable; urgency=low - - * New upstream release 1.5.3 - - -- OpenTTD Tue, 01 Dec 2015 21:00:00 +0100 - -openttd (1.5.3~RC1-0) unstable; urgency=low - - * New upstream release 1.5.3-RC1 - - -- OpenTTD Sun, 01 Nov 2015 14:00:00 +0100 - -openttd (1.5.2-0) unstable; urgency=low - - * New upstream release 1.5.2 - - -- OpenTTD Tue, 01 Sep 2015 21:00:00 +0200 - -openttd (1.5.2~RC1-0) unstable; urgency=low - - * New upstream release 1.5.2-RC1 - - -- OpenTTD Sat, 01 Aug 2015 13:00:00 +0200 - -openttd (1.5.1-0) unstable; urgency=low - - * New upstream release 1.5.1 - - -- OpenTTD Mon, 01 Jun 2015 21:00:00 +0200 - -openttd (1.5.1~RC1-0) unstable; urgency=low - - * New upstream release 1.5.1-RC1 - - -- OpenTTD Fri, 08 May 2015 21:00:00 +0200 - -openttd (1.5.0-0) unstable; urgency=low - - * New upstream release 1.5.0 - - -- OpenTTD Wed, 01 Apr 2015 21:00:00 +0200 - -openttd (1.5.0~RC1-0) unstable; urgency=low - - * New upstream release 1.5.0-RC1 - - -- OpenTTD Wed, 18 Mar 2015 21:00:00 +0100 - -openttd (1.5.0~beta2-0) unstable; urgency=low - - * New upstream release 1.5.0-beta2 - - -- OpenTTD Tue, 24 Feb 2015 21:00:00 +0100 - -openttd (1.5.0~beta1-0) unstable; urgency=low - - * New upstream release 1.5.0-beta1 - - -- OpenTTD Wed, 24 Dec 2014 21:00:00 +0100 - -openttd (1.4.4-0) unstable; urgency=low - - * New upstream release 1.4.4 - - -- OpenTTD Tue, 21 Oct 2014 21:00:00 +0200 - -openttd (1.4.4~RC1-0) unstable; urgency=low - - * New upstream release 1.4.4-RC1 - - -- OpenTTD Wed, 08 Oct 2014 19:00:00 +0200 - -openttd (1.4.3-0) unstable; urgency=low - - * New upstream release 1.4.3 - - -- OpenTTD Tue, 23 Sep 2014 21:00:00 +0200 - -openttd (1.4.3~RC2-0) unstable; urgency=low - - * New upstream release 1.4.3-RC2 - - -- OpenTTD Sun, 14 Sep 2014 19:00:00 +0200 - -openttd (1.4.3~RC1-0) unstable; urgency=low - - * New upstream release 1.4.3-RC1 - - -- OpenTTD Sun, 07 Sep 2014 19:00:00 +0200 - -openttd (1.4.2-0) unstable; urgency=low - - * New upstream release 1.4.2 - - -- OpenTTD Sat, 16 Aug 2014 21:00:00 +0200 - -openttd (1.4.2~RC2-0) unstable; urgency=low - - * New upstream release 1.4.2-RC2 - - -- OpenTTD Sun, 03 Aug 2014 18:00:00 +0200 - -openttd (1.4.2~RC1-0) unstable; urgency=low - - * New upstream release 1.4.2-RC1 - - -- OpenTTD Thu, 03 Jul 2014 21:00:00 +0200 - -openttd (1.4.1-0) unstable; urgency=low - - * New upstream release 1.4.1 - - -- OpenTTD Mon, 02 Jun 2014 21:00:00 +0200 - -openttd (1.4.1~RC2-0) unstable; urgency=low - - * New upstream release 1.4.1-RC2 - - -- OpenTTD Sun, 18 May 2014 21:00:00 +0200 - -openttd (1.4.1~RC1-0) unstable; urgency=low - - * New upstream release 1.4.1-RC1 - - -- OpenTTD Sun, 04 May 2014 21:00:00 +0200 - -openttd (1.4.0-0) unstable; urgency=low - - * New upstream release 1.4.0 - - -- OpenTTD Tue, 01 Apr 2014 21:00:00 +0200 - -openttd (1.4.0~RC1-0) unstable; urgency=low - - * New upstream release 1.4.0-RC1 - - -- OpenTTD Tue, 17 Mar 2014 21:00:00 +0100 - -openttd (1.4.0~beta5-0) unstable; urgency=low - - * New upstream release 1.4.0-beta5 - - -- OpenTTD Tue, 25 Feb 2014 10:15:00 +0100 - -openttd (1.4.0~beta4-0) unstable; urgency=low - - * New upstream release 1.4.0-beta4 - - -- OpenTTD Thu, 06 Feb 2014 21:00:00 +0100 - -openttd (1.4.0~beta3-0) unstable; urgency=low - - * New upstream release 1.4.0-beta3 - - -- OpenTTD Tue, 21 Jan 2014 21:00:00 +0100 - -openttd (1.4.0~beta2-0) unstable; urgency=low - - * New upstream release 1.4.0-beta2 - - -- OpenTTD Tue, 07 Jan 2014 21:00:00 +0100 - -openttd (1.4.0~beta1-0) unstable; urgency=low - - * New upstream release 1.4.0-beta1 - - -- OpenTTD Tue, 24 Dec 2013 00:00:00 +0100 - -openttd (1.3.3-0) unstable; urgency=low - - * New upstream release 1.3.3 - - -- OpenTTD Fri, 29 Nov 2013 19:00:00 +0100 - -openttd (1.3.3~RC2-0) unstable; urgency=low - - * New upstream release 1.3.3-RC2 - - -- OpenTTD Sun, 24 Nov 2013 19:00:00 +0100 - -openttd (1.3.3~RC1-0) unstable; urgency=low - - * New upstream release 1.3.3-RC1 - - -- OpenTTD Sun, 17 Nov 2013 19:00:00 +0100 - -openttd (1.3.2-0) unstable; urgency=low - - * New upstream release 1.3.2 - - -- OpenTTD Sat, 27 Jul 2013 18:00:00 +0200 - -openttd (1.3.2~RC2-0) unstable; urgency=low - - * New upstream release 1.3.2-RC2 - - -- OpenTTD Sat, 13 Jul 2013 12:00:00 +0200 - -openttd (1.3.2~RC1-0) unstable; urgency=low - - * New upstream release 1.3.2-RC1 - - -- OpenTTD Sun, 30 Jun 2013 12:00:00 +0200 - -openttd (1.3.1-0) unstable; urgency=low - - * New upstream release 1.3.1 - - -- OpenTTD Sat, 01 Jun 2013 00:00:00 +0300 - -openttd (1.3.1~RC1-0) unstable; urgency=low - - * New upstream release 1.3.1-RC1 - - -- OpenTTD Fri, 17 May 2013 22:00:00 +0200 - -openttd (1.3.0-0) unstable; urgency=low - - * New upstream release 1.3.0 - - -- OpenTTD Mon, 01 Apr 2013 00:00:00 +0200 - -openttd (1.3.0~RC3) unstable; urgency=low - - * New upstream release 1.3.0-RC3 - - -- OpenTTD Mon, 18 Mar 2013 00:00:00 +0100 - -openttd (1.3.0~RC2) unstable; urgency=low - - * New upstream release 1.3.0-RC2 - - -- OpenTTD Tue, 05 Mar 2013 00:00:00 +0100 - -openttd (1.3.0~RC1) unstable; urgency=low - - * New upstream release 1.3.0-RC1 - - -- OpenTTD Tue, 19 Feb 2013 00:00:00 +0100 - -openttd (1.3.0~beta2) unstable; urgency=low - - * New upstream release 1.3.0-beta2 - - -- OpenTTD Thu, 07 Feb 2013 00:00:00 +0100 - -openttd (1.3.0~beta1) unstable; urgency=low - - * New upstream release 1.3.0-beta1 - - -- OpenTTD Mon, 24 Dec 2012 00:00:00 +0100 - -openttd (1.2.3) unstable; urgency=low - - * New upstream release 1.2.3 - - -- OpenTTD Thu, 01 Nov 2012 00:00:00 +0200 - -openttd (1.2.3~RC1) unstable; urgency=low - - * New upstream release 1.2.3-RC1 - - -- OpenTTD Wed, 17 Oct 2012 00:00:00 +0200 - -openttd (1.2.2) unstable; urgency=low - - * New upstream release 1.2.2 - - -- OpenTTD Thu, 16 Aug 2012 20:00:00 +0200 - -openttd (1.2.2~RC1) unstable; urgency=low - - * New upstream release 1.2.2-RC1 - - -- OpenTTD Wed, 01 Aug 2012 00:00:00 +0200 - -openttd (1.2.1) unstable; urgency=low - - * New upstream release 1.2.1 - - -- OpenTTD Fri, 01 Jun 2012 00:00:00 +0200 - -openttd (1.2.1~RC1) unstable; urgency=low - - * New upstream release 1.2.1-RC1 - - -- OpenTTD Wed, 16 Apr 2012 22:00:00 +0200 - -openttd (1.2.0) unstable; urgency=low - - * New upstream release 1.2.0 - - -- OpenTTD Sun, 15 Apr 2012 14:00:00 +0200 - -openttd (1.2.0~RC4) unstable; urgency=low - - * New upstream release 1.2.0-RC4 - - -- OpenTTD Sun, 01 Apr 2012 00:00:00 +0200 - -openttd (1.2.0~RC3) unstable; urgency=low - - * New upstream release 1.2.0-RC3 - - -- OpenTTD Sun, 18 Mar 2012 18:00:00 +0100 - -openttd (1.2.0~RC2) unstable; urgency=low - - * New upstream release 1.2.0-RC2 - - -- OpenTTD Sun, 04 Mar 2012 18:00:00 +0100 - -openttd (1.2.0~RC1) unstable; urgency=low - - * New upstream release 1.2.0-RC1 - - -- OpenTTD Sun, 19 Feb 2012 23:00:00 +0100 - -openttd (1.2.0~beta4) unstable; urgency=low - - * New upstream release 1.2.0-beta4 - - -- OpenTTD Sat, 04 Feb 2012 16:00:00 +0100 - -openttd (1.2.0~beta3) unstable; urgency=low - - * New upstream release 1.2.0-beta3 - - -- OpenTTD Sat, 21 Jan 2012 16:00:00 +0100 - -openttd (1.2.0~beta2) unstable; urgency=low - - * New upstream release 1.2.0-beta2 - - -- OpenTTD Sat, 07 Jan 2012 00:00:00 +0100 - -openttd (1.2.0~beta1) unstable; urgency=low - - * New upstream release 1.2.0-beta1 - - -- OpenTTD Sat, 24 Dec 2011 00:00:00 +0100 - -openttd (1.1.4) unstable; urgency=low - - * New upstream release 1.1.4 - - -- OpenTTD Mon, 05 Dec 2011 00:00:00 +0400 - -openttd (1.1.4-RC1) unstable; urgency=low - - * New upstream release 1.1.4-RC1 - - -- OpenTTD Sun, 20 Nov 2011 17:00:00 +0100 - -openttd (1.1.3) unstable; urgency=low - - * New upstream release 1.1.3 - - -- OpenTTD Thu, 15 Sep 2011 21:00:00 +0200 - -openttd (1.1.3-RC1) unstable; urgency=low - - * New upstream release 1.1.3-RC1 - - -- OpenTTD Sun, 04 Sep 2011 17:00:00 +0200 - -openttd (1.1.2) unstable; urgency=low - - * New upstream release 1.1.2 - - -- OpenTTD Sun, 14 Aug 2011 17:00:00 +0200 - -openttd (1.1.2~RC2) unstable; urgency=low - - * New upstream release 1.1.2-RC2 - - -- OpenTTD Sat, 30 Jul 2011 21:00:00 +0200 - -openttd (1.1.2~RC1) unstable; urgency=low - - * New upstream release 1.1.2-RC1 - - -- OpenTTD Sun, 24 Jul 2011 21:00:00 +0200 - -openttd (1.1.1) unstable; urgency=low - - * New upstream release 1.1.1 - - -- OpenTTD Wed, 01 Jun 2011 00:00:00 +0200 - -openttd (1.1.1~RC1) unstable; urgency=low - - * New upstream release 1.1.1-RC1 - - -- OpenTTD Sun, 15 May 2011 21:00:00 +0200 - -openttd (1.1.0) unstable; urgency=low - - * New upstream release 1.1.0 - - -- OpenTTD Fri, 01 Apr 2011 00:00:00 +0100 - -openttd (1.1.0~RC3) unstable; urgency=low - - * New upstream release 1.1.0-RC3 - - -- OpenTTD Fri, 18 Mar 2011 22:00:00 +0100 - -openttd (1.1.0~RC2) unstable; urgency=low - - * New upstream release 1.1.0-RC2 - - -- OpenTTD Fri, 04 Mar 2011 22:00:00 +0100 - -openttd (1.1.0~RC1) unstable; urgency=low - - * New upstream release 1.1.0-RC1 - - -- OpenTTD Fri, 18 Feb 2011 22:00:00 +0100 - -openttd (1.1.0~beta5) unstable; urgency=low - - * New upstream release 1.1.0-beta5 - - -- OpenTTD Fri, 04 Feb 2011 22:00:00 +0100 - -openttd (1.1.0~beta4) unstable; urgency=low - - * New upstream release 1.1.0-beta4 - - -- OpenTTD Fri, 21 Jan 2011 00:00:00 +0100 - -openttd (1.1.0~beta3) unstable; urgency=low - - * New upstream release 1.1.0-beta3 - - -- OpenTTD Sun, 09 Jan 2011 18:00:00 +0100 - -openttd (1.1.0~beta2) unstable; urgency=low - - * New upstream release 1.1.0-beta2 - - -- OpenTTD Fri, 31 Dec 2010 18:00:00 +0100 - -openttd (1.1.0~beta1) unstable; urgency=low - - * New upstream release 1.1.0-beta1 - - -- OpenTTD Fri, 24 Dec 2010 00:00:00 +0100 - -openttd (1.0.5-0) unstable; urgency=low - - * New upstream release 1.0.5 - - -- OpenTTD Sat, 20 Nov 2010 21:00:00 +0000 - -openttd (1.0.5~rc2-0) unstable; urgency=low - - * New upstream release 1.0.5~rc2 - - -- OpenTTD Sun, 14 Nov 2010 15:00:00 +0000 - -openttd (1.0.5~rc1-0) unstable; urgency=low - - * New upstream release 1.0.5-RC1 - - -- OpenTTD Sun, 31 Oct 2010 15:00:00 +0000 - -openttd (1.0.4-0) unstable; urgency=low - - * New upstream release 1.0.4 - - -- OpenTTD Tue, 14 Sep 2010 20:00:00 +0000 - -openttd (1.0.4~rc1-0) unstable; urgency=low - - * New upstream release 1.0.4-RC1 - - -- OpenTTD Mon, 30 Aug 2010 20:00:00 +0000 - -openttd (1.0.3-0) unstable; urgency=low - - * New upstream release 1.0.3 - - -- OpenTTD Sun, 01 Aug 2010 00:00:00 +0000 - -openttd (1.0.3~rc1-0) unstable; urgency=low - - * New upstream release 1.0.3-RC1 - - -- OpenTTD Sat, 05 Jul 2010 17:37:21 +0000 - -openttd (1.0.2-0) unstable; urgency=low - - * New upstream release 1.0.2 - - -- OpenTTD Sat, 19 Jun 2010 18:36:21 +0000 - -openttd (1.0.2~rc1-0) unstable; urgency=low - - * New upstream release 1.0.2-RC1 - - -- OpenTTD Sat, 05 Jun 2010 23:36:21 +0000 - -openttd (1.0.1-0) unstable; urgency=low - - * New upstream release 1.0.1 - - -- OpenTTD Sat, 01 May 2010 00:00:00 +0200 - -openttd (1.0.1~rc2-0) unstable; urgency=low - - * New upstream release 1.0.1-RC2 - - -- OpenTTD Wed, 21 Apr 2010 21:36:21 +0200 - -openttd (1.0.1~rc1-0) unstable; urgency=low - - * New upstream release 1.0.1-RC1 - - -- OpenTTD Sat, 17 Apr 2010 23:36:21 +0000 - -openttd (1.0.0-1) unstable; urgency=low - - * [30a2162] New upstream release 1.0.0. (Closes: #570104) - * [102698a] Make openttd-wrapper work with older mktemp versions. - - -- Matthijs Kooijman Fri, 02 Apr 2010 23:36:21 +0200 - -openttd (1.0.0~rc3-2) unstable; urgency=low - - * [279c5ef] Recommend openttd-opengfx and suggest openttd-opensfx. - * [9330ad7] Update README.Debian concerning music files. - * [07bde24] Move openttd from contrib to main. (Closes: #560810) - - -- Matthijs Kooijman Thu, 18 Mar 2010 13:16:32 +0100 - -openttd (1.0.0~rc3-1) unstable; urgency=low - - * [412d153] New upstream release 1.0.0~rc3. - - -- Matthijs Kooijman Thu, 18 Mar 2010 10:09:33 +0100 - -openttd (1.0.0~rc2-1) unstable; urgency=low - - * [9c99af4] New upstream release 1.0.0~rc2. - - -- Matthijs Kooijman Thu, 04 Mar 2010 12:22:28 +0100 - -openttd (1.0.0~rc1-1) unstable; urgency=low - - * [fe4eb51] New upstream release 1.0.0~rc1. - * [6aa2be0] Note that the embedded md5 implementation has a different - license. - * [39eb336] Remove lintian override for empty gm directory. - - -- Matthijs Kooijman Fri, 19 Feb 2010 13:00:53 +0100 - -openttd (1.0.0~beta4-1) unstable; urgency=low - - * [6718224] New upstream release 1.0.0~beta4. - * [7b0fa8d] Remove some more docs that we don't want in the package. - * [bb9d744] Use liblzo2 instead of an embedded minilzo version. - * [949c06b] Explicitly disable iconv support. - - -- Matthijs Kooijman Fri, 19 Feb 2010 12:59:27 +0100 - -openttd (0.7.5-4) unstable; urgency=low - - * [174d0b1] Don't use deprecated < in Replaces. - - -- Matthijs Kooijman Mon, 15 Feb 2010 00:35:33 +0100 - -openttd (0.7.5-3) unstable; urgency=low - - * [d12fc5a] Make openttd-data replace openttd (< 0.7.5-2). - (Closes: #569679) - - -- Matthijs Kooijman Sun, 14 Feb 2010 16:56:31 +0100 - -openttd (0.7.5-2) unstable; urgency=low - - [ Matthijs Kooijman ] - * [fbab21d] Switch to source format 3.0 (quilt). - * [85c0c7d] No longer check for (and complain about missing) datafiles - on installation and upgrades. (Closes: #524651, 562574) - * [827eb61] Split the architecture independent data into openttd-data. - (Closes: #492462) - * [6fbd9c7] Update README.Debian. - * [76a5148] Support cross compilation. (Closes: #550951) - * [2005bf8] Simplify the rules file, make debhelper do more stuff. - * [fc0500e] Remove some configure arguments. - * [8ca38bb] Explicitly enable or disable all of the dependencies. - * [e38fb3e] Let the upstream Makefile install documentation. - * [5954fcf] Update the watch file to the new upstream url scheme. - * [7249594] Fix typo in copyright file. - * [660fb61] Bump the Standards-Version to 3.8.4, with no changes - required. - * [f94ab89] Move the packaging git repository to git.debian.org. - - -- Jordi Mallach Tue, 09 Feb 2010 21:40:24 +0100 - -openttd (0.7.5-1) unstable; urgency=high - - * [cdcb73a] Imported Upstream version 0.7.5. This release fixes - CVE-2009-4007. - - -- Matthijs Kooijman Thu, 24 Dec 2009 00:55:45 +0100 - -openttd (0.7.4-1) unstable; urgency=low - - * [a2c297b0] Imported Upstream version 0.7.4 - * [0232a645] Make Debian-specific patches executable. - * [76be04b] Switch the Debian packaging to git. - - -- Matthijs Kooijman Tue, 15 Dec 2009 22:11:52 +0100 - -openttd (0.7.3-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - * Use printf instead of echo -en in openttd-wrapper to make it POSIX - compatible (Closes: #547758). - * Remove three patches that are now included in upstream. - - -- Matthijs Kooijman Thu, 01 Oct 2009 22:52:59 +0200 - -openttd (0.7.2-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - * Bump Standards-Version to 3.8.3, with no changes required. - * Clean up the rules file a bit and add some lintian overrides. - * Explain why openttd is in contrib (Closes: #539381). - * Add the DM-Upload-Allowed control field. - * Re-add dpatch infrastructure. - * Fix the copyright file, since upstream only allows GPLv2, not later - versions. - * Add a section to the copyright file on the different license used by the - "Squirrel" programming language, which is shipped with OpenTTD since - 0.7.0. - * Backport upstream r17226, which removes the deprecated Encoding entry from - the .desktop file. - * Add a wrapper script for openttd, which captures any stderr output and - displays it when openttd returns an error code (Closes: #533557). - * Recommend x11-utils, since we use xmessage for displaying errors. Don't - depend on it, since openttd will still run fine without it, you just won't - see any errors. - * Backport upstream r17227 and r17229, which prevents terminal escape codes - from ending up in the captured error output. - * Backport upstream r17240, which improves stderr output when files are - missing or corrupt. - - -- Jordi Mallach Fri, 21 Aug 2009 15:27:26 +0200 - -openttd (0.7.1-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - * Link against libicu to enable right-to-left language support. - - -- Jordi Mallach Tue, 09 Jun 2009 21:46:28 +0200 - -openttd (0.7.0-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - * Remove Debian specific desktop file, upstream provides one now. - * Add debian/watch file. - - [ Jordi Mallach ] - * Bump Standards-Version to 3.8.1, with no changes required. - * Move to debhelper compat 7. Bump Build-Depends accordingly. - * Use dh_prep. - * Add "set -e" to config script. - * Remove a few extra doc files that get installed by upstream Makefile. - * Add more complete copyright information. - - -- Jordi Mallach Wed, 15 Apr 2009 18:22:10 +0200 - -openttd (0.6.3-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - - [ Jordi Mallach ] - * Add Spanish Debconf template translation, after fixing its corrupted - encoding (thanks, Germana Oliveira, closes: #499214). - - -- Jordi Mallach Thu, 02 Oct 2008 16:59:03 +0200 - -openttd (0.6.2-1) unstable; urgency=low - - * New upstream release. - - Fixes remote crash vulnerability CVE-2008-3547. Closes: #493714 - - -- Matthijs Kooijman Fri, 08 Aug 2008 11:07:05 +0200 - -openttd (0.6.2~rc2-1) experimental; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - - [ Jordi Mallach ] - * Fix typo in README.Debian (lintian). - * Remove dpatch build-dep and the empty debian/patches dir. - * Don't ignore possible "make distclean" errors. - - -- Jordi Mallach Sat, 26 Jul 2008 01:35:30 +0200 - -openttd (0.6.2~rc1-1) experimental; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - - -- Jordi Mallach Thu, 24 Jul 2008 16:09:57 +0200 - -openttd (0.6.1-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release. - * Remove no_install_personal.dpatch, it is included upstream now. - - -- Jordi Mallach Thu, 05 Jun 2008 00:47:36 +0200 - -openttd (0.6.0-2) unstable; urgency=low - - [ Jordi Mallach ] - * Rename XS-Vcs-* to the official Vcs-* fields. - - [ Matthijs Kooijman ] - * Don't install anything into ~ during make install, this prevented - successful builds on some architectures. Fix imported from upstream. - * Put the homepage in its own Homepage field instead of in the description. - * Bump Standards-Version to 3.7.3 - - -- Jordi Mallach Thu, 03 Apr 2008 00:07:10 +0200 - -openttd (0.6.0-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release: - - Adds note about font-configuration for non-latin languages. - Closes: #462604 - * Add .desktop file, provided by Andrea Colangelo. - Closes: #460073 - * Add Finnish Debconf translation, provided by Esko Arajärvi. - Closes: #456956 - - [ Jordi Mallach ] - * Fixes and improvements for the .desktop file according to the spec. - - -- Jordi Mallach Wed, 02 Apr 2008 14:04:40 +0200 - -openttd (0.5.3-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - - -- Jordi Mallach Tue, 18 Sep 2007 12:05:28 +0200 - -openttd (0.5.2-1) unstable; urgency=low - - [ Jordi Mallach ] - * New upstream release. - * Debconf translation updates: - - Catalan. - - [ Christian Perrier ] - * Debconf templates and debian/control reviewed by the debian-l10n- - english team as part of the Smith review project. - Closes: #422183, #419096. - * Debconf translation updates: - - Swedish. Closes: #422780 - - Basque. Closes: #422786 - - Czech. Closes: #422809 - - Galician. Closes: #422831 - - German. Closes: #422908 - - Tamil. Closes: #423079 - - Russian. Closes: #423224 - - Portuguese. Closes: #423413 - - French. Closes: #424436 - - Brazilian Portuguese. Closes: #425585 - - Dutch. Closes: #425707 - - -- Jordi Mallach Sat, 02 Jun 2007 06:24:34 +0200 - -openttd (0.5.1-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - * Add German and Swedish translations (Closes: #420258, #419097) - * Remove bogus fuzzy mark from the Catalan translation - - [ Jordi Mallach ] - * debian/control: add XS-Vcs-Svn and XS-Vcs-Browser fields. - - -- Jordi Mallach Mon, 23 Apr 2007 21:03:06 +0200 - -openttd (0.5.0-2) unstable; urgency=low - - * Upload to Debian. - - -- Jordi Mallach Sun, 11 Mar 2007 14:12:37 +0100 - -openttd (0.5.0-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - - [ Jordi Mallach ] - * Depend on ${misc:Depends}, not debconf directly. - - -- Jordi Mallach Thu, 8 Mar 2007 15:34:54 +0100 - -openttd (0.5.0~rc5-1) unstable; urgency=low - - [ Matthijs Kooijman ] - * New upstream release - * Compile with freetype and fontconfig support. - - [ Jordi Mallach ] - * Convert debconf templates to podebconf. - * Add a Catalan translation. - * Minor packaging cleanups. - - -- Matthijs Kooijman Mon, 12 Feb 2007 09:25:41 +0100 - -openttd (0.5.0~rc4-1) unstable; urgency=low - - * New upstream release - - -- Matthijs Kooijman Thu, 18 Jan 2007 21:17:28 +0100 - -openttd (0.5.0~rc3-1) unstable; urgency=low - - * New upstream release - - -- Matthijs Kooijman Thu, 18 Jan 2007 20:21:04 +0100 - -openttd (0.5.0~rc2-1) unstable; urgency=low - - * New upstream release - * Removed fix for empty scenarios dir, openttd Makefile now properly handles - this. - - -- Matthijs Kooijman Sun, 31 Dec 2006 12:24:37 +0100 - -openttd (0.5.0~rc1-1) unstable; urgency=low - - * New upstream release. - - -- Matthijs Kooijman Fri, 22 Dec 2006 11:03:46 +0100 - -openttd (0.4.8-1) unstable; urgency=low - - * New upstream release - * Bump standards version to 3.7.2 - - -- Matthijs Kooijman Mon, 14 Aug 2006 16:28:50 +0200 - -openttd (0.4.7-1) unstable; urgency=low - - * New upstream release. - - -- Matthijs Kooijman Mon, 27 Mar 2006 23:40:00 +0200 - -openttd (0.4.6-1) unstable; urgency=low - - * New upstream release. - * Remove old terminal messages and make sure that debconf is always called. - - -- Matthijs Kooijman Wed, 8 Mar 2006 23:57:35 +0100 - -openttd (0.4.5-1) unstable; urgency=low - - * New upstream release - * Bump Standards-Version to 3.6.2 - * s/timdity/timidity/ in README.Debian. - * Use debconf for prompting instead of terminal. - * Fix makefile to create icon dir if necessary. - * Fix syntax error in manpage. - - -- Matthijs Kooijman Wed, 1 Feb 2006 01:56:39 +0100 - -openttd (0.4.0.1-5) unstable; urgency=low - - * Fixed capitalization of menu item. - * Install xpm icon to /usr/share/pixmaps and don't install png icon, since - it is not used. - - -- Matthijs Kooijman Thu, 22 Sep 2005 10:35:09 +0200 - -openttd (0.4.0.1-4) unstable; urgency=low - - * Changelog was distributed twice. - * Put openttd in contrib. - - -- Matthijs Kooijman Mon, 19 Sep 2005 23:49:18 +0200 - -openttd (0.4.0.1-3) unstable; urgency=low - - * Clarified installing instructions in README.Debian - - -- Matthijs Kooijman Thu, 16 Jun 2005 03:51:13 +0200 - -openttd (0.4.0.1-2) unstable; urgency=low - - * Added Suggests: timidity, freepats - - -- Matthijs Kooijman Thu, 16 Jun 2005 03:34:03 +0200 - -openttd (0.4.0.1-1) unstable; urgency=low - - * New upstream release - - -- Matthijs Kooijman Mon, 23 May 2005 13:04:24 +0200 - -openttd (0.4.0-1) unstable; urgency=low - - * New upstream release - - -- Matthijs Kooijman Mon, 16 May 2005 00:16:17 +0200 - -openttd (0.3.6-1) unstable; urgency=low - - * New upstream release - * Modified Makefile to install xpm icon and scenarios in /usr/share/games/openttd/ - * Added openttd.32.xpm, openttd.64.xpm was too big - - -- Matthijs Kooijman Tue, 25 Jan 2005 19:21:08 +0100 - -openttd (0.3.5-2) unstable; urgency=low - - * Fixed some lintian warnings. - * Added openttd.64.xpm (icon for menu). - - -- Matthijs Kooijman Mon, 27 Dec 2004 01:51:36 +0100 - -openttd (0.3.5-1) unstable; urgency=low - - * Initial Release. - - -- Matthijs Kooijman Fri, 24 Dec 2004 02:58:47 +0100 diff --git a/os/debian/compat b/os/debian/compat deleted file mode 100644 index 7f8f011eb7..0000000000 --- a/os/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/os/debian/control b/os/debian/control deleted file mode 100644 index 01b66cc494..0000000000 --- a/os/debian/control +++ /dev/null @@ -1,36 +0,0 @@ -Source: openttd -Section: games -Priority: optional -Maintainer: Matthijs Kooijman -Uploaders: Jordi Mallach -Build-Depends: debhelper (>= 7.0.50), libsdl2-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzma-dev, liblzo2-dev -Standards-Version: 3.8.4 -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/openttd.git -Vcs-Git: git://anonscm.debian.org/collab-maint/openttd.git -Homepage: http://www.openttd.org/ - -Package: openttd -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: openttd-opengfx, x11-utils -Replaces: openttd-data -Conflicts: openttd-data -Suggests: openttd-opensfx, timidity, freepats -Description: reimplementation of Transport Tycoon Deluxe with enhancements - OpenTTD is a reimplementation of the Microprose game "Transport - Tycoon Deluxe" with lots of new features and enhancements. - . - OpenTTD is playable with the free graphics files from the openttd-opengfx - package and optional sound files from the openttd-opensfx package (which is in - non-free). Alternatively, OpenTTD can use the graphics files from the original - Transport Tycoon Deluxe game (See README.Debian on how to set this up). - -Package: openttd-dbg -Architecture: any -Section: debug -Priority: extra -Depends: openttd (= ${binary:Version}), ${misc:Depends} -Description: debugging symbols for openttd - This package contains the debugging symbols for OpenTTD, the reimplementation - of the Micropose game "Transport Tycoon Deluxe" with lots of new features and - enhancements. diff --git a/os/debian/copyright b/os/debian/copyright deleted file mode 100644 index 24d6d7052f..0000000000 --- a/os/debian/copyright +++ /dev/null @@ -1,106 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: OpenTTD -Upstream-Contact: info@openttd.org, #openttd on irc.oftc.net -Source: http://www.openttd.org - - -Files: * -Copyright: © 2004-2019 Ludvig Strigeous and others. -License: GPL-2.0 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2.0 as - published by the Free Software Foundation; - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the complete text of the GNU General Public License - version 2 can be found in `/usr/share/common-licenses/GPL-2'. - -Files: src/3rdparty/squirrel/* -Copyright: © 2003-2009 Alberto Demichelis -License: Zlib - -Files: src/3rdparty/md5/* -Copyright: © 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. -License: Zlib - - -License: Zlib - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - . - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - . - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software in - a product, an acknowledgment in the product documentation would be - appreciated but is not required. - . - 2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - . - 3. This notice may not be removed or altered from any source - distribution. - -Files: os/dos/exe2coff/* -Copyright: © 1998 DJ Delorie -License: GPL-2.0 with additional restrictions - This document is Copyright (C) DJ Delorie and may be distributed - verbatim, but changing it is not allowed. - . - Source code copyright DJ Delorie is distributed under the terms of the - GNU General Public Licence, with the following exceptions: - . - * Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and - libemu.a are distributed under the terms of the GNU Library General - Public License, rather than the GNU GPL. - . - * Any existing copyright or authorship information in any given source - file must remain intact. If you modify a source file, a notice to that - effect must be added to the authorship information in the source file. - . - * Runtime binaries, as provided by DJ in DJGPP, may be distributed - without sources ONLY if the recipient is given sufficient information - to obtain a copy of djgpp themselves. This primarily applies to - go32-v2.exe, emu387.dxe, and stubedit.exe. - . - * Runtime objects and libraries, as provided by DJ in DJGPP, when - linked into an application, may be distributed without sources ONLY - if the recipient is given sufficient information to obtain a copy of - djgpp themselves. This primarily applies to crt0.o and libc.a. - . - On Debian systems, the complete text of the GNU General Public License - version 2 can be found in `/usr/share/common-licenses/GPL-2'. -Comment: - Given only the exe2coff.c file is distributed in the source distribution (and - nothing in Debian binary distribution), it seems only the 2nd condition - applies. - -Files: os/dos/cwsdpmi/* -Source: http://homer.rice.edu/~sandmann/cwsdpmi/index.html -Copyright: © 1995-2000 Charles W Sandmann (sandmann@clio.rice.edu) -License: Custom binary-only license - This is release 5. The files in this binary distribution may be redistributed - under the GPL (with source) or without the source code provided: - . - * CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM. - . - * CWSDSTUB.EXE internal contents are not modified in any way except via - CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it. - . - * Notice to users that they have the right to receive the source code and/or - binary updates for CWSDPMI. Distributors should indicate a site for the - source in their documentation. -Comment: - Files are distributed as binary only, so the second option in the license - ("without source code provided: ...") is applicable. diff --git a/os/debian/gbp.conf b/os/debian/gbp.conf deleted file mode 100644 index 58b68d336b..0000000000 --- a/os/debian/gbp.conf +++ /dev/null @@ -1,13 +0,0 @@ -[DEFAULT] -# Use pristine-tar -pristine-tar = True - -[git-dch] -# We use metaheaders in commit messages. -meta = True -# Put git commit ids in the debian changelog. -id-length = 7 - -[git-import-orig] -# Use a custom commit message for upstream imports. -import-msg = New upstream release %(version)s. diff --git a/os/debian/menu b/os/debian/menu deleted file mode 100644 index 3afa6e08e8..0000000000 --- a/os/debian/menu +++ /dev/null @@ -1,2 +0,0 @@ -?package(openttd):needs="X11" section="Games/Simulation" title="OpenTTD"\ -command="/usr/games/openttd" icon="/usr/share/pixmaps/openttd.32.xpm" diff --git a/os/debian/openttd-wrapper b/os/debian/openttd-wrapper deleted file mode 100644 index 6f85f00b06..0000000000 --- a/os/debian/openttd-wrapper +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# This is a wrapper script that checks openttd's exit status and -# displays its stderr output - -# Get a file to capture stderr to. Use the deprecated -t option, so this -# works on the old mktemp from the mktemp package (which has been -# replaced by the version from the coreutils package). -TMPFILE=`mktemp -t openttd.errout.XXXXXXXXX` - -if [ ! -w "$TMPFILE" ]; then - xmessage "Could not create temporary file for error messages. Not starting OpenTTD." - exit 1; -fi - -# Capture stderr -openttd "$@" 2> "$TMPFILE" -ERRCODE=$? -if [ "$ERRCODE" -ne 0 ]; then - CODEMSG="OpenTTD returned with error code $ERRCODE." - if [ -s "$TMPFILE" ]; then - MESSAGE="$CODEMSG The following error messages were produced:\n\n" - printf "$MESSAGE" | cat - "$TMPFILE" | fold -s | xmessage -file - - else - xmessage "$CODEMSG No error messages were produced." - fi -fi - -rm -f "$TMPFILE" diff --git a/os/debian/patches/run-openttd-wrapper.patch b/os/debian/patches/run-openttd-wrapper.patch deleted file mode 100644 index ff8fc15aef..0000000000 --- a/os/debian/patches/run-openttd-wrapper.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Matthijs Kooijman -Subject: Use a wrapper script for running openttd - -The wrapper script captures stderr from openttd and displays this in -case of an error. This patch makes the the .desktop file call the -wrapper instead of the openttd binary directly. - -Index: media/openttd.desktop.in -=================================================================== ---- a/media/openttd.desktop.in (revision 20124) -+++ b/media/openttd.desktop.in (working copy) -@@ -5,7 +5,7 @@ - Version=1.1 - Name=!!MENU_NAME!! - Icon=openttd --Exec=!!TTD!! -+Exec=/usr/share/games/openttd/openttd-wrapper - Terminal=false - Categories=!!MENU_GROUP!! - Comment=A clone of Transport Tycoon Deluxe diff --git a/os/debian/patches/series b/os/debian/patches/series deleted file mode 100644 index f7cf2d9d58..0000000000 --- a/os/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -run-openttd-wrapper.patch diff --git a/os/debian/rules b/os/debian/rules deleted file mode 100755 index b5d67670bd..0000000000 --- a/os/debian/rules +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Makefile to build the openttd debian package. - -# Use debhelper default for all targets (but some are overridden below). -%: - dh --parallel $@ - -DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) -CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) -endif - -# This prevents linking uselessly to libicudata and silences a warning -# in the build process. -DEB_LDFLAGS_MAINT_APPEND="-Wl,-as-needed" - -# Enable all hardening options (since openttd offers a network-listening -# service that handles untrusted data). -DEB_BUILD_MAINT_OPTIONS=hardening=+all - -# Load buildflags (this uses dpkg-buildflags). Note that we don't export -# them, but instead pass them to ./configure explicitly. -include /usr/share/dpkg/buildflags.mk - -# Pass custom options to configure. Since it's not autoconf but a custom -# script, some of the option names are slightly different. We also need -# to be explicit about the dependencies, in case we're not running in a -# clean build root. -override_dh_auto_configure: - ./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu-sort --with-liblzo2 --with-lzma --without-xdg-basedir --without-iconv --disable-strip CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)" - -# Do some extra installation -override_dh_auto_install: - $(MAKE) install DO_NOT_INSTALL_CHANGELOG=1 DO_NOT_INSTALL_LICENSE=1 - -# Don't do testing. Because the OpenTTD Makefile always does dependency -# generation (even on invalid targets), dh_auto_test thinks there is a -# "test" target, while there isn't. -override_dh_auto_test: - -# Call mrproper. Again, dh_auto_clean thinks there is a distclean -# target, while there isn't. -override_dh_auto_clean: - [ ! -f Makefile ] || $(MAKE) mrproper - -# We want to strip the debug informatiton into the -dbg package. -override_dh_strip: - dh_strip --dbg-package=openttd-dbg diff --git a/os/debian/source/format b/os/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/os/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/os/debian/watch b/os/debian/watch deleted file mode 100644 index 776381b9c2..0000000000 --- a/os/debian/watch +++ /dev/null @@ -1,5 +0,0 @@ -version=3 - -options=downloadurlmangle=s/(.*)\/index.html$/\1\/openttd-\1-source.tar.gz/ \ -http://master.binaries.openttd.org/releases/ \ -(\d+(?:\.\d+)*)/index.html diff --git a/os/macosx/Info.plist.in b/os/macosx/Info.plist.in new file mode 100644 index 0000000000..b3285589dd --- /dev/null +++ b/os/macosx/Info.plist.in @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${CPACK_BUNDLE_NAME} + CFBundleExecutable + ${CPACK_BUNDLE_NAME} + CFBundleGetInfoString + #CPACK_PACKAGE_VERSION#, Copyright 2004-${CURRENT_YEAR} The OpenTTD team + CFBundleIconFile + ${CPACK_BUNDLE_NAME}.icns + CFBundleIdentifier + org.openttd.openttd + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${CPACK_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + #CPACK_PACKAGE_VERSION# + CFBundleVersion + #CPACK_PACKAGE_VERSION# + NSHumanReadableCopyright + Copyright 2004-${CURRENT_YEAR} The OpenTTD team + NSPrincipalClass + NSApplication + + diff --git a/os/macosx/launch.sh b/os/macosx/launch.sh new file mode 100644 index 0000000000..7b0389d8a5 --- /dev/null +++ b/os/macosx/launch.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +ROOT_DIR=$(dirname "$0")/.. + +export DYLD_LIBRARY_PATH=${ROOT_DIR}/Frameworks + +cd ${ROOT_DIR}/Resources +exec ./openttd "$@" diff --git a/os/macosx/plistgen.sh b/os/macosx/plistgen.sh deleted file mode 100755 index f492bcdcf9..0000000000 --- a/os/macosx/plistgen.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# sets VERSION to the value if RELEASE if there are any, -# otherwise it sets VERSION to revision number -if [ "$3" ]; then -VERSION="$3" -else -VERSION="$2" -fi -date=`date +%Y` - -# Generates Info.plist while applying $VERSION - -echo " - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - OpenTTD - CFBundleExecutable - openttd - CFBundleGetInfoString - $VERSION, Copyright 2004-$date The OpenTTD team - CFBundleIconFile - openttd.icns - CFBundleIdentifier - org.openttd.openttd - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OpenTTD - CFBundlePackageType - APPL - CFBundleShortVersionString - $VERSION - CFBundleVersion - $VERSION - NSHumanReadableCopyright - Copyright 2004-$date The OpenTTD team - NSPrincipalClass - NSApplication - -" > "$1"/Contents/Info.plist diff --git a/os/morphos/icons/OpenTTD.info b/os/morphos/icons/OpenTTD.info deleted file mode 100644 index 3a25be6830..0000000000 Binary files a/os/morphos/icons/OpenTTD.info and /dev/null differ diff --git a/os/morphos/icons/docs.info b/os/morphos/icons/docs.info deleted file mode 100644 index 6f8ac00f2d..0000000000 Binary files a/os/morphos/icons/docs.info and /dev/null differ diff --git a/os/morphos/icons/document.info b/os/morphos/icons/document.info deleted file mode 100644 index 877ea3575f..0000000000 Binary files a/os/morphos/icons/document.info and /dev/null differ diff --git a/os/morphos/icons/drawer.info b/os/morphos/icons/drawer.info deleted file mode 100644 index 149ef7e101..0000000000 Binary files a/os/morphos/icons/drawer.info and /dev/null differ diff --git a/os/rpm/openttd-rpmlintrc b/os/rpm/openttd-rpmlintrc deleted file mode 100644 index f8d5fb9ed9..0000000000 --- a/os/rpm/openttd-rpmlintrc +++ /dev/null @@ -1,6 +0,0 @@ -# the man page is in the subpackage data -addFilter("openttd.*: W: no-manual-page-for-binary openttd") -# no other package depends on this package, so this should not matter -addFilter("openttd.*: W: file-contains-date-and-time /usr/bin/openttd") -addFilter("openttd.*: W: file-contains-current-date /usr/bin/openttd") - diff --git a/os/rpm/openttd.changes b/os/rpm/openttd.changes deleted file mode 100644 index 351f260799..0000000000 --- a/os/rpm/openttd.changes +++ /dev/null @@ -1,100 +0,0 @@ -------------------------------------------------------------------- -Sun Mar 6 09:36:55 UTC 2011 - ammler@openttdcoop.org - -- upstream update 1.1.0-RC2 - * Feature: XZ/LZMA2 savegame support. New default reduces - savegame size by 10 to 30% with slightly more CPU usage. - (requires xz-devel) - * Feature: Remote administration - * Feature: a lot improvements with GUI - * Feature: Customizable hotkeys - * Sources for openttd.grf are pngs (requires grfcodec >= 5.1) - -------------------------------------------------------------------- -Sun Nov 21 11:11:38 UTC 2010 - ammler@openttdcoop.org - -- upstream update 1.0.5 - * Fix: Reading (very) recently freed memory [CVE-2010-4168] - -------------------------------------------------------------------- -Sun Oct 31 17:53:41 UTC 2010 - ammler@openttdcoop.org - -- upstream update 1.0.4 - * build openttd.grf from source - -------------------------------------------------------------------- -Tue Aug 10 20:16:03 UTC 2010 - ammler@openttdcoop.org - -- upstream update 1.0.3 - -------------------------------------------------------------------- -Wed Jun 23 11:42:59 UTC 2010 - Marcel Gmür - -- upstream update 1.0.2 - * Feature: Translated desktop shortcut comments (r19884) - * many minor Bugfixes - -------------------------------------------------------------------- -Sat May 1 15:59:32 UTC 2010 - Marcel Gmür - -- upstream update 1.0.1 - * Fix: Leaking a file descriptor - * Fix a lot small bugs, like minor desync issues on Mulitplayer -- no strip on make - -------------------------------------------------------------------- -Thu Apr 1 08:53:54 UTC 2010 - Marcel Gmür - -- upstream update 1.0.0 (finally!) - * completely independent game but still working also - with ttd original gaphics, sounds and music -- Add: Recommends openmsx -- requires lzo2 - -------------------------------------------------------------------- -Fri Dec 18 2009 Marcel Gmür - 0.7.4 - -- support for different branches -- easy support for dedicated branch -- let openttd build system make the dektop file -- split the package to data and gui -- disable requires - -------------------------------------------------------------------- -Thu Oct 01 2009 Marcel Gmür - 0.7.3 - -- disable libicu for RHEL4 - -------------------------------------------------------------------- -Sat Sep 26 2009 Marcel Gmür - 0.7.2 - -- no subfolder games for datadir -- cleanup: no post and postun anymore -- Recommends: opengfx (for suse and mandriva) -- add SUSE support - -------------------------------------------------------------------- -Mon Oct 20 2008 Benedikt Brüggemeier - -- Added libicu dependency - -------------------------------------------------------------------- -Thu Sep 23 2008 Benedikt Brüggemeier - -- Merged both versions of the spec file - -------------------------------------------------------------------- -Fri Aug 29 2008 Jonathan Coome - -- Rewrite spec file from scratch. - -------------------------------------------------------------------- -Sat Aug 02 2008 Benedikt Brüggemeier - -- Updated spec file - -------------------------------------------------------------------- -Thu Mar 27 2008 Denis Burlaka - -- Universal spec file - diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec deleted file mode 100644 index 134caad38e..0000000000 --- a/os/rpm/openttd.spec +++ /dev/null @@ -1,272 +0,0 @@ -# -# spec file for package openttd -# -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2007-2019 The OpenTTD developers -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - -Name: openttd -Version: 1.11.beta1 -Release: 0 -%define srcver 1.11.0-beta1 -Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe -License: GPL-2.0 -Group: Amusements/Games/Strategy/Other -Url: http://www.openttd.org - -Source: http://binaries.openttd.org/releases/%{srcver}/%{name}-%{srcver}-source.tar.gz - -%if 0%{?suse_version} || 0%{?mdkversion} -Recommends: %{name}-gui -%endif - -BuildRequires: gcc-c++ -BuildRequires: libpng-devel -BuildRequires: zlib-devel - -%if 0%{?suse_version} || 0%{?mdkversion} -BuildRequires: update-alternatives -Requires: update-alternatives -%else -BuildRequires: chkconfig -Requires: chkconfig -%endif - -%if 0%{?mdkversion} -BuildRequires: liblzma-devel -BuildRequires: liblzo-devel -%else -BuildRequires: lzo-devel -BuildRequires: xz-devel -%endif - -# OBS workaround: needed by libdrm -%if 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 -BuildRequires: kernel -%endif - -# for lzma detection -%if 0%{?suse_version} -BuildRequires: pkg-config -%endif - -# building openttd.grf is not required as it is a) part of source and -# b) required only, if you want to use the original set -%if 0%{?with_grfcodec} -BuildRequires: grfcodec -%endif -# Recommends would fit better but not well supported... -Requires: openttd-opengfx >= 0.4.2 - -Obsoletes: %{name}-data < %{version} -Provides: %{name}-data = %{version} - -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe" -with lots of new features and enhancements. To play the game you need either -the original data from the game or install the recommend subackages OpenGFX for -free graphics, OpenSFX for free sounds and OpenMSX for free music. - -OpenTTD is licensed under the GNU General Public License version 2.0. For more -information, see the file 'COPYING.md' included with every release and source -download of the game. - -%package gui -Summary: OpenTTD GUI/Client (requires SDL) -Group: Amusements/Games/Strategy/Other - -Requires: %{name} -Conflicts: %{name}-dedicated - -BuildRequires: SDL2-devel -BuildRequires: fontconfig-devel - -%if 0%{?rhel_version} != 600 -BuildRequires: libicu-devel -%endif -%if 0%{?rhel_version} || 0%{?fedora} -BuildRequires: freetype-devel -%endif -%if 0%{?suse_version} || 0%{?mdkversion} -BuildRequires: freetype2-devel -%endif -%if 0%{?suse_version} -BuildRequires: update-desktop-files -%else -BuildRequires: desktop-file-utils -Requires: hicolor-icon-theme -%endif - -%if 0%{?suse_version} || 0%{?mdkversion} -Recommends: openttd-openmsx -Recommends: openttd-opensfx -%endif - -%description gui -OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe" -with lots of new features and enhancements. To play the game you need either -the original data from the game or install the recommend subackages OpenGFX for -free graphics, OpenSFX for free sounds and OpenMSX for free music. - -This subpackage provides the binary which needs SDL. - -%package dedicated -Summary: OpenTTD Dedicated Server binary (without SDL) -Group: Amusements/Games/Strategy/Other - -Requires: %{name} -Conflicts: %{name}-gui - -%description dedicated -OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe" -with lots of new features and enhancements. To play the game you need either -the original data from the game or the required package OpenGFX and OpenSFX. - -This subpackage provides the binary without dependency of SDL. - -%prep -%setup -qn openttd%{?branch:-%{branch}}-%{srcver} - -# we build the grfs from sources but validate the result with the existing data -%if 0%{?with_grfcodec} -md5sum bin/data/* > validate.data -%endif - -%build -# first, we build the dedicated binary and copy it to dedicated/ -./configure \ - --prefix-dir="%{_prefix}" \ - --binary-dir="bin" \ - --data-dir="share/%{name}" \ - --enable-dedicated -make %{?_smp_mflags} BUNDLE_DIR="dedicated" bundle - -# then, we build the common gui version which we install the usual way -./configure \ - --prefix-dir="%{_prefix}" \ - --binary-name="%{name}" \ - --binary-dir="bin" \ - --data-dir="share/%{name}" \ - --doc-dir="share/doc/%{name}" \ - --menu-name="OpenTTD%{?branch: %{branch}}" \ - --menu-group="Game;StrategyGame;" - -make %{?_smp_mflags} - -%install -# install the dedicated binary -install -D -m0755 dedicated/openttd %{buildroot}%{_bindir}/%{name}-dedicated -# install the gui binary and rename to openttd-gui -make install INSTALL_DIR=%{buildroot} -mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-gui -# we need a dummy target for /etc/alternatives/openttd -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -touch %{buildroot}%{_sysconfdir}/alternatives/%{name} -ln -s -f /etc/alternatives/%{name} %{buildroot}%{_bindir}/%{name} - -%if 0%{?suse_version} -%suse_update_desktop_file -r %{name} Game StrategyGame -%else -%if 0%{?fedora} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 -desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ - --add-category=StrategyGame \ - media/openttd.desktop -%endif -%endif - -%if 0%{?with_grfcodec} -%check -md5sum -c validate.data -%endif - -%post gui -/usr/sbin/update-alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-gui 10 -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post dedicated -/usr/sbin/update-alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-dedicated 0 - -%preun gui -if [ "$1" = 0 ] ; then - /usr/sbin/update-alternatives --remove %{name} %{_bindir}/%{name}-gui -fi - -%preun dedicated -if [ "$1" = 0 ] ; then - /usr/sbin/update-alternatives --remove %{name} %{_bindir}/%{name}-dedicated -fi - -%postun gui -if [ "$1" -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans gui -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -# we need a file in the main package so it will be made -%files -%defattr(-, root, root) -%dir %{_datadir}/doc/%{name} -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/lang -%dir %{_datadir}/%{name}/baseset -%dir %{_datadir}/%{name}/scripts -%dir %{_datadir}/%{name}/ai -%dir %{_datadir}/%{name}/game -%{_datadir}/doc/%{name}/* -%{_datadir}/%{name}/lang/* -%{_datadir}/%{name}/baseset/* -%{_datadir}/%{name}/scripts/* -%{_datadir}/%{name}/ai/* -%{_datadir}/%{name}/game/* -%doc %{_mandir}/man6/%{name}.6.* - -%files gui -%defattr(-, root, root) -%ghost %{_sysconfdir}/alternatives/%{name} -%ghost %{_bindir}/%{name} -%{_bindir}/%{name}-gui -%dir %{_datadir}/icons/hicolor -%dir %{_datadir}/icons/hicolor/16x16 -%dir %{_datadir}/icons/hicolor/16x16/apps -%dir %{_datadir}/icons/hicolor/32x32 -%dir %{_datadir}/icons/hicolor/32x32/apps -%dir %{_datadir}/icons/hicolor/48x48 -%dir %{_datadir}/icons/hicolor/48x48/apps -%dir %{_datadir}/icons/hicolor/64x64 -%dir %{_datadir}/icons/hicolor/64x64/apps -%dir %{_datadir}/icons/hicolor/128x128 -%dir %{_datadir}/icons/hicolor/128x128/apps -%dir %{_datadir}/icons/hicolor/256x256 -%dir %{_datadir}/icons/hicolor/256x256/apps -%{_datadir}/applications/%{name}.desktop -%{_datadir}/icons/hicolor/16x16/apps/%{name}.png -%{_datadir}/icons/hicolor/32x32/apps/%{name}.png -%{_datadir}/icons/hicolor/48x48/apps/%{name}.png -%{_datadir}/icons/hicolor/64x64/apps/%{name}.png -%{_datadir}/icons/hicolor/128x128/apps/%{name}.png -%{_datadir}/icons/hicolor/256x256/apps/%{name}.png -%{_datadir}/pixmaps/%{name}.32.xpm - -%files dedicated -%defattr(-, root, root) -%ghost %{_bindir}/%{name} -%ghost %{_sysconfdir}/alternatives/%{name} -%{_bindir}/%{name}-dedicated - -%changelog diff --git a/os/windows/installer/build_installers.bat b/os/windows/installer/build_installers.bat deleted file mode 100644 index 73a2898da2..0000000000 --- a/os/windows/installer/build_installers.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -"c:\Program Files\NSIS\makensis.exe" /DVERSION_INCLUDE=version_win9x.txt install.nsi > win9x.log -"c:\Program Files\NSIS\makensis.exe" /DVERSION_INCLUDE=version_win32.txt install.nsi > win32.log -"c:\Program Files\NSIS\makensis.exe" /DVERSION_INCLUDE=version_win64.txt install.nsi > win64.log diff --git a/os/windows/installer/cdfinder.ini b/os/windows/installer/cdfinder.ini deleted file mode 100644 index 45f9602f13..0000000000 --- a/os/windows/installer/cdfinder.ini +++ /dev/null @@ -1,26 +0,0 @@ -; Ini file generated by the HM NIS Edit IO designer. -[Settings] -NumFields=3 - -[Field 1] -Type=Groupbox -Text=Transport Tycoon Deluxe Installation location -Left=6 -Right=294 -Top=68 -Bottom=100 - -[Field 2] -Type=DirRequest -Left=10 -Right=290 -Top=80 -Bottom=92 - -[Field 3] -Type=Label -Left=17 -Right=282 -Top=6 -Bottom=64 - diff --git a/os/windows/installer/install.nsi b/os/windows/installer/install.nsi deleted file mode 100644 index 7b93992286..0000000000 --- a/os/windows/installer/install.nsi +++ /dev/null @@ -1,744 +0,0 @@ -# Version numbers to update -!define APPV_MAJOR 1 -!define APPV_MINOR 11 -!define APPV_MAINT 0 -!define APPV_BUILD 0 -!define APPV_EXTRA "-beta1" - -!define APPNAME "OpenTTD" ; Define application name -!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version -!define APPVERSIONINTERNAL "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}.${APPV_BUILD}" ; Define application version in X.X.X.X -!define INSTALLERVERSION ${APPV_MAJOR}${APPV_MINOR}${APPV_MAINT}${APPV_BUILD} -!include ${VERSION_INCLUDE} - -!define APPURLLINK "http://www.openttd.org" -!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}" - -!define OPENGFX_BASE_VERSION "1.2.0" -!define OPENSFX_BASE_VERSION "0.8.0" -!define OPENMSX_BASE_VERSION "1.0.0" - -!define MUI_ICON "..\..\..\media\openttd.ico" -!define MUI_UNICON "..\..\..\media\openttd.ico" -!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_BITMAP "top.bmp" - -ManifestDPIAware true -BrandingText "OpenTTD Installer" -SetCompressor LZMA - -; Version Info -Var AddWinPrePopulate -VIProductVersion "${APPVERSIONINTERNAL}" -VIAddVersionKey "ProductName" "OpenTTD ${APPBITS}-bit Installer for Windows ${EXTRA_VERSION}" -VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}" -VIAddVersionKey "CompanyName" "OpenTTD Developers" -VIAddVersionKey "FileDescription" "Installs ${APPNAMEANDVERSION}" -VIAddVersionKey "ProductVersion" "${APPVERSION}" -VIAddVersionKey "InternalName" "InstOpenTTD-${APPARCH}" -VIAddVersionKey "FileVersion" "${APPVERSION}-${APPARCH}" -VIAddVersionKey "LegalCopyright" " " -; Main Install settings -Name "${APPNAMEANDVERSION} ${APPBITS}-bit for Windows ${EXTRA_VERSION}" - -; NOTE: Keep trailing backslash! -InstallDirRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" -OutFile "openttd-${APPVERSION}-${APPARCH}.exe" -CRCCheck force - -ShowInstDetails show -ShowUninstDetails show - -RequestExecutionLevel admin - -Var SHORTCUTS -Var CDDRIVE - -; Modern interface settings -!include "MUI2.nsh" -!include "InstallOptions.nsh" -!include "WinVer.nsh" - -!define MUI_ABORTWARNING -!define MUI_WELCOMEPAGE_TITLE_3LINES -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING.md" - -!define MUI_COMPONENTSPAGE_SMALLDESC -!insertmacro MUI_PAGE_COMPONENTS - -;--------------------------------- -; Custom page for finding TTDLX CD -Page custom SelectCDEnter SelectCDExit ": TTD folder" - -!insertmacro MUI_PAGE_DIRECTORY - -;Start Menu Folder Page Configuration -!define MUI_STARTMENUPAGE_DEFAULTFOLDER $SHORTCUTS -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKEY_LOCAL_MACHINE" -!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Shortcut Folder" - -!insertmacro MUI_PAGE_STARTMENU "OpenTTD" $SHORTCUTS - -!insertmacro MUI_PAGE_INSTFILES - -!define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_RUN_TEXT "Run ${APPNAMEANDVERSION} now!" -!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe" -!define MUI_FINISHPAGE_LINK "Visit the OpenTTD site for more information" -!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}" -!define MUI_FINISHPAGE_NOREBOOTSUPPORT -!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.md" -!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBack - -!insertmacro MUI_PAGE_FINISH -!define MUI_PAGE_HEADER_TEXT "Uninstall ${APPNAMEANDVERSION}" -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -; Set languages (first is default language) -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_RESERVEFILE_LANGDLL - -;-------------------------------------------------------------- -; (Core) OpenTTD install section. Copies all internal game data -Section "!OpenTTD" Section1 - ; Make sure to be upgraded OpenTTD is not running - Call CheckOpenTTDRunning - - ; Overwrite files by default, but don't complain on failure - SetOverwrite try - - SetShellVarContext all - - ; Define root variable relative to installer - !define PATH_ROOT "..\..\..\" - - ; Copy language files - SetOutPath "$INSTDIR\lang\" - File ${PATH_ROOT}bin\lang\english.lng - - ; Copy AI files - SetOutPath "$INSTDIR\ai\" - File ${PATH_ROOT}bin\ai\compat_*.nut - - ; Copy Game Script files - SetOutPath "$INSTDIR\game\" - File ${PATH_ROOT}bin\game\compat_*.nut - - ; Copy data files - SetOutPath "$INSTDIR\baseset\" - File ${PATH_ROOT}bin\baseset\*.grf - File ${PATH_ROOT}bin\baseset\*.obg - File ${PATH_ROOT}bin\baseset\*.obm - File ${PATH_ROOT}bin\baseset\*.obs - File ${PATH_ROOT}bin\baseset\opntitle.dat - - ; Copy the scripts - SetOutPath "$INSTDIR\scripts\" - File ${PATH_ROOT}bin\scripts\*.* - Push "$INSTDIR\scripts\README.md" - Call unix2dos - - ; Copy some documentation files - SetOutPath "$INSTDIR\docs\" - File ${PATH_ROOT}docs\multiplayer.md - Push "$INSTDIR\docs\multiplayer.md" - Call unix2dos - - ; Copy the rest of the stuff - SetOutPath "$INSTDIR\" - - ; Copy text files - File ${PATH_ROOT}changelog.txt - Push "$INSTDIR\changelog.txt" - Call unix2dos - File ${PATH_ROOT}COPYING.md - Push "$INSTDIR\COPYING.md" - Call unix2dos - File ${PATH_ROOT}README.md - Push "$INSTDIR\README.md" - Call unix2dos - File ${PATH_ROOT}known-bugs.txt - Push "$INSTDIR\known-bugs.txt" - Call unix2dos - - ; Copy executable - File /oname=openttd.exe ${BINARY_DIR}\openttd.exe - - - ; Delete old files from the main dir. they are now placed in baseset/ and lang/ - Delete "$INSTDIR\*.lng" - Delete "$INSTDIR\*.grf" - Delete "$INSTDIR\sample.cat" - Delete "$INSTDIR\ttd.exe" - Delete "$INSTDIR\data\opntitle.dat" - Delete "$INSTDIR\data\2ccmap.grf" - Delete "$INSTDIR\data\airports.grf" - Delete "$INSTDIR\data\autorail.grf" - Delete "$INSTDIR\data\canalsw.grf" - Delete "$INSTDIR\data\dosdummy.grf" - Delete "$INSTDIR\data\elrailsw.grf" - Delete "$INSTDIR\data\nsignalsw.grf" - Delete "$INSTDIR\data\openttd.grf" - Delete "$INSTDIR\data\roadstops.grf" - Delete "$INSTDIR\data\trkfoundw.grf" - Delete "$INSTDIR\data\openttdd.grf" - Delete "$INSTDIR\data\openttdw.grf" - Delete "$INSTDIR\data\orig_win.obg" - Delete "$INSTDIR\data\orig_dos.obg" - Delete "$INSTDIR\data\orig_dos_de.obg" - Delete "$INSTDIR\data\orig_win.obs" - Delete "$INSTDIR\data\orig_dos.obs" - Delete "$INSTDIR\data\no_sound.obs" - - ; Create the Registry Entries - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit ${APPURLLINK}" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayIcon" "$INSTDIR\openttd.exe,0" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayName" "OpenTTD ${APPVERSION}" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" "${APPVERSION}" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "${APPURLLINK}" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" "$INSTDIR" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Publisher" "OpenTTD" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" "$SHORTCUTS" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "${APPURLLINK}" - ; This key sets the Version DWORD that new installers will check against - WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" ${INSTALLERVERSION} - - !insertmacro MUI_STARTMENU_WRITE_BEGIN "OpenTTD" - CreateShortCut "$DESKTOP\OpenTTD.lnk" "$INSTDIR\openttd.exe" - CreateDirectory "$SMPROGRAMS\$SHORTCUTS" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\OpenTTD.lnk" "$INSTDIR\openttd.exe" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Uninstall.lnk" "$INSTDIR\uninstall.exe" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" "$INSTDIR\README.md" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" "$INSTDIR\Changelog.txt" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" "$INSTDIR\known-bugs.txt" - CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Docs" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" "$INSTDIR\docs\multiplayer.md" - CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Scripts" - CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" "$INSTDIR\scripts\README.md" - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -;-------------------------------------------------------------- -; OpenTTD translation install section. Copies only translations -Section "OpenTTD translations" Section6 - ; Overwrite files by default, but don't complain on failure - SetOverwrite try - - ; Copy language files - SetOutPath "$INSTDIR\lang\" - File ${PATH_ROOT}bin\lang\*.lng -SectionEnd - -;---------------------------------------------------------------------------------- -; OpenGFX files install section. Downloads OpenGFX and installs it -Section "Download OpenGFX (free graphics set)" Section3 - SetOverwrite try - - NSISdl::download "http://binaries.openttd.org/installer/opengfx-${OPENGFX_BASE_VERSION}.7z" "$INSTDIR\baseset\opengfx.7z" - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Downloading of OpenGFX failed" - Goto Done - - ; Let's extract the files - SetOutPath "$INSTDIR\baseset\" - NSIS7z::Extract "$INSTDIR\baseset\opengfx.7z" - - Delete "$INSTDIR\baseset\opengfx.7z" - SetOutPath "$INSTDIR\" -Done: - -SectionEnd - -;---------------------------------------------------------------------------------- -; OpenSFX files install section. Downloads OpenSFX and installs it -Section "Download OpenSFX (free sound set)" Section4 - SetOverwrite try - - NSISdl::download "http://binaries.openttd.org/installer/opensfx-${OPENSFX_BASE_VERSION}.7z" "$INSTDIR\baseset\opensfx.7z" - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Downloading of OpenSFX failed" - Goto Done - - ; Let's extract the files - SetOutPath "$INSTDIR\baseset\" - NSIS7z::Extract "$INSTDIR\baseset\opensfx.7z" - - Delete "$INSTDIR\baseset\opensfx.7z" - SetOutPath "$INSTDIR\" -Done: - -SectionEnd - -;---------------------------------------------------------------------------------- -; OpenMSX files install section. Downloads OpenMSX and installs it -Section "Download OpenMSX (free music set)" Section5 - SetOverwrite try - - NSISdl::download "http://binaries.openttd.org/installer/openmsx-${OPENMSX_BASE_VERSION}.7z" "$INSTDIR\baseset\openmsx.7z" - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Downloading of OpenMSX failed" - Goto Done - - ; Let's extract the files - SetOutPath "$INSTDIR\baseset\" - NSIS7z::Extract "$INSTDIR\baseset\openmsx.7z" - - Delete "$INSTDIR\baseset\openmsx.7z" - SetOutPath "$INSTDIR\" -Done: - -SectionEnd - -;---------------------------------------------------------------------------------- -; TTDLX files install section. Copies all needed TTDLX files from CD or install dir -Section /o "Copy data from Transport Tycoon Deluxe CD-ROM" Section2 - SetOverwrite try - ; Let's copy the files with size approximation - SetOutPath "$INSTDIR\baseset" - CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\baseset\" 1028 - CopyFiles "$CDDRIVE\gm.cat" "$INSTDIR\baseset\gm.cat" 415 - CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\baseset\sample.cat" 1566 - ; Copy Windows files - CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\baseset\trg1r.grf" 2365 - CopyFiles "$CDDRIVE\trgcr.grf" "$INSTDIR\baseset\trgcr.grf" 260 - CopyFiles "$CDDRIVE\trghr.grf" "$INSTDIR\baseset\trghr.grf" 400 - CopyFiles "$CDDRIVE\trgir.grf" "$INSTDIR\baseset\trgir.grf" 334 - CopyFiles "$CDDRIVE\trgtr.grf" "$INSTDIR\baseset\trgtr.grf" 546 - ; Copy DOS files - CopyFiles "$CDDRIVE\trg1.grf" "$INSTDIR\baseset\trg1.grf" 2365 - CopyFiles "$CDDRIVE\trgc.grf" "$INSTDIR\baseset\trgc.grf" 260 - CopyFiles "$CDDRIVE\trgh.grf" "$INSTDIR\baseset\trgh.grf" 400 - CopyFiles "$CDDRIVE\trgi.grf" "$INSTDIR\baseset\trgi.grf" 334 - CopyFiles "$CDDRIVE\trgt.grf" "$INSTDIR\baseset\trgt.grf" 546 - SetOutPath "$INSTDIR\" -SectionEnd - -;------------------------------------------- -; Install the uninstaller (option is hidden) -Section -FinishSection - WriteUninstaller "$INSTDIR\uninstall.exe" -SectionEnd - -; Modern install component descriptions -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Minimal OpenTTD installation in English. You need at least one of the game graphics and sound sets installed." - !insertmacro MUI_DESCRIPTION_TEXT ${Section6} "Translations of OpenTTD." - !insertmacro MUI_DESCRIPTION_TEXT ${Section3} "Download the free OpenGFX game graphics set. This download is about 3 MiB." - !insertmacro MUI_DESCRIPTION_TEXT ${Section4} "Download the free OpenSFX game sound set. This download is about 10 MiB." - !insertmacro MUI_DESCRIPTION_TEXT ${Section5} "Download the free OpenMSX game music set. This download is about 200 KiB." - !insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics, sounds and music from the Transport Tycoon Deluxe CD." -!insertmacro MUI_FUNCTION_DESCRIPTION_END - -;----------------------------------------------- -; Uninstall section, deletes all installed files -Section "Uninstall" - SetShellVarContext all - - IfFileExists "$INSTDIR\save" 0 NoRemoveSavedGames - MessageBox MB_YESNO|MB_ICONQUESTION \ - "Remove the save game folders located at $\"$INSTDIR\save$\"?$\n \ - If you choose Yes, your saved games will be deleted." \ - IDYES RemoveSavedGames IDNO NoRemoveSavedGames - RemoveSavedGames: - Delete "$INSTDIR\save\autosave\*" - RMDir "$INSTDIR\save\autosave" - Delete "$INSTDIR\save\*" - RMDir "$INSTDIR\save" - NoRemoveSavedGames: - - IfFileExists "$INSTDIR\scenario" 0 NoRemoveScen - MessageBox MB_YESNO|MB_ICONQUESTION \ - "Remove the scenario folders located at $\"$INSTDIR\scenario$\"?$\n \ - If you choose Yes, your scenarios will be deleted." \ - IDYES RemoveScen IDNO NoRemoveScen - RemoveScen: - Delete "$INSTDIR\scenario\heightmap*" - RMDir "$INSTDIR\scenario\heightmap" - Delete "$INSTDIR\scenario\*" - RMDir "$INSTDIR\scenario" - NoRemoveScen: - - ; Remove from registry... - !insertmacro MUI_STARTMENU_GETFOLDER "OpenTTD" $SHORTCUTS - ReadRegStr $SHORTCUTS HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" - - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" - - ; Delete self - Delete "$INSTDIR\uninstall.exe" - - ; Delete Shortcuts - Delete "$DESKTOP\OpenTTD.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\OpenTTD.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Uninstall.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Readme.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Changelog.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Docs\32bpp.lnk" - Delete "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" - - ; Clean up OpenTTD dir - Delete "$INSTDIR\changelog.txt" - Delete "$INSTDIR\README.md" - Delete "$INSTDIR\known-bugs.txt" - Delete "$INSTDIR\openttd.exe" - Delete "$INSTDIR\COPYING.md" - Delete "$INSTDIR\INSTALL.LOG" - Delete "$INSTDIR\crash.log" - Delete "$INSTDIR\crash.dmp" - Delete "$INSTDIR\openttd.cfg" - Delete "$INSTDIR\hs.dat" - Delete "$INSTDIR\cached_sprites.*" - Delete "$INSTDIR\save\autosave\network*.tmp" ; temporary network file - - ; AI files - Delete "$INSTDIR\ai\compat_*.nut" - - ; Game Script files - Delete "$INSTDIR\game\compat_*.nut" - - ; Baseset files - Delete "$INSTDIR\baseset\opntitle.dat" - Delete "$INSTDIR\baseset\openttd.grf" - Delete "$INSTDIR\baseset\orig_extra.grf" - Delete "$INSTDIR\baseset\orig_win.obg" - Delete "$INSTDIR\baseset\orig_dos.obg" - Delete "$INSTDIR\baseset\orig_dos_de.obg" - Delete "$INSTDIR\baseset\orig_win.obs" - Delete "$INSTDIR\baseset\orig_dos.obs" - Delete "$INSTDIR\baseset\no_sound.obs" - Delete "$INSTDIR\baseset\sample.cat" - Delete "$INSTDIR\baseset\trg1r.grf" - Delete "$INSTDIR\baseset\trghr.grf" - Delete "$INSTDIR\baseset\trgtr.grf" - Delete "$INSTDIR\baseset\trgcr.grf" - Delete "$INSTDIR\baseset\trgir.grf" - Delete "$INSTDIR\baseset\trg1.grf" - Delete "$INSTDIR\baseset\trgh.grf" - Delete "$INSTDIR\baseset\trgt.grf" - Delete "$INSTDIR\baseset\trgc.grf" - Delete "$INSTDIR\baseset\trgi.grf" - Delete "$INSTDIR\baseset\gm.cat" - Delete "$INSTDIR\baseset\gm-tto.cat" - Delete "$INSTDIR\baseset\*.gm" - - Delete "$INSTDIR\data\sample.cat" - Delete "$INSTDIR\data\trg1r.grf" - Delete "$INSTDIR\data\trghr.grf" - Delete "$INSTDIR\data\trgtr.grf" - Delete "$INSTDIR\data\trgcr.grf" - Delete "$INSTDIR\data\trgir.grf" - Delete "$INSTDIR\data\trg1.grf" - Delete "$INSTDIR\data\trgh.grf" - Delete "$INSTDIR\data\trgt.grf" - Delete "$INSTDIR\data\trgc.grf" - Delete "$INSTDIR\data\trgi.grf" - Delete "$INSTDIR\gm\*.gm" - - ; Downloaded OpenGFX/OpenSFX/OpenMSX - Delete "$INSTDIR\baseset\opengfx\*" - RMDir "$INSTDIR\baseset\opengfx" - Delete "$INSTDIR\baseset\opensfx\*" - RMDir "$INSTDIR\baseset\opensfx" - Delete "$INSTDIR\baseset\openmsx\*" - RMDir "$INSTDIR\baseset\openmsx" - - Delete "$INSTDIR\data\opengfx\*" - RMDir "$INSTDIR\data\opengfx" - Delete "$INSTDIR\data\opensfx\*" - RMDir "$INSTDIR\data\opensfx" - Delete "$INSTDIR\gm\openmsx\*" - RMDir "$INSTDIR\gm\openmsx" - - ; Language files - Delete "$INSTDIR\lang\*.lng" - - ; Scripts - Delete "$INSTDIR\scripts\*.*" - - ; Documentation - Delete "$INSTDIR\docs\*.*" - - ; Base sets for music - Delete "$INSTDIR\gm\orig_win.obm" - Delete "$INSTDIR\gm\orig_dos.obm" - Delete "$INSTDIR\gm\no_music.obm" - Delete "$INSTDIR\baseset\orig_win.obm" - Delete "$INSTDIR\baseset\orig_dos.obm" - Delete "$INSTDIR\baseset\no_music.obm" - - ; Remove remaining directories - RMDir "$SMPROGRAMS\$SHORTCUTS\Extras\" - RMDir "$SMPROGRAMS\$SHORTCUTS\Scripts\" - RMDir "$SMPROGRAMS\$SHORTCUTS\Docs\" - RMDir "$SMPROGRAMS\$SHORTCUTS" - RMDir "$INSTDIR\ai" - RMDir "$INSTDIR\game" - RMDir "$INSTDIR\data" - RMDir "$INSTDIR\baseset" - RMDir "$INSTDIR\gm" - RMDir "$INSTDIR\lang" - RMDir "$INSTDIR\scripts" - RMDir "$INSTDIR\docs" - RMDir "$INSTDIR" - -SectionEnd - -;------------------------------------------------------------ -; Custom page function to find the TTDLX CD/install location -Function SelectCDEnter - SectionGetFlags ${Section2} $0 - IntOp $1 $0 & 0x80 ; bit 7 set by upgrade, no need to copy files - IntCmp $1 1 DoneCD ; Upgrade doesn't need copy files - - IntOp $0 $0 & 1 - IntCmp $0 1 NoAbort - Abort -NoAbort: - - GetTempFileName $R0 - !insertmacro MUI_HEADER_TEXT "Locate TTD" "Setup needs the location of Transport Tycoon Deluxe in order to continue." - !insertmacro INSTALLOPTIONS_EXTRACT_AS "CDFinder.ini" "CDFinder" - - ClearErrors - ; Now, let's populate $CDDRIVE - ReadRegStr $R0 HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath" - IfErrors NoTTD - StrCmp $CDDRIVE "" 0 Populated - StrCpy $CDDRIVE $R0 -Populated: - StrCpy $AddWinPrePopulate "Setup has detected your TTD folder. Don't change the folder. Simply press Next." - Goto TruFinish -NoTTD: - StrCpy $AddWinPrePopulate "Setup couldn't find TTD. Please enter the path where the graphics files from TTD are stored and press Next to continue." -TruFinish: - ClearErrors - !insertmacro INSTALLOPTIONS_WRITE "CDFinder" "Field 2" "State" $CDDRIVE ; TTDLX path - !insertmacro INSTALLOPTIONS_WRITE "CDFinder" "Field 3" "Text" $AddWinPrePopulate ; Caption -DoneCD: - ; Initialize the dialog *AFTER* we've changed the text otherwise we won't see the changes - !insertmacro INSTALLOPTIONS_INITDIALOG "CDFinder" - !insertmacro INSTALLOPTIONS_SHOW -FunctionEnd - -;---------------------------------------------------------------- -; Custom page function when 'next' is selected for the TTDLX path -Function SelectCDExit - !insertmacro INSTALLOPTIONS_READ $CDDRIVE "CDFinder" "Field 2" "State" - ; If trg1r.grf does not exist at the path, retry with DOS version - IfFileExists $CDDRIVE\trg1r.grf "" DosCD - IfFileExists $CDDRIVE\trgir.grf "" NoCD - IfFileExists $CDDRIVE\sample.cat hasCD NoCD -DosCD: - IfFileExists $CDDRIVE\TRG1.GRF "" NoCD - IfFileExists $CDDRIVE\TRGI.GRF "" NoCD - IfFileExists $CDDRIVE\SAMPLE.CAT hasCD NoCD -NoCD: - MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe location!" - Abort -hasCD: -FunctionEnd - -;------------------------------------------------------------------------------- -; Determine windows version, returns "win9x" if Win9x/Me/2000/XP SP2- or "winnt" for the rest on the stack -Function GetWindowsVersion - GetVersion::WindowsPlatformArchitecture - Pop $R0 - IntCmp $R0 64 WinNT 0 - ClearErrors - StrCpy $R0 "win9x" - ${If} ${IsNT} - ${If} ${IsWinXP} - ${AndIf} ${AtLeastServicePack} 3 - ${OrIf} ${AtLeastWin2003} - GoTo WinNT - ${EndIf} - ${EndIf} - GoTo Done -WinNT: - StrCpy $R0 "winnt" -Done: - Push $R0 -FunctionEnd - -;------------------------------------------------------------------------------- -; Check whether we're not running an installer for 64 bits on 32 bits and vice versa -Function CheckProcessorArchitecture - GetVersion::WindowsPlatformArchitecture - Pop $R0 - IntCmp $R0 64 Win64 0 - ClearErrors - IntCmp ${APPBITS} 64 0 Done - MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the 64-bit OpenTTD on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort - GoTo Done -Win64: - ClearErrors - IntCmp ${APPBITS} 64 Done 0 - MessageBox MB_YESNO|MB_ICONINFORMATION "You are trying to install the 32-bit OpenTTD on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort - GoTo Done -Abort: - Quit -Done: -FunctionEnd - -;------------------------------------------------------------------------------- -; Check whether we're not running an installer for NT on 9x and vice versa -Function CheckWindowsVersion - Call GetWindowsVersion - Pop $R0 - StrCmp $R0 "win9x" 0 WinNT - ClearErrors - StrCmp ${APPARCH} "win9x" Done 0 - MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the Windows XP SP3 and newer version on Windows 95, 98, ME, 2000, or XP without SP3. This will not work - please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort - GoTo Done -WinNT: - ClearErrors - StrCmp ${APPARCH} "win9x" 0 Done - MessageBox MB_YESNO|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98, 2000 and XP without SP3 version on Windows XP SP3 or newer. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort -Abort: - Quit -Done: -FunctionEnd - -;------------------------------------------------------------------------------- -; Check whether OpenTTD is running -Function CheckOpenTTDRunning - IfFileExists "$INSTDIR\openttd.exe" 0 Done -Retry: - FindProcDLL::FindProc "openttd.exe" - Pop $R0 - IntCmp $R0 1 0 Done - ClearErrors - Delete "$INSTDIR\openttd.exe" - IfErrors 0 Done - ClearErrors - MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "OpenTTD is running. Please close it and retry." IDRETRY Retry - Abort -Done: -FunctionEnd - -;------------------------------------------------------------------------------- -; strips all CRs -; and then converts all LFs into CRLFs -; (this is roughly equivalent to "cat file | dos2unix | unix2dos") -; -; usage: -; Push "infile" -; Call unix2dos -; -; beware that this function destroys $0 $1 $2 -Function unix2dos - ClearErrors - - Pop $2 - Rename $2 $2.U2D - FileOpen $1 $2 w - - FileOpen $0 $2.U2D r - - Push $2 ; save name for deleting - - IfErrors unix2dos_done - - ; $0 = file input (opened for reading) - ; $1 = file output (opened for writing) - -unix2dos_loop: - ; read a byte (stored in $2) - FileReadByte $0 $2 - IfErrors unix2dos_done ; EOL - ; skip CR - StrCmp $2 13 unix2dos_loop - ; if LF write an extra CR - StrCmp $2 10 unix2dos_cr unix2dos_write - -unix2dos_cr: - FileWriteByte $1 13 - -unix2dos_write: - ; write byte - FileWriteByte $1 $2 - ; read next byte - Goto unix2dos_loop - -unix2dos_done: - ; close files - FileClose $0 - FileClose $1 - - ; delete original - Pop $0 - Delete $0.U2D - -FunctionEnd - - -Var OLDVERSION -Var UninstallString - -;----------------------------------------------------------------------------------- -; NSIS Initialize function, determine if we are going to install/upgrade or uninstall -Function .onInit - StrCpy $SHORTCUTS "OpenTTD" - - SectionSetSize ${Section3} 6144 - SectionSetSize ${Section4} 13312 - SectionSetSize ${Section5} 1024 - - SectionSetFlags 0 17 - - ; Starts Setup - let's look for an older version of OpenTTD - ReadRegDWORD $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" - - IfErrors ShowWelcomeMessage ShowUpgradeMessage -ShowWelcomeMessage: - ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" - ; In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry) - IfErrors FinishCallback - -ShowUpgradeMessage: - IntCmp ${INSTALLERVERSION} $R8 VersionsAreEqual InstallerIsOlder WelcomeToSetup -WelcomeToSetup: - ; An older version was found. Let's let the user know there's an upgrade that will take place. - ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" - ; Gets the older version then displays it in a message box - MessageBox MB_OK|MB_ICONINFORMATION \ - "Welcome to ${APPNAMEANDVERSION} Setup.$\nThis will allow you to upgrade from version $OLDVERSION." - SectionSetFlags ${Section2} 0x80 ; set bit 7 - SectionSetFlags ${Section3} 0x80 ; set bit 7 - SectionSetFlags ${Section4} 0x80 ; set bit 7 - SectionSetFlags ${Section5} 0x80 ; set bit 7 - Goto FinishCallback - -VersionsAreEqual: - ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" - IfFileExists "$UninstallString" "" FinishCallback - MessageBox MB_YESNO|MB_ICONQUESTION \ - "Setup detected ${APPNAMEANDVERSION} on your system. This is the same version that this program will install.$\nAre you trying to uninstall it?" \ - IDYES DoUninstall IDNO FinishCallback -DoUninstall: ; You have the same version as this installer. This allows you to uninstall. - Exec "$UninstallString" - Quit - -InstallerIsOlder: - MessageBox MB_OK|MB_ICONSTOP \ - "You have a newer version of ${APPNAME}.$\nSetup will now exit." - Quit - -FinishCallback: - ClearErrors - Call CheckProcessorArchitecture - Call CheckWindowsVersion -FunctionEnd -; eof - diff --git a/os/windows/installer/version_win32.txt b/os/windows/installer/version_win32.txt deleted file mode 100644 index 0ac06d0d19..0000000000 --- a/os/windows/installer/version_win32.txt +++ /dev/null @@ -1,5 +0,0 @@ -!define APPBITS 32 ; Define number of bits for the architecture -!define EXTRA_VERSION "XP SP3 and newer" -!define APPARCH "win32" ; Define the application architecture -!define BINARY_DIR "${PATH_ROOT}objs\win32\Release" -InstallDir "$PROGRAMFILES32\OpenTTD\" diff --git a/os/windows/installer/version_win64.txt b/os/windows/installer/version_win64.txt deleted file mode 100644 index 15ef51096b..0000000000 --- a/os/windows/installer/version_win64.txt +++ /dev/null @@ -1,5 +0,0 @@ -!define APPBITS 64 ; Define number of bits for the architecture -!define EXTRA_VERSION "XP and newer" -!define APPARCH "win64" ; Define the application architecture -!define BINARY_DIR "${PATH_ROOT}objs\x64\Release" -InstallDir "$PROGRAMFILES64\OpenTTD\" diff --git a/os/windows/installer/version_win9x.txt b/os/windows/installer/version_win9x.txt deleted file mode 100644 index 603778d73c..0000000000 --- a/os/windows/installer/version_win9x.txt +++ /dev/null @@ -1,5 +0,0 @@ -!define APPBITS 32 ; Define number of bits for the architecture -!define EXTRA_VERSION "95, 98, ME, 2000 and XP SP2 or older" -!define APPARCH "win9x" ; Define the application architecture -!define BINARY_DIR "${PATH_ROOT}objs\release" -InstallDir "$PROGRAMFILES32\OpenTTD\" diff --git a/os/windows/installer/top.bmp b/os/windows/nsis-top.bmp similarity index 100% rename from os/windows/installer/top.bmp rename to os/windows/nsis-top.bmp diff --git a/os/windows/installer/welcome.bmp b/os/windows/nsis-welcome.bmp similarity index 100% rename from os/windows/installer/welcome.bmp rename to os/windows/nsis-welcome.bmp diff --git a/media/openttd.ico b/os/windows/openttd.ico similarity index 100% rename from media/openttd.ico rename to os/windows/openttd.ico diff --git a/projects/dpi_aware.manifest b/os/windows/openttd.manifest similarity index 100% rename from projects/dpi_aware.manifest rename to os/windows/openttd.manifest diff --git a/projects/basesets_vs140.vcxproj b/projects/basesets_vs140.vcxproj deleted file mode 100644 index 4e5ed52c4a..0000000000 --- a/projects/basesets_vs140.vcxproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v140 - - - - - - - - - ..\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 - - - ..\bin\baseset\ - ..\objs\baseset\ - - - - Generating no_music.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_music.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_music.obm;%(Outputs) - - - Generating no_sound.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_sound.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_sound.obs;%(Outputs) - - - Generating orig_dos.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obg;%(Outputs) - - - Generating orig_dos.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obm;%(Outputs) - - - Generating orig_dos.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obs;%(Outputs) - - - Generating orig_dos_de.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos_de.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos_de.obg;%(Outputs) - - - Generating orig_tto.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_tto.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_tto.obm;%(Outputs) - - - Generating orig_win.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obg;%(Outputs) - - - Generating orig_win.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obm;%(Outputs) - - - Generating orig_win.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obs;%(Outputs) - - - - - - diff --git a/projects/basesets_vs140.vcxproj.filters b/projects/basesets_vs140.vcxproj.filters deleted file mode 100644 index aa555f3fc3..0000000000 --- a/projects/basesets_vs140.vcxproj.filters +++ /dev/null @@ -1,40 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - diff --git a/projects/basesets_vs140.vcxproj.filters.in b/projects/basesets_vs140.vcxproj.filters.in deleted file mode 100644 index 07bff4542f..0000000000 --- a/projects/basesets_vs140.vcxproj.filters.in +++ /dev/null @@ -1,11 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - -!!FILES!! - - diff --git a/projects/basesets_vs140.vcxproj.in b/projects/basesets_vs140.vcxproj.in deleted file mode 100644 index 0471100a3e..0000000000 --- a/projects/basesets_vs140.vcxproj.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v140 - - - - - - - - -!!FILTERS!! - - - ..\bin\baseset\ - ..\objs\baseset\ - - -!!FILES!! - - - - - diff --git a/projects/basesets_vs141.vcxproj b/projects/basesets_vs141.vcxproj deleted file mode 100644 index a01f24989b..0000000000 --- a/projects/basesets_vs141.vcxproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v141 - - - - - - - - - ..\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 - - - ..\bin\baseset\ - ..\objs\baseset\ - - - - Generating no_music.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_music.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_music.obm;%(Outputs) - - - Generating no_sound.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_sound.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_sound.obs;%(Outputs) - - - Generating orig_dos.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obg;%(Outputs) - - - Generating orig_dos.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obm;%(Outputs) - - - Generating orig_dos.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obs;%(Outputs) - - - Generating orig_dos_de.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos_de.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos_de.obg;%(Outputs) - - - Generating orig_tto.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_tto.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_tto.obm;%(Outputs) - - - Generating orig_win.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obg;%(Outputs) - - - Generating orig_win.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obm;%(Outputs) - - - Generating orig_win.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obs;%(Outputs) - - - - - - diff --git a/projects/basesets_vs141.vcxproj.filters b/projects/basesets_vs141.vcxproj.filters deleted file mode 100644 index aa555f3fc3..0000000000 --- a/projects/basesets_vs141.vcxproj.filters +++ /dev/null @@ -1,40 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - diff --git a/projects/basesets_vs141.vcxproj.filters.in b/projects/basesets_vs141.vcxproj.filters.in deleted file mode 100644 index 07bff4542f..0000000000 --- a/projects/basesets_vs141.vcxproj.filters.in +++ /dev/null @@ -1,11 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - -!!FILES!! - - diff --git a/projects/basesets_vs141.vcxproj.in b/projects/basesets_vs141.vcxproj.in deleted file mode 100644 index 69dbd2e078..0000000000 --- a/projects/basesets_vs141.vcxproj.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v141 - - - - - - - - -!!FILTERS!! - - - ..\bin\baseset\ - ..\objs\baseset\ - - -!!FILES!! - - - - - diff --git a/projects/basesets_vs142.vcxproj b/projects/basesets_vs142.vcxproj deleted file mode 100644 index d483708aa7..0000000000 --- a/projects/basesets_vs142.vcxproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v142 - - - - - - - - - ..\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 - - - ..\bin\baseset\ - ..\objs\baseset\ - - - - Generating no_music.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_music.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_music.obm;%(Outputs) - - - Generating no_sound.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)no_sound.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\no_sound.obs;%(Outputs) - - - Generating orig_dos.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obg;%(Outputs) - - - Generating orig_dos.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obm;%(Outputs) - - - Generating orig_dos.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos.obs;%(Outputs) - - - Generating orig_dos_de.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_dos_de.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_dos_de.obg;%(Outputs) - - - Generating orig_tto.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_tto.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_tto.obm;%(Outputs) - - - Generating orig_win.obg baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obg" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obg;%(Outputs) - - - Generating orig_win.obm baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obm" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obm;%(Outputs) - - - Generating orig_win.obs baseset metadata file - cscript //nologo ..\media\baseset\translations.vbs "%(FullPath)" "$(OutputPath)orig_win.obs" ..\src\lang ..\bin\baseset\orig_extra.grf - $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs) - ..\bin\baseset\orig_win.obs;%(Outputs) - - - - - - diff --git a/projects/basesets_vs142.vcxproj.filters b/projects/basesets_vs142.vcxproj.filters deleted file mode 100644 index aa555f3fc3..0000000000 --- a/projects/basesets_vs142.vcxproj.filters +++ /dev/null @@ -1,40 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - Baseset Metadata - - - diff --git a/projects/basesets_vs142.vcxproj.filters.in b/projects/basesets_vs142.vcxproj.filters.in deleted file mode 100644 index 07bff4542f..0000000000 --- a/projects/basesets_vs142.vcxproj.filters.in +++ /dev/null @@ -1,11 +0,0 @@ - - - - - {b5a3ac67-19a9-4276-80e9-2360367d2680} - - - -!!FILES!! - - diff --git a/projects/basesets_vs142.vcxproj.in b/projects/basesets_vs142.vcxproj.in deleted file mode 100644 index 9743d83e7a..0000000000 --- a/projects/basesets_vs142.vcxproj.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Debug - Win32 - - - - basesets - {E12E77CA-C0F1-4ADA-943F-4929274249D3} - basesets - MakeFileProj - - - - Utility - false - v142 - - - - - - - - -!!FILTERS!! - - - ..\bin\baseset\ - ..\objs\baseset\ - - -!!FILES!! - - - - - diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs deleted file mode 100755 index 24d45d0a20..0000000000 --- a/projects/determineversion.vbs +++ /dev/null @@ -1,218 +0,0 @@ -Option Explicit - -' This file is part of OpenTTD. -' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -Dim FSO -Set FSO = CreateObject("Scripting.FileSystemObject") - -Sub FindReplaceInFile(filename, to_find, replacement) - Dim file, data - Set file = FSO.OpenTextFile(filename, 1, 0, 0) - data = file.ReadAll - file.Close - data = Replace(data, to_find, replacement) - Set file = FSO.CreateTextFile(filename, -1, 0) - file.Write data - file.Close -End Sub - -Sub UpdateFile(modified, isodate, version, cur_date, githash, istag, isstabletag, year, filename) - FSO.CopyFile filename & ".in", filename - FindReplaceInFile filename, "!!MODIFIED!!", modified - FindReplaceInFile filename, "!!ISODATE!!", isodate - FindReplaceInFile filename, "!!VERSION!!", version - FindReplaceInFile filename, "!!DATE!!", cur_date - FindReplaceInFile filename, "!!GITHASH!!", githash - FindReplaceInFile filename, "!!ISTAG!!", istag - FindReplaceInFile filename, "!!ISSTABLETAG!!", isstabletag - FindReplaceInFile filename, "!!YEAR!!", year - FindReplaceInFile filename, "!!CONFIGURE_INVOCATION!!", "" - FindReplaceInFile filename, "!!CONFIGURE_DEFINES!!", "" -End Sub - -Sub UpdateFiles(version) - Dim modified, isodate, cur_date, githash, istag, isstabletag, year - cur_date = DatePart("D", Date) & "." & DatePart("M", Date) & "." & DatePart("YYYY", Date) - - If InStr(version, Chr(9)) Then - ' Split string into field with tails - isodate = Mid(version, InStr(version, Chr(9)) + 1) - modified = Mid(isodate, InStr(isodate, Chr(9)) + 1) - githash = Mid(modified, InStr(modified, Chr(9)) + 1) - istag = Mid(githash, InStr(githash, Chr(9)) + 1) - isstabletag = Mid(istag, InStr(istag, Chr(9)) + 1) - year = Mid(isstabletag, InStr(isstabletag, Chr(9)) + 1) - ' Remove tails from fields - version = Mid(version, 1, InStr(version, Chr(9)) - 1) - isodate = Mid(isodate, 1, InStr(isodate, Chr(9)) - 1) - modified = Mid(modified, 1, InStr(modified, Chr(9)) - 1) - githash = Mid(githash, 1, InStr(githash, Chr(9)) - 1) - istag = Mid(istag, 1, InStr(istag, Chr(9)) - 1) - isstabletag = Mid(isstabletag, 1, InStr(isstabletag, Chr(9)) - 1) - Else - isodate = 0 - modified = 1 - githash = "" - istag = 0 - isstabletag = 0 - year = "" - End If - - UpdateFile modified, isodate, version, cur_date, githash, istag, isstabletag, year, "../src/rev.cpp" - UpdateFile modified, isodate, version, cur_date, githash, istag, isstabletag, year, "../src/os/windows/ottdres.rc" -End Sub - -Function DetermineVersion() - Dim WshShell, branch, tag, modified, isodate, oExec, line, hash, shorthash, year - Set WshShell = CreateObject("WScript.Shell") - On Error Resume Next - - modified = 0 - hash = "" - shorthash = "" - branch = "" - isodate = "" - tag = "" - year = "" - - ' Set the environment to english - WshShell.Environment("PROCESS")("LANG") = "en" - - Set oExec = WshShell.Exec("git rev-parse --verify HEAD") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - - If oExec.ExitCode = 0 Then - hash = oExec.StdOut.ReadLine() - shorthash = Mid(hash, 1, 10) - ' Make sure index is in sync with disk - Set oExec = WshShell.Exec("git update-index --refresh") - If Err.Number = 0 Then - ' StdOut and StdErr share a 4kB buffer so prevent it from filling up as we don't care about the output - oExec.StdOut.Close - oExec.StdErr.Close - ' Wait till the application is finished ... - Do While oExec.Status = 0 - WScript.Sleep 10 - Loop - End If - Set oExec = WshShell.Exec("git diff-index --exit-code --quiet HEAD ../") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - - If oExec.ExitCode = 1 Then - modified = 2 - End If ' oExec.ExitCode = 1 - - Set oExec = WshShell.Exec("git show -s --pretty=format:%ci") - if Err.Number = 0 Then - isodate = Mid(oExec.StdOut.ReadLine(), 1, 10) - isodate = Replace(isodate, "-", "") - year = Mid(isodate, 1, 4) - End If ' Err.Number = 0 - - ' Check branch - Err.Clear - Set oExec = WshShell.Exec("git symbolic-ref HEAD") - If Err.Number = 0 Then - line = oExec.StdOut.ReadLine() - branch = Mid(line, InStrRev(line, "/") + 1) - End If ' Err.Number = 0 - - ' Check if a tag is currently checked out - Err.Clear - Set oExec = WshShell.Exec("git name-rev --name-only --tags --no-undefined HEAD") - If Err.Number = 0 Then - ' Wait till the application is finished ... - Do While oExec.Status = 0 - Loop - If oExec.ExitCode = 0 Then - tag = oExec.StdOut.ReadLine() - If Right(tag, 2) = "^0" Then - tag = Left(tag, Len(tag) - 2) - End If - End If ' oExec.ExitCode = 0 - End If ' Err.Number = 0 - End If ' Err.Number = 0 - End If ' oExec.ExitCode = 0 - End If ' Err.Number = 0 - - If hash = "" And FSO.FileExists("../.ottdrev") Then - Dim rev_file - Set rev_file = FSO.OpenTextFile("../.ottdrev", 1, True, 0) - DetermineVersion = rev_file.ReadLine() - rev_file.Close() - ElseIf hash = "" Then - DetermineVersion = "norev000" - modified = 1 - Else - Dim version, hashprefix, istag, isstabletag - If modified = 0 Then - hashprefix = "-g" - ElseIf modified = 2 Then - hashprefix = "-m" - Else - hashprefix = "-u" - End If - - If tag <> "" Then - version = tag - istag = 1 - - Set stable_regexp = New RegExp - stable_regexp.Pattern = "^[0-9.]*$" - If stable_regexp.Test(tag) Then - isstabletag = 1 - Else - isstabletag = 0 - End If - Else - version = isodate & "-" & branch & hashprefix & shorthash - istag = 0 - isstabletag = 0 - End If - - DetermineVersion = version & Chr(9) & isodate & Chr(9) & modified & Chr(9) & hash & Chr(9) & istag & Chr(9) & isstabletag & Chr(9) & year - End If -End Function - -Function IsCachedVersion(ByVal version) - Dim cache_file, cached_version - cached_version = "" - Set cache_file = FSO.OpenTextFile("../config.cache.version", 1, True, 0) - If Not cache_file.atEndOfStream Then - cached_version = cache_file.ReadLine() - End If - cache_file.Close - - If InStr(version, Chr(9)) Then - version = Mid(version, 1, Instr(version, Chr(9)) - 1) - End If - - If version <> cached_version Then - Set cache_file = fso.CreateTextFile("../config.cache.version", True) - cache_file.WriteLine(version) - cache_file.Close - IsCachedVersion = False - Else - IsCachedVersion = True - End If -End Function - -Function CheckFile(filename) - CheckFile = FSO.FileExists(filename) - If CheckFile Then CheckFile = (FSO.GetFile(filename).DateLastModified >= FSO.GetFile(filename & ".in").DateLastModified) -End Function - -Dim version -version = DetermineVersion -If Not (IsCachedVersion(version) And CheckFile("../src/rev.cpp") And CheckFile("../src/os/windows/ottdres.rc")) Then - UpdateFiles version -End If diff --git a/projects/gen-kdev4.sh b/projects/gen-kdev4.sh deleted file mode 100755 index 2062d9686a..0000000000 --- a/projects/gen-kdev4.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/sh - -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# echo without interpretation of backslash escapes and without -# adding newline at the end - just the string as it is -rawprint() -{ - printf '%s' "$@" -} - -encode_dword() -{ - printf '\x%02x' \ - `expr $1 / 16777216 % 256` \ - `expr $1 / 65536 % 256` \ - `expr $1 / 256 % 256` \ - `expr $1 % 256` -} - -encode_string() -{ - # turn string into UTF-16 and hexdump it - hex_utf16=`rawprint "$1" | iconv -t UTF-16BE | od -t x1 -A n | tr -d -c '[:xdigit:]'`; - - encode_dword `rawprint "$hex_utf16" | wc -m | xargs -I {} expr {} / 2` # length = num hex digits / 2 - rawprint "$hex_utf16" | sed 's/../\\x&/g' # put '\x' prefix before every pair of digits -} - -encode_single_define() -{ - encode_string `rawprint "$1" | grep -o '^[^=]*'` # everything before '=' - rawprint '\x00\x00\x00\n\x00' - encode_string `rawprint "$1" | sed 's/^[^=]*=\?//'` # everything after '=' -} - -# $1 - newline-separated list of defines -encode_defines() -{ - # add some fixed defines and discard empty lines from the tail - defines=`printf 'va_list\nva_args\n%s' "$1"` - - # count lines (no newline at the end so add one) - encode_dword `printf '%s\n' "$defines" | wc -l` - - while [ -n "$defines" ]; do - encode_single_define `rawprint "$defines" | head -n 1` - defines=`rawprint "$defines" | tail -n +2` - done -} - -encode_includes() -{ - encode_dword 3 # number of custom includes - encode_string "$1/src/stdafx.h" - encode_string "$1/objs/lang" - encode_string "$1/objs/setting" -} - -# escape with a backslash (\) characters special to the sed replace string: \ & -# also escape our custom filed separator that we will be using in sed: @ -escape_sed_special() -{ - sed -e 's/[\&@]/\\&/g' -} - - - -PROJECT_DIR=`pwd` -DIR_NAME=`pwd | xargs -0 basename` - -USAGE_TEXT='Usage: - - projects/gen-kdev4 [PROJECT_NAME|-h|--help] - -PROJECT_NAME is the name of the project that will be displayed in KDevelop. -Before executing, cd into OpenTTD folder and run ./configure script. - --h, --help - print help and exit' - -case "$# $1" in - '1 -h' | '1 --help') printf 'Generate OpenTTD project files for KDevelop 4+\n\n%s\n' "$USAGE_TEXT"; exit 0;; - 1*) PROJECT_NAME="$1";; - 0*) PROJECT_NAME="$DIR_NAME";; - *) printf 'Wrong arguments given. %s\n' "$USAGE_TEXT" >&2; exit 1;; -esac - -CFLAGS=`grep '^using CFLAGS\.\.\.' config.log 2>/dev/null` -if [ -z "$CFLAGS" ]; then - echo "OpenTTD config.log not found" >&2 - echo "cd into OpenTTD first and run 'configure'" >&2 - exit 1 -fi -DEFINES=`eval "printf '%s\n' $CFLAGS" | grep '^\-D' | cut -c3-` - -PROJECT_NAME_SED=s@!!PROJECT_NAME!!@`rawprint "$PROJECT_NAME" | escape_sed_special`@g -PROJECT_DIR_SED=s@!!PROJECT_DIR!!@`rawprint "$PROJECT_DIR" | escape_sed_special`@g -CUSTOM_DEFINES_SED=s@!!CUSTOM_DEFINES!!@`encode_defines "$DEFINES" | escape_sed_special`@g -CUSTOM_INCLUDES_SED=s@!!CUSTOM_INCLUDES!!@`encode_includes "$PROJECT_DIR" | escape_sed_special`@g - -mkdir -p .kdev4 - -sed -e "$PROJECT_NAME_SED" \ - >"$PROJECT_DIR/$DIR_NAME.kdev4" \ - << "EOF" -[Project] -Manager=KDevCustomMakeManager -Name=!!PROJECT_NAME!! -EOF - -sed -e "$PROJECT_DIR_SED" -e "$CUSTOM_DEFINES_SED" -e "$CUSTOM_INCLUDES_SED" \ - >"$PROJECT_DIR/.kdev4/$DIR_NAME.kdev4" \ - << "EOF" -[CustomDefinesAndIncludes][ProjectPath0] -Defines=!!CUSTOM_DEFINES!! -Includes=!!CUSTOM_INCLUDES!! -Path=. - -[Defines And Includes][Compiler] -Name=GCC -Path=gcc -Type=GCC - -[Filters] -size=10 - -[Filters][0] -inclusive=0 -pattern=.* -targets=3 - -[Filters][1] -inclusive=0 -pattern=.svn -targets=2 - -[Filters][2] -inclusive=0 -pattern=.hg -targets=2 - -[Filters][3] -inclusive=0 -pattern=.git -targets=2 - -[Filters][4] -inclusive=0 -pattern=*.rej -targets=1 - -[Filters][5] -inclusive=0 -pattern=*.orig -targets=1 - -[Filters][6] -inclusive=0 -pattern=*~ -targets=1 - -[Filters][7] -inclusive=0 -pattern=.*.kate-swp -targets=1 - -[Filters][8] -inclusive=0 -pattern=.*.swp -targets=1 - -[Filters][9] -inclusive=0 -pattern=/objs -targets=2 - -[Launch] -Launch Configurations=Launch Configuration 0 - -[Launch][Launch Configuration 0] -Configured Launch Modes=execute -Configured Launchers=nativeAppLauncher -Name=Launch OpenTTD\s -Type=Native Application - -[Launch][Launch Configuration 0][Data] -Arguments=-d 1 -Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) -Dependency Action=Nothing -EnvironmentGroup= -Executable=file://!!PROJECT_DIR!!/bin/openttd -External Terminal=konsole --noclose --workdir %workdir -e %exe -Project Target= -Use External Terminal=false -Working Directory=file://!!PROJECT_DIR!!/bin -isExecutable=true -EOF diff --git a/projects/generate b/projects/generate deleted file mode 100755 index 7526bd31b9..0000000000 --- a/projects/generate +++ /dev/null @@ -1,338 +0,0 @@ -#!/bin/bash - -# This file is part of OpenTTD. -# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -# This file generates all project files based on sources.list, so everyone who -# can start a bash process, can update the project files. - -# Set neutral locale so sort behaves the same everywhere -LC_ALL=C -export LC_ALL - -# We really need gawk for this! -AWK=gawk - -${AWK} --version > /dev/null 2> /dev/null -if [ "$?" != "0" ]; then - echo "This script needs gawk to run properly" - exit 1 -fi - -ROOT_DIR="`pwd`/.." -if ! [ -e "$ROOT_DIR/source.list" ] -then - ROOT_DIR="`pwd`" -fi -if ! [ -e "$ROOT_DIR/source.list" ] -then - echo "Can't find source.list, needed in order to make this run. Please go to either" - echo " the project dir, or the root dir of a clean SVN checkout." - 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 -# langs_vs141.vcxproj is for MSVC 2017 -# strgen_vs141.vcxproj is for MSVC 2017 -# strgen_vs141.vcxproj.filters is for MSVC 2017 -# generate_vs141.vcxproj is for MSVC 2017 -# version_vs141.vcxproj is for MSVC 2017 -# basesets_vs141.vcxproj is for MSVC 2017 - -# openttd_vs140.sln is for MSVC 2015 -# openttd_vs140.vcxproj is for MSVC 2015 -# openttd_vs140.vcxproj.filters is for MSVC 2015 -# langs_vs140.vcxproj is for MSVC 2015 -# strgen_vs140.vcxproj is for MSVC 2015 -# strgen_vs140.vcxproj.filters is for MSVC 2015 -# generate_vs140.vcxproj is for MSVC 2015 -# version_vs140.vcxproj is for MSVC 2015 -# basesets_vs140.vcxproj is for MSVC 2015 - - - - -# First, collect the list of Windows files -allegro_config="" -sdl_config="1" -sdl2_config="1" -png_config="1" -os="MSVC" -enable_dedicated="0" -enable_ai="1" -with_cocoa="0" -enable_directmusic="1" -enable_fluidsynth="0" -with_threads="1" -file_prefix="..\\\\\\\\src\\\\\\\\" - -safety_check() { - li="" - for i in `cat $1 | grep -v "#\|ottdres.rc\|win32.cpp\|win32_v.cpp" | xargs -n 1 basename | sort`; do - if [ "$li" = "$i" ]; then - echo " !! ERROR !!" - echo "" - echo "The filename '$i' is already used in this project." - echo "Because MSVC uses one single directory for all object files, it" - echo "cannot handle filenames with the same name inside the same project." - echo "Please rename either one of the file and try generating again." - echo "" - echo " !! ERROR !!" - exit 1 - fi - li="$i" - done -} - -grep '\.h' "$ROOT_DIR/source.list" | grep -v '../objs/langs/table/strings.h\|../objs/settings/table/settings.h' | sed 's/ //g' | sort > tmp.headers.source.list -find "$ROOT_DIR/src" \( -iname "*.h" -or -iname "*.hpp" \) -and -not -ipath "*/.svn/*" | sed "s~$ROOT_DIR/src/~~" | sort > tmp.headers.src -if [ -n "`diff tmp.headers.source.list tmp.headers.src`" ]; then - echo "The following headers are missing in source.list and not in /src/ or vice versa." - diff tmp.headers.source.list tmp.headers.src | grep '[<>]' | sort - echo "" -fi -rm tmp.headers.* - -load_main_data() { - # Read the source.list and process it - RES="`cat $1 | ${AWK} -v BINMODE=1 ' - { gsub("\\r", "", $0); } - /^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; } - /^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; } - /^( *)#if/ { - gsub(" ", "", $0); - gsub("^#if", "", $0); - gsub("^ ", "", $0); - - if (deep != skip) { deep += 1; next; } - - deep += 1; - - if ($0 == "ALLEGRO" && "'$allegro_config'" == "") { next; } - if ($0 == "SDL" && "'$sdl_config'" == "") { next; } - if ($0 == "SDL2" && "'$sdl2_config'" == "") { next; } - if ($0 == "PNG" && "'$png_config'" == "") { next; } - if ($0 == "OSX" && "'$os'" != "OSX") { next; } - if ($0 == "OS2" && "'$os'" != "OS2") { next; } - if ($0 == "DOS" && "'$os'" != "DOS") { next; } - if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; } - if ($0 == "AI" && "'$enable_ai'" == "0") { next; } - if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; } - if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; } - if ($0 == "WIN32" && "'$os'" != "MINGW" && - "'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; } - if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } - if ($0 == "MINGW" && "'$os'" != "MINGW") { next; } - if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; } - if ($0 == "FLUIDSYNTH" && "'$enable_fluidsynth'" != "1") { next; } - if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; } - if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; } - - skip += 1; - - next; - } - /^( *)#/ { - if (deep == skip) { - gsub(" ", "", $0); - gsub("^#", "", $0); - gsub("^ ", "", $0); - filter = $0; - print "#3 "; - printf "#3 {c76ff9f1-1e62-46d8-8d55-%012d}\n", i; - print "#3 "; - i += 1; - } - - next; - } - /^$/ { next } - { - if (deep == skip) { - gsub(" ", "", $0); - gsub("/", "\\\\\\\\", $0); - split($0, file, "."); - cltype = "ClInclude" - if (file[2] == "cpp") cltype = "ClCompile"; - if (file[2] == "rc") cltype = "ResourceCompile"; - print "#2 <"cltype" Include=\\"'$file_prefix'"$0"\\" />"; - print "#4 <"cltype" Include=\\"'$file_prefix'"$0"\\">"; - print "#4 "filter""; - print "#4 "; - } - } - '`" - - eval "$2=\"\$RES\"" -} - -load_lang_data() { - RES="" - # Windows Folder sort and Linux Folder sort are slightly different. - # By removing the extension and sorting it on Linux, they are the same. - for i in `ls $1 | sed s~.txt$~~g | sort` - do - i=`basename $i` - if [ "$i" == "english" ] - then - continue - fi - RES="$RES -#2 -#2 Generating "$i" language file -#2 ..\\\\objs\\\\strgen\\\\strgen.exe -s ..\\\\src\\\\lang -d ..\\\\bin\\\\lang \"%(FullPath)\" -#2 ..\\\\src\\\\lang\\\\english.txt;..\\\\objs\\\\strgen\\\\strgen.exe;%(AdditionalInputs) -#2 ..\\\\bin\\\\lang\\\\"$i".lng;%(Outputs) -#2 -#3 -#3 Translations -#3 " - done - - eval "$2=\"\$RES\"" -} - -load_settings_data() { - RES="" - RES2=" -#3..\\\\objs\\\\settings\\\\settings_gen.exe -o ..\\\\objs\\\\settings\\\\table\\\\settings.h -b ..\\\\src\\\\table\\\\settings.h.preamble -a ..\\\\src\\\\table\\\\settings.h.postamble" - for i in `ls $1` - do - i=`basename $i` - RES="$RES -#2 -#4 -#4 INI -#4 " - RES2="$RES2 ..\\\\src\\\\table\\\\"$i - done - - eval "$2=\"\$RES\$RES2\"" -} - -load_baseset_data() { - FIRST="" - RES="" - RES2=" -#4 " - # Windows Folder sort and Linux Folder sort are slightly different. - # By removing the extension and sorting it on Linux, they are the same. - for i in `ls $2 | sed s~.txt$~~g | sort` - do - if [ "$FIRST" != "" ]; then - RES2="$RES2;" - else - FIRST=1 - fi - i=`basename $i` - RES2="$RES2..\\\\src\\\\lang\\\\$i.txt" - done - RES2="$RES2" - # Windows Folder sort and Linux Folder sort are slightly different. - # By fiddling with the extension and sorting it on Linux, they are the same. - for i in `ls $1 | sed s~\\\.~000~g | sort | sed s~000~.~g` - do - i=`basename $i` - RES="$RES -#2 -#2 Generating "$i" baseset metadata file -#2 cscript //nologo ..\\\\media\\\\baseset\\\\translations.vbs \"%(FullPath)\" \"\$(OutputPath)$i\" ..\\\\src\\\\lang ..\\\\bin\\\\baseset\\\\orig_extra.grf -#2 \$(Langs);..\\\\bin\\\\baseset\\\\orig_extra.grf;%(AdditionalInputs) -#2 ..\\\\bin\\\\baseset\\\\"$i";%(Outputs) -#2 -#3 -#3 Baseset Metadata -#3 " - done - - eval "$3=\"\$RES\$RES2\"" -} - -generate() { - echo "Generating $2..." - # Everything above the !!FILTERS!! marker - cat "$ROOT_DIR/projects/$2".in | ${AWK} -v BINMODE=1 -v FILTERS="$3" -v FILES="$1" ' - /^$/ { next } - /!!FILTERS!!/ { - split(FILTERS, filters, "\n"); - for (i = 1; filters[i] != ""; i++) { - line = $0 - gsub(/!!FILTERS!!/, filters[i], line); - print line; - } - next; - } - /!!FILES!!/ { - split(FILES, files, "\n"); - for (i = 1; files[i] != ""; i++) { - line = $0 - gsub(/!!FILES!!/, files[i], line); - print line; - } - next; - } - { - print $0; - } - ' > "$ROOT_DIR/projects/$2" -} - -safety_check "$ROOT_DIR/source.list" - -load_main_data "$ROOT_DIR/source.list" openttd -openttdfiles=`echo "$openttd" | grep "^#4" | sed "s~#4~~g"` -openttdfilters=`echo "$openttd" | grep "^#3" | sed "s~#3~~g"` -openttdvcxproj=`echo "$openttd" | grep "^#2" | sed "s~#2~~g"` - -load_lang_data "$ROOT_DIR/src/lang/*.txt" lang -langfiles=`echo "$lang" | grep "^#3" | sed "s~#3~~g"` -langvcxproj=`echo "$lang" | grep "^#2" | sed "s~#2~~g"` - -load_settings_data "$ROOT_DIR/src/table/*.ini" settings -settingsfiles=`echo "$settings" | grep "^#4" | sed "s~#4~~g"` -settingscommand=`echo "$settings" | grep "^#3" | sed "s~#3~~g"` -settingsvcxproj=`echo "$settings" | grep "^#2" | sed "s~#2~~g"` - -load_baseset_data "$ROOT_DIR/media/baseset/*.ob?" "$ROOT_DIR/src/lang/*.txt" baseset -basesetfiles=`echo "$baseset" | grep "^#3" | sed "s-#3--g"` -basesetvcxproj=`echo "$baseset" | grep "^#2" | sed "s~#2~~g"` -basesetlangs=`echo "$baseset" | grep "^#4" | sed "s~#4~~g"` - -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" diff --git a/projects/generate.vbs b/projects/generate.vbs deleted file mode 100644 index 577dce9558..0000000000 --- a/projects/generate.vbs +++ /dev/null @@ -1,414 +0,0 @@ -Option Explicit - -' This file is part of OpenTTD. -' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. -' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -' See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - -Dim FSO -Set FSO = CreateObject("Scripting.FileSystemObject") - -' 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 -' langs_vs141.vcxproj is for MSVC 2017 -' strgen_vs141.vcxproj is for MSVC 2017 -' strgen_vs141.vcxproj.filters is for MSVC 2017 -' generate_vs141.vcxproj is for MSVC 2017 -' version_vs141.vcxproj is for MSVC 2017 -' basesets_vs141.vcxproj is for MSVC 2017 - -' openttd_vs140.sln is for MSVC 2015 -' openttd_vs140.vcxproj is for MSVC 2015 -' openttd_vs140.vcxproj.filters is for MSVC 2015 -' langs_vs140.vcxproj is for MSVC 2015 -' strgen_vs140.vcxproj is for MSVC 2015 -' strgen_vs140.vcxproj.filters is for MSVC 2015 -' generate_vs140.vcxproj is for MSVC 2015 -' version_vs140.vcxproj is for MSVC 2015 -' basesets_vs140.vcxproj is for MSVC 2015 - -Sub safety_check(filename) - Dim file, line, regexp, list - - ' Define regexp - Set regexp = New RegExp - regexp.Pattern = "#|ottdres.rc|win32.cpp|win32_v.cpp" - regexp.Global = True - - ' We use a dictionary to check duplicates - Set list = CreateObject("Scripting.Dictionary") - - Set file = FSO.OpenTextFile(filename, 1, 0, 0) - While Not file.AtEndOfStream - line = Replace(file.ReadLine, Chr(9), "") ' Remove tabs - If Len(line) > 0 And Not regexp.Test(line) Then - line = FSO.GetFileName(line) - if list.Exists(line) Then - WScript.Echo " !! ERROR !!" _ - & vbCrLf & "" _ - & vbCrLf & "The filename '" & line & "' is already used in this project." _ - & vbCrLf & "Because MSVC uses one single directory for all object files, it" _ - & vbCrLf & "cannot handle filenames with the same name inside the same project." _ - & vbCrLf & "Please rename either one of the file and try generating again." _ - & vbCrLf & "" _ - & vbCrLf & " !! ERROR !!" - WScript.Quit(1) - End If - list.Add line, line - End If - Wend - file.Close -End Sub - -Sub get_files(srcdir, dir, list) - Dim file, filename - Dim rekeep, reskip - - ' pattern for files to keep - Set rekeep = New RegExp - rekeep.Pattern = "\.h(pp)?$" - rekeep.Global = True - - ' pattern for files to exclude - Set reskip = New RegExp - reskip.Pattern = "\.svn" - reskip.Global = True - - For Each file in dir.Files - filename = Replace(file.path, srcdir, "") ' Remove */src/ - filename = Replace(filename, "\", "/") ' Replace separators - If rekeep.Test(filename) And Not reskip.Test(filename) Then - list.Add filename, filename - End If - Next -End Sub - -Sub get_dir_files(srcdir, dir, list) - Dim folder - ' Get files - get_files srcdir, dir, list - - ' Recurse in subfolders - For Each folder in dir.SubFolders - get_dir_files srcdir, folder, list - Next -End Sub - -Sub headers_check(filename, dir) - Dim source_list_headers, src_dir_headers, regexp, line, file, str - - ' Define regexp for source.list parsing - Set regexp = New RegExp - regexp.Pattern = "\.h" - regexp.Global = True - - ' Parse source.list and store headers in a dictionary - Set source_list_headers = CreateObject("Scripting.Dictionary") - Set file = FSO.OpenTextFile(filename, 1, 0, 0) - While Not file.AtEndOfStream - line = Replace(file.ReadLine, Chr(9), "") ' Remove tabs - If Len(line) > 0 And regexp.Test(line) And line <> "../objs/langs/table/strings.h" And line <> "../objs/settings/table/settings.h" Then - source_list_headers.Add line, line - End If - Wend - file.Close() - - ' Get header files in /src/ - Set src_dir_headers = CreateObject("Scripting.Dictionary") - get_dir_files dir, FSO.GetFolder(dir), src_dir_headers - - ' Finding files in source.list but not in /src/ - For Each line In source_list_headers - If Not src_dir_headers.Exists(line) Then - str = str & "< " & line & vbCrLf - End If - Next - - ' Finding files in /src/ but not in source.list - For Each line In src_dir_headers - If Not source_list_headers.Exists(line) Then - str = str & "> " & line & vbCrLf - End If - Next - - ' Display the missing files if any - If str <> "" Then - str = "The following headers are missing in source.list and not in /src/ or vice versa." _ - & vbCrLf & str - WScript.Echo str - End If -End Sub - -Sub load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) - Dim file, line, deep, skip, first_filter, first_file, filter, cltype, index - index = 0 - ' Read the source.list and process it - Set file = FSO.OpenTextFile(filename, 1, 0, 0) - While Not file.AtEndOfStream - line = Replace(file.ReadLine, Chr(9), "") ' Remove tabs - If Len(line) > 0 Then - Select Case Split(line, " ")(0) - Case "#end" - If deep = skip Then skip = skip - 1 - deep = deep - 1 - Case "#else" - If deep = skip Then - skip = skip - 1 - ElseIf deep - 1 = skip Then - skip = skip + 1 - End If - Case "#if" - line = Replace(line, "#if ", "") - If deep = skip And ( _ - line = "SDL" Or _ - line = "SDL2" Or _ - line = "PNG" Or _ - line = "WIN32" Or _ - line = "MSVC" Or _ - line = "DIRECTMUSIC" Or _ - line = "AI" Or _ - line = "USE_SSE" Or _ - line = "USE_XAUDIO2" Or _ - line = "USE_THREADS" _ - ) Then skip = skip + 1 - deep = deep + 1 - Case "#" - if deep = skip Then - line = Replace(line, "# ", "") - if first_filter <> 0 Then - filters = filters & vbCrLf - Else - first_filter = 1 - End If - filter = line - filters = filters & _ - " " & vbCrLf & _ - " {c76ff9f1-1e62-46d8-8d55-" & String(12 - Len(CStr(index)), "0") & index & "}" & vbCrLf & _ - " " - index = index + 1 - End If - Case Else - If deep = skip Then - line = Replace(line, "/" ,"\") - if first_file <> 0 Then - vcxproj = vcxproj & vbCrLf - files = files & vbCrLf - Else - first_file = 1 - End If - Select Case Split(Line, ".")(1) - Case "cpp" - cltype = "ClCompile" - Case "rc" - cltype = "ResourceCompile" - Case Else - cltype = "ClInclude" - End Select - vcxproj = vcxproj & " <" & cltype & " Include="& Chr(34) & "..\src\" & line & Chr(34) & " />" - files = files & _ - " <" & cltype & " Include="& Chr(34) & "..\src\" & line & Chr(34) & ">" & vbCrLf & _ - " " & filter & "" & vbCrLf & _ - " " - End If - End Select - End If - Wend - file.Close() -End Sub - -Sub load_lang_data(dir, ByRef vcxproj, ByRef files) - Dim folder, file, first_time - Set folder = FSO.GetFolder(dir) - For Each file In folder.Files - file = FSO.GetFileName(file) - If file <> "english.txt" And FSO.GetExtensionName(file) = "txt" Then - file = Left(file, Len(file) - 4) - If first_time <> 0 Then - vcxproj = vcxproj & vbCrLf - files = files & vbCrLf - Else - first_time = 1 - End If - vcxproj = vcxproj & _ - " " & vbCrLf & _ - " Generating " & file & " language file" & vbCrLf & _ - " ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang " & Chr(34) & "%(FullPath)" & Chr(34) & "" & vbCrLf & _ - " ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)" & vbCrLf & _ - " ..\bin\lang\" & file & ".lng;%(Outputs)" & vbCrLf & _ - " " - files = files & _ - " " & vbCrLf & _ - " Translations" & vbCrLf & _ - " " - End If - Next -End Sub - -Sub load_settings_data(dir, ByRef vcxproj, ByRef command, ByRef files) - Dim folder, file, first_time - command = "..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble" - Set folder = FSO.GetFolder(dir) - For Each file In folder.Files - file = FSO.GetFileName(file) - If FSO.GetExtensionName(file) = "ini" Then - if first_time <> 0 Then - vcxproj = vcxproj & vbCrLf - files = files & vbCrLf - Else - first_time = 1 - End If - vcxproj = vcxproj & _ - " " - command = command & " ..\src\table\" & file - files = files & _ - " " & vbCrLf & _ - " INI" & vbCrLf & _ - " " - End If - Next -End Sub - -Sub load_baseset_data(dir, langdir, ByRef vcxproj, ByRef files, ByRef langs) - Dim folder, file, ext, first_time - Set folder = FSO.GetFolder(langdir) - langs = " " - For Each file In folder.Files - If first_time <> 0 Then - langs = langs & ";" - Else - first_time = 1 - End If - file = FSO.GetFileName(file) - ext = FSO.GetExtensionName(file) - langs = langs & "..\src\lang\" & file - Next - langs = langs & "" - first_time = 0 - Set folder = FSO.GetFolder(dir) - For Each file In folder.Files - file = FSO.GetFileName(file) - ext = FSO.GetExtensionName(file) - If ext = "obm" Or ext = "obg" Or ext = "obs" Then - If first_time <> 0 Then - vcxproj = vcxproj & vbCrLf - files = files & vbCrLf - Else - first_time = 1 - End If - vcxproj = vcxproj & _ - " " & vbCrLf & _ - " Generating " & file & " baseset metadata file" & vbCrLf & _ - " cscript //nologo ..\media\baseset\translations.vbs " & Chr(34) & "%(FullPath)" & Chr(34) & " " & Chr(34) & "$(OutputPath)" & file & Chr(34) & " ..\src\lang ..\bin\baseset\orig_extra.grf" & vbCrLf & _ - " $(Langs);..\bin\baseset\orig_extra.grf;%(AdditionalInputs)" & vbCrLf & _ - " ..\bin\baseset\" & file & ";%(Outputs)" & vbCrLf & _ - " " - files = files & _ - " " & vbCrLf & _ - " Baseset Metadata" & vbCrLf & _ - " " - End If - Next -End Sub - -Sub generate(data, dest, data2) - Dim srcfile, destfile, line, regexp - WScript.Echo "Generating " & FSO.GetFileName(dest) & "..." - Set srcfile = FSO.OpenTextFile(dest & ".in", 1, 0, 0) - Set destfile = FSO.CreateTextFile(dest, -1, 0) - - If Not IsNull(data2) Then - ' Everything above the !!FILTERS!! marker - Set regexp = New RegExp - regexp.Pattern = "!!FILTERS!!" - regexp.Global = True - - line = srcfile.ReadLine() - While Not regexp.Test(line) - If len(line) > 0 Then destfile.WriteLine(line) - line = srcfile.ReadLine() - Wend - - ' Our generated content - line = regexp.Replace(line, data2) - destfile.WriteLine(line) - End If - - ' Everything above the !!FILES!! marker - line = srcfile.ReadLine() - While line <> "!!FILES!!" - If len(line) > 0 Then destfile.WriteLine(line) - line = srcfile.ReadLine() - Wend - - ' Our generated content - destfile.WriteLine(data) - - ' Everything below the !!FILES!! marker - While Not srcfile.AtEndOfStream - line = srcfile.ReadLine() - If len(line) > 0 Then destfile.WriteLine(line) - Wend - srcfile.Close() - destfile.Close() -End Sub - -Dim ROOT_DIR -ROOT_DIR = FSO.GetFolder("..").Path -If Not FSO.FileExists(ROOT_DIR & "/source.list") Then - ROOT_DIR = FSO.GetFolder(".").Path -End If -If Not FSO.FileExists(ROOT_DIR & "/source.list") Then - WScript.Echo "Can't find source.list, needed in order to make this run." _ - & vbCrLf & "Please go to either the project dir, or the root dir of a clean SVN checkout." - WScript.Quit(1) -End If - -safety_check ROOT_DIR & "/source.list" -headers_check ROOT_DIR & "/source.list", ROOT_DIR & "\src\" ' Backslashes needed for DoFiles - -Dim openttdvcxproj, openttdfilters, openttdfiles -load_main_data ROOT_DIR & "/source.list", openttdvcxproj, openttdfilters, openttdfiles -generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs140.vcxproj", Null -generate openttdfiles, ROOT_DIR & "/projects/openttd_vs140.vcxproj.filters", openttdfilters -generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs141.vcxproj", Null -generate openttdfiles, ROOT_DIR & "/projects/openttd_vs141.vcxproj.filters", openttdfilters -generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs142.vcxproj", Null -generate openttdfiles, ROOT_DIR & "/projects/openttd_vs142.vcxproj.filters", openttdfilters - -Dim langvcxproj, langfiles -load_lang_data ROOT_DIR & "/src/lang", langvcxproj, langfiles -generate langvcxproj, ROOT_DIR & "/projects/langs_vs140.vcxproj", Null -generate langfiles, ROOT_DIR & "/projects/langs_vs140.vcxproj.filters", Null -generate langvcxproj, ROOT_DIR & "/projects/langs_vs141.vcxproj", Null -generate langfiles, ROOT_DIR & "/projects/langs_vs141.vcxproj.filters", Null -generate langvcxproj, ROOT_DIR & "/projects/langs_vs142.vcxproj", Null -generate langfiles, ROOT_DIR & "/projects/langs_vs142.vcxproj.filters", Null - -Dim settingsvcxproj, settingscommand, settingsfiles -load_settings_data ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles -generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs140.vcxproj", settingscommand -generate settingsfiles, ROOT_DIR & "/projects/settings_vs140.vcxproj.filters", Null -generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs141.vcxproj", settingscommand -generate settingsfiles, ROOT_DIR & "/projects/settings_vs141.vcxproj.filters", Null -generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs142.vcxproj", settingscommand -generate settingsfiles, ROOT_DIR & "/projects/settings_vs142.vcxproj.filters", Null - -Dim basesetvcxproj, basesetfiles, basesetlangs -load_baseset_data ROOT_DIR & "/media/baseset", ROOT_DIR & "/src/lang", basesetvcxproj, basesetfiles, basesetlangs -generate basesetvcxproj, ROOT_DIR & "/projects/basesets_vs140.vcxproj", basesetlangs -generate basesetfiles, ROOT_DIR & "/projects/basesets_vs140.vcxproj.filters", Null -generate basesetvcxproj, ROOT_DIR & "/projects/basesets_vs141.vcxproj", basesetlangs -generate basesetfiles, ROOT_DIR & "/projects/basesets_vs141.vcxproj.filters", Null -generate basesetvcxproj, ROOT_DIR & "/projects/basesets_vs142.vcxproj", basesetlangs -generate basesetfiles, ROOT_DIR & "/projects/basesets_vs142.vcxproj.filters", Null diff --git a/projects/generate_vs140.vcxproj b/projects/generate_vs140.vcxproj deleted file mode 100644 index b17142050b..0000000000 --- a/projects/generate_vs140.vcxproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Debug - Win32 - - - - generate - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34} - generate - - - - Utility - v140 - - - - - - - - - - - - - Document - Running %27generate.vbs%27 ... - cscript "$(ProjectDir)generate.vbs" - %(FullPath);%(AdditionalInputs) - - - - - - diff --git a/projects/generate_vs141.vcxproj b/projects/generate_vs141.vcxproj deleted file mode 100644 index d7a877db17..0000000000 --- a/projects/generate_vs141.vcxproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Debug - Win32 - - - - generate - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34} - generate - - - - Utility - v141 - - - - - - - - - - - - - Document - Running %27generate.vbs%27 ... - cscript "$(ProjectDir)generate.vbs" - %(FullPath);%(AdditionalInputs) - - - - - - diff --git a/projects/generate_vs142.vcxproj b/projects/generate_vs142.vcxproj deleted file mode 100644 index 7230676cb5..0000000000 --- a/projects/generate_vs142.vcxproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Debug - Win32 - - - - generate - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34} - generate - - - - Utility - v142 - - - - - - - - - - - - - Document - Running %27generate.vbs%27 ... - cscript "$(ProjectDir)generate.vbs" - %(FullPath);%(AdditionalInputs) - - - - - - diff --git a/projects/langs_vs140.vcxproj b/projects/langs_vs140.vcxproj deleted file mode 100644 index 25e7160bfb..0000000000 --- a/projects/langs_vs140.vcxproj +++ /dev/null @@ -1,390 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v140 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - - - Generating afrikaans language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\afrikaans.lng;%(Outputs) - - - Generating arabic_egypt language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\arabic_egypt.lng;%(Outputs) - - - Generating basque language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\basque.lng;%(Outputs) - - - Generating belarusian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\belarusian.lng;%(Outputs) - - - Generating brazilian_portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\brazilian_portuguese.lng;%(Outputs) - - - Generating bulgarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\bulgarian.lng;%(Outputs) - - - Generating catalan language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\catalan.lng;%(Outputs) - - - Generating croatian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\croatian.lng;%(Outputs) - - - Generating czech language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\czech.lng;%(Outputs) - - - Generating danish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\danish.lng;%(Outputs) - - - Generating dutch language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\dutch.lng;%(Outputs) - - - Generating english_AU language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_AU.lng;%(Outputs) - - - Generating english_US language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_US.lng;%(Outputs) - - - Generating esperanto language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\esperanto.lng;%(Outputs) - - - Generating estonian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\estonian.lng;%(Outputs) - - - Generating faroese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\faroese.lng;%(Outputs) - - - Generating finnish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\finnish.lng;%(Outputs) - - - Generating french language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\french.lng;%(Outputs) - - - Generating gaelic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\gaelic.lng;%(Outputs) - - - Generating galician language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\galician.lng;%(Outputs) - - - Generating german language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\german.lng;%(Outputs) - - - Generating greek language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\greek.lng;%(Outputs) - - - Generating hebrew language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hebrew.lng;%(Outputs) - - - Generating hungarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hungarian.lng;%(Outputs) - - - Generating icelandic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\icelandic.lng;%(Outputs) - - - Generating indonesian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\indonesian.lng;%(Outputs) - - - Generating irish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\irish.lng;%(Outputs) - - - Generating italian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\italian.lng;%(Outputs) - - - Generating japanese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\japanese.lng;%(Outputs) - - - Generating korean language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\korean.lng;%(Outputs) - - - Generating latin language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latin.lng;%(Outputs) - - - Generating latvian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latvian.lng;%(Outputs) - - - Generating lithuanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\lithuanian.lng;%(Outputs) - - - Generating luxembourgish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\luxembourgish.lng;%(Outputs) - - - Generating malay language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\malay.lng;%(Outputs) - - - Generating norwegian_bokmal language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_bokmal.lng;%(Outputs) - - - Generating norwegian_nynorsk language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_nynorsk.lng;%(Outputs) - - - Generating polish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\polish.lng;%(Outputs) - - - Generating portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\portuguese.lng;%(Outputs) - - - Generating romanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\romanian.lng;%(Outputs) - - - Generating russian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\russian.lng;%(Outputs) - - - Generating serbian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\serbian.lng;%(Outputs) - - - Generating simplified_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\simplified_chinese.lng;%(Outputs) - - - Generating slovak language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovak.lng;%(Outputs) - - - Generating slovenian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovenian.lng;%(Outputs) - - - Generating spanish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish.lng;%(Outputs) - - - Generating spanish_MX language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish_MX.lng;%(Outputs) - - - Generating swedish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\swedish.lng;%(Outputs) - - - Generating tamil language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\tamil.lng;%(Outputs) - - - Generating thai language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\thai.lng;%(Outputs) - - - Generating traditional_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\traditional_chinese.lng;%(Outputs) - - - Generating turkish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\turkish.lng;%(Outputs) - - - Generating ukrainian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\ukrainian.lng;%(Outputs) - - - Generating vietnamese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\vietnamese.lng;%(Outputs) - - - Generating welsh language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\welsh.lng;%(Outputs) - - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/langs_vs140.vcxproj.filters b/projects/langs_vs140.vcxproj.filters deleted file mode 100644 index bf5257ec82..0000000000 --- a/projects/langs_vs140.vcxproj.filters +++ /dev/null @@ -1,176 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - diff --git a/projects/langs_vs140.vcxproj.filters.in b/projects/langs_vs140.vcxproj.filters.in deleted file mode 100644 index 0d60ee9595..0000000000 --- a/projects/langs_vs140.vcxproj.filters.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - -!!FILES!! - - diff --git a/projects/langs_vs140.vcxproj.in b/projects/langs_vs140.vcxproj.in deleted file mode 100644 index 3271fecffa..0000000000 --- a/projects/langs_vs140.vcxproj.in +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v140 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - -!!FILES!! - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/langs_vs141.vcxproj b/projects/langs_vs141.vcxproj deleted file mode 100644 index c554c6e378..0000000000 --- a/projects/langs_vs141.vcxproj +++ /dev/null @@ -1,390 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v141 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - - - Generating afrikaans language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\afrikaans.lng;%(Outputs) - - - Generating arabic_egypt language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\arabic_egypt.lng;%(Outputs) - - - Generating basque language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\basque.lng;%(Outputs) - - - Generating belarusian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\belarusian.lng;%(Outputs) - - - Generating brazilian_portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\brazilian_portuguese.lng;%(Outputs) - - - Generating bulgarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\bulgarian.lng;%(Outputs) - - - Generating catalan language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\catalan.lng;%(Outputs) - - - Generating croatian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\croatian.lng;%(Outputs) - - - Generating czech language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\czech.lng;%(Outputs) - - - Generating danish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\danish.lng;%(Outputs) - - - Generating dutch language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\dutch.lng;%(Outputs) - - - Generating english_AU language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_AU.lng;%(Outputs) - - - Generating english_US language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_US.lng;%(Outputs) - - - Generating esperanto language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\esperanto.lng;%(Outputs) - - - Generating estonian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\estonian.lng;%(Outputs) - - - Generating faroese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\faroese.lng;%(Outputs) - - - Generating finnish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\finnish.lng;%(Outputs) - - - Generating french language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\french.lng;%(Outputs) - - - Generating gaelic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\gaelic.lng;%(Outputs) - - - Generating galician language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\galician.lng;%(Outputs) - - - Generating german language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\german.lng;%(Outputs) - - - Generating greek language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\greek.lng;%(Outputs) - - - Generating hebrew language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hebrew.lng;%(Outputs) - - - Generating hungarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hungarian.lng;%(Outputs) - - - Generating icelandic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\icelandic.lng;%(Outputs) - - - Generating indonesian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\indonesian.lng;%(Outputs) - - - Generating irish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\irish.lng;%(Outputs) - - - Generating italian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\italian.lng;%(Outputs) - - - Generating japanese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\japanese.lng;%(Outputs) - - - Generating korean language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\korean.lng;%(Outputs) - - - Generating latin language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latin.lng;%(Outputs) - - - Generating latvian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latvian.lng;%(Outputs) - - - Generating lithuanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\lithuanian.lng;%(Outputs) - - - Generating luxembourgish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\luxembourgish.lng;%(Outputs) - - - Generating malay language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\malay.lng;%(Outputs) - - - Generating norwegian_bokmal language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_bokmal.lng;%(Outputs) - - - Generating norwegian_nynorsk language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_nynorsk.lng;%(Outputs) - - - Generating polish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\polish.lng;%(Outputs) - - - Generating portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\portuguese.lng;%(Outputs) - - - Generating romanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\romanian.lng;%(Outputs) - - - Generating russian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\russian.lng;%(Outputs) - - - Generating serbian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\serbian.lng;%(Outputs) - - - Generating simplified_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\simplified_chinese.lng;%(Outputs) - - - Generating slovak language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovak.lng;%(Outputs) - - - Generating slovenian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovenian.lng;%(Outputs) - - - Generating spanish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish.lng;%(Outputs) - - - Generating spanish_MX language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish_MX.lng;%(Outputs) - - - Generating swedish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\swedish.lng;%(Outputs) - - - Generating tamil language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\tamil.lng;%(Outputs) - - - Generating thai language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\thai.lng;%(Outputs) - - - Generating traditional_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\traditional_chinese.lng;%(Outputs) - - - Generating turkish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\turkish.lng;%(Outputs) - - - Generating ukrainian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\ukrainian.lng;%(Outputs) - - - Generating vietnamese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\vietnamese.lng;%(Outputs) - - - Generating welsh language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\welsh.lng;%(Outputs) - - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/langs_vs141.vcxproj.filters b/projects/langs_vs141.vcxproj.filters deleted file mode 100644 index bf5257ec82..0000000000 --- a/projects/langs_vs141.vcxproj.filters +++ /dev/null @@ -1,176 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - diff --git a/projects/langs_vs141.vcxproj.filters.in b/projects/langs_vs141.vcxproj.filters.in deleted file mode 100644 index 0d60ee9595..0000000000 --- a/projects/langs_vs141.vcxproj.filters.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - -!!FILES!! - - diff --git a/projects/langs_vs141.vcxproj.in b/projects/langs_vs141.vcxproj.in deleted file mode 100644 index b73d52c5c9..0000000000 --- a/projects/langs_vs141.vcxproj.in +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v141 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - -!!FILES!! - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/langs_vs142.vcxproj b/projects/langs_vs142.vcxproj deleted file mode 100644 index 0a11156bb0..0000000000 --- a/projects/langs_vs142.vcxproj +++ /dev/null @@ -1,390 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v142 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - - - Generating afrikaans language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\afrikaans.lng;%(Outputs) - - - Generating arabic_egypt language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\arabic_egypt.lng;%(Outputs) - - - Generating basque language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\basque.lng;%(Outputs) - - - Generating belarusian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\belarusian.lng;%(Outputs) - - - Generating brazilian_portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\brazilian_portuguese.lng;%(Outputs) - - - Generating bulgarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\bulgarian.lng;%(Outputs) - - - Generating catalan language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\catalan.lng;%(Outputs) - - - Generating croatian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\croatian.lng;%(Outputs) - - - Generating czech language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\czech.lng;%(Outputs) - - - Generating danish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\danish.lng;%(Outputs) - - - Generating dutch language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\dutch.lng;%(Outputs) - - - Generating english_AU language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_AU.lng;%(Outputs) - - - Generating english_US language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english_US.lng;%(Outputs) - - - Generating esperanto language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\esperanto.lng;%(Outputs) - - - Generating estonian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\estonian.lng;%(Outputs) - - - Generating faroese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\faroese.lng;%(Outputs) - - - Generating finnish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\finnish.lng;%(Outputs) - - - Generating french language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\french.lng;%(Outputs) - - - Generating gaelic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\gaelic.lng;%(Outputs) - - - Generating galician language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\galician.lng;%(Outputs) - - - Generating german language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\german.lng;%(Outputs) - - - Generating greek language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\greek.lng;%(Outputs) - - - Generating hebrew language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hebrew.lng;%(Outputs) - - - Generating hungarian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\hungarian.lng;%(Outputs) - - - Generating icelandic language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\icelandic.lng;%(Outputs) - - - Generating indonesian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\indonesian.lng;%(Outputs) - - - Generating irish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\irish.lng;%(Outputs) - - - Generating italian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\italian.lng;%(Outputs) - - - Generating japanese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\japanese.lng;%(Outputs) - - - Generating korean language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\korean.lng;%(Outputs) - - - Generating latin language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latin.lng;%(Outputs) - - - Generating latvian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\latvian.lng;%(Outputs) - - - Generating lithuanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\lithuanian.lng;%(Outputs) - - - Generating luxembourgish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\luxembourgish.lng;%(Outputs) - - - Generating malay language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\malay.lng;%(Outputs) - - - Generating norwegian_bokmal language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_bokmal.lng;%(Outputs) - - - Generating norwegian_nynorsk language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\norwegian_nynorsk.lng;%(Outputs) - - - Generating polish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\polish.lng;%(Outputs) - - - Generating portuguese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\portuguese.lng;%(Outputs) - - - Generating romanian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\romanian.lng;%(Outputs) - - - Generating russian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\russian.lng;%(Outputs) - - - Generating serbian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\serbian.lng;%(Outputs) - - - Generating simplified_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\simplified_chinese.lng;%(Outputs) - - - Generating slovak language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovak.lng;%(Outputs) - - - Generating slovenian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\slovenian.lng;%(Outputs) - - - Generating spanish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish.lng;%(Outputs) - - - Generating spanish_MX language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\spanish_MX.lng;%(Outputs) - - - Generating swedish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\swedish.lng;%(Outputs) - - - Generating tamil language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\tamil.lng;%(Outputs) - - - Generating thai language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\thai.lng;%(Outputs) - - - Generating traditional_chinese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\traditional_chinese.lng;%(Outputs) - - - Generating turkish language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\turkish.lng;%(Outputs) - - - Generating ukrainian language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\ukrainian.lng;%(Outputs) - - - Generating vietnamese language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\vietnamese.lng;%(Outputs) - - - Generating welsh language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\welsh.lng;%(Outputs) - - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/langs_vs142.vcxproj.filters b/projects/langs_vs142.vcxproj.filters deleted file mode 100644 index bf5257ec82..0000000000 --- a/projects/langs_vs142.vcxproj.filters +++ /dev/null @@ -1,176 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - Translations - - - diff --git a/projects/langs_vs142.vcxproj.filters.in b/projects/langs_vs142.vcxproj.filters.in deleted file mode 100644 index 0d60ee9595..0000000000 --- a/projects/langs_vs142.vcxproj.filters.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - - {2a164580-9033-4a01-974b-b21da507efda} - - - - -!!FILES!! - - diff --git a/projects/langs_vs142.vcxproj.in b/projects/langs_vs142.vcxproj.in deleted file mode 100644 index f24c7cad78..0000000000 --- a/projects/langs_vs142.vcxproj.in +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Debug - Win32 - - - - langs - {0F066B23-18DF-4284-8265-F4A5E7E3B966} - langs - MakeFileProj - - - - Utility - false - v142 - - - - - - - - - - ..\bin\lang\ - ..\objs\langs\ - - - - Generating strings.h - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table - - - ./langs.tlb - - - - - - - Generating english language file - ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)" - ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs) - ..\bin\lang\english.lng;%(Outputs) - -!!FILES!! - - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - - - - diff --git a/projects/openttd_vs140.sln b/projects/openttd_vs140.sln deleted file mode 100644 index e2b7632f7e..0000000000 --- a/projects/openttd_vs140.sln +++ /dev/null @@ -1,103 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs140.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs140.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs140.vcxproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs140.vcxproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs140.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs140.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs140.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regression", "regression_vs140.vcxproj", "{4712B013-437D-42CE-947F-DEBABA15261F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basesets", "basesets_vs140.vcxproj", "{E12E77CA-C0F1-4ADA-943F-4929274249D3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|x64.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.Build.0 = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|x64.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj deleted file mode 100644 index d2ef91a877..0000000000 --- a/projects/openttd_vs140.vcxproj +++ /dev/null @@ -1,1457 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v140 - - - Application - false - Unicode - true - v140 - - - Application - false - Unicode - v140 - - - Application - false - Unicode - true - v140 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/openttd_vs140.vcxproj.filters b/projects/openttd_vs140.vcxproj.filters deleted file mode 100644 index f37355d847..0000000000 --- a/projects/openttd_vs140.vcxproj.filters +++ /dev/null @@ -1,3371 +0,0 @@ - - - - - {c76ff9f1-1e62-46d8-8d55-000000000000} - - - {c76ff9f1-1e62-46d8-8d55-000000000001} - - - {c76ff9f1-1e62-46d8-8d55-000000000002} - - - {c76ff9f1-1e62-46d8-8d55-000000000003} - - - {c76ff9f1-1e62-46d8-8d55-000000000004} - - - {c76ff9f1-1e62-46d8-8d55-000000000005} - - - {c76ff9f1-1e62-46d8-8d55-000000000006} - - - {c76ff9f1-1e62-46d8-8d55-000000000007} - - - {c76ff9f1-1e62-46d8-8d55-000000000008} - - - {c76ff9f1-1e62-46d8-8d55-000000000009} - - - {c76ff9f1-1e62-46d8-8d55-000000000010} - - - {c76ff9f1-1e62-46d8-8d55-000000000011} - - - {c76ff9f1-1e62-46d8-8d55-000000000012} - - - {c76ff9f1-1e62-46d8-8d55-000000000013} - - - {c76ff9f1-1e62-46d8-8d55-000000000014} - - - {c76ff9f1-1e62-46d8-8d55-000000000015} - - - {c76ff9f1-1e62-46d8-8d55-000000000016} - - - {c76ff9f1-1e62-46d8-8d55-000000000017} - - - {c76ff9f1-1e62-46d8-8d55-000000000018} - - - {c76ff9f1-1e62-46d8-8d55-000000000019} - - - {c76ff9f1-1e62-46d8-8d55-000000000020} - - - {c76ff9f1-1e62-46d8-8d55-000000000021} - - - {c76ff9f1-1e62-46d8-8d55-000000000022} - - - {c76ff9f1-1e62-46d8-8d55-000000000023} - - - {c76ff9f1-1e62-46d8-8d55-000000000024} - - - {c76ff9f1-1e62-46d8-8d55-000000000025} - - - {c76ff9f1-1e62-46d8-8d55-000000000026} - - - {c76ff9f1-1e62-46d8-8d55-000000000027} - - - {c76ff9f1-1e62-46d8-8d55-000000000028} - - - {c76ff9f1-1e62-46d8-8d55-000000000029} - - - {c76ff9f1-1e62-46d8-8d55-000000000030} - - - {c76ff9f1-1e62-46d8-8d55-000000000031} - - - {c76ff9f1-1e62-46d8-8d55-000000000032} - - - {c76ff9f1-1e62-46d8-8d55-000000000033} - - - {c76ff9f1-1e62-46d8-8d55-000000000034} - - - {c76ff9f1-1e62-46d8-8d55-000000000035} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - MD5 - - - MD5 - - - Compat - - - Compat - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI API - - - Game API - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Drivers - - - Drivers - - - Drivers - - - Sprite loaders - - - Sprite loaders - - - Sprite loaders - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - Video - - - Video - - - Video - - - Video - - - Video - - - Music - - - Music - - - Music - - - Music - - - Sound - - - Sound - - - Sound - - - Sound - - - Sound - - - Windows files - - - Windows files - - - Windows files - - - Windows files - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - - - - - diff --git a/projects/openttd_vs140.vcxproj.filters.in b/projects/openttd_vs140.vcxproj.filters.in deleted file mode 100644 index 126bd61459..0000000000 --- a/projects/openttd_vs140.vcxproj.filters.in +++ /dev/null @@ -1,13 +0,0 @@ - - - -!!FILTERS!! - - -!!FILES!! - - - - - - diff --git a/projects/openttd_vs140.vcxproj.in b/projects/openttd_vs140.vcxproj.in deleted file mode 100644 index b5628a23d3..0000000000 --- a/projects/openttd_vs140.vcxproj.in +++ /dev/null @@ -1,374 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v140 - - - Application - false - Unicode - true - v140 - - - Application - false - Unicode - v140 - - - Application - false - Unicode - true - v140 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - -!!FILES!! - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/openttd_vs141.sln b/projects/openttd_vs141.sln deleted file mode 100644 index 6e328ba764..0000000000 --- a/projects/openttd_vs141.sln +++ /dev/null @@ -1,103 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs141.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs141.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs141.vcxproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs141.vcxproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs141.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs141.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs141.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regression", "regression_vs141.vcxproj", "{4712B013-437D-42CE-947F-DEBABA15261F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basesets", "basesets_vs141.vcxproj", "{E12E77CA-C0F1-4ADA-943F-4929274249D3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|x64.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.Build.0 = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|x64.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/projects/openttd_vs141.vcxproj b/projects/openttd_vs141.vcxproj deleted file mode 100644 index 1e2c8aa668..0000000000 --- a/projects/openttd_vs141.vcxproj +++ /dev/null @@ -1,1457 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v141 - - - Application - false - Unicode - true - v141 - - - Application - false - Unicode - v141 - - - Application - false - Unicode - true - v141 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/openttd_vs141.vcxproj.filters b/projects/openttd_vs141.vcxproj.filters deleted file mode 100644 index f37355d847..0000000000 --- a/projects/openttd_vs141.vcxproj.filters +++ /dev/null @@ -1,3371 +0,0 @@ - - - - - {c76ff9f1-1e62-46d8-8d55-000000000000} - - - {c76ff9f1-1e62-46d8-8d55-000000000001} - - - {c76ff9f1-1e62-46d8-8d55-000000000002} - - - {c76ff9f1-1e62-46d8-8d55-000000000003} - - - {c76ff9f1-1e62-46d8-8d55-000000000004} - - - {c76ff9f1-1e62-46d8-8d55-000000000005} - - - {c76ff9f1-1e62-46d8-8d55-000000000006} - - - {c76ff9f1-1e62-46d8-8d55-000000000007} - - - {c76ff9f1-1e62-46d8-8d55-000000000008} - - - {c76ff9f1-1e62-46d8-8d55-000000000009} - - - {c76ff9f1-1e62-46d8-8d55-000000000010} - - - {c76ff9f1-1e62-46d8-8d55-000000000011} - - - {c76ff9f1-1e62-46d8-8d55-000000000012} - - - {c76ff9f1-1e62-46d8-8d55-000000000013} - - - {c76ff9f1-1e62-46d8-8d55-000000000014} - - - {c76ff9f1-1e62-46d8-8d55-000000000015} - - - {c76ff9f1-1e62-46d8-8d55-000000000016} - - - {c76ff9f1-1e62-46d8-8d55-000000000017} - - - {c76ff9f1-1e62-46d8-8d55-000000000018} - - - {c76ff9f1-1e62-46d8-8d55-000000000019} - - - {c76ff9f1-1e62-46d8-8d55-000000000020} - - - {c76ff9f1-1e62-46d8-8d55-000000000021} - - - {c76ff9f1-1e62-46d8-8d55-000000000022} - - - {c76ff9f1-1e62-46d8-8d55-000000000023} - - - {c76ff9f1-1e62-46d8-8d55-000000000024} - - - {c76ff9f1-1e62-46d8-8d55-000000000025} - - - {c76ff9f1-1e62-46d8-8d55-000000000026} - - - {c76ff9f1-1e62-46d8-8d55-000000000027} - - - {c76ff9f1-1e62-46d8-8d55-000000000028} - - - {c76ff9f1-1e62-46d8-8d55-000000000029} - - - {c76ff9f1-1e62-46d8-8d55-000000000030} - - - {c76ff9f1-1e62-46d8-8d55-000000000031} - - - {c76ff9f1-1e62-46d8-8d55-000000000032} - - - {c76ff9f1-1e62-46d8-8d55-000000000033} - - - {c76ff9f1-1e62-46d8-8d55-000000000034} - - - {c76ff9f1-1e62-46d8-8d55-000000000035} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - MD5 - - - MD5 - - - Compat - - - Compat - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI API - - - Game API - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Drivers - - - Drivers - - - Drivers - - - Sprite loaders - - - Sprite loaders - - - Sprite loaders - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - Video - - - Video - - - Video - - - Video - - - Video - - - Music - - - Music - - - Music - - - Music - - - Sound - - - Sound - - - Sound - - - Sound - - - Sound - - - Windows files - - - Windows files - - - Windows files - - - Windows files - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - - - - - diff --git a/projects/openttd_vs141.vcxproj.filters.in b/projects/openttd_vs141.vcxproj.filters.in deleted file mode 100644 index 126bd61459..0000000000 --- a/projects/openttd_vs141.vcxproj.filters.in +++ /dev/null @@ -1,13 +0,0 @@ - - - -!!FILTERS!! - - -!!FILES!! - - - - - - diff --git a/projects/openttd_vs141.vcxproj.in b/projects/openttd_vs141.vcxproj.in deleted file mode 100644 index 015c23d3c5..0000000000 --- a/projects/openttd_vs141.vcxproj.in +++ /dev/null @@ -1,374 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v141 - - - Application - false - Unicode - true - v141 - - - Application - false - Unicode - v141 - - - Application - false - Unicode - true - v141 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - -!!FILES!! - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/openttd_vs142.sln b/projects/openttd_vs142.sln deleted file mode 100644 index 15cd430168..0000000000 --- a/projects/openttd_vs142.sln +++ /dev/null @@ -1,105 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28516.95 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs142.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs142.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs142.vcxproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs142.vcxproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs142.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs142.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs142.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regression", "regression_vs142.vcxproj", "{4712B013-437D-42CE-947F-DEBABA15261F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basesets", "basesets_vs142.vcxproj", "{E12E77CA-C0F1-4ADA-943F-4929274249D3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64 - {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.Build.0 = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.ActiveCfg = Debug|Win32 - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32 - {0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32 - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|x64.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|Win32.ActiveCfg = Debug|Win32 - {2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.Build.0 = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.ActiveCfg = Debug|Win32 - {0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.Build.0 = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.ActiveCfg = Debug|Win32 - {E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.Build.0 = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Debug|x64.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|Win32.ActiveCfg = Debug|Win32 - {4712B013-437D-42CE-947F-DEBABA15261F}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Debug|x64.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|Win32.Build.0 = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.ActiveCfg = Debug|Win32 - {E12E77CA-C0F1-4ADA-943F-4929274249D3}.Release|x64.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1DE4D2BD-DBC4-4304-907E-34994EEAA4C1} - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal diff --git a/projects/openttd_vs142.vcxproj b/projects/openttd_vs142.vcxproj deleted file mode 100644 index 66a7de6918..0000000000 --- a/projects/openttd_vs142.vcxproj +++ /dev/null @@ -1,1457 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v142 - - - Application - false - Unicode - true - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - true - v142 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/openttd_vs142.vcxproj.filters b/projects/openttd_vs142.vcxproj.filters deleted file mode 100644 index f37355d847..0000000000 --- a/projects/openttd_vs142.vcxproj.filters +++ /dev/null @@ -1,3371 +0,0 @@ - - - - - {c76ff9f1-1e62-46d8-8d55-000000000000} - - - {c76ff9f1-1e62-46d8-8d55-000000000001} - - - {c76ff9f1-1e62-46d8-8d55-000000000002} - - - {c76ff9f1-1e62-46d8-8d55-000000000003} - - - {c76ff9f1-1e62-46d8-8d55-000000000004} - - - {c76ff9f1-1e62-46d8-8d55-000000000005} - - - {c76ff9f1-1e62-46d8-8d55-000000000006} - - - {c76ff9f1-1e62-46d8-8d55-000000000007} - - - {c76ff9f1-1e62-46d8-8d55-000000000008} - - - {c76ff9f1-1e62-46d8-8d55-000000000009} - - - {c76ff9f1-1e62-46d8-8d55-000000000010} - - - {c76ff9f1-1e62-46d8-8d55-000000000011} - - - {c76ff9f1-1e62-46d8-8d55-000000000012} - - - {c76ff9f1-1e62-46d8-8d55-000000000013} - - - {c76ff9f1-1e62-46d8-8d55-000000000014} - - - {c76ff9f1-1e62-46d8-8d55-000000000015} - - - {c76ff9f1-1e62-46d8-8d55-000000000016} - - - {c76ff9f1-1e62-46d8-8d55-000000000017} - - - {c76ff9f1-1e62-46d8-8d55-000000000018} - - - {c76ff9f1-1e62-46d8-8d55-000000000019} - - - {c76ff9f1-1e62-46d8-8d55-000000000020} - - - {c76ff9f1-1e62-46d8-8d55-000000000021} - - - {c76ff9f1-1e62-46d8-8d55-000000000022} - - - {c76ff9f1-1e62-46d8-8d55-000000000023} - - - {c76ff9f1-1e62-46d8-8d55-000000000024} - - - {c76ff9f1-1e62-46d8-8d55-000000000025} - - - {c76ff9f1-1e62-46d8-8d55-000000000026} - - - {c76ff9f1-1e62-46d8-8d55-000000000027} - - - {c76ff9f1-1e62-46d8-8d55-000000000028} - - - {c76ff9f1-1e62-46d8-8d55-000000000029} - - - {c76ff9f1-1e62-46d8-8d55-000000000030} - - - {c76ff9f1-1e62-46d8-8d55-000000000031} - - - {c76ff9f1-1e62-46d8-8d55-000000000032} - - - {c76ff9f1-1e62-46d8-8d55-000000000033} - - - {c76ff9f1-1e62-46d8-8d55-000000000034} - - - {c76ff9f1-1e62-46d8-8d55-000000000035} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - Core Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - GUI Source Code - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Widgets - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Command handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Save/Load handlers - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - Tables - - - MD5 - - - MD5 - - - Compat - - - Compat - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Script - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - Squirrel headers - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI Core - - - AI API - - - Game API - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Game Core - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Script API Implementation - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Blitters - - - Drivers - - - Drivers - - - Drivers - - - Sprite loaders - - - Sprite loaders - - - Sprite loaders - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - NewGRF - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Map Accessors - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Misc - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Network Core - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - Pathfinder - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - NPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - YAPF - - - Video - - - Video - - - Video - - - Video - - - Video - - - Music - - - Music - - - Music - - - Music - - - Sound - - - Sound - - - Sound - - - Sound - - - Sound - - - Windows files - - - Windows files - - - Windows files - - - Windows files - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Threading - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - Btree containers - - - - - - - diff --git a/projects/openttd_vs142.vcxproj.filters.in b/projects/openttd_vs142.vcxproj.filters.in deleted file mode 100644 index 126bd61459..0000000000 --- a/projects/openttd_vs142.vcxproj.filters.in +++ /dev/null @@ -1,13 +0,0 @@ - - - -!!FILTERS!! - - -!!FILES!! - - - - - - diff --git a/projects/openttd_vs142.vcxproj.in b/projects/openttd_vs142.vcxproj.in deleted file mode 100644 index 6941b3450b..0000000000 --- a/projects/openttd_vs142.vcxproj.in +++ /dev/null @@ -1,374 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - openttd - {668328A0-B40E-4CDB-BD72-D0064424414A} - openttd - x86-windows-static - x64-windows-static - - - - Application - false - Unicode - v142 - - - Application - false - Unicode - true - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - true - v142 - - - - - - - - - - - - - - - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - false - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - NativeMinimumRules.ruleset - - - $(SolutionDir)..\objs\$(Platform)\$(Configuration)\ - $(ProjectDir)..\bin - - - - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - 4Bytes - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - false - - - MachineX86 - true - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - false - - - MachineX86 - 5.01 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Release/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Full - AnySuitable - true - Size - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions) - true - Sync - MultiThreaded - Default - false - true - - - - - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - FastCall - Default - true - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - %(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - true - MachineX64 - true - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - - - X64 - .\Debug/openttd.tlb - - - - - /J /Zc:throwingNew /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - Disabled - true - ..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories) - _DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_XAUDIO2;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LIBLZMA;WITH_PNG;WITH_UNISCRIBE;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - - - - - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - false - true - ProgramDatabase - Cdecl - Default - true - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0809 - - - winmm.lib;ws2_32.lib;imm32.lib;%(AdditionalDependencies) - true - LIBCMT.lib;%(IgnoreSpecificDefaultLibraries) - true - Windows - 1048576 - 1048576 - MachineX64 - 5.02 - - - os_versions.manifest - PerMonitorHighDPIAware - - - copy "$(OutDir)$(TargetName)$(TargetExt)" "$(SolutionDir)..\bin\$(TargetName)$(TargetExt)" - - - -!!FILES!! - - - - - - - - {0f066b23-18df-4284-8265-f4a5e7e3b966} - false - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - {0817f629-589e-4a3b-b81a-8647bc571e35} - false - - - {a133a442-bd0a-4ade-b117-ad7545e4bdd1} - false - - - {1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec} - false - - - {e12e77ca-c0f1-4ada-943f-4929274249d3} - false - - - - diff --git a/projects/os_versions.manifest b/projects/os_versions.manifest deleted file mode 100644 index c7905ee709..0000000000 --- a/projects/os_versions.manifest +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/projects/regression.bat b/projects/regression.bat deleted file mode 100644 index db373c371b..0000000000 --- a/projects/regression.bat +++ /dev/null @@ -1,6 +0,0 @@ -cd ..\bin -editbin /nologo /subsystem:console openttd.exe -cscript /nologo ai\regression\run.vbs -set RESULT=%ERRORLEVEL% -editbin /nologo /subsystem:windows openttd.exe -exit %RESULT% diff --git a/projects/regression_vs140.vcxproj b/projects/regression_vs140.vcxproj deleted file mode 100644 index b1c9f4930a..0000000000 --- a/projects/regression_vs140.vcxproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Debug - Win32 - - - - {4712B013-437D-42CE-947F-DEBABA15261F} - regression - regression - - - - Makefile - v140 - - - - - - - - - - - - call regression.bat - call regression.bat - del ..\bin\tmp.regression - - - - {668328a0-b40e-4cdb-bd72-d0064424414a} - - - - - - diff --git a/projects/regression_vs141.vcxproj b/projects/regression_vs141.vcxproj deleted file mode 100644 index fda3f3312d..0000000000 --- a/projects/regression_vs141.vcxproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Debug - Win32 - - - - {4712B013-437D-42CE-947F-DEBABA15261F} - regression - regression - - - - Makefile - v141 - - - - - - - - - - - - call regression.bat - call regression.bat - del ..\bin\tmp.regression - - - - {668328a0-b40e-4cdb-bd72-d0064424414a} - - - - - - diff --git a/projects/regression_vs142.vcxproj b/projects/regression_vs142.vcxproj deleted file mode 100644 index 3ddcc6f37a..0000000000 --- a/projects/regression_vs142.vcxproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Debug - Win32 - - - - {4712B013-437D-42CE-947F-DEBABA15261F} - regression - regression - - - - Makefile - v142 - - - - - - - - - - - - call regression.bat - call regression.bat - del ..\bin\tmp.regression - - - - {668328a0-b40e-4cdb-bd72-d0064424414a} - - - - - - diff --git a/projects/settings_vs140.vcxproj b/projects/settings_vs140.vcxproj deleted file mode 100644 index b5f5151821..0000000000 --- a/projects/settings_vs140.vcxproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v140 - - - - - - - - - ..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble ..\src\table\company_settings.ini ..\src\table\currency_settings.ini ..\src\table\gameopt_settings.ini ..\src\table\misc_settings.ini ..\src\table\settings.ini ..\src\table\win32_settings.ini ..\src\table\window_settings.ini - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - - - - - - - - - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settings_vs140.vcxproj.filters b/projects/settings_vs140.vcxproj.filters deleted file mode 100644 index 8caf9fa0a6..0000000000 --- a/projects/settings_vs140.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - - - - - diff --git a/projects/settings_vs140.vcxproj.filters.in b/projects/settings_vs140.vcxproj.filters.in deleted file mode 100644 index 08f90670d2..0000000000 --- a/projects/settings_vs140.vcxproj.filters.in +++ /dev/null @@ -1,15 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - -!!FILES!! - - - - - - diff --git a/projects/settings_vs140.vcxproj.in b/projects/settings_vs140.vcxproj.in deleted file mode 100644 index dcbbfbd352..0000000000 --- a/projects/settings_vs140.vcxproj.in +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v140 - - - - - - - - - !!FILTERS!! - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - -!!FILES!! - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settings_vs141.vcxproj b/projects/settings_vs141.vcxproj deleted file mode 100644 index b3f6871945..0000000000 --- a/projects/settings_vs141.vcxproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v141 - - - - - - - - - ..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble ..\src\table\company_settings.ini ..\src\table\currency_settings.ini ..\src\table\gameopt_settings.ini ..\src\table\misc_settings.ini ..\src\table\settings.ini ..\src\table\win32_settings.ini ..\src\table\window_settings.ini - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - - - - - - - - - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settings_vs141.vcxproj.filters b/projects/settings_vs141.vcxproj.filters deleted file mode 100644 index 8caf9fa0a6..0000000000 --- a/projects/settings_vs141.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - - - - - diff --git a/projects/settings_vs141.vcxproj.filters.in b/projects/settings_vs141.vcxproj.filters.in deleted file mode 100644 index 08f90670d2..0000000000 --- a/projects/settings_vs141.vcxproj.filters.in +++ /dev/null @@ -1,15 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - -!!FILES!! - - - - - - diff --git a/projects/settings_vs141.vcxproj.in b/projects/settings_vs141.vcxproj.in deleted file mode 100644 index 1701c99f5f..0000000000 --- a/projects/settings_vs141.vcxproj.in +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v141 - - - - - - - - - !!FILTERS!! - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - -!!FILES!! - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settings_vs142.vcxproj b/projects/settings_vs142.vcxproj deleted file mode 100644 index e0ed933091..0000000000 --- a/projects/settings_vs142.vcxproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v142 - - - - - - - - - ..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble ..\src\table\company_settings.ini ..\src\table\currency_settings.ini ..\src\table\gameopt_settings.ini ..\src\table\misc_settings.ini ..\src\table\settings.ini ..\src\table\win32_settings.ini ..\src\table\window_settings.ini - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - - - - - - - - - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settings_vs142.vcxproj.filters b/projects/settings_vs142.vcxproj.filters deleted file mode 100644 index 8caf9fa0a6..0000000000 --- a/projects/settings_vs142.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - INI - - - - - - - diff --git a/projects/settings_vs142.vcxproj.filters.in b/projects/settings_vs142.vcxproj.filters.in deleted file mode 100644 index 08f90670d2..0000000000 --- a/projects/settings_vs142.vcxproj.filters.in +++ /dev/null @@ -1,15 +0,0 @@ - - - - - {21deca6c-8df4-4f34-9dad-17d7781cd5a0} - - - -!!FILES!! - - - - - - diff --git a/projects/settings_vs142.vcxproj.in b/projects/settings_vs142.vcxproj.in deleted file mode 100644 index 4463c573d7..0000000000 --- a/projects/settings_vs142.vcxproj.in +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Debug - Win32 - - - - settings - {0817F629-589E-4A3B-B81A-8647BC571E35} - settings - - - - Makefile - v142 - - - - - - - - - !!FILTERS!! - - - ..\objs\settings\table\ - ..\objs\settings\table\ - $(SettingsCommandLine) - $(SettingsCommandLine) - del ..\objs\settings\table\settings.h - ..\objs\settings\table\settings.h - - -!!FILES!! - - - - - - - - {e9548de9-f089-49b7-93a6-30be2cc311c7} - false - - - - - - diff --git a/projects/settingsgen_vs140.vcxproj b/projects/settingsgen_vs140.vcxproj deleted file mode 100644 index 12ce280f3a..0000000000 --- a/projects/settingsgen_vs140.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - Win32 - - - - settingsgen - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - settings - - - - Application - MultiByte - v140 - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\objs\settings\ - ..\objs\settings\ - settings_gen - - - - - - - - %(Inputs) - - - MinSpace - Size - SETTINGSGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - All - $(IntDir)$(TargetName).pdb - Level3 - true - ProgramDatabase - MultiThreadedDebug - - - $(OutDir)settings_gen.exe - true - false - - - Console - 5.01 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/settingsgen_vs140.vcxproj.filters b/projects/settingsgen_vs140.vcxproj.filters deleted file mode 100644 index c8afe0c8ed..0000000000 --- a/projects/settingsgen_vs140.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {a4678737-b3b3-4be5-9db1-fa6ccd164c59} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - diff --git a/projects/settingsgen_vs141.vcxproj b/projects/settingsgen_vs141.vcxproj deleted file mode 100644 index 2b356f2eab..0000000000 --- a/projects/settingsgen_vs141.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - Win32 - - - - settingsgen - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - settings - - - - Application - MultiByte - v141 - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\objs\settings\ - ..\objs\settings\ - settings_gen - - - - - - - - %(Inputs) - - - MinSpace - Size - SETTINGSGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - All - $(IntDir)$(TargetName).pdb - Level3 - true - ProgramDatabase - MultiThreadedDebug - - - $(OutDir)settings_gen.exe - true - false - - - Console - 5.01 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/settingsgen_vs141.vcxproj.filters b/projects/settingsgen_vs141.vcxproj.filters deleted file mode 100644 index c8afe0c8ed..0000000000 --- a/projects/settingsgen_vs141.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {a4678737-b3b3-4be5-9db1-fa6ccd164c59} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - diff --git a/projects/settingsgen_vs142.vcxproj b/projects/settingsgen_vs142.vcxproj deleted file mode 100644 index fb2f7a731e..0000000000 --- a/projects/settingsgen_vs142.vcxproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Debug - Win32 - - - - settingsgen - {E9548DE9-F089-49B7-93A6-30BE2CC311C7} - settings - - - - Application - MultiByte - v142 - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\objs\settings\ - ..\objs\settings\ - settings_gen - - - - - - - - %(Inputs) - - - /std:c++latest /Zc:__cplusplus %(AdditionalOptions) - MinSpace - Size - SETTINGSGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - All - $(IntDir)$(TargetName).pdb - Level3 - true - ProgramDatabase - MultiThreadedDebug - - - $(OutDir)settings_gen.exe - true - false - - - Console - 5.01 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/settingsgen_vs142.vcxproj.filters b/projects/settingsgen_vs142.vcxproj.filters deleted file mode 100644 index c8afe0c8ed..0000000000 --- a/projects/settingsgen_vs142.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {a4678737-b3b3-4be5-9db1-fa6ccd164c59} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - diff --git a/projects/strgen_vs140.vcxproj b/projects/strgen_vs140.vcxproj deleted file mode 100644 index b972d873eb..0000000000 --- a/projects/strgen_vs140.vcxproj +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Debug - Win32 - - - - strgen - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} - strgen - - - - Application - false - MultiByte - v140 - - - - - - - - - - $(SolutionDir)..\objs\strgen\ - $(SolutionDir)..\objs\strgen\ - false - AllRules.ruleset - - - - - - .\Debug/strgen.tlb - - - - - /MP %(AdditionalOptions) - MinSpace - Size - STRGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - Default - MultiThreadedDebug - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - true - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x041d - - - true - true - $(IntDir)strgen.pdb - Console - false - - - MachineX86 - 5.01 - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/strgen_vs140.vcxproj.filters b/projects/strgen_vs140.vcxproj.filters deleted file mode 100644 index 58864ee691..0000000000 --- a/projects/strgen_vs140.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {5894294c-d4dc-41f0-be31-e56cff4e0405} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - - - diff --git a/projects/strgen_vs141.vcxproj b/projects/strgen_vs141.vcxproj deleted file mode 100644 index addc6f10a5..0000000000 --- a/projects/strgen_vs141.vcxproj +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Debug - Win32 - - - - strgen - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} - strgen - - - - Application - false - MultiByte - v141 - - - - - - - - - - $(SolutionDir)..\objs\strgen\ - $(SolutionDir)..\objs\strgen\ - false - AllRules.ruleset - - - - - - .\Debug/strgen.tlb - - - - - /MP %(AdditionalOptions) - MinSpace - Size - STRGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - Default - MultiThreadedDebug - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - true - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x041d - - - true - true - $(IntDir)strgen.pdb - Console - false - - - MachineX86 - 5.01 - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/strgen_vs141.vcxproj.filters b/projects/strgen_vs141.vcxproj.filters deleted file mode 100644 index 58864ee691..0000000000 --- a/projects/strgen_vs141.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {5894294c-d4dc-41f0-be31-e56cff4e0405} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - - - diff --git a/projects/strgen_vs142.vcxproj b/projects/strgen_vs142.vcxproj deleted file mode 100644 index 554109b045..0000000000 --- a/projects/strgen_vs142.vcxproj +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Debug - Win32 - - - - strgen - {A133A442-BD0A-4ADE-B117-AD7545E4BDD1} - strgen - - - - Application - false - MultiByte - v142 - - - - - - - - - - $(SolutionDir)..\objs\strgen\ - $(SolutionDir)..\objs\strgen\ - false - NativeMinimumRules.ruleset - - - - - - .\Debug/strgen.tlb - - - - - /MP %(AdditionalOptions) - MinSpace - Size - STRGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - Default - MultiThreadedDebug - - - All - $(IntDir) - $(IntDir) - $(IntDir)$(TargetName).pdb - Level3 - true - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x041d - - - true - true - $(IntDir)strgen.pdb - Console - false - - - MachineX86 - 5.01 - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/strgen_vs142.vcxproj.filters b/projects/strgen_vs142.vcxproj.filters deleted file mode 100644 index 58864ee691..0000000000 --- a/projects/strgen_vs142.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {5894294c-d4dc-41f0-be31-e56cff4e0405} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - - - - - - - diff --git a/projects/version_vs140.vcxproj b/projects/version_vs140.vcxproj deleted file mode 100644 index 6e71a88201..0000000000 --- a/projects/version_vs140.vcxproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Debug - Win32 - - - - version - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} - version - - - - Makefile - MultiByte - v140 - - - - - - - - - - $(SolutionDir)..\objs\version\ - $(SolutionDir)..\objs\version\ - cscript "$(ProjectDir)/determineversion.vbs" - cscript "$(ProjectDir)/determineversion.vbs" - ..\src\rev.cpp - del ..\src\rev.cpp - - - - - - - - - diff --git a/projects/version_vs141.vcxproj b/projects/version_vs141.vcxproj deleted file mode 100644 index 5d8ee8c74f..0000000000 --- a/projects/version_vs141.vcxproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Debug - Win32 - - - - version - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} - version - - - - Makefile - MultiByte - v141 - - - - - - - - - - $(SolutionDir)..\objs\version\ - $(SolutionDir)..\objs\version\ - cscript "$(ProjectDir)/determineversion.vbs" - cscript "$(ProjectDir)/determineversion.vbs" - ..\src\rev.cpp - del ..\src\rev.cpp - - - - - - - - - diff --git a/projects/version_vs142.vcxproj b/projects/version_vs142.vcxproj deleted file mode 100644 index 31971e35c9..0000000000 --- a/projects/version_vs142.vcxproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Debug - Win32 - - - - version - {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} - version - - - - Makefile - MultiByte - v142 - - - - - - - - - - $(SolutionDir)..\objs\version\ - $(SolutionDir)..\objs\version\ - cscript "$(ProjectDir)/determineversion.vbs" - cscript "$(ProjectDir)/determineversion.vbs" - ..\src\rev.cpp - del ..\src\rev.cpp - - - - - - - - - diff --git a/bin/ai/regression/regression.cfg b/regression/regression.cfg similarity index 100% rename from bin/ai/regression/regression.cfg rename to regression/regression.cfg diff --git a/bin/ai/regression/regression_info.nut b/regression/regression/info.nut similarity index 100% rename from bin/ai/regression/regression_info.nut rename to regression/regression/info.nut diff --git a/bin/ai/regression/tst_regression/main.nut b/regression/regression/main.nut similarity index 100% rename from bin/ai/regression/tst_regression/main.nut rename to regression/regression/main.nut diff --git a/bin/ai/regression/tst_regression/require.nut b/regression/regression/require.nut similarity index 100% rename from bin/ai/regression/tst_regression/require.nut rename to regression/regression/require.nut diff --git a/bin/ai/regression/tst_regression/result.txt b/regression/regression/result.txt similarity index 100% rename from bin/ai/regression/tst_regression/result.txt rename to regression/regression/result.txt diff --git a/bin/ai/regression/empty.sav b/regression/regression/test.sav similarity index 100% rename from bin/ai/regression/empty.sav rename to regression/regression/test.sav diff --git a/regression/stationlist/info.nut b/regression/stationlist/info.nut new file mode 100644 index 0000000000..42e5072fd4 --- /dev/null +++ b/regression/stationlist/info.nut @@ -0,0 +1,13 @@ +class StationList extends AIInfo { + function GetAuthor() { return "OpenTTD NoAI Developers Team"; } + function GetName() { return "StationList"; } + function GetShortName() { return "REGS"; } + function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; } + function GetVersion() { return 1; } + function GetAPIVersion() { return "1.11"; } + function GetDate() { return "2007-03-18"; } + function CreateInstance() { return "StationList"; } +} + +RegisterAI(StationList()); + diff --git a/bin/ai/regression/tst_stationlist/main.nut b/regression/stationlist/main.nut similarity index 89% rename from bin/ai/regression/tst_stationlist/main.nut rename to regression/stationlist/main.nut index 2f00ea1d6f..b639c54049 100644 --- a/bin/ai/regression/tst_stationlist/main.nut +++ b/regression/stationlist/main.nut @@ -1,9 +1,9 @@ -class Regression extends AIController { +class StationList extends AIController { function Start(); }; -function Regression::StationList() +function StationList::StationList() { local list = AIStationList(AIStation.STATION_BUS_STOP + AIStation.STATION_TRUCK_STOP); @@ -27,7 +27,7 @@ function Regression::StationList() } }; -function Regression::StationList_Cargo() +function StationList::StationList_Cargo() { print(""); print("--StationList_Cargo--"); @@ -44,7 +44,7 @@ function Regression::StationList_Cargo() } }; -function Regression::StationList_CargoPlanned() +function StationList::StationList_CargoPlanned() { print(""); print("--StationList_CargoPlanned--"); @@ -58,7 +58,7 @@ function Regression::StationList_CargoPlanned() } }; -function Regression::StationList_CargoPlannedByFrom() +function StationList::StationList_CargoPlannedByFrom() { print(""); print("--StationList_CargoPlannedByFrom--"); @@ -68,7 +68,7 @@ function Regression::StationList_CargoPlannedByFrom() } }; -function Regression::StationList_CargoPlannedByVia() +function StationList::StationList_CargoPlannedByVia() { print(""); print("--StationList_CargoPlannedByVia--"); @@ -78,7 +78,7 @@ function Regression::StationList_CargoPlannedByVia() } }; -function Regression::StationList_CargoPlannedViaByFrom() +function StationList::StationList_CargoPlannedViaByFrom() { print(""); print("--StationList_CargoPlannedViaByFrom--"); @@ -88,7 +88,7 @@ function Regression::StationList_CargoPlannedViaByFrom() } }; -function Regression::StationList_CargoPlannedFromByVia() +function StationList::StationList_CargoPlannedFromByVia() { print(""); print("--StationList_CargoPlannedFromByVia--"); @@ -98,7 +98,7 @@ function Regression::StationList_CargoPlannedFromByVia() } }; -function Regression::StationList_CargoWaiting() +function StationList::StationList_CargoWaiting() { print(""); print("--StationList_CargoWaiting--"); @@ -112,7 +112,7 @@ function Regression::StationList_CargoWaiting() } }; -function Regression::StationList_CargoWaitingByFrom() +function StationList::StationList_CargoWaitingByFrom() { print(""); print("--StationList_CargoWaitingByFrom--"); @@ -122,7 +122,7 @@ function Regression::StationList_CargoWaitingByFrom() } }; -function Regression::StationList_CargoWaitingByVia() +function StationList::StationList_CargoWaitingByVia() { print(""); print("--StationList_CargoWaitingByVia--"); @@ -132,7 +132,7 @@ function Regression::StationList_CargoWaitingByVia() } }; -function Regression::StationList_CargoWaitingViaByFrom() +function StationList::StationList_CargoWaitingViaByFrom() { print(""); print("--StationList_CargoWaitingViaByFrom--"); @@ -142,7 +142,7 @@ function Regression::StationList_CargoWaitingViaByFrom() } }; -function Regression::StationList_CargoWaitingFromByVia() +function StationList::StationList_CargoWaitingFromByVia() { print(""); print("--StationList_CargoWaitingFromByVia--"); @@ -152,7 +152,7 @@ function Regression::StationList_CargoWaitingFromByVia() } }; -function Regression::StationList_Vehicle() +function StationList::StationList_Vehicle() { local list = AIStationList_Vehicle(12); @@ -196,7 +196,7 @@ function Regression::StationList_Vehicle() } } -function Regression::Start() +function StationList::Start() { StationList(); StationList_Cargo(); diff --git a/bin/ai/regression/tst_stationlist/result.txt b/regression/stationlist/result.txt similarity index 100% rename from bin/ai/regression/tst_stationlist/result.txt rename to regression/stationlist/result.txt diff --git a/regression/stationlist/test.sav b/regression/stationlist/test.sav new file mode 100644 index 0000000000..959f77638b Binary files /dev/null and b/regression/stationlist/test.sav differ diff --git a/source.list b/source.list deleted file mode 100644 index f2dbf76563..0000000000 --- a/source.list +++ /dev/null @@ -1,1274 +0,0 @@ -# Source Files -tbtr_template_gui_main.cpp -tbtr_template_gui_create.cpp -tbtr_template_vehicle.cpp -tbtr_template_vehicle_func.cpp -tbtr_template_gui_main.h -tbtr_template_gui_create.h -tbtr_template_vehicle.h -tbtr_template_vehicle_func.h - -airport.cpp -animated_tile.cpp -articulated_vehicles.cpp -autoreplace.cpp -bmp.cpp -cargoaction.cpp -cargomonitor.cpp -cargopacket.cpp -cargotype.cpp -cheat.cpp -command.cpp -console.cpp -console_cmds.cpp -cpu.cpp -crashlog.cpp -currency.cpp -date.cpp -debug.cpp -dedicated.cpp -departures.cpp -depot.cpp -disaster_vehicle.cpp -driver.cpp -economy.cpp -effectvehicle.cpp -elrail.cpp -engine.cpp -fileio.cpp -fios.cpp -fontcache.cpp -fontdetection.cpp -base_consist.cpp -gamelog.cpp -genworld.cpp -gfx.cpp -gfxinit.cpp -gfx_layout.cpp -goal.cpp -ground_vehicle.cpp -heightmap.cpp -highscore.cpp -infrastructure.cpp -hotkeys.cpp -ini.cpp -ini_load.cpp -landscape.cpp -linkgraph/demands.cpp -linkgraph/flowmapper.cpp -linkgraph/linkgraph.cpp -linkgraph/linkgraphjob.cpp -linkgraph/linkgraphschedule.cpp -linkgraph/mcf.cpp -linkgraph/refresh.cpp -map.cpp -misc.cpp -mixer.cpp -music.cpp -network/network.cpp -network/network_admin.cpp -network/network_client.cpp -network/network_command.cpp -network/network_content.cpp -network/network_gamelist.cpp -network/network_server.cpp -network/network_udp.cpp -openttd.cpp -order_backup.cpp -pbs.cpp -plans.cpp -progress.cpp -rail.cpp -rev.cpp -road.cpp -roadstop.cpp -screenshot_gui.cpp -screenshot.cpp -settings.cpp -signal.cpp -programmable_signals.cpp -programmable_signals_gui.cpp -signs.cpp -sound.cpp -sprite.cpp -spritecache.cpp -station.cpp -strgen/strgen_base.cpp -string.cpp -stringfilter.cpp -strings.cpp -story.cpp -subsidy.cpp -textbuf.cpp -texteff.cpp -tgp.cpp -tile_map.cpp -tilearea.cpp -townname.cpp -#if WIN32 -#else - #if OS2 - os/os2/os2.cpp - 3rdparty/os2/getaddrinfo.c - 3rdparty/os2/getaddrinfo.h - 3rdparty/os2/getnameinfo.c - 3rdparty/os2/getnameinfo.h - #else - #if OSX - os/macosx/crashlog_osx.cpp - #else - os/unix/crashlog_unix.cpp - #end - os/unix/unix.cpp - #end -#end -vehicle.cpp -vehiclelist.cpp -viewport.cpp -#if USE_SSE - viewport_sprite_sorter_sse4.cpp -#end -waypoint.cpp -widget.cpp -window.cpp - -# Header Files -#if ALLEGRO - music/allegro_m.h - sound/allegro_s.h - video/allegro_v.h -#end -aircraft.h -airport.h -animated_tile_func.h -articulated_vehicles.h -autoreplace_base.h -autoreplace_func.h -autoreplace_gui.h -autoreplace_type.h -autoslope.h -base_media_base.h -base_media_func.h -base_station_base.h -bitmap_type.h -bmp.h -bridge.h -cargo_type.h -cargoaction.h -cargomonitor.h -cargopacket.h -cargotype.h -cheat_func.h -cheat_type.h -clear_func.h -cmd_helper.h -command_func.h -command_type.h -company_base.h -company_func.h -company_gui.h -company_manager_face.h -company_type.h -console_func.h -console_gui.h -console_internal.h -console_type.h -cpu.h -crashlog.h -crashlog_bfd.h -currency.h -date_func.h -date_gui.h -date_type.h -debug.h -debug_settings.h -video/dedicated_v.h -departures_func.h -departures_gui.h -departures_type.h -depot_base.h -depot_func.h -depot_map.h -depot_type.h -direction_func.h -direction_type.h -disaster_vehicle.h -music/dmusic.h -driver.h -economy_base.h -economy_func.h -economy_type.h -effectvehicle_base.h -effectvehicle_func.h -elrail_func.h -engine_base.h -engine_func.h -engine_gui.h -engine_type.h -error.h -fileio_func.h -fileio_type.h -fios.h -fontcache.h -fontdetection.h -framerate_type.h -base_consist.h -gamelog.h -gamelog_internal.h -genworld.h -gfx_func.h -gfx_layout.h -gfx_type.h -gfxinit.h -goal_base.h -goal_type.h -graph_gui.h -ground_vehicle.hpp -group.h -group_gui.h -group_type.h -gui.h -guitimer_func.h -heightmap.h -highscore.h -hotkeys.h -house.h -house_type.h -industry.h -industry_type.h -industrytype.h -infrastructure_func.h -ini_type.h -landscape.h -landscape_type.h -language.h -linkgraph/demands.h -linkgraph/flowmapper.h -linkgraph/init.h -linkgraph/linkgraph.h -linkgraph/linkgraph_base.h -linkgraph/linkgraph_gui.h -linkgraph/linkgraph_type.h -linkgraph/linkgraphjob.h -linkgraph/linkgraphjob_base.h -linkgraph/linkgraphschedule.h -linkgraph/mcf.h -linkgraph/refresh.h -livery.h -map_func.h -map_type.h -mixer.h -network/network.h -network/network_admin.h -network/network_base.h -network/network_client.h -network/network_content.h -network/network_content_gui.h -network/network_func.h -network/network_gamelist.h -network/network_gui.h -network/network_internal.h -network/network_server.h -network/network_type.h -network/network_udp.h -newgrf.h -newgrf_airport.h -newgrf_airporttiles.h -newgrf_animation_base.h -newgrf_animation_type.h -newgrf_callbacks.h -newgrf_canal.h -newgrf_cargo.h -newgrf_class.h -newgrf_class_func.h -newgrf_commons.h -newgrf_config.h -newgrf_debug.h -newgrf_engine.h -newgrf_generic.h -newgrf_house.h -newgrf_industries.h -newgrf_industrytiles.h -newgrf_object.h -newgrf_profiling.h -newgrf_properties.h -newgrf_railtype.h -newgrf_roadtype.h -newgrf_sound.h -newgrf_spritegroup.h -newgrf_station.h -newgrf_storage.h -newgrf_text.h -newgrf_town.h -newgrf_townname.h -news_func.h -news_gui.h -news_type.h -music/midi.h -music/midifile.hpp -music/null_m.h -sound/null_s.h -video/null_v.h -object.h -object_base.h -object_type.h -openttd.h -order_backup.h -order_base.h -order_cmd.h -order_func.h -order_type.h -pbs.h -plans_base.h -plans_func.h -plans_type.h -progress.h -querystring_gui.h -rail.h -rail_gui.h -rail_type.h -rev.h -road.h -road_cmd.h -road_func.h -road_gui.h -road_internal.h -road_type.h -roadstop_base.h -roadveh.h -safeguards.h -scope.h -screenshot.h -screenshot_gui.h -sound/sdl_s.h -video/sdl_v.h -video/sdl2_v.h -schdispatch.h -settings_func.h -settings_gui.h -settings_internal.h -settings_type.h -ship.h -signal_func.h -signal_type.h -programmable_signals.h -signs_base.h -signs_func.h -signs_type.h -slope_func.h -slope_type.h -smallmap_colours.h -smallmap_gui.h -sortlist_type.h -sound_func.h -sound_type.h -sprite.h -spritecache.h -station_base.h -station_func.h -station_gui.h -station_kdtree.h -station_type.h -statusbar_gui.h -stdafx.h -story_base.h -story_type.h -strgen/strgen.h -string_base.h -string_func.h -string_func_extra.h -string_type.h -os/windows/string_uniscribe.h -stringfilter_type.h -strings_func.h -strings_type.h -subsidy_base.h -subsidy_func.h -subsidy_type.h -tar_type.h -terraform_gui.h -textbuf_gui.h -textbuf_type.h -texteff.hpp -textfile_gui.h -textfile_type.h -tgp.h -tile_cmd.h -tile_type.h -tilearea_type.h -tilehighlight_func.h -tilehighlight_type.h -tilematrix_type.hpp -timetable.h -toolbar_gui.h -town.h -town_gui.h -town_type.h -town_kdtree.h -townname_func.h -townname_type.h -track_func.h -track_type.h -train.h -transparency.h -transparency_gui.h -transport_type.h -tunnelbridge.h -tunnel_base.h -vehicle_base.h -vehicle_func.h -vehicle_gui.h -vehicle_gui_base.h -vehicle_type.h -vehiclelist.h -viewport_func.h -viewport_kdtree.h -viewport_sprite_sorter.h -viewport_type.h -water.h -waypoint_base.h -waypoint_func.h -widget_type.h -os/windows/win32.h -music/win32_m.h -sound/win32_s.h -unit_conversion.h -video/win32_v.h -window_func.h -window_gui.h -window_type.h -sound/xaudio2_s.h -zoom_func.h -zoom_type.h -zoning.h -#if WIN32 -#else - music/bemidi.h - music/cocoa_m.h - music/extmidi.h - music/fluidsynth.h - music/os2_m.h - os/macosx/macos.h - os/macosx/osx_stdafx.h - os/macosx/splash.h - os/macosx/string_osx.h - sound/cocoa_s.h - video/cocoa/cocoa_keys.h - video/cocoa/cocoa_v.h -#end - -# Core Source Code -core/alloc_func.cpp -core/alloc_func.hpp -core/alloc_type.hpp -core/backup_type.hpp -core/bitmath_func.cpp -core/bitmath_func.hpp -core/checksum_func.hpp -core/container_func.hpp -core/dyn_arena_alloc.hpp -core/endian_func.hpp -core/endian_type.hpp -core/enum_type.hpp -core/geometry_func.cpp -core/geometry_func.hpp -core/geometry_type.hpp -core/kdtree.hpp -core/math_func.cpp -core/math_func.hpp -core/mem_func.hpp -core/multimap.hpp -core/overflowsafe_type.hpp -core/pool_func.cpp -core/pool_func.hpp -core/pool_type.hpp -core/random_func.cpp -core/random_func.hpp -core/smallmap_type.hpp -core/smallmatrix_type.hpp -core/smallstack_type.hpp -core/smallvec_type.hpp -core/string_compare_type.hpp -core/tinystring_type.hpp - -# GUI Source Code -aircraft_gui.cpp -airport_gui.cpp -autoreplace_gui.cpp -bootstrap_gui.cpp -bridge_gui.cpp -build_vehicle_gui.cpp -cheat_gui.cpp -company_gui.cpp -console_gui.cpp -date_gui.cpp -departures_gui.cpp -depot_gui.cpp -dock_gui.cpp -engine_gui.cpp -error_gui.cpp -fios_gui.cpp -framerate_gui.cpp -genworld_gui.cpp -goal_gui.cpp -graph_gui.cpp -group_gui.cpp -highscore_gui.cpp -industry_gui.cpp -intro_gui.cpp -linkgraph/linkgraph_gui.cpp -main_gui.cpp -misc_gui.cpp -music_gui.cpp -network/network_chat_gui.cpp -network/network_content_gui.cpp -network/network_gui.cpp -newgrf_debug_gui.cpp -newgrf_gui.cpp -news_gui.cpp -object_gui.cpp -order_gui.cpp -osk_gui.cpp -plans_gui.cpp -rail_gui.cpp -road_gui.cpp -roadveh_gui.cpp -schdispatch_gui.cpp -settings_gui.cpp -ship_gui.cpp -signs_gui.cpp -smallmap_gui.cpp -station_gui.cpp -statusbar_gui.cpp -story_gui.cpp -subsidy_gui.cpp -terraform_gui.cpp -textfile_gui.cpp -timetable_gui.cpp -toolbar_gui.cpp -town_gui.cpp -train_gui.cpp -transparency_gui.cpp -tree_gui.cpp -vehicle_gui.cpp -viewport_gui.cpp -waypoint_gui.cpp -zoning_gui.cpp - -# Widgets -widgets/airport_widget.h -widgets/ai_widget.h -widgets/autoreplace_widget.h -widgets/bootstrap_widget.h -widgets/bridge_widget.h -widgets/build_vehicle_widget.h -widgets/cheat_widget.h -widgets/company_widget.h -widgets/console_widget.h -widgets/date_widget.h -widgets/departures_widget.h -widgets/depot_widget.h -widgets/dock_widget.h -widgets/dropdown.cpp -widgets/dropdown_func.h -widgets/dropdown_type.h -widgets/dropdown_widget.h -widgets/engine_widget.h -widgets/error_widget.h -widgets/fios_widget.h -widgets/framerate_widget.h -widgets/genworld_widget.h -widgets/goal_widget.h -widgets/graph_widget.h -widgets/group_widget.h -widgets/highscore_widget.h -widgets/industry_widget.h -widgets/intro_widget.h -widgets/link_graph_legend_widget.h -widgets/main_widget.h -widgets/misc_widget.h -widgets/music_widget.h -widgets/network_chat_widget.h -widgets/network_content_widget.h -widgets/network_widget.h -widgets/newgrf_debug_widget.h -widgets/newgrf_widget.h -widgets/news_widget.h -widgets/object_widget.h -widgets/order_widget.h -widgets/osk_widget.h -widgets/plans_widget.h -widgets/rail_widget.h -widgets/road_widget.h -widgets/screenshot_widget.h -widgets/settings_widget.h -widgets/sign_widget.h -widgets/smallmap_widget.h -widgets/station_widget.h -widgets/statusbar_widget.h -widgets/story_widget.h -widgets/subsidy_widget.h -widgets/terraform_widget.h -widgets/timetable_widget.h -widgets/toolbar_widget.h -widgets/town_widget.h -widgets/transparency_widget.h -widgets/tree_widget.h -widgets/vehicle_widget.h -widgets/viewport_widget.h -widgets/waypoint_widget.h - -# Command handlers -aircraft_cmd.cpp -autoreplace_cmd.cpp -clear_cmd.cpp -company_cmd.cpp -depot_cmd.cpp -group_cmd.cpp -industry_cmd.cpp -misc_cmd.cpp -object_cmd.cpp -order_cmd.cpp -plans_cmd.cpp -rail_cmd.cpp -road_cmd.cpp -roadveh_cmd.cpp -schdispatch_cmd.cpp -ship_cmd.cpp -signs_cmd.cpp -station_cmd.cpp -terraform_cmd.cpp -timetable_cmd.cpp -town_cmd.cpp -train_cmd.cpp -tree_cmd.cpp -tunnelbridge_cmd.cpp -vehicle_cmd.cpp -void_cmd.cpp -water_cmd.cpp -waypoint_cmd.cpp -zoning_cmd.cpp - -# Save/Load handlers -saveload/afterload.cpp -saveload/ai_sl.cpp -saveload/airport_sl.cpp -saveload/animated_tile_sl.cpp -saveload/autoreplace_sl.cpp -saveload/cargomonitor_sl.cpp -saveload/cargopacket_sl.cpp -saveload/cheat_sl.cpp -saveload/company_sl.cpp -saveload/debug_sl.cpp -saveload/depot_sl.cpp -saveload/economy_sl.cpp -saveload/engine_sl.cpp -saveload/game_sl.cpp -saveload/gamelog_sl.cpp -saveload/goal_sl.cpp -saveload/group_sl.cpp -saveload/industry_sl.cpp -saveload/labelmaps_sl.cpp -saveload/linkgraph_sl.cpp -saveload/map_sl.cpp -saveload/misc_sl.cpp -saveload/newgrf_sl.cpp -saveload/newgrf_sl.h -saveload/object_sl.cpp -saveload/oldloader.cpp -saveload/oldloader.h -saveload/oldloader_sl.cpp -saveload/order_sl.cpp -saveload/plans_sl.cpp -saveload/saveload.cpp -saveload/saveload.h -saveload/saveload_filter.h -saveload/saveload_internal.h -saveload/saveload_buffer.h -saveload/signs_sl.cpp -saveload/station_sl.cpp -saveload/storage_sl.cpp -saveload/strings_sl.cpp -saveload/story_sl.cpp -saveload/subsidy_sl.cpp -saveload/town_sl.cpp -saveload/tunnel_sl.cpp -saveload/vehicle_sl.cpp -saveload/waypoint_sl.cpp -saveload/signal_sl.cpp -saveload/extended_ver_sl.h -saveload/extended_ver_sl.cpp -saveload/tbtr_template_replacement_sl.cpp -saveload/tbtr_template_veh_sl.cpp -saveload/bridge_signal_sl.cpp - -# Tables -table/airport_defaults.h -table/airport_movement.h -table/airporttile_ids.h -table/airporttiles.h -table/animcursors.h -table/autorail.h -table/bridge_land.h -table/build_industry.h -table/cargo_const.h -table/clear_land.h -table/control_codes.h -table/darklight_colours.h -table/elrail_data.h -table/engines.h -table/genland.h -table/heightmap_colours.h -table/industry_land.h -table/landscape_sprite.h -table/newgrf_debug_data.h -table/object_land.h -table/palette_convert.h -table/palettes.h -table/pricebase.h -table/railtypes.h -table/road_land.h -table/roadveh_movement.h -table/roadtypes.h -../objs/settings/table/settings.h -table/sprites.h -table/station_land.h -table/strgen_tables.h -table/string_colours.h -../objs/langs/table/strings.h -table/town_land.h -table/townname.h -table/track_land.h -table/train_cmd.h -table/tree_land.h -table/unicode.h -table/water_land.h - -# MD5 -3rdparty/md5/md5.cpp -3rdparty/md5/md5.h - -# Compat -3rdparty/optional/optional.hpp -3rdparty/optional/ottd_optional.h - -# Script -script/script_config.cpp -script/script_config.hpp -script/script_fatalerror.hpp -script/script_info.cpp -script/script_info.hpp -script/script_info_dummy.cpp -script/script_instance.cpp -script/script_instance.hpp -script/script_scanner.cpp -script/script_scanner.hpp -script/script_storage.hpp -script/script_suspend.hpp -script/squirrel.cpp -script/squirrel.hpp -script/squirrel_class.hpp -script/squirrel_helper.hpp -script/squirrel_helper_type.hpp -script/squirrel_std.cpp -script/squirrel_std.hpp - -# Squirrel -3rdparty/squirrel/squirrel/sqapi.cpp -3rdparty/squirrel/squirrel/sqbaselib.cpp -3rdparty/squirrel/squirrel/sqclass.cpp -3rdparty/squirrel/squirrel/sqcompiler.cpp -3rdparty/squirrel/squirrel/sqdebug.cpp -3rdparty/squirrel/squirrel/sqfuncstate.cpp -3rdparty/squirrel/squirrel/sqlexer.cpp -3rdparty/squirrel/squirrel/sqmem.cpp -3rdparty/squirrel/squirrel/sqobject.cpp -3rdparty/squirrel/squirrel/sqstate.cpp -3rdparty/squirrel/sqstdlib/sqstdaux.cpp -3rdparty/squirrel/sqstdlib/sqstdmath.cpp -3rdparty/squirrel/squirrel/sqtable.cpp -3rdparty/squirrel/squirrel/sqvm.cpp - -# Squirrel headers -3rdparty/squirrel/squirrel/sqarray.h -3rdparty/squirrel/squirrel/sqclass.h -3rdparty/squirrel/squirrel/sqclosure.h -3rdparty/squirrel/squirrel/sqcompiler.h -3rdparty/squirrel/squirrel/sqfuncproto.h -3rdparty/squirrel/squirrel/sqfuncstate.h -3rdparty/squirrel/squirrel/sqlexer.h -3rdparty/squirrel/squirrel/sqobject.h -3rdparty/squirrel/squirrel/sqopcodes.h -3rdparty/squirrel/squirrel/sqpcheader.h -3rdparty/squirrel/squirrel/sqstate.h -3rdparty/squirrel/include/sqstdaux.h -3rdparty/squirrel/include/sqstdmath.h -3rdparty/squirrel/include/sqstdstring.h -3rdparty/squirrel/squirrel/sqstring.h -3rdparty/squirrel/squirrel/sqtable.h -3rdparty/squirrel/include/squirrel.h -3rdparty/squirrel/squirrel/squserdata.h -3rdparty/squirrel/squirrel/squtils.h -3rdparty/squirrel/squirrel/sqvm.h - -# AI Core -ai/ai.hpp -ai/ai_config.cpp -ai/ai_config.hpp -ai/ai_core.cpp -ai/ai_gui.cpp -ai/ai_gui.hpp -ai/ai_info.cpp -ai/ai_info.hpp -ai/ai_instance.cpp -ai/ai_instance.hpp -ai/ai_scanner.cpp -ai/ai_scanner.hpp - -# AI API -script/api/ai_changelog.hpp - -# Game API -script/api/game_changelog.hpp - -# Game Core -game/game.hpp -game/game_config.cpp -game/game_config.hpp -game/game_core.cpp -game/game_info.cpp -game/game_info.hpp -game/game_instance.cpp -game/game_instance.hpp -game/game_scanner.cpp -game/game_scanner.hpp -game/game_text.cpp -game/game_text.hpp - -# Script API -script/api/script_accounting.hpp -script/api/script_admin.hpp -script/api/script_airport.hpp -script/api/script_base.hpp -script/api/script_basestation.hpp -script/api/script_bridge.hpp -script/api/script_bridgelist.hpp -script/api/script_cargo.hpp -script/api/script_cargolist.hpp -script/api/script_cargomonitor.hpp -script/api/script_client.hpp -script/api/script_clientlist.hpp -script/api/script_company.hpp -script/api/script_companymode.hpp -script/api/script_controller.hpp -script/api/script_date.hpp -script/api/script_depotlist.hpp -script/api/script_engine.hpp -script/api/script_enginelist.hpp -script/api/script_error.hpp -script/api/script_event.hpp -script/api/script_event_types.hpp -script/api/script_execmode.hpp -script/api/script_game.hpp -script/api/script_gamesettings.hpp -script/api/script_goal.hpp -script/api/script_group.hpp -script/api/script_grouplist.hpp -script/api/script_industry.hpp -script/api/script_industrylist.hpp -script/api/script_industrytype.hpp -script/api/script_industrytypelist.hpp -script/api/script_info_docs.hpp -script/api/script_infrastructure.hpp -script/api/script_list.hpp -script/api/script_log.hpp -script/api/script_map.hpp -script/api/script_marine.hpp -script/api/script_news.hpp -script/api/script_object.hpp -script/api/script_order.hpp -script/api/script_priorityqueue.hpp -script/api/script_rail.hpp -script/api/script_railtypelist.hpp -script/api/script_road.hpp -script/api/script_roadtypelist.hpp -script/api/script_sign.hpp -script/api/script_signlist.hpp -script/api/script_station.hpp -script/api/script_stationlist.hpp -script/api/script_story_page.hpp -script/api/script_storypagelist.hpp -script/api/script_storypageelementlist.hpp -script/api/script_subsidy.hpp -script/api/script_subsidylist.hpp -script/api/script_testmode.hpp -script/api/script_text.hpp -script/api/script_tile.hpp -script/api/script_tilelist.hpp -script/api/script_town.hpp -script/api/script_townlist.hpp -script/api/script_tunnel.hpp -script/api/script_types.hpp -script/api/script_vehicle.hpp -script/api/script_vehiclelist.hpp -script/api/script_viewport.hpp -script/api/script_waypoint.hpp -script/api/script_waypointlist.hpp -script/api/script_window.hpp - -# Script API Implementation -script/api/script_accounting.cpp -script/api/script_admin.cpp -script/api/script_airport.cpp -script/api/script_base.cpp -script/api/script_basestation.cpp -script/api/script_bridge.cpp -script/api/script_bridgelist.cpp -script/api/script_cargo.cpp -script/api/script_cargolist.cpp -script/api/script_cargomonitor.cpp -script/api/script_client.cpp -script/api/script_clientlist.cpp -script/api/script_company.cpp -script/api/script_companymode.cpp -script/api/script_controller.cpp -script/api/script_date.cpp -script/api/script_depotlist.cpp -script/api/script_engine.cpp -script/api/script_enginelist.cpp -script/api/script_error.cpp -script/api/script_event.cpp -script/api/script_event_types.cpp -script/api/script_execmode.cpp -script/api/script_game.cpp -script/api/script_gamesettings.cpp -script/api/script_goal.cpp -script/api/script_group.cpp -script/api/script_grouplist.cpp -script/api/script_industry.cpp -script/api/script_industrylist.cpp -script/api/script_industrytype.cpp -script/api/script_industrytypelist.cpp -script/api/script_infrastructure.cpp -script/api/script_list.cpp -script/api/script_log.cpp -script/api/script_map.cpp -script/api/script_marine.cpp -script/api/script_news.cpp -script/api/script_object.cpp -script/api/script_order.cpp -script/api/script_priorityqueue.cpp -script/api/script_rail.cpp -script/api/script_railtypelist.cpp -script/api/script_road.cpp -script/api/script_roadtypelist.cpp -script/api/script_sign.cpp -script/api/script_signlist.cpp -script/api/script_station.cpp -script/api/script_stationlist.cpp -script/api/script_story_page.cpp -script/api/script_storypagelist.cpp -script/api/script_storypageelementlist.cpp -script/api/script_subsidy.cpp -script/api/script_subsidylist.cpp -script/api/script_testmode.cpp -script/api/script_text.cpp -script/api/script_tile.cpp -script/api/script_tilelist.cpp -script/api/script_town.cpp -script/api/script_townlist.cpp -script/api/script_tunnel.cpp -script/api/script_vehicle.cpp -script/api/script_vehiclelist.cpp -script/api/script_viewport.cpp -script/api/script_waypoint.cpp -script/api/script_waypointlist.cpp -script/api/script_window.cpp - -# Blitters -#if DEDICATED -#else - blitter/32bpp_anim.cpp - blitter/32bpp_anim.hpp - #if USE_SSE - blitter/32bpp_anim_sse2.cpp - blitter/32bpp_anim_sse2.hpp - blitter/32bpp_anim_sse4.cpp - blitter/32bpp_anim_sse4.hpp - #end - blitter/32bpp_base.cpp - blitter/32bpp_base.hpp - blitter/32bpp_optimized.cpp - blitter/32bpp_optimized.hpp - blitter/32bpp_simple.cpp - blitter/32bpp_simple.hpp - #if USE_SSE - blitter/32bpp_sse_func.hpp - blitter/32bpp_sse_type.h - blitter/32bpp_sse2.cpp - blitter/32bpp_sse2.hpp - blitter/32bpp_sse4.cpp - blitter/32bpp_sse4.hpp - blitter/32bpp_ssse3.cpp - blitter/32bpp_ssse3.hpp - #end - blitter/8bpp_base.cpp - blitter/8bpp_base.hpp - blitter/8bpp_optimized.cpp - blitter/8bpp_optimized.hpp - blitter/8bpp_simple.cpp - blitter/8bpp_simple.hpp -#end -blitter/base.hpp -blitter/common.hpp -blitter/factory.hpp -blitter/null.cpp -blitter/null.hpp - -# Drivers -music/music_driver.hpp -sound/sound_driver.hpp -video/video_driver.hpp - -# Sprite loaders -spriteloader/grf.cpp -spriteloader/grf.hpp -spriteloader/spriteloader.hpp - -# NewGRF -newgrf.cpp -newgrf_airport.cpp -newgrf_airporttiles.cpp -newgrf_canal.cpp -newgrf_cargo.cpp -newgrf_commons.cpp -newgrf_config.cpp -newgrf_engine.cpp -newgrf_generic.cpp -newgrf_house.cpp -newgrf_industries.cpp -newgrf_industrytiles.cpp -newgrf_object.cpp -newgrf_profiling.cpp -newgrf_railtype.cpp -newgrf_roadtype.cpp -newgrf_sound.cpp -newgrf_spritegroup.cpp -newgrf_station.cpp -newgrf_storage.cpp -newgrf_text.cpp -newgrf_town.cpp -newgrf_townname.cpp - -# Map Accessors -bridge_map.cpp -bridge_map.h -bridge_signal_map.h -clear_map.h -industry_map.h -object_map.h -rail_map.h -road_map.cpp -road_map.h -station_map.h -tile_map.h -town_map.h -tree_map.h -tunnel_map.cpp -tunnel_map.h -tunnelbridge_map.h -void_map.h -water_map.h - -# Misc -misc/array.hpp -misc/binaryheap.hpp -misc/blob.hpp -misc/countedobj.cpp -misc/countedptr.hpp -misc/dbg_helpers.cpp -misc/dbg_helpers.h -misc/fixedsizearray.hpp -misc/getoptdata.cpp -misc/getoptdata.h -misc/hashtable.hpp -misc/str.hpp - -# Network Core -network/core/address.cpp -network/core/address.h -network/core/config.h -network/core/core.cpp -network/core/core.h -network/core/game.h -network/core/host.cpp -network/core/host.h -network/core/os_abstraction.h -network/core/packet.cpp -network/core/packet.h -network/core/tcp.cpp -network/core/tcp.h -network/core/tcp_admin.cpp -network/core/tcp_admin.h -network/core/tcp_connect.cpp -network/core/tcp_content.cpp -network/core/tcp_content.h -network/core/tcp_game.cpp -network/core/tcp_game.h -network/core/tcp_http.cpp -network/core/tcp_http.h -network/core/tcp_listen.h -network/core/udp.cpp -network/core/udp.h - -# Pathfinder -pathfinder/follow_track.hpp -pathfinder/pathfinder_func.h -pathfinder/pathfinder_type.h -pathfinder/pf_performance_timer.hpp - -# NPF -pathfinder/npf/aystar.cpp -pathfinder/npf/aystar.h -pathfinder/npf/npf.cpp -pathfinder/npf/npf_func.h -pathfinder/npf/queue.cpp -pathfinder/npf/queue.h - -# YAPF -pathfinder/yapf/nodelist.hpp -pathfinder/yapf/yapf.h -pathfinder/yapf/yapf.hpp -pathfinder/yapf/yapf_base.hpp -pathfinder/yapf/yapf_cache.h -pathfinder/yapf/yapf_common.hpp -pathfinder/yapf/yapf_costbase.hpp -pathfinder/yapf/yapf_costcache.hpp -pathfinder/yapf/yapf_costrail.hpp -pathfinder/yapf/yapf_destrail.hpp -pathfinder/yapf/yapf_node.hpp -pathfinder/yapf/yapf_node_rail.hpp -pathfinder/yapf/yapf_node_road.hpp -pathfinder/yapf/yapf_node_ship.hpp -pathfinder/yapf/yapf_rail.cpp -pathfinder/yapf/yapf_road.cpp -pathfinder/yapf/yapf_ship.cpp -pathfinder/yapf/yapf_type.hpp - -# Video -video/dedicated_v.cpp -video/null_v.cpp -#if DEDICATED -#else - #if ALLEGRO - video/allegro_v.cpp - #end - #if SDL - video/sdl_v.cpp - #end - #if SDL2 - video/sdl2_v.cpp - #end - #if WIN32 - video/win32_v.cpp - #end -#end - -# Music -#if DEDICATED -#else - #if ALLEGRO - music/allegro_m.cpp - #end - #if DIRECTMUSIC - music/dmusic.cpp - #end -#end -music/null_m.cpp -music/midifile.cpp -#if DEDICATED -#else - #if WIN32 - music/win32_m.cpp - #else - music/extmidi.cpp - #end - #if HAIKU - music/bemidi.cpp - #end - #if FLUIDSYNTH - music/fluidsynth.cpp - #end -#end - -# Sound -sound/null_s.cpp -#if DEDICATED -#else - #if ALLEGRO - sound/allegro_s.cpp - #end - #if SDL - sound/sdl_s.cpp - #end - #if SDL2 - sound/sdl2_s.cpp - #end - #if WIN32 - sound/win32_s.cpp - #if USE_XAUDIO2 - sound/xaudio2_s.cpp - #end - #end -#end - -#if OSX -# OSX Files - os/macosx/macos.mm - - #if COCOA - video/cocoa/cocoa_v.mm - video/cocoa/event.mm - video/cocoa/wnd_quartz.mm - music/cocoa_m.cpp - sound/cocoa_s.cpp - os/macosx/splash.cpp - os/macosx/string_osx.cpp - #end -#end - -# Windows files -#if WIN32 - os/windows/crashlog_win.cpp - os/windows/ottdres.rc - os/windows/string_uniscribe.cpp - os/windows/win32.cpp -#end - -# Threading -thread.h - -tracerestrict.h -tracerestrict.cpp -tracerestrict_gui.cpp -saveload/tracerestrict_sl.cpp - -scope_info.cpp -scope_info.h - -# Btree containers -3rdparty/cpp-btree/btree.h -3rdparty/cpp-btree/btree_container.h -3rdparty/cpp-btree/btree_map.h -3rdparty/cpp-btree/btree_set.h -3rdparty/cpp-btree/safe_btree.h -3rdparty/cpp-btree/safe_btree_map.h -3rdparty/cpp-btree/safe_btree_set.h - -# MinGW threading -#if MINGW - 3rdparty/mingw-std-threads/mingw.condition_variable.h - 3rdparty/mingw-std-threads/mingw.mutex.h - 3rdparty/mingw-std-threads/mingw.shared_mutex.h - 3rdparty/mingw-std-threads/mingw.thread.h -#end diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt new file mode 100644 index 0000000000..89d43fee2a --- /dev/null +++ b/src/3rdparty/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(md5) +add_subdirectory(squirrel) +add_subdirectory(os2) +add_subdirectory(cpp-btree) +add_subdirectory(mingw-std-threads) diff --git a/src/3rdparty/cpp-btree/CMakeLists.txt b/src/3rdparty/cpp-btree/CMakeLists.txt new file mode 100644 index 0000000000..4565a24074 --- /dev/null +++ b/src/3rdparty/cpp-btree/CMakeLists.txt @@ -0,0 +1,9 @@ +add_files( + btree.h + btree_container.h + btree_map.h + btree_set.h + safe_btree.h + safe_btree_map.h + safe_btree_set.h +) diff --git a/src/3rdparty/md5/CMakeLists.txt b/src/3rdparty/md5/CMakeLists.txt new file mode 100644 index 0000000000..58720ca2d6 --- /dev/null +++ b/src/3rdparty/md5/CMakeLists.txt @@ -0,0 +1,4 @@ +add_files( + md5.cpp + md5.h +) diff --git a/src/3rdparty/mingw-std-threads/CMakeLists.txt b/src/3rdparty/mingw-std-threads/CMakeLists.txt new file mode 100644 index 0000000000..4e6369a3a0 --- /dev/null +++ b/src/3rdparty/mingw-std-threads/CMakeLists.txt @@ -0,0 +1,7 @@ +add_files( + mingw.condition_variable.h + mingw.mutex.h + mingw.shared_mutex.h + mingw.thread.h + CONDITION MINGW +) diff --git a/src/3rdparty/os2/CMakeLists.txt b/src/3rdparty/os2/CMakeLists.txt new file mode 100644 index 0000000000..8edc63479e --- /dev/null +++ b/src/3rdparty/os2/CMakeLists.txt @@ -0,0 +1,7 @@ +add_files( + getaddrinfo.c + getaddrinfo.h + getnameinfo.c + getnameinfo.h + CONDITION OPTION_OS2 +) diff --git a/src/3rdparty/squirrel/CMakeLists.txt b/src/3rdparty/squirrel/CMakeLists.txt new file mode 100644 index 0000000000..9602087cdf --- /dev/null +++ b/src/3rdparty/squirrel/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(include) +add_subdirectory(sqstdlib) +add_subdirectory(squirrel) diff --git a/src/3rdparty/squirrel/include/CMakeLists.txt b/src/3rdparty/squirrel/include/CMakeLists.txt new file mode 100644 index 0000000000..5237360d31 --- /dev/null +++ b/src/3rdparty/squirrel/include/CMakeLists.txt @@ -0,0 +1,6 @@ +add_files( + sqstdaux.h + sqstdmath.h + sqstdstring.h + squirrel.h +) diff --git a/src/3rdparty/squirrel/sqstdlib/CMakeLists.txt b/src/3rdparty/squirrel/sqstdlib/CMakeLists.txt new file mode 100644 index 0000000000..2b3bd6bb31 --- /dev/null +++ b/src/3rdparty/squirrel/sqstdlib/CMakeLists.txt @@ -0,0 +1,4 @@ +add_files( + sqstdaux.cpp + sqstdmath.cpp +) diff --git a/src/3rdparty/squirrel/squirrel/CMakeLists.txt b/src/3rdparty/squirrel/squirrel/CMakeLists.txt new file mode 100644 index 0000000000..a86a92b7dd --- /dev/null +++ b/src/3rdparty/squirrel/squirrel/CMakeLists.txt @@ -0,0 +1,30 @@ +add_files( + sqapi.cpp + sqarray.h + sqbaselib.cpp + sqclass.cpp + sqclass.h + sqclosure.h + sqcompiler.cpp + sqcompiler.h + sqdebug.cpp + sqfuncproto.h + sqfuncstate.cpp + sqfuncstate.h + sqlexer.cpp + sqlexer.h + sqmem.cpp + sqobject.cpp + sqobject.h + sqopcodes.h + sqpcheader.h + sqstate.cpp + sqstate.h + sqstring.h + sqtable.cpp + sqtable.h + squserdata.h + squtils.h + sqvm.cpp + sqvm.h +) diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.h b/src/3rdparty/squirrel/squirrel/sqcompiler.h index b29917390b..08946fb60c 100644 --- a/src/3rdparty/squirrel/squirrel/sqcompiler.h +++ b/src/3rdparty/squirrel/squirrel/sqcompiler.h @@ -72,7 +72,7 @@ struct SQVM; #define TK_CONST 324 /* MSVC doesn't like NORETURN for function prototypes, but we kinda need it for GCC. */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s); #else typedef NORETURN void(*CompilerErrorFunc)(void *ud, const SQChar *s); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000000..a0f85ae227 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,524 @@ +add_subdirectory(3rdparty) +add_subdirectory(ai) +add_subdirectory(blitter) +add_subdirectory(core) +add_subdirectory(game) +add_subdirectory(lang) +add_subdirectory(linkgraph) +add_subdirectory(misc) +add_subdirectory(music) +add_subdirectory(network) +add_subdirectory(os) +add_subdirectory(pathfinder) +add_subdirectory(saveload) +add_subdirectory(script) +add_subdirectory(settingsgen) +add_subdirectory(sound) +add_subdirectory(spriteloader) +add_subdirectory(strgen) +add_subdirectory(table) +add_subdirectory(video) +add_subdirectory(widgets) + +add_files( + viewport_sprite_sorter_sse4.cpp + CONDITION SSE_FOUND +) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set_compile_flags( + viewport_sprite_sorter_sse4.cpp + COMPILE_FLAGS -msse4.1) +endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + +add_files( + aircraft.h + aircraft_cmd.cpp + aircraft_gui.cpp + airport.cpp + airport.h + airport_gui.cpp + animated_tile.cpp + animated_tile_func.h + articulated_vehicles.cpp + articulated_vehicles.h + autoreplace.cpp + autoreplace_base.h + autoreplace_cmd.cpp + autoreplace_func.h + autoreplace_gui.cpp + autoreplace_gui.h + autoreplace_type.h + autoslope.h + base_consist.cpp + base_consist.h + base_media_base.h + base_media_func.h + base_station_base.h + bitmap_type.h + bmp.cpp + bmp.h + bootstrap_gui.cpp + bridge.h + bridge_gui.cpp + bridge_map.cpp + bridge_map.h + bridge_signal_map.h + build_vehicle_gui.cpp + cargo_type.h + cargoaction.cpp + cargoaction.h + cargomonitor.cpp + cargomonitor.h + cargopacket.cpp + cargopacket.h + cargotype.cpp + cargotype.h + cheat.cpp + cheat_func.h + cheat_gui.cpp + cheat_type.h + clear_cmd.cpp + clear_func.h + clear_map.h + cmd_helper.h + command.cpp + command_func.h + command_type.h + company_base.h + company_cmd.cpp + company_func.h + company_gui.cpp + company_gui.h + company_manager_face.h + company_type.h + console.cpp + console_cmds.cpp + console_func.h + console_gui.cpp + console_gui.h + console_internal.h + console_type.h + cpu.cpp + cpu.h + crashlog.cpp + crashlog.h + crashlog_bfd.h + currency.cpp + currency.h + date.cpp + date_func.h + date_gui.cpp + date_gui.h + date_type.h + debug.cpp + debug.h + debug_settings.h + dedicated.cpp + departures.cpp + departures_func.h + departures_gui.cpp + departures_gui.h + departures_type.h + depot.cpp + depot_base.h + depot_cmd.cpp + depot_func.h + depot_gui.cpp + depot_map.h + depot_type.h + direction_func.h + direction_type.h + disaster_vehicle.cpp + disaster_vehicle.h + dock_gui.cpp + driver.cpp + driver.h + economy.cpp + economy_base.h + economy_func.h + economy_type.h + effectvehicle.cpp + effectvehicle_base.h + effectvehicle_func.h + elrail.cpp + elrail_func.h + engine.cpp + engine_base.h + engine_func.h + engine_gui.cpp + engine_gui.h + engine_type.h + error.h + error_gui.cpp + fileio.cpp + fileio_func.h + fileio_type.h + fios.cpp + fios.h + fios_gui.cpp + fontcache.cpp + fontcache.h + fontdetection.cpp + fontdetection.h + framerate_gui.cpp + framerate_type.h + gamelog.cpp + gamelog.h + gamelog_internal.h + genworld.cpp + genworld.h + genworld_gui.cpp + gfx.cpp + gfx_func.h + gfx_layout.cpp + gfx_layout.h + gfx_type.h + gfxinit.cpp + gfxinit.h + goal.cpp + goal_base.h + goal_gui.cpp + goal_type.h + graph_gui.cpp + graph_gui.h + ground_vehicle.cpp + ground_vehicle.hpp + group.h + group_cmd.cpp + group_gui.cpp + group_gui.h + group_type.h + gui.h + guitimer_func.h + heightmap.cpp + heightmap.h + highscore.cpp + highscore.h + highscore_gui.cpp + hotkeys.cpp + hotkeys.h + house.h + house_type.h + industry.h + industry_cmd.cpp + industry_gui.cpp + industry_map.h + industry_type.h + industrytype.h + ini.cpp + ini_load.cpp + ini_type.h + infrastructure.cpp + infrastructure_func.h + intro_gui.cpp + landscape.cpp + landscape.h + landscape_type.h + language.h + livery.h + main_gui.cpp + map.cpp + map_func.h + map_type.h + misc.cpp + misc_cmd.cpp + misc_gui.cpp + mixer.cpp + mixer.h + music.cpp + music_gui.cpp + newgrf.cpp + newgrf.h + newgrf_airport.cpp + newgrf_airport.h + newgrf_airporttiles.cpp + newgrf_airporttiles.h + newgrf_animation_base.h + newgrf_animation_type.h + newgrf_callbacks.h + newgrf_canal.cpp + newgrf_canal.h + newgrf_cargo.cpp + newgrf_cargo.h + newgrf_class.h + newgrf_class_func.h + newgrf_commons.cpp + newgrf_commons.h + newgrf_config.cpp + newgrf_config.h + newgrf_debug.h + newgrf_debug_gui.cpp + newgrf_engine.cpp + newgrf_engine.h + newgrf_generic.cpp + newgrf_generic.h + newgrf_gui.cpp + newgrf_house.cpp + newgrf_house.h + newgrf_industries.cpp + newgrf_industries.h + newgrf_industrytiles.cpp + newgrf_industrytiles.h + newgrf_object.cpp + newgrf_object.h + newgrf_profiling.cpp + newgrf_profiling.h + newgrf_properties.h + newgrf_railtype.cpp + newgrf_railtype.h + newgrf_roadtype.cpp + newgrf_roadtype.h + newgrf_sound.cpp + newgrf_sound.h + newgrf_spritegroup.cpp + newgrf_spritegroup.h + newgrf_station.cpp + newgrf_station.h + newgrf_storage.cpp + newgrf_storage.h + newgrf_text.cpp + newgrf_text.h + newgrf_town.cpp + newgrf_town.h + newgrf_townname.cpp + newgrf_townname.h + news_func.h + news_gui.cpp + news_gui.h + news_type.h + object.h + object_base.h + object_cmd.cpp + object_gui.cpp + object_map.h + object_type.h + openttd.cpp + openttd.h + order_backup.cpp + order_backup.h + order_base.h + order_cmd.cpp + order_cmd.h + order_func.h + order_gui.cpp + order_type.h + osk_gui.cpp + pbs.cpp + pbs.h + plans.cpp + plans_base.h + plans_cmd.cpp + plans_func.h + plans_gui.cpp + plans_type.h + programmable_signals.cpp + programmable_signals_gui.cpp + programmable_signals.h + progress.cpp + progress.h + querystring_gui.h + rail.cpp + rail.h + rail_cmd.cpp + rail_gui.cpp + rail_gui.h + rail_map.h + rail_type.h + rev.h + road.cpp + road.h + road_cmd.cpp + road_cmd.h + road_func.h + road_gui.cpp + road_gui.h + road_internal.h + road_map.cpp + road_map.h + road_type.h + roadstop.cpp + roadstop_base.h + roadveh.h + roadveh_cmd.cpp + roadveh_gui.cpp + safeguards.h + schdispatch.h + schdispatch_cmd.cpp + schdispatch_gui.cpp + screenshot_gui.cpp + screenshot_gui.h + screenshot.cpp + screenshot.h + scope.h + scope_info.cpp + scope_info.h + settings.cpp + settings_func.h + settings_gui.cpp + settings_gui.h + settings_internal.h + settings_type.h + ship.h + ship_cmd.cpp + ship_gui.cpp + signal.cpp + signal_func.h + signal_type.h + signs.cpp + signs_base.h + signs_cmd.cpp + signs_func.h + signs_gui.cpp + signs_type.h + slope_func.h + slope_type.h + smallmap_colours.h + smallmap_gui.cpp + smallmap_gui.h + sortlist_type.h + sound.cpp + sound_func.h + sound_type.h + sprite.cpp + sprite.h + spritecache.cpp + spritecache.h + station.cpp + station_base.h + station_cmd.cpp + station_func.h + station_gui.cpp + station_gui.h + station_kdtree.h + station_map.h + station_type.h + statusbar_gui.cpp + statusbar_gui.h + stdafx.h + story.cpp + story_base.h + story_gui.cpp + story_type.h + strgen/strgen.h + string.cpp + string_base.h + string_func.h + string_func_extra.h + string_type.h + stringfilter.cpp + stringfilter_type.h + strings.cpp + strings_func.h + strings_type.h + subsidy.cpp + subsidy_base.h + subsidy_func.h + subsidy_gui.cpp + subsidy_type.h + tar_type.h + tbtr_template_gui_main.cpp + tbtr_template_gui_create.cpp + tbtr_template_vehicle.cpp + tbtr_template_vehicle_func.cpp + tbtr_template_gui_main.h + tbtr_template_gui_create.h + tbtr_template_vehicle.h + tbtr_template_vehicle_func.h + terraform_cmd.cpp + terraform_gui.cpp + terraform_gui.h + textbuf.cpp + textbuf_gui.h + textbuf_type.h + texteff.cpp + texteff.hpp + textfile_gui.cpp + textfile_gui.h + textfile_type.h + tgp.cpp + tgp.h + thread.h + tile_cmd.h + tile_map.cpp + tile_map.h + tile_type.h + tilearea.cpp + tilearea_type.h + tilehighlight_func.h + tilehighlight_type.h + tilematrix_type.hpp + timetable.h + timetable_cmd.cpp + timetable_gui.cpp + toolbar_gui.cpp + toolbar_gui.h + town.h + town_cmd.cpp + town_gui.cpp + town_gui.h + town_kdtree.h + town_map.h + town_type.h + townname.cpp + townname_func.h + townname_type.h + tracerestrict.cpp + tracerestrict.h + tracerestrict_gui.cpp + track_func.h + track_type.h + train.h + train_cmd.cpp + train_gui.cpp + transparency.h + transparency_gui.cpp + transparency_gui.h + transport_type.h + tree_cmd.cpp + tree_gui.cpp + tree_map.h + tunnel_base.h + tunnel_map.cpp + tunnel_map.h + tunnelbridge.h + tunnelbridge_cmd.cpp + tunnelbridge_map.h + unit_conversion.h + vehicle.cpp + vehicle_base.h + vehicle_cmd.cpp + vehicle_func.h + vehicle_gui.cpp + vehicle_gui.h + vehicle_gui_base.h + vehicle_type.h + vehiclelist.cpp + vehiclelist.h + viewport.cpp + viewport_func.h + viewport_gui.cpp + viewport_kdtree.h + viewport_sprite_sorter.h + viewport_type.h + void_cmd.cpp + void_map.h + water.h + water_cmd.cpp + water_map.h + waypoint.cpp + waypoint_base.h + waypoint_cmd.cpp + waypoint_func.h + waypoint_gui.cpp + widget.cpp + widget_type.h + window.cpp + window_func.h + window_gui.h + window_type.h + zoom_func.h + zoom_type.h + zoning.h + zoning_cmd.cpp + zoning_gui.cpp +) diff --git a/src/ai/CMakeLists.txt b/src/ai/CMakeLists.txt new file mode 100644 index 0000000000..cab886b265 --- /dev/null +++ b/src/ai/CMakeLists.txt @@ -0,0 +1,14 @@ +add_files( + ai.hpp + ai_config.cpp + ai_config.hpp + ai_core.cpp + ai_gui.cpp + ai_gui.hpp + ai_info.cpp + ai_info.hpp + ai_instance.cpp + ai_instance.hpp + ai_scanner.cpp + ai_scanner.hpp +) diff --git a/src/blitter/CMakeLists.txt b/src/blitter/CMakeLists.txt new file mode 100644 index 0000000000..2abe6aec0e --- /dev/null +++ b/src/blitter/CMakeLists.txt @@ -0,0 +1,55 @@ +add_files( + 32bpp_anim.cpp + 32bpp_anim.hpp + 32bpp_base.cpp + 32bpp_base.hpp + 32bpp_optimized.cpp + 32bpp_optimized.hpp + 32bpp_simple.cpp + 32bpp_simple.hpp + 8bpp_base.cpp + 8bpp_base.hpp + 8bpp_optimized.cpp + 8bpp_optimized.hpp + 8bpp_simple.cpp + 8bpp_simple.hpp + CONDITION NOT OPTION_DEDICATED +) + +add_files( + 32bpp_anim_sse2.cpp + 32bpp_anim_sse2.hpp + 32bpp_anim_sse4.cpp + 32bpp_anim_sse4.hpp + 32bpp_sse2.cpp + 32bpp_sse2.hpp + 32bpp_sse4.cpp + 32bpp_sse4.hpp + 32bpp_sse_func.hpp + 32bpp_sse_type.h + 32bpp_ssse3.cpp + 32bpp_ssse3.hpp + CONDITION NOT OPTION_DEDICATED AND SSE_FOUND +) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set_compile_flags( + 32bpp_anim_sse2.cpp + 32bpp_sse2.cpp + COMPILE_FLAGS -msse2) + set_compile_flags( + 32bpp_ssse3.cpp + COMPILE_FLAGS -mssse3) + set_compile_flags( + 32bpp_anim_sse4.cpp + 32bpp_sse4.cpp + COMPILE_FLAGS -msse4.1) +endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + +add_files( + base.hpp + common.hpp + factory.hpp + null.cpp + null.hpp +) diff --git a/src/cargopacket.h b/src/cargopacket.h index 8118ca319a..9e26ba3367 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -460,7 +460,7 @@ public: uint Reroute(uint max_move, VehicleCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge); /** - * Are two the two CargoPackets mergeable in the context of + * Are the two CargoPackets mergeable in the context of * a list of CargoPackets for a Vehicle? * @param cp1 First CargoPacket. * @param cp2 Second CargoPacket. @@ -523,7 +523,7 @@ public: while (!next.IsEmpty()) { if (this->packets.find(next.Pop()) != this->packets.end()) return true; } - /* Packets for INVALID_STTION can go anywhere. */ + /* Packets for INVALID_STATION can go anywhere. */ return this->packets.find(INVALID_STATION) != this->packets.end(); } diff --git a/src/command.cpp b/src/command.cpp index 34523a5878..eac407846f 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -810,7 +810,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac int x = TileX(tile) * TILE_SIZE; int y = TileY(tile) * TILE_SIZE; - if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cmd)) { + if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cmd) && !estimate_only) { ShowErrorMessage(GB(cmd, 16, 16), STR_ERROR_NOT_ALLOWED_WHILE_PAUSED, WL_INFO, x, y); return false; } diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 3dd21c2331..08a1d235e5 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -662,6 +662,7 @@ DEF_CONSOLE_CMD(ConBanList) uint i = 1; for (const auto &entry : _network_ban_list) { IConsolePrintF(CC_DEFAULT, " %d) %s", i, entry.c_str()); + i++; } return true; diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 0000000000..3faaa4b54a --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,34 @@ +add_files( + alloc_func.cpp + alloc_func.hpp + alloc_type.hpp + backup_type.hpp + bitmath_func.cpp + bitmath_func.hpp + checksum_func.hpp + container_func.hpp + dyn_arena_alloc.hpp + endian_func.hpp + endian_type.hpp + enum_type.hpp + geometry_func.cpp + geometry_func.hpp + geometry_type.hpp + kdtree.hpp + math_func.cpp + math_func.hpp + mem_func.hpp + multimap.hpp + overflowsafe_type.hpp + pool_func.cpp + pool_func.hpp + pool_type.hpp + random_func.cpp + random_func.hpp + smallmap_type.hpp + smallmatrix_type.hpp + smallstack_type.hpp + smallvec_type.hpp + string_compare_type.hpp + tinystring_type.hpp +) diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp index 1b927ef45a..e1add251ed 100644 --- a/src/core/endian_type.hpp +++ b/src/core/endian_type.hpp @@ -23,30 +23,8 @@ /** Big endian builds use this for TTD_ENDIAN. */ #define TTD_BIG_ENDIAN 1 -/* Windows has always LITTLE_ENDIAN */ -#if defined(_WIN32) || defined(__OS2__) || defined(__HAIKU__) -# define TTD_ENDIAN TTD_LITTLE_ENDIAN -#elif defined(OSX) -# include -# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN -# define TTD_ENDIAN TTD_LITTLE_ENDIAN -# else -# define TTD_ENDIAN TTD_BIG_ENDIAN -# endif -#elif defined(__OpenBSD__) -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# define TTD_ENDIAN TTD_LITTLE_ENDIAN -# else -# define TTD_ENDIAN TTD_BIG_ENDIAN -# endif -#elif !defined(TESTING) -# include -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define TTD_ENDIAN TTD_LITTLE_ENDIAN -# else -# define TTD_ENDIAN TTD_BIG_ENDIAN -# endif -#endif /* _WIN32 || __OS2__ */ +#if !defined(TTD_ENDIAN) +# error "TTD_ENDIAN is not defined; please set it to either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN" +#endif /* !TTD_ENDIAN */ #endif /* ENDIAN_TYPE_HPP */ diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp deleted file mode 100644 index 5a3bd868de..0000000000 --- a/src/depend/depend.cpp +++ /dev/null @@ -1,1084 +0,0 @@ -/* - * This file is part of OpenTTD. - * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. - * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . - */ - -/** - * @file depend/depend.cpp Custom implementation of Makedepend. - * - * We previously used makedepend, but that could not handle the amount of - * files we have and does not handle conditional includes in a sane manner. - * This caused many link problems because not enough files were recompiled. - * This has lead to the development of our own dependency generator. It is - * meant to be a substitute to the (relatively slow) dependency generation - * via gcc. It thus helps speeding up compilation. It will also ignore - * system headers making it less error prone when system headers are moved - * or renamed. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/** - * Return the length of an fixed size array. - * Unlike sizeof this function returns the number of elements - * of the given type. - * - * @param x The pointer to the first element of the array - * @return The number of elements - */ -#define lengthof(x) (sizeof(x) / sizeof(x[0])) - -/** - * Get the last element of an fixed size array. - * - * @param x The pointer to the first element of the array - * @return The pointer to the last element of the array - */ -#define lastof(x) (&x[lengthof(x) - 1]) - -/** - * Copies characters from one buffer to another. - * - * Copies the source string to the destination buffer with respect of the - * terminating null-character and the last pointer to the last element in - * the destination buffer. If the last pointer is set to nullptr no boundary - * check is performed. - * - * @note usage: strecpy(dst, src, lastof(dst)); - * @note lastof() applies only to fixed size arrays - * - * @param dst The destination buffer - * @param src The buffer containing the string to copy - * @param last The pointer to the last element of the destination buffer - * @return The pointer to the terminating null-character in the destination buffer - */ -char *strecpy(char *dst, const char *src, const char *last) -{ - assert(dst <= last); - while (dst != last && *src != '\0') { - *dst++ = *src++; - } - *dst = '\0'; - - if (dst == last && *src != '\0') { - fprintf(stderr, "String too long for destination buffer\n"); - exit(-3); - } - return dst; -} - -/** - * Appends characters from one string to another. - * - * Appends the source string to the destination string with respect of the - * terminating null-character and and the last pointer to the last element - * in the destination buffer. If the last pointer is set to nullptr no - * boundary check is performed. - * - * @note usage: strecat(dst, src, lastof(dst)); - * @note lastof() applies only to fixed size arrays - * - * @param dst The buffer containing the target string - * @param src The buffer containing the string to append - * @param last The pointer to the last element of the destination buffer - * @return The pointer to the terminating null-character in the destination buffer - */ -static char *strecat(char *dst, const char *src, const char *last) -{ - assert(dst <= last); - while (*dst != '\0') { - if (dst == last) return dst; - dst++; - } - - return strecpy(dst, src, last); -} - -#if defined(__CYGWIN__) -/** - * Version of strdup copied from glibc. - * Duplicate S, returning an identical malloc'd string. - * @param s The string to duplicate. - */ -char * -strdup (const char *s) -{ - size_t len = strlen(s) + 1; - void *n = malloc(len); - - if (n == NULL) return NULL; - return (char *) memcpy(n, s, len); -} -#endif - -/** - * Version of the standard free that accepts const pointers. - * @param ptr The data to free. - */ -static inline void free(const void *ptr) -{ - free(const_cast(ptr)); -} - -#ifndef PATH_MAX -/** The maximum length of paths, if we don't know it. */ -# define PATH_MAX 260 -#endif - -/** Simple string comparator using strcmp as implementation */ -struct StringCompare { - /** - * Compare a to b using strcmp. - * @param a string to compare. - * @param b string to compare. - * @return whether a is less than b. - */ - bool operator () (const char *a, const char *b) const - { - return strcmp(a, b) < 0; - } -}; -/** Set of C-style strings. */ -typedef std::set StringSet; -/** Mapping of C-style string to a set of C-style strings. */ -typedef std::map StringMap; -/** Pair of C-style string and a set of C-style strings. */ -typedef std::pair StringMapItem; - -/** Include directory to search in. */ -static StringSet _include_dirs; -/** Files that have been parsed/handled with their dependencies. */ -static StringMap _files; -/** Dependencies of headers. */ -static StringMap _headers; -/** The current 'active' defines. */ -static StringSet _defines; - -/** - * Helper class to read a file. - */ -class File { -public: - /** - * Create the helper by opening the given file. - * @param filename the file to open - * @post the file is open; otherwise the application is killed. - */ - File(const char *filename) - { - this->fp = fopen(filename, "r"); - if (this->fp == nullptr) { - fprintf(stdout, "Could not open %s for reading\n", filename); - exit(1); - } - this->dirname = strdup(filename); - char *last = strrchr(this->dirname, '/'); - if (last != nullptr) { - *last = '\0'; - } else { - *this->dirname = '\0'; - } - } - - /** Free everything we have allocated. */ - ~File() - { - fclose(this->fp); - free(this->dirname); - } - - /** - * Get a single character from the file. - * If we are reading beyond the end of the file '\0' is returned. - * @return the read character. - */ - char GetChar() const - { - int c = fgetc(this->fp); - return (c == EOF) ? '\0' : c; - } - - /** - * Get the directory name of the file. - * @return the directory name. - */ - const char *GetDirname() const - { - return this->dirname; - } - -private: - FILE *fp; ///< The currently opened file. - char *dirname; ///< The directory of the file. -}; - -/** A token returned by the tokenizer. */ -enum Token { - TOKEN_UNKNOWN, ///< Unknown token - TOKEN_END, ///< End of document - TOKEN_EOL, ///< End of line - TOKEN_SHARP, ///< # character, usually telling something important comes. - TOKEN_LOCAL, ///< Read a local include - TOKEN_GLOBAL, ///< Read a global include - TOKEN_IDENTIFIER, ///< Identifier within the data. - TOKEN_DEFINE, ///< \c \#define in code - TOKEN_IF, ///< \c \#if in code - TOKEN_IFDEF, ///< \c \#ifdef in code - TOKEN_IFNDEF, ///< \c \#ifndef in code - TOKEN_ELIF, ///< \c \#elif in code - TOKEN_ELSE, ///< \c \#else in code - TOKEN_ENDIF, ///< \c \#endif in code - TOKEN_UNDEF, ///< \c \#undef in code - TOKEN_OR, ///< '||' within \c \#if expression - TOKEN_AND, ///< '&&' within \c \#if expression - TOKEN_DEFINED, ///< 'defined' within \c \#if expression - TOKEN_OPEN, ///< '(' within \c \#if expression - TOKEN_CLOSE, ///< ')' within \c \#if expression - TOKEN_NOT, ///< '!' within \c \#if expression - TOKEN_ZERO, ///< '0' within \c \#if expression - TOKEN_INCLUDE, ///< \c \#include in code -}; - -/** Mapping from a C-style keyword representation to a Token. */ -typedef std::map KeywordList; - -/** - * Lexer of a file. - */ -class Lexer { -public: - /** - * Create the lexer and fill the keywords table. - * @param file the file to read from. - */ - Lexer(const File *file) : file(file), current_char('\0'), string(nullptr), token(TOKEN_UNKNOWN) - { - this->keywords["define"] = TOKEN_DEFINE; - this->keywords["defined"] = TOKEN_DEFINED; - this->keywords["if"] = TOKEN_IF; - this->keywords["ifdef"] = TOKEN_IFDEF; - this->keywords["ifndef"] = TOKEN_IFNDEF; - this->keywords["include"] = TOKEN_INCLUDE; - this->keywords["elif"] = TOKEN_ELIF; - this->keywords["else"] = TOKEN_ELSE; - this->keywords["endif"] = TOKEN_ENDIF; - this->keywords["undef"] = TOKEN_UNDEF; - - /* Initialise currently read character. */ - this->Next(); - - /* Allocate the buffer. */ - this->buf_len = 32; - this->buf = (char*)malloc(sizeof(*this->buf) * this->buf_len); - } - - /** Free everything */ - ~Lexer() - { - free(this->buf); - } - - /** - * Read the next character into 'current_char'. - */ - void Next() - { - this->current_char = this->file->GetChar(); - } - - /** - * Get the current token. - * @return the token. - */ - Token GetToken() const - { - return this->token; - } - - /** - * Read the currently processed string. - * @return the string, can be nullptr. - */ - const char *GetString() const - { - return this->string; - } - - /** - * Perform the lexing/tokenizing of the file till we can return something - * that must be parsed. - */ - void Lex() - { - for (;;) { - free(this->string); - this->string = nullptr; - this->token = TOKEN_UNKNOWN; - - switch (this->current_char) { - /* '\0' means End-Of-File */ - case '\0': this->token = TOKEN_END; return; - - /* Skip some chars, as they don't do anything */ - case '\t': this->Next(); break; - case '\r': this->Next(); break; - case ' ': this->Next(); break; - - case '\\': - this->Next(); - if (this->current_char == '\n') this->Next(); - break; - - case '\n': - this->token = TOKEN_EOL; - this->Next(); - return; - - case '#': - this->token = TOKEN_SHARP; - this->Next(); - return; - - case '"': - this->ReadString('"', TOKEN_LOCAL); - this->Next(); - return; - - case '<': - this->ReadString('>', TOKEN_GLOBAL); - this->Next(); - return; - - case '&': - this->Next(); - if (this->current_char == '&') { - this->Next(); - this->token = TOKEN_AND; - return; - } - break; - - case '|': - this->Next(); - if (this->current_char == '|') { - this->Next(); - this->token = TOKEN_OR; - return; - } - break; - - case '(': - this->Next(); - this->token = TOKEN_OPEN; - return; - - case ')': - this->Next(); - this->token = TOKEN_CLOSE; - return; - - case '!': - this->Next(); - if (this->current_char != '=') { - this->token = TOKEN_NOT; - return; - } - break; - - /* Possible begin of comment */ - case '/': - this->Next(); - switch (this->current_char) { - case '*': { - this->Next(); - char previous_char = '\0'; - while ((this->current_char != '/' || previous_char != '*') && this->current_char != '\0') { - previous_char = this->current_char; - this->Next(); - } - this->Next(); - break; - } - case '/': while (this->current_char != '\n' && this->current_char != '\0') this->Next(); break; - default: break; - } - break; - - default: - if (isalpha(this->current_char) || this->current_char == '_') { - /* If the name starts with a letter, it is an identifier */ - this->ReadIdentifier(); - return; - } - if (isdigit(this->current_char)) { - bool zero = this->current_char == '0'; - this->Next(); - if (this->current_char == 'x' || this->current_char == 'X') Next(); - while (isdigit(this->current_char) || this->current_char == '.' || (this->current_char >= 'a' && this->current_char <= 'f') || (this->current_char >= 'A' && this->current_char <= 'F')) { - zero &= this->current_char == '0'; - this->Next(); - } - if (zero) this->token = TOKEN_ZERO; - return; - } - this->Next(); - break; - } - } - } - -private: - /** - * The token based on keyword with a given name. - * @param name the actual keyword. - * @return the token of the keyword. - */ - Token FindKeyword(const char *name) const - { - KeywordList::const_iterator it = this->keywords.find(name); - if (it == this->keywords.end()) return TOKEN_IDENTIFIER; - return (*it).second; - } - - /** - * Read an identifier. - */ - void ReadIdentifier() - { - size_t count = 0; - - /* Read the rest of the identifier */ - do { - this->buf[count++] = this->current_char; - this->Next(); - - if (count >= buf_len) { - /* Scale the buffer if required */ - this->buf_len *= 2; - this->buf = (char *)realloc(this->buf, sizeof(*this->buf) * this->buf_len); - } - } while ((isalpha(this->current_char) || this->current_char == '_' || isdigit(this->current_char))); - this->buf[count] = '\0'; - - free(this->string); - this->string = strdup(this->buf); - this->token = FindKeyword(this->string); - } - - /** - * Read a string up to a given character, then set the given token. - * @param end the 'marker' for the end of the string. - * @param token the token to set after returning. - */ - void ReadString(char end, Token token) - { - size_t count = 0; - this->Next(); - while (this->current_char != end && this->current_char != ')' && this->current_char != '\n' && this->current_char != '\0') { - this->buf[count++] = this->current_char; - this->Next(); - - if (count >= this->buf_len) { - /* Scale the buffer if required */ - this->buf_len *= 2; - this->buf = (char *)realloc(this->buf, sizeof(*this->buf) * this->buf_len); - } - } - this->buf[count] = '\0'; - free(this->string); - this->string = strdup(this->buf); - this->token = token; - } - - const File *file; ///< The file to read from. - char current_char; ///< The current character to process. - char *string; ///< Currently processed string. - Token token; ///< The current token to process. - char *buf; ///< Temporary buffer. - size_t buf_len; ///< Length of the temporary buffer. - KeywordList keywords; ///< All keywords we know of. -}; - -/** - * Generate a path from a directory name and a relative filename. - * If the file is not local the include directory names will be used instead - * of the passed parameter with directory name. If the file is local both will - * be queried where the parameter takes precedence. - * @param dirname the directory to look in. - * @param filename the file to look for. - * @param local whether to look locally (in dirname) for the file. - * @return the absolute path, or nullptr if the file doesn't exist. - */ -const char *GeneratePath(const char *dirname, const char *filename, bool local) -{ - /* Ignore C++ standard library headers. */ - if (strchr(filename, '.') == nullptr) return nullptr; - - if (local) { - if (access(filename, R_OK) == 0) return strdup(filename); - - char path[PATH_MAX]; - strecpy(path, dirname, lastof(path)); - const char *p = filename; - /* Remove '..' from the begin of the filename. */ - while (*p == '.') { - if (*(++p) == '.') { - char *s = strrchr(path, '/'); - if (s != nullptr) *s = '\0'; - p += 2; - } - } - strecat(path, "/", lastof(path)); - strecat(path, p, lastof(path)); - - if (access(path, R_OK) == 0) return strdup(path); - } - - for (StringSet::iterator it = _include_dirs.begin(); it != _include_dirs.end(); it++) { - char path[PATH_MAX]; - strecpy(path, *it, lastof(path)); - const char *p = filename; - /* Remove '..' from the begin of the filename. */ - while (*p == '.') { - if (*(++p) == '.') { - char *s = strrchr(path, '/'); - if (s != nullptr) *s = '\0'; - p += 2; - } - } - strecat(path, "/", lastof(path)); - strecat(path, p, lastof(path)); - - if (access(path, R_OK) == 0) return strdup(path); - } - - return nullptr; -} - -/** - * Try to parse a 'defined(expr)' expression. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionDefined(Lexer *lexer, StringSet *defines, bool verbose); - -/** - * Try to parse a 'expr || expr' expression. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionOr(Lexer *lexer, StringSet *defines, bool verbose); - -/** - * Try to parse a '!expr' expression. Also parses the '(expr)', '0' and - * identifiers. Finally it also consumes any unknown tokens. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionNot(Lexer *lexer, StringSet *defines, bool verbose) -{ - if (lexer->GetToken() == TOKEN_NOT) { - if (verbose) fprintf(stderr, "!"); - lexer->Lex(); - bool value = !ExpressionDefined(lexer, defines, verbose); - if (verbose) fprintf(stderr, "[%d]", value); - return value; - } - - if (lexer->GetToken() == TOKEN_OPEN) { - if (verbose) fprintf(stderr, "("); - lexer->Lex(); - bool value = ExpressionOr(lexer, defines, verbose); - if (verbose) fprintf(stderr, ")[%d]", value); - lexer->Lex(); - return value; - } - - if (lexer->GetToken() == TOKEN_ZERO) { - if (verbose) fprintf(stderr, "0"); - lexer->Lex(); - if (verbose) fprintf(stderr, "[0]"); - return false; - } - - bool first = true; - while (lexer->GetToken() == TOKEN_UNKNOWN || lexer->GetToken() == TOKEN_IDENTIFIER) { - if (verbose && first) fprintf(stderr, ""); - first = false; - lexer->Lex(); - } - - return true; -} - -/** - * Try to parse a 'defined(expr)' expression. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionDefined(Lexer *lexer, StringSet *defines, bool verbose) -{ - bool value = ExpressionNot(lexer, defines, verbose); - - if (lexer->GetToken() != TOKEN_DEFINED) return value; - lexer->Lex(); - if (verbose) fprintf(stderr, "defined"); - bool open = (lexer->GetToken() == TOKEN_OPEN); - if (open) lexer->Lex(); - if (verbose) fprintf(stderr, open ? "(" : " "); - if (lexer->GetToken() == TOKEN_IDENTIFIER) { - if (verbose) fprintf(stderr, "%s", lexer->GetString()); - value = defines->find(lexer->GetString()) != defines->end(); - } - if (open) { - if (verbose) fprintf(stderr, ")"); - lexer->Lex(); - } - lexer->Lex(); - if (verbose) fprintf(stderr, "[%d]", value); - return value; -} - -/** - * Try to parse a 'expr && expr' expression. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionAnd(Lexer *lexer, StringSet *defines, bool verbose) -{ - bool value = ExpressionDefined(lexer, defines, verbose); - - for (;;) { - if (lexer->GetToken() != TOKEN_AND) return value; - if (verbose) fprintf(stderr, " && "); - lexer->Lex(); - value = value && ExpressionDefined(lexer, defines, verbose); - } -} - -/** - * Try to parse a 'expr || expr' expression. - * @param lexer the lexer to get tokens from. - * @param defines the set of known defines. - * @param verbose whether to give verbose debugging information. - * @return the value of the expression. - */ -bool ExpressionOr(Lexer *lexer, StringSet *defines, bool verbose) -{ - bool value = ExpressionAnd(lexer, defines, verbose); - - for (;;) { - if (lexer->GetToken() != TOKEN_OR) return value; - if (verbose) fprintf(stderr, " || "); - lexer->Lex(); - value = value || ExpressionAnd(lexer, defines, verbose); - } -} - -/** Enumerator to tell how long to ignore 'stuff'. */ -enum Ignore { - NOT_IGNORE, ///< No ignoring. - IGNORE_UNTIL_ELSE, ///< Ignore till a \c \#else is reached. - IGNORE_UNTIL_ENDIF, ///< Ignore till a \c \#endif is reached. -}; - -/** - * Scan a file for includes, defines and the lot. - * @param filename the name of the file to scan. - * @param ext the extension of the filename. - * @param header whether the file is a header or not. - * @param verbose whether to give verbose debugging information. - */ -void ScanFile(const char *filename, const char *ext, bool header, bool verbose) -{ - static StringSet defines; - static std::stack ignore; - /* Copy in the default defines (parameters of depend) */ - if (!header) { - for (StringSet::iterator it = _defines.begin(); it != _defines.end(); it++) { - defines.insert(strdup(*it)); - } - } - - File file(filename); - Lexer lexer(&file); - - /* Start the lexing! */ - lexer.Lex(); - - while (lexer.GetToken() != TOKEN_END) { - switch (lexer.GetToken()) { - /* We reached the end of the file... yay, we're done! */ - case TOKEN_END: break; - - /* The line started with a # (minus whitespace) */ - case TOKEN_SHARP: - lexer.Lex(); - switch (lexer.GetToken()) { - case TOKEN_INCLUDE: - if (verbose) fprintf(stderr, "%s #include ", filename); - lexer.Lex(); - switch (lexer.GetToken()) { - case TOKEN_LOCAL: - case TOKEN_GLOBAL: { - if (verbose) fprintf(stderr, "%s", lexer.GetString()); - if (!ignore.empty() && ignore.top() != NOT_IGNORE) { - if (verbose) fprintf(stderr, " (ignored)"); - break; - } - const char *h = GeneratePath(file.GetDirname(), lexer.GetString(), lexer.GetToken() == TOKEN_LOCAL); - if (h != nullptr) { - StringMap::iterator it = _headers.find(h); - if (it == _headers.end()) { - it = (_headers.insert(StringMapItem(strdup(h), new StringSet()))).first; - if (verbose) fprintf(stderr, "\n"); - ScanFile(h, ext, true, verbose); - } - StringMap::iterator curfile; - if (header) { - curfile = _headers.find(filename); - } else { - /* Replace the extension with the provided extension of '.o'. */ - char path[PATH_MAX]; - strecpy(path, filename, lastof(path)); - *(strrchr(path, '.')) = '\0'; - strecat(path, ext != nullptr ? ext : ".o", lastof(path)); - curfile = _files.find(path); - if (curfile == _files.end()) { - curfile = (_files.insert(StringMapItem(strdup(path), new StringSet()))).first; - } - } - if (it != _headers.end()) { - for (StringSet::iterator header = it->second->begin(); header != it->second->end(); header++) { - if (curfile->second->find(*header) == curfile->second->end()) curfile->second->insert(strdup(*header)); - } - } - if (curfile->second->find(h) == curfile->second->end()) curfile->second->insert(strdup(h)); - free(h); - } - } - /* FALL THROUGH */ - default: break; - } - break; - - case TOKEN_DEFINE: - if (verbose) fprintf(stderr, "%s #define ", filename); - lexer.Lex(); - if (lexer.GetToken() == TOKEN_IDENTIFIER) { - if (verbose) fprintf(stderr, "%s", lexer.GetString()); - if (!ignore.empty() && ignore.top() != NOT_IGNORE) { - if (verbose) fprintf(stderr, " (ignored)"); - break; - } - if (defines.find(lexer.GetString()) == defines.end()) defines.insert(strdup(lexer.GetString())); - lexer.Lex(); - } - break; - - case TOKEN_UNDEF: - if (verbose) fprintf(stderr, "%s #undef ", filename); - lexer.Lex(); - if (lexer.GetToken() == TOKEN_IDENTIFIER) { - if (verbose) fprintf(stderr, "%s", lexer.GetString()); - if (!ignore.empty() && ignore.top() != NOT_IGNORE) { - if (verbose) fprintf(stderr, " (ignored)"); - break; - } - StringSet::iterator it = defines.find(lexer.GetString()); - if (it != defines.end()) { - free(*it); - defines.erase(it); - } - lexer.Lex(); - } - break; - - case TOKEN_ENDIF: - if (verbose) fprintf(stderr, "%s #endif", filename); - lexer.Lex(); - if (!ignore.empty()) ignore.pop(); - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - - case TOKEN_ELSE: { - if (verbose) fprintf(stderr, "%s #else", filename); - lexer.Lex(); - Ignore last = ignore.empty() ? NOT_IGNORE : ignore.top(); - if (!ignore.empty()) ignore.pop(); - if (ignore.empty() || ignore.top() == NOT_IGNORE) { - ignore.push(last == IGNORE_UNTIL_ELSE ? NOT_IGNORE : IGNORE_UNTIL_ENDIF); - } else { - ignore.push(IGNORE_UNTIL_ENDIF); - } - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - } - - case TOKEN_ELIF: { - if (verbose) fprintf(stderr, "%s #elif ", filename); - lexer.Lex(); - Ignore last = ignore.empty() ? NOT_IGNORE : ignore.top(); - if (!ignore.empty()) ignore.pop(); - if (ignore.empty() || ignore.top() == NOT_IGNORE) { - bool value = ExpressionOr(&lexer, &defines, verbose); - ignore.push(last == IGNORE_UNTIL_ELSE ? (value ? NOT_IGNORE : IGNORE_UNTIL_ELSE) : IGNORE_UNTIL_ENDIF); - } else { - ignore.push(IGNORE_UNTIL_ENDIF); - } - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - } - - case TOKEN_IF: { - if (verbose) fprintf(stderr, "%s #if ", filename); - lexer.Lex(); - if (ignore.empty() || ignore.top() == NOT_IGNORE) { - bool value = ExpressionOr(&lexer, &defines, verbose); - ignore.push(value ? NOT_IGNORE : IGNORE_UNTIL_ELSE); - } else { - ignore.push(IGNORE_UNTIL_ENDIF); - } - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - } - - case TOKEN_IFDEF: - if (verbose) fprintf(stderr, "%s #ifdef ", filename); - lexer.Lex(); - if (lexer.GetToken() == TOKEN_IDENTIFIER) { - bool value = defines.find(lexer.GetString()) != defines.end(); - if (verbose) fprintf(stderr, "%s[%d]", lexer.GetString(), value); - if (ignore.empty() || ignore.top() == NOT_IGNORE) { - ignore.push(value ? NOT_IGNORE : IGNORE_UNTIL_ELSE); - } else { - ignore.push(IGNORE_UNTIL_ENDIF); - } - } - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - - case TOKEN_IFNDEF: - if (verbose) fprintf(stderr, "%s #ifndef ", filename); - lexer.Lex(); - if (lexer.GetToken() == TOKEN_IDENTIFIER) { - bool value = defines.find(lexer.GetString()) != defines.end(); - if (verbose) fprintf(stderr, "%s[%d]", lexer.GetString(), value); - if (ignore.empty() || ignore.top() == NOT_IGNORE) { - ignore.push(!value ? NOT_IGNORE : IGNORE_UNTIL_ELSE); - } else { - ignore.push(IGNORE_UNTIL_ENDIF); - } - } - if (verbose) fprintf(stderr, " -> %signore", (!ignore.empty() && ignore.top() != NOT_IGNORE) ? "" : "not "); - break; - - default: - if (verbose) fprintf(stderr, "%s #", filename); - lexer.Lex(); - break; - } - if (verbose) fprintf(stderr, "\n"); - /* FALL THROUGH */ - default: - /* Ignore the rest of the garbage on this line */ - while (lexer.GetToken() != TOKEN_EOL && lexer.GetToken() != TOKEN_END) lexer.Lex(); - lexer.Lex(); - break; - } - } - - if (!header) { - for (StringSet::iterator it = defines.begin(); it != defines.end(); it++) { - free(*it); - } - defines.clear(); - while (!ignore.empty()) ignore.pop(); - } -} - -/** - * Entry point. Arguably the most common function in all applications. - * @param argc the number of arguments. - * @param argv the actual arguments. - * @return return value for the caller to tell we succeed or not. - */ -int main(int argc, char *argv[]) -{ - bool ignorenext = true; - char *filename = nullptr; - char *ext = nullptr; - char *delimiter = nullptr; - bool append = false; - bool verbose = false; - - for (int i = 0; i < argc; i++) { - if (ignorenext) { - ignorenext = false; - continue; - } - if (argv[i][0] == '-') { - /* Append */ - if (strncmp(argv[i], "-a", 2) == 0) append = true; - /* Include dir */ - if (strncmp(argv[i], "-I", 2) == 0) { - if (argv[i][2] == '\0') { - i++; - _include_dirs.insert(strdup(argv[i])); - } else { - _include_dirs.insert(strdup(&argv[i][2])); - } - continue; - } - /* Define */ - if (strncmp(argv[i], "-D", 2) == 0) { - char *p = strchr(argv[i], '='); - if (p != nullptr) *p = '\0'; - _defines.insert(strdup(&argv[i][2])); - continue; - } - /* Output file */ - if (strncmp(argv[i], "-f", 2) == 0) { - if (filename != nullptr) continue; - filename = strdup(&argv[i][2]); - continue; - } - /* Object file extension */ - if (strncmp(argv[i], "-o", 2) == 0) { - if (ext != nullptr) continue; - ext = strdup(&argv[i][2]); - continue; - } - /* Starting string delimiter */ - if (strncmp(argv[i], "-s", 2) == 0) { - if (delimiter != nullptr) continue; - delimiter = strdup(&argv[i][2]); - continue; - } - /* Verbose */ - if (strncmp(argv[i], "-v", 2) == 0) verbose = true; - continue; - } - ScanFile(argv[i], ext, false, verbose); - } - - /* Default output file is Makefile */ - if (filename == nullptr) filename = strdup("Makefile"); - - /* Default delimiter string */ - if (delimiter == nullptr) delimiter = strdup("# DO NOT DELETE"); - - char backup[PATH_MAX]; - strecpy(backup, filename, lastof(backup)); - strecat(backup, ".bak", lastof(backup)); - - char *content = nullptr; - long size = 0; - - /* Read in the current file; so we can overwrite everything from the - * end of non-depend data marker down till the end. */ - FILE *src = fopen(filename, "rb"); - if (src != nullptr) { - fseek(src, 0, SEEK_END); - if ((size = ftell(src)) < 0) { - fprintf(stderr, "Could not read %s\n", filename); - exit(-2); - } - rewind(src); - content = (char*)malloc(size * sizeof(*content)); - if (fread(content, 1, size, src) != (size_t)size) { - fprintf(stderr, "Could not read %s\n", filename); - exit(-2); - } - fclose(src); - } - - FILE *dst = fopen(filename, "w"); - bool found_delimiter = false; - - if (size != 0) { - src = fopen(backup, "wb"); - if (fwrite(content, 1, size, src) != (size_t)size) { - fprintf(stderr, "Could not write %s\n", filename); - exit(-2); - } - fclose(src); - - /* Then append it to the real file. */ - src = fopen(backup, "r"); - while (fgets(content, size, src) != nullptr) { - fputs(content, dst); - if (!strncmp(content, delimiter, strlen(delimiter))) found_delimiter = true; - if (!append && found_delimiter) break; - } - fclose(src); - } - if (!found_delimiter) fprintf(dst, "\n%s\n", delimiter); - - for (StringMap::iterator it = _files.begin(); it != _files.end(); it++) { - for (StringSet::iterator h = it->second->begin(); h != it->second->end(); h++) { - fprintf(dst, "%s: %s\n", it->first, *h); - } - } - - /* Clean up our mess. */ - fclose(dst); - - free(delimiter); - free(filename); - free(ext); - free(content); - - for (StringMap::iterator it = _files.begin(); it != _files.end(); it++) { - for (StringSet::iterator h = it->second->begin(); h != it->second->end(); h++) { - free(*h); - } - it->second->clear(); - delete it->second; - free(it->first); - } - _files.clear(); - - for (StringMap::iterator it = _headers.begin(); it != _headers.end(); it++) { - for (StringSet::iterator h = it->second->begin(); h != it->second->end(); h++) { - free(*h); - } - it->second->clear(); - delete it->second; - free(it->first); - } - _headers.clear(); - - for (StringSet::iterator it = _defines.begin(); it != _defines.end(); it++) { - free(*it); - } - _defines.clear(); - - for (StringSet::iterator it = _include_dirs.begin(); it != _include_dirs.end(); it++) { - free(*it); - } - _include_dirs.clear(); - - return 0; -} diff --git a/src/fileio.cpp b/src/fileio.cpp index 343d21c9c2..2ae0b451d1 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -25,6 +25,7 @@ #endif #include #include +#include #ifdef WITH_XDG_BASEDIR #include @@ -484,6 +485,28 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, strecpy(resolved_name, filename, lastof(resolved_name)); strtolower(resolved_name); + /* Resolve ".." */ + std::istringstream ss(resolved_name); + std::vector tokens; + std::string token; + while (std::getline(ss, token, PATHSEPCHAR)) { + if (token == "..") { + if (tokens.size() < 2) return nullptr; + tokens.pop_back(); + } else { + tokens.push_back(token); + } + } + resolved_name[0] = '\0'; + bool first = true; + for (const std::string &token : tokens) { + if (!first) { + strecat(resolved_name, PATHSEP, lastof(resolved_name)); + } + strecat(resolved_name, token.c_str(), lastof(resolved_name)); + first = false; + } + size_t resolved_len = strlen(resolved_name); /* Resolve ONE directory link */ diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt new file mode 100644 index 0000000000..aafb5a7b8d --- /dev/null +++ b/src/game/CMakeLists.txt @@ -0,0 +1,14 @@ +add_files( + game.hpp + game_config.cpp + game_config.hpp + game_core.cpp + game_info.cpp + game_info.hpp + game_instance.cpp + game_instance.hpp + game_scanner.cpp + game_scanner.hpp + game_text.cpp + game_text.hpp +) diff --git a/src/gfx.cpp b/src/gfx.cpp index c62453c3c8..d6d130f0a0 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -894,6 +894,7 @@ void DrawCharCentered(WChar c, int x, int y, TextColour colour) * Get the size of a sprite. * @param sprid Sprite to examine. * @param[out] offset Optionally returns the sprite position offset. + * @param zoom The zoom level applicable to the sprite. * @return Sprite size in pixels. * @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position. */ @@ -1408,6 +1409,16 @@ void DrawMouseCursor() _cursor.dirty = false; } +/** + * Repaints a specific rectangle of the screen. + * + * @param left,top,right,bottom The area of the screen that needs repainting + * @pre The rectangle is assumed to have been previously marked dirty with \c SetDirtyBlocks. + * @see SetDirtyBlocks + * @see DrawDirtyBlocks + * @ingroup dirty + * + */ void RedrawScreenRect(int left, int top, int right, int bottom) { assert(right <= _screen.width && bottom <= _screen.height); @@ -1487,6 +1498,8 @@ static void DrawDirtyViewport(uint occlusion, int left, int top, int right, int * Repaints the rectangle blocks which are marked as 'dirty'. * * @see SetDirtyBlocks + * + * @ingroup dirty */ void DrawDirtyBlocks() { @@ -1817,6 +1830,8 @@ static void AddDirtyBlocks(uint start, int left, int top, int right, int bottom) } /** + * Add the specified rectangle to the collection of screen areas to be + * invalidated and redrawn. * Note the point (0,0) is top left. * * @param left The left edge of the rectangle @@ -1825,9 +1840,7 @@ static void AddDirtyBlocks(uint start, int left, int top, int right, int bottom) * @param bottom The bottom edge of the rectangle * @see DrawDirtyBlocks * - * @todo The name of the function should be called like @c AddDirtyBlock as - * it neither set a dirty rect nor add several dirty rects although - * the function name is in plural. (Progman) + * @ingroup dirty */ void SetDirtyBlocks(int left, int top, int right, int bottom) { diff --git a/src/lang/CMakeLists.txt b/src/lang/CMakeLists.txt new file mode 100644 index 0000000000..00b554126f --- /dev/null +++ b/src/lang/CMakeLists.txt @@ -0,0 +1,122 @@ +set(LANG_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/afrikaans.txt + ${CMAKE_CURRENT_SOURCE_DIR}/arabic_egypt.txt + ${CMAKE_CURRENT_SOURCE_DIR}/basque.txt + ${CMAKE_CURRENT_SOURCE_DIR}/belarusian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/brazilian_portuguese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/bulgarian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/catalan.txt + ${CMAKE_CURRENT_SOURCE_DIR}/croatian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/czech.txt + ${CMAKE_CURRENT_SOURCE_DIR}/danish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/dutch.txt + ${CMAKE_CURRENT_SOURCE_DIR}/english.txt + ${CMAKE_CURRENT_SOURCE_DIR}/english_AU.txt + ${CMAKE_CURRENT_SOURCE_DIR}/english_US.txt + ${CMAKE_CURRENT_SOURCE_DIR}/esperanto.txt + ${CMAKE_CURRENT_SOURCE_DIR}/estonian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/faroese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/finnish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/french.txt + ${CMAKE_CURRENT_SOURCE_DIR}/gaelic.txt + ${CMAKE_CURRENT_SOURCE_DIR}/galician.txt + ${CMAKE_CURRENT_SOURCE_DIR}/german.txt + ${CMAKE_CURRENT_SOURCE_DIR}/greek.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hebrew.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hungarian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/icelandic.txt + ${CMAKE_CURRENT_SOURCE_DIR}/indonesian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/irish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/italian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/japanese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/korean.txt + ${CMAKE_CURRENT_SOURCE_DIR}/latin.txt + ${CMAKE_CURRENT_SOURCE_DIR}/latvian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/lithuanian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/luxembourgish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/malay.txt + ${CMAKE_CURRENT_SOURCE_DIR}/norwegian_bokmal.txt + ${CMAKE_CURRENT_SOURCE_DIR}/norwegian_nynorsk.txt + ${CMAKE_CURRENT_SOURCE_DIR}/polish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/portuguese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/romanian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/russian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/serbian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/simplified_chinese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/slovak.txt + ${CMAKE_CURRENT_SOURCE_DIR}/slovenian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/spanish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/spanish_MX.txt + ${CMAKE_CURRENT_SOURCE_DIR}/swedish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/tamil.txt + ${CMAKE_CURRENT_SOURCE_DIR}/thai.txt + ${CMAKE_CURRENT_SOURCE_DIR}/traditional_chinese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/turkish.txt + ${CMAKE_CURRENT_SOURCE_DIR}/ukrainian.txt + ${CMAKE_CURRENT_SOURCE_DIR}/vietnamese.txt + ${CMAKE_CURRENT_SOURCE_DIR}/welsh.txt +) + +set(LANG_BINARY_DIR ${CMAKE_BINARY_DIR}/lang) + +# Walk over all the (finished) language files, and generate a command to compile them +foreach(LANG_SOURCE_FILE IN LISTS LANG_SOURCE_FILES) + get_filename_component(LANG_SOURCE_FILE_NAME_WE ${LANG_SOURCE_FILE} NAME_WE) + + set(LANG_BINARY_FILE ${LANG_BINARY_DIR}/${LANG_SOURCE_FILE_NAME_WE}.lng) + + add_custom_command(OUTPUT ${LANG_BINARY_FILE} + COMMAND ${CMAKE_COMMAND} -E make_directory ${LANG_BINARY_DIR} + COMMAND strgen + -s ${CMAKE_CURRENT_SOURCE_DIR} + -d ${LANG_BINARY_DIR} + ${LANG_SOURCE_FILE} + DEPENDS strgen + MAIN_DEPENDENCY ${LANG_SOURCE_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Compiling language ${LANG_SOURCE_FILE_NAME_WE}" + ) + + list(APPEND LANG_BINARY_FILES ${LANG_BINARY_FILE}) +endforeach(LANG_SOURCE_FILE) + +# Create a new target which compiles all language files +add_custom_target(language_files + DEPENDS + ${LANG_BINARY_FILES} +) +set_target_properties(language_files + PROPERTIES LANG_SOURCE_FILES "${LANG_SOURCE_FILES}" +) + + +set(GENERATED_BINARY_DIR ${CMAKE_BINARY_DIR}/generated) +set(TABLE_BINARY_DIR ${GENERATED_BINARY_DIR}/table) + +# Generate a command and target to create the strings table +add_custom_command_timestamp(OUTPUT ${TABLE_BINARY_DIR}/strings.h + COMMAND ${CMAKE_COMMAND} -E make_directory ${TABLE_BINARY_DIR} + COMMAND strgen + -s ${CMAKE_CURRENT_SOURCE_DIR} + -d ${TABLE_BINARY_DIR} + DEPENDS strgen ${LANG_SOURCE_FILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating table/strings.h" +) +add_custom_target_timestamp(table_strings + DEPENDS + ${TABLE_BINARY_DIR}/strings.h +) + +add_library(languages + INTERFACE +) +target_include_directories(languages + INTERFACE + ${GENERATED_BINARY_DIR} +) +add_dependencies(languages + language_files + table_strings +) +add_library(openttd::languages ALIAS languages) diff --git a/src/lang/danish.txt b/src/lang/danish.txt index 9b070a803a..dd056634fe 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -936,6 +936,7 @@ STR_GAME_OPTIONS_CURRENCY_MXN :Meksikansk Peso STR_GAME_OPTIONS_CURRENCY_NTD :Ny Taiwan dollar (NTD) STR_GAME_OPTIONS_CURRENCY_CNY :Kinesisk Renminbi (CNY) STR_GAME_OPTIONS_CURRENCY_HKD :Hong Kong Dollar (HKD) +STR_GAME_OPTIONS_CURRENCY_INR :Indisk rupi (INR) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vejkøretøjer diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 9e372f2ed9..4a911dd236 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -988,6 +988,7 @@ STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_4X_ZOOM :Kali empat STR_GAME_OPTIONS_FONT_ZOOM :{BLACK}Ukuran font STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_NORMAL :Normal +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Kali dua STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :4 kali STR_GAME_OPTIONS_BASE_GRF :{BLACK}Set Grafik Dasar @@ -1523,10 +1524,12 @@ STR_CONFIG_SETTING_NEWS_MESSAGES_FULL :Penuh STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :Berita berwarna tampil pada: {STRING} STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT :Tahun saat surat kabar/koran menjadi berwarna. Sebelum tahun ini, koran menggunakan warna hitam-putih STR_CONFIG_SETTING_STARTING_YEAR :Tahun mulai: {STRING} +STR_CONFIG_SETTING_ENDING_YEAR_ZERO :Tidak pernah STR_CONFIG_SETTING_SMOOTH_ECONOMY :Aktifkan pertumbuhan ekonomi yang stabil (jarang berubah): {STRING} STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Ketika diaktifkan, produksi industri mengalami perubahan lebih sering, dalam gerakan kecil. Pengaturan tidak berpengaruh jika jenis industri disediakan oleh NewGRF STR_CONFIG_SETTING_ALLOW_SHARES :Ijinkan pembelian saham perusahaan lain: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Jika diaktifkan, pemain dibolehkan membeli saham suatu perusahaan. Saham hanya bisa dibeli saat perusahaan memasuki umur tertentu +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Set umur minimal perusahaan saat sahamnya dapat dibeli atau dijual. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Persentase keuntungan akhir dari sistem pengisi: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Persentase pendapatan yang diberikan dari sistem pengisi, memberikan lebih banyak kendali pendapatan STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Saat menyeret, tempatkan sinyal setiap: {STRING} @@ -2697,10 +2700,12 @@ STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Rata sim STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Jumlah detak permainan tersimulasi per detik. STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Beberapa cepat permainan lagi berjalan, dibanding dengan kecepatan diharapkan memakai rata simulasi biasa. STR_FRAMERATE_CURRENT :{WHITE}Sekarang +STR_FRAMERATE_MEMORYUSE :{WHITE}Memori STR_FRAMERATE_DATA_POINTS :{WHITE}Data tergantung oleh ukuran {COMMA} STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} bingkai/dtk STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! @@ -2710,6 +2715,7 @@ STR_FRAMERATE_GL_ROADVEHS :{WHITE} Titik k STR_FRAMERATE_GL_SHIPS :{WHITE} Titik kapal: STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Titik pesawat: STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Titik dunia: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Jarak tunda linkgraph: STR_FRAMERATE_DRAWING :{BLACK}Render grafis: STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Viewport dunia: STR_FRAMERATE_VIDEO :{BLACK}Keluaran Video: @@ -2866,6 +2872,8 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versi: { STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Versi kompatibel min.: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palet/warna: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Standar (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Standar (D) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameter: {SILVER}{STRING} STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Tidak ada informasi yang tersedia @@ -2914,6 +2922,7 @@ STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Lanjutka STR_SPRITE_ALIGNER_SPRITE_TOOLTIP :{BLACK}Mewakili sprite yang sedang dipilih. Penjajaran diabaikan ketika sprite ini digambar STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Pindahkan sprite, mengubah offset X dan Y STR_SPRITE_ALIGNER_RESET_BUTTON :{BLACK}Reset relatif +STR_SPRITE_ALIGNER_RESET_TOOLTIP :{BLACK}Reset offset relatif saat ini STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Pilih sprite STR_SPRITE_ALIGNER_PICKER_TOOLTIP :{BLACK}Pilih sebuah sprite di manapun pada layar @@ -3116,6 +3125,7 @@ STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klik pad # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Buku Cerita STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Buku Cerita Global +STR_STORY_BOOK_SPECTATOR :Buku Cerita Global STR_STORY_BOOK_TITLE :{YELLOW}{STRING} STR_STORY_BOOK_GENERIC_PAGE_ITEM :Halaman {NUM} STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Loncat ke halaman yang dipilih dari daftar drop-down ini @@ -3310,6 +3320,7 @@ STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industri STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Tidak Ada - STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nama-nama industri - klik di nama untuk mengarahkan pandangan utama pada industri. Ctrl+Click akan membuka viewport baru pada lokasi industri +STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Muatan diterima: {SILVER}{STRING} # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} @@ -3321,6 +3332,7 @@ STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industr STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Membutuhkan: +STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT :{YELLOW}{STRING}{BLACK}: {CARGO_SHORT} menunggu{STRING} STR_CONFIG_GAME_PRODUCTION :{WHITE}Perubahan produksi (kelipatan 8, hingga 2040) @@ -3558,10 +3570,12 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Pesan da STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Kami telah mendesain {STRING} baru - apakah anda tertarik mempergunakan kendaraan ini secara eksklusif , sehingga kami dapat melihat bagaimana kemampuannya sebelum dijual secara masal? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :lokomotif kereta +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :lokomotif rel kereta listrik STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :lokomotif monorel STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :lokomotif maglev STR_ENGINE_PREVIEW_ROAD_VEHICLE :kendaraan jalan raya +STR_ENGINE_PREVIEW_TRAM_VEHICLE :kendaraan jalan trem STR_ENGINE_PREVIEW_AIRCRAFT :pesawat STR_ENGINE_PREVIEW_SHIP :kapal @@ -4062,6 +4076,7 @@ STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}Pilih sk STR_AI_LIST_CANCEL :{BLACK}Batal STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}Jangan mengubah skrip AI +STR_SCREENSHOT_HEIGHTMAP_SCREENSHOT :{BLACK}Tangkapan layar Peta Ketinggian # AI Parameters STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Parameter @@ -4354,6 +4369,7 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Tidak da STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Tidak dapat membongkar jalur trem disini... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... tidak ada jalan STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... tidak ada jalur trem +STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}Jalur Tram tidak ada yang cocok # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Tidak dapat membangun kanal disini... diff --git a/src/lang/korean.txt b/src/lang/korean.txt index 150b6754e0..141cbfb7da 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -1850,7 +1850,7 @@ STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_PARAM :{STRING}에 대 STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_HELPTEXT :"(기본)"은 이 화물 종류에 대한 기본 화물 분배 형식을 따른다는 뜻입니다. "균형"은 대체로 A역에서 B역으로 가려는 화물의 수가 B에서 A로 가려는 화물의 수와 대체로 같다는 뜻입니다. "불균형"은 아무 방향이나 임의의 양만큼 가게 됨을 뜻합니다. "수동"은 자동적인 화물 분배가 일어나지 않고 기존 방식을 사용하겠음을 뜻합니다. STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_DEFAULT :(기본) STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :분배 정확도: {STRING} -STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :값이 높으면 높을수록 CPU가 연결 상태를 계산하는 시간이 더 오래 걸립니다. 만약 이 시간이 너무 오래 걸리면 랙 현상이 나타날 것입니다. 하지만, 낮은 값으로 설정하면 분배가 부정확하게 일어나서, 화물이 원하는 곳으로 분배되지 않을 수 있습니다. +STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :값이 높으면 높을수록 CPU가 연결 상태를 계산하는 시간이 더 오래 걸립니다. 만약 이 시간이 너무 오래 걸리면 게임이 버벅일 것입니다. 하지만, 낮은 값으로 설정하면 분배가 부정확하게 일어나서, 화물이 원하는 곳으로 분배되지 않을 수 있습니다. STR_CONFIG_SETTING_DEMAND_DISTANCE :거리에 따른 수요 효과: {STRING} STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :이 값을 0보다 크게 설정하면, 어떤 화물이 있는 A역과 목적지가 될 수 있는 역 B 사이의 거리는 A에서 B로 가는 화물의 양에 영향을 미치게 됩니다. A역에서 B역이 더 멀리 떨어질 수록 이동하는 화물의 양은 적어질 것입니다. 값이 크면 클 수록 화물은 멀리 이동하지 않고 가까운 역으로 가게 됩니다. STR_CONFIG_SETTING_DEMAND_SIZE :균형 모드에서 되돌아오는 화물의 양: {STRING} diff --git a/src/lang/polish.txt b/src/lang/polish.txt index acb7a1e17a..54eeb13dfd 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -1315,6 +1315,7 @@ STR_GAME_OPTIONS_CURRENCY_MXN :Peso meksykańs STR_GAME_OPTIONS_CURRENCY_NTD :Nowy dolar tajwański (TWD) STR_GAME_OPTIONS_CURRENCY_CNY :Juan chiński (CNY) STR_GAME_OPTIONS_CURRENCY_HKD :Dolar hongkoński (HKD) +STR_GAME_OPTIONS_CURRENCY_INR :Rupia Indyjska (INR) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Pojazdy drogowe diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index 66925e518c..593fa03895 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -864,6 +864,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny {STRING} är nu tillgänglig - {ENGINE} +STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Öppna gruppfönstret fokuserat på fordonets grupp STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tar inte längre emot {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tar inte längre emot {STRING} eller {STRING} @@ -934,6 +935,7 @@ STR_GAME_OPTIONS_CURRENCY_MXN :Mexikansk peso STR_GAME_OPTIONS_CURRENCY_NTD :Nya Taiwanesisk dollar (NTD) STR_GAME_OPTIONS_CURRENCY_CNY :Kinesisk Renminbi (CNY) STR_GAME_OPTIONS_CURRENCY_HKD :Hongkongdollar (HKD) +STR_GAME_OPTIONS_CURRENCY_INR :Indisk rupie (INR) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vägfordon @@ -1160,7 +1162,7 @@ STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Maximalt belopp STR_CONFIG_SETTING_INTEREST_RATE :Räntenivå: {STRING} STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :Räntenivå för lån; styr även inflationen om sådan är aktiverad STR_CONFIG_SETTING_RUNNING_COSTS :Driftkostnader: {STRING} -STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Sätt nivån för underhålls- och driftkostnader för fordon och infrastruktur +STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Sätt nivån för underhålls- och driftskostnader för fordon och infrastruktur STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Konstruktionshastighet: {STRING} STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Begränsar antalet konstruktionshandlingar för AI-spelare STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :Fordonshaverier: {STRING} @@ -1308,6 +1310,8 @@ STR_CONFIG_SETTING_POPULATION_IN_LABEL :Visa invånaran STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Visa antal invånare efter stadsnamnen på kartan STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Linjetjocklek i grafer: {STRING} STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Linjernas bredd i grafernas kurvor. En tunn linje är lättare att läsa av mer precist, medan en tjockare linje är lättare att se och gör det lättare att skilja mellan de olika färgerna +STR_CONFIG_SETTING_SHOW_NEWGRF_NAME :Visa NewGRF:ens namn i fordonsbyggnadsfönstret: {STRING} +STR_CONFIG_SETTING_SHOW_NEWGRF_NAME_HELPTEXT :Lägg till en rad i fordonsbyggnadsfönstret som visar vilken NewGRF det valda fordonet kommer ifrån. STR_CONFIG_SETTING_LANDSCAPE :Landskap: {STRING} STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT :Landskap definiera grundläggande gameplay scenarier med olika last och krav stad tillväxt. NewGRF och Game skript tillåter finare kontroll. @@ -1319,8 +1323,8 @@ STR_CONFIG_SETTING_TERRAIN_TYPE :Terrängtyp: {S STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(TerraGenesis endast) Hilliness av landskapet STR_CONFIG_SETTING_INDUSTRY_DENSITY :Industritäthet: {STRING} STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Ange hur många industrier som ska genereras och vilken nivå som ska bibehållas under spelet -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maximalt avstånd mellan oljeraffinaderier och kartans kant: {STRING} -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Oljeraffinaderier byggs bara nära kartans kanter, alltså vid kusten om det är en ö-karta +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maximalt avstånd mellan oljeindustrier och kartans kant: {STRING} +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Begränsar hur långt från kartans kant oljeraffinaderier och oljeplattformar kan byggas. På ö-kartor säkerställer detta att de är nära kusten. På kartor större än 256 rutor skalas detta värde upp. STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Snögränsens höjd: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Kontrollerar på vilken höjd snön börjar i det subarktiska landskapet. Snö påverkar även industrigeneration och städers tillväxtkrav STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Terrängens svårhetsgrad: {STRING} @@ -1545,10 +1549,16 @@ STR_CONFIG_SETTING_NEWS_MESSAGES_FULL :På STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :Nyheter i färg visas efter: {STRING} STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT :Årtal då tidningens nyhetsartiklar börjar tryckas i färg. Innan detta år används monokromt svart/vitt STR_CONFIG_SETTING_STARTING_YEAR :Startår: {STRING} +STR_CONFIG_SETTING_ENDING_YEAR :Slutår för poängräkning: {STRING} +STR_CONFIG_SETTING_ENDING_YEAR_HELPTEXT :Årtal då spelet slutar räkna poäng. Vid slutet av detta år sparas företagets poäng och listan med de bästa spelresultaten visas, men därefter kan spelarna fortsätta att spela.{}Om årtalet är satt till innan startåret visas aldrig de bästa spelresultaten. +STR_CONFIG_SETTING_ENDING_YEAR_VALUE :{NUM} +STR_CONFIG_SETTING_ENDING_YEAR_ZERO :Aldrig STR_CONFIG_SETTING_SMOOTH_ECONOMY :Lugn ekonomi (flera små ändringar): {STRING} STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :När det är aktiverat ändras industriproduktionen oftare och i mindre steg. Den här inställningen har vanligtvis ingen effekt om de olika industrityperna kommer från en NewGRF STR_CONFIG_SETTING_ALLOW_SHARES :Tillåt köp av aktier från andra företag: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :När det är aktiverat blir det tillåtet att köpa och sälja andelar i företag. För att dess andelar ska bli tillgängliga måste ett företag ha uppnått en viss ålder +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Lägsta företagsålder för aktiehandel: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Ställ in den lägsta ålder från vilken ett företags aktier kan köpas och säljas av andra företag. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Inkomstprocent per etapp i matarsystem: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Procentandel av inkomsten som ges till de mellanliggande etapperna i matarsystem. Ger mer kontroll över inkomsterna STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Vid dragning med verktyget, placera en signal per: {STRING} @@ -1590,7 +1600,7 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :Förbjuden STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Tillåten STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Tillåten, vanlig stads-layout STR_CONFIG_SETTING_TOWN_CARGOGENMODE :Fraktgods som genereras i staden: {STRING} -STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT :Hur mycket fraktgods produceras av hus i städer, i förhållande till den totala befolkningen i staden.{}Kvadratisk tillväxt: En stad dubbelt så stor genererar fyra gånger så många passagerare.{}Linjär tillväxt: En stad dubbelt så stor genererar dubbelt så många passagerare. +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT :Hur mycket fraktgods som produceras av hus i städer, i förhållande till den totala befolkningen i staden.{}Kvadratisk tillväxt: En dubbelt så stor stad genererar fyra gånger så många passagerare.{}Linjär tillväxt: En dubbelt så stor stad genererar dubbelt så många passagerare. STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :Kvadratisk (original) STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :Linjär @@ -2156,6 +2166,7 @@ STR_NETWORK_ERROR_WRONG_PASSWORD :{WHITE}Fel lös STR_NETWORK_ERROR_SERVER_FULL :{WHITE}Servern är full STR_NETWORK_ERROR_SERVER_BANNED :{WHITE}Du är bannlyst från den här servern STR_NETWORK_ERROR_KICKED :{WHITE}Du blev utkastad från spelet +STR_NETWORK_ERROR_KICK_MESSAGE :{WHITE}Orsak: {STRING} STR_NETWORK_ERROR_CHEATER :{WHITE}Fusk är inte tillåtet på denna server STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}Du skickade för många kommandon till servern STR_NETWORK_ERROR_TIMEOUT_PASSWORD :{WHITE}Du tog för lång tid på dig att mata in löserondet @@ -2215,6 +2226,7 @@ STR_NETWORK_MESSAGE_GIVE_MONEY :*** {STRING} ga STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** You gave {1:STRING} {2:CURRENCY_LONG} STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}Servern avslutade sessionen STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}Servern startar om...{}Var vänlig vänta... +STR_NETWORK_MESSAGE_KICKED :*** {STRING} kastades ut. Orsak: ({STRING}) # Content downloading window STR_CONTENT_TITLE :{WHITE}Nedladdning av innehåll @@ -3042,7 +3054,7 @@ STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Kapacite STR_BROKEN_VEHICLE_LENGTH :{WHITE}Tåg '{VEHICLE}' som tillhör '{COMPANY}' har ogiltig längd. Detta orsakas förmodligen av problem med en NewGRF. Spelet kan desynkroniseras eller krascha STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' ger felaktig information -STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Last/återställnings information för '{1:ENGINE}' är skilld ifrån köp lista efter konstruktion. Detta kan leda till att utomatisk förnyelse/uppgradering misslyckas med att anpassa fordonen/vagnarna korrekt +STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Last-/återställningsinformationen för '{1:ENGINE}' skiljer sig från köplistan efter konstruktion. Detta kan leda till att automatisk förnyelse/uppgradering misslyckas med att anpassa fordonen/vagnarna korrekt STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' skapade en oändlig loop i en produktions-callback-funktion STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Callback-funktion {1:HEX} returnerade ett okänt/ogiltligt resultat {2:HEX} STR_NEWGRF_BUGGY_INVALID_CARGO_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' returnerade ogiltig lasttyp i produktions-callback vid {2:HEX} @@ -3112,6 +3124,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Byt namn på st # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} lokala myndigheter +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zon +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Visa zonen som ryms inom de lokala myndigheternas gränser STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Transportföretags värderingar: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Tillgängliga åtgärder: @@ -3207,7 +3221,7 @@ STR_STATION_LIST_STATION :{YELLOW}{STATIO STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} STR_STATION_LIST_NONE :{YELLOW}- Inga - STR_STATION_LIST_SELECT_ALL_FACILITIES :{BLACK}Markera alla inrättningar -STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}Välj alla last-typer (inklusive icke väntande last) +STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}Välj alla typer av last (inklusive icke väntande last) STR_STATION_LIST_NO_WAITING_CARGO :{BLACK}Ingen sorts last väntar # Station view window @@ -3382,8 +3396,17 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrier STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Inga - +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% transporterat){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} och {NUM} till... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrinamn - klicka på namnet för att centrera huvudvyn över industrin. Ctrl+klick öppnar en ny vy över industrins läge +STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Accepterat gods: {SILVER}{STRING} +STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Producerat fraktgods: {SILVER}{STRING} +STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :Alla typer av last +STR_INDUSTRY_DIRECTORY_FILTER_NONE :Inga # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} @@ -4158,6 +4181,13 @@ STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}Välj ma STR_AI_LIST_CANCEL :{BLACK}Avbryt STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}Ändra inte datorspelare +STR_SCREENSHOT_CAPTION :{WHITE}Ta en skärmdump +STR_SCREENSHOT_SCREENSHOT :{BLACK}Vanlig skärmdump +STR_SCREENSHOT_ZOOMIN_SCREENSHOT :{BLACK}Fullt inzoomad skärmdump +STR_SCREENSHOT_DEFAULTZOOM_SCREENSHOT :{BLACK}Skärmdump med grundinställd zoomnivå +STR_SCREENSHOT_WORLD_SCREENSHOT :{BLACK}Skärmdump med hela kartan +STR_SCREENSHOT_HEIGHTMAP_SCREENSHOT :{BLACK}Skärmdump av höjdkarta +STR_SCREENSHOT_MINIMAP_SCREENSHOT :{BLACK}Skärmdump av miniatyrkartan # AI Parameters STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} parametrar diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 66f64e361c..1575e64cc7 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -4298,6 +4298,7 @@ STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}Вибр STR_AI_LIST_CANCEL :{BLACK}Відміна STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}Не міняти скрипт +STR_SCREENSHOT_CAPTION :{WHITE}Зробити знімок екрану # AI Parameters STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Параметри diff --git a/src/linkgraph/CMakeLists.txt b/src/linkgraph/CMakeLists.txt new file mode 100644 index 0000000000..c3d73a15e1 --- /dev/null +++ b/src/linkgraph/CMakeLists.txt @@ -0,0 +1,22 @@ +add_files( + demands.cpp + demands.h + flowmapper.cpp + flowmapper.h + init.h + linkgraph.cpp + linkgraph.h + linkgraph_base.h + linkgraph_gui.cpp + linkgraph_gui.h + linkgraph_type.h + linkgraphjob.cpp + linkgraphjob.h + linkgraphjob_base.h + linkgraphschedule.cpp + linkgraphschedule.h + mcf.cpp + mcf.h + refresh.cpp + refresh.h +) diff --git a/src/misc/CMakeLists.txt b/src/misc/CMakeLists.txt new file mode 100644 index 0000000000..3a5363e7b0 --- /dev/null +++ b/src/misc/CMakeLists.txt @@ -0,0 +1,14 @@ +add_files( + array.hpp + binaryheap.hpp + blob.hpp + countedobj.cpp + countedptr.hpp + dbg_helpers.cpp + dbg_helpers.h + fixedsizearray.hpp + getoptdata.cpp + getoptdata.h + hashtable.hpp + str.hpp +) diff --git a/src/music/CMakeLists.txt b/src/music/CMakeLists.txt new file mode 100644 index 0000000000..0ae15fde26 --- /dev/null +++ b/src/music/CMakeLists.txt @@ -0,0 +1,54 @@ +if (NOT OPTION_DEDICATED) + add_files( + allegro_m.cpp + allegro_m.h + CONDITION Allegro_FOUND + ) + + add_files( + fluidsynth.cpp + fluidsynth.h + CONDITION Fluidsynth_FOUND + ) + + add_files( + cocoa_m.cpp + cocoa_m.h + CONDITION APPLE + ) + + add_files( + dmusic.cpp + dmusic.h + win32_m.cpp + win32_m.h + CONDITION WIN32 + ) + + add_files( + extmidi.cpp + extmidi.h + CONDITION UNIX + ) + + add_files( + bemidi.cpp + bemidi.h + CONDITION OPTION_HAIKU + ) + + add_files( + os2_m.cpp + os2_m.h + CONDITION OPTION_OS2 + ) +endif (NOT OPTION_DEDICATED) + +add_files( + midi.h + midifile.cpp + midifile.hpp + music_driver.hpp + null_m.cpp + null_m.h +) diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index c4edcfe08f..4f30353143 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -7,8 +7,6 @@ /** @file dmusic.cpp Playing music via DirectMusic. */ -#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT - #define INITGUID #include "../stdafx.h" #ifdef WIN32_LEAN_AND_MEAN @@ -1244,6 +1242,3 @@ void MusicDriver_DMusic::SetVolume(byte vol) { _playback.new_volume = vol; } - - -#endif /* WIN32_ENABLE_DIRECTMUSIC_SUPPORT */ diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt new file mode 100644 index 0000000000..1c27d62066 --- /dev/null +++ b/src/network/CMakeLists.txt @@ -0,0 +1,28 @@ +add_subdirectory(core) + +add_files( + network.cpp + network.h + network_admin.cpp + network_admin.h + network_base.h + network_chat_gui.cpp + network_client.cpp + network_client.h + network_command.cpp + network_content.cpp + network_content.h + network_content_gui.cpp + network_content_gui.h + network_func.h + network_gamelist.cpp + network_gamelist.h + network_gui.cpp + network_gui.h + network_internal.h + network_server.cpp + network_server.h + network_type.h + network_udp.cpp + network_udp.h +) diff --git a/src/network/core/CMakeLists.txt b/src/network/core/CMakeLists.txt new file mode 100644 index 0000000000..777d15d841 --- /dev/null +++ b/src/network/core/CMakeLists.txt @@ -0,0 +1,27 @@ +add_files( + address.cpp + address.h + config.h + core.cpp + core.h + game.h + host.cpp + host.h + os_abstraction.h + packet.cpp + packet.h + tcp.cpp + tcp.h + tcp_admin.cpp + tcp_admin.h + tcp_connect.cpp + tcp_content.cpp + tcp_content.h + tcp_game.cpp + tcp_game.h + tcp_http.cpp + tcp_http.h + tcp_listen.h + udp.cpp + udp.h +) diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 0be6fca2b6..10b0fd9f7a 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -96,7 +96,6 @@ void NetworkAddress::GetAddressAsString(char *buffer, const char *last, bool wit * Get the address as a string, e.g. 127.0.0.1:12345. * @param with_family whether to add the family (e.g. IPvX). * @return the address - * @note NOT thread safe */ const char *NetworkAddressDumper::GetAddressAsString(NetworkAddress *addr, bool with_family) { diff --git a/src/network/core/address.h b/src/network/core/address.h index 0e8f446959..f27ba2003f 100644 --- a/src/network/core/address.h +++ b/src/network/core/address.h @@ -15,6 +15,8 @@ #include "../../string_func.h" #include "../../core/smallmap_type.hpp" +#include + class NetworkAddress; typedef std::vector NetworkAddressList; ///< Type for a list of addresses. typedef SmallMap SocketList; ///< Type for a mapping between address and socket. @@ -91,6 +93,7 @@ public: const char *GetHostname(); void GetAddressAsString(char *buffer, const char *last, bool with_family = true); + std::string GetAddressAsString(bool with_family = true); const sockaddr_storage *GetAddress(); /** diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt new file mode 100644 index 0000000000..e302c448b5 --- /dev/null +++ b/src/os/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(macosx) +add_subdirectory(os2) +add_subdirectory(unix) +add_subdirectory(windows) diff --git a/src/os/macosx/CMakeLists.txt b/src/os/macosx/CMakeLists.txt new file mode 100644 index 0000000000..e6b6c237b0 --- /dev/null +++ b/src/os/macosx/CMakeLists.txt @@ -0,0 +1,11 @@ +add_files( + crashlog_osx.cpp + macos.h + macos.mm + osx_stdafx.h + splash.cpp + splash.h + string_osx.cpp + string_osx.h + CONDITION APPLE +) diff --git a/src/os/os2/CMakeLists.txt b/src/os/os2/CMakeLists.txt new file mode 100644 index 0000000000..52534dbcbb --- /dev/null +++ b/src/os/os2/CMakeLists.txt @@ -0,0 +1,4 @@ +add_files( + os2.cpp + CONDITION OPTION_OS2 +) diff --git a/src/os/unix/CMakeLists.txt b/src/os/unix/CMakeLists.txt new file mode 100644 index 0000000000..b548d3bb21 --- /dev/null +++ b/src/os/unix/CMakeLists.txt @@ -0,0 +1,9 @@ +add_files( + crashlog_unix.cpp + CONDITION UNIX AND NOT APPLE AND NOT OPTION_OS2 +) + +add_files( + unix.cpp + CONDITION UNIX AND NOT OPTION_OS2 +) diff --git a/src/os/windows/CMakeLists.txt b/src/os/windows/CMakeLists.txt new file mode 100644 index 0000000000..19d1bd46e3 --- /dev/null +++ b/src/os/windows/CMakeLists.txt @@ -0,0 +1,8 @@ +add_files( + crashlog_win.cpp + string_uniscribe.cpp + string_uniscribe.h + win32.cpp + win32.h + CONDITION WIN32 +) diff --git a/src/os/windows/ottdres.rc.in b/src/os/windows/ottdres.rc.in index 861015eb70..741fa0e105 100644 --- a/src/os/windows/ottdres.rc.in +++ b/src/os/windows/ottdres.rc.in @@ -37,7 +37,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -100 ICON DISCARDABLE "../../../media/openttd.ico" +100 ICON DISCARDABLE "${CMAKE_SOURCE_DIR}/os/windows/openttd.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -77,8 +77,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,11,0,!!ISODATE!! - PRODUCTVERSION 1,11,0,!!ISODATE!! + FILEVERSION 1,11,0,${REV_ISODATE} + PRODUCTVERSION 1,11,0,${REV_ISODATE} FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -96,14 +96,14 @@ BEGIN VALUE "Comments", "This program is licensed under the GNU General Public License version 2.\0" VALUE "CompanyName", "OpenTTD Development Team\0" VALUE "FileDescription", "OpenTTD\0" - VALUE "FileVersion", "!!VERSION!!\0" + VALUE "FileVersion", "${REV_VERSION}\0" VALUE "InternalName", "openttd\0" - VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-!!YEAR!!. All Rights Reserved.\0" + VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-${REV_YEAR}. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "openttd.exe\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "OpenTTD\0" - VALUE "ProductVersion", "!!VERSION!!\0" + VALUE "ProductVersion", "${REV_VERSION}\0" VALUE "SpecialBuild", "-\0" END END @@ -116,7 +116,7 @@ END #endif // !_MAC #ifdef __MINGW32__ -1 24 "../../../projects/dpi_aware.manifest" +1 24 "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest" #endif #endif // Neutral (Default) resources diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp index ce433364a1..42a003ae17 100644 --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -7,8 +7,6 @@ /** @file string_uniscribe.cpp Functions related to laying out text on Win32. */ -#if defined(WITH_UNISCRIBE) - #include "../../stdafx.h" #include "../../debug.h" #include "string_uniscribe.h" @@ -620,5 +618,3 @@ const int *UniscribeParagraphLayout::UniscribeVisualRun::GetGlyphToCharMap() con return this->utf16_to_utf8[this->cur_pos]; } - -#endif /* defined(WITH_UNISCRIBE) */ diff --git a/src/os/windows/string_uniscribe.h b/src/os/windows/string_uniscribe.h index 9470b44b0c..7ec7ca6708 100644 --- a/src/os/windows/string_uniscribe.h +++ b/src/os/windows/string_uniscribe.h @@ -10,8 +10,6 @@ #ifndef STRING_UNISCRIBE_H #define STRING_UNISCRIBE_H -#if defined(WITH_UNISCRIBE) - #include "../../gfx_layout.h" #include "../../string_base.h" #include @@ -85,6 +83,4 @@ public: size_t Prev(IterType what) override; }; -#endif /* defined(WITH_UNISCRIBE) */ - #endif /* STRING_UNISCRIBE_H */ diff --git a/src/pathfinder/CMakeLists.txt b/src/pathfinder/CMakeLists.txt new file mode 100644 index 0000000000..2e275706f2 --- /dev/null +++ b/src/pathfinder/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(npf) +add_subdirectory(yapf) + +add_files( + follow_track.hpp + pathfinder_func.h + pathfinder_type.h + pf_performance_timer.hpp +) diff --git a/src/pathfinder/npf/CMakeLists.txt b/src/pathfinder/npf/CMakeLists.txt new file mode 100644 index 0000000000..e3ace57e52 --- /dev/null +++ b/src/pathfinder/npf/CMakeLists.txt @@ -0,0 +1,8 @@ +add_files( + aystar.cpp + aystar.h + npf.cpp + npf_func.h + queue.cpp + queue.h +) diff --git a/src/pathfinder/yapf/CMakeLists.txt b/src/pathfinder/yapf/CMakeLists.txt new file mode 100644 index 0000000000..170c1ad61d --- /dev/null +++ b/src/pathfinder/yapf/CMakeLists.txt @@ -0,0 +1,20 @@ +add_files( + nodelist.hpp + yapf.h + yapf.hpp + yapf_base.hpp + yapf_cache.h + yapf_common.hpp + yapf_costbase.hpp + yapf_costcache.hpp + yapf_costrail.hpp + yapf_destrail.hpp + yapf_node.hpp + yapf_node_rail.hpp + yapf_node_road.hpp + yapf_node_ship.hpp + yapf_rail.cpp + yapf_road.cpp + yapf_ship.cpp + yapf_type.hpp +) diff --git a/src/rev.cpp.in b/src/rev.cpp.in index 58f7bf7f44..cabb19ce4c 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -35,7 +35,7 @@ bool IsReleasedVersion() * * shows a "M", if the binary is made from modified source code. */ -const char _openttd_revision[] = "!!VERSION!!"; +const char _openttd_revision[] = "${REV_VERSION}"; /** * The text version of OpenTTD's build date. @@ -59,12 +59,12 @@ const char _openttd_build_configure_defines[] = "!!CONFIGURE_DEFINES!!"; /** * The git revision hash of this version. */ -const char _openttd_revision_hash[] = "!!GITHASH!!"; +const char _openttd_revision_hash[] = "${REV_HASH}"; /** * The year of this version. */ -const char _openttd_revision_year[] = "!!YEAR!!"; +const char _openttd_revision_year[] = "${REV_YEAR}"; /** * Let us know if current build was modified. This detection @@ -74,14 +74,14 @@ const char _openttd_revision_year[] = "!!YEAR!!"; * (compiling from sources without any version control software) * and 2 is for modified revision. */ -const byte _openttd_revision_modified = !!MODIFIED!!; +const byte _openttd_revision_modified = ${REV_MODIFIED}; /** * Indicate whether this is a tagged version. * If this is non-0, then _openttd_revision is the name of the tag, * and the version is likely a beta, release candidate, or real release. */ -const byte _openttd_revision_tagged = !!ISTAG!!; +const byte _openttd_revision_tagged = ${REV_ISTAG}; /** * The NewGRF revision of OTTD: @@ -96,4 +96,4 @@ const byte _openttd_revision_tagged = !!ISTAG!!; * final release will always have a lower version number than the released * version, thus making comparisons on specific revisions easy. */ -const uint32 _openttd_newgrf_version = 1 << 28 | 11 << 24 | 0 << 20 | !!ISSTABLETAG!! << 19 | 28004; +const uint32 _openttd_newgrf_version = 1 << 28 | 11 << 24 | 0 << 20 | ${REV_ISSTABLETAG} << 19 | 28004; diff --git a/src/saveload/CMakeLists.txt b/src/saveload/CMakeLists.txt new file mode 100644 index 0000000000..0fb209b624 --- /dev/null +++ b/src/saveload/CMakeLists.txt @@ -0,0 +1,54 @@ +add_files( + afterload.cpp + ai_sl.cpp + airport_sl.cpp + animated_tile_sl.cpp + autoreplace_sl.cpp + bridge_signal_sl.cpp + cargomonitor_sl.cpp + cargopacket_sl.cpp + cheat_sl.cpp + company_sl.cpp + debug_sl.cpp + depot_sl.cpp + economy_sl.cpp + engine_sl.cpp + extended_ver_sl.cpp + extended_ver_sl.h + game_sl.cpp + gamelog_sl.cpp + goal_sl.cpp + group_sl.cpp + industry_sl.cpp + labelmaps_sl.cpp + linkgraph_sl.cpp + map_sl.cpp + misc_sl.cpp + newgrf_sl.cpp + newgrf_sl.h + object_sl.cpp + oldloader.cpp + oldloader.h + oldloader_sl.cpp + order_sl.cpp + plans_sl.cpp + saveload.cpp + saveload.h + saveload_buffer.h + saveload_filter.h + saveload_internal.h + signal_sl.cpp + signs_sl.cpp + station_sl.cpp + storage_sl.cpp + strings_sl.cpp + story_sl.cpp + subsidy_sl.cpp + tbtr_template_replacement_sl.cpp + tbtr_template_veh_sl.cpp + town_sl.cpp + tracerestrict_sl.cpp + tunnel_sl.cpp + vehicle_sl.cpp + waypoint_sl.cpp +) diff --git a/src/script/CMakeLists.txt b/src/script/CMakeLists.txt new file mode 100644 index 0000000000..e5915332c4 --- /dev/null +++ b/src/script/CMakeLists.txt @@ -0,0 +1,23 @@ +add_subdirectory(api) + +add_files( + script_config.cpp + script_config.hpp + script_fatalerror.hpp + script_info.cpp + script_info.hpp + script_info_dummy.cpp + script_instance.cpp + script_instance.hpp + script_scanner.cpp + script_scanner.hpp + script_storage.hpp + script_suspend.hpp + squirrel.cpp + squirrel.hpp + squirrel_class.hpp + squirrel_helper.hpp + squirrel_helper_type.hpp + squirrel_std.cpp + squirrel_std.hpp +) diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt new file mode 100644 index 0000000000..9c665293c1 --- /dev/null +++ b/src/script/api/CMakeLists.txt @@ -0,0 +1,140 @@ +add_files( + ai_changelog.hpp + game_changelog.hpp + script_accounting.hpp + script_admin.hpp + script_airport.hpp + script_base.hpp + script_basestation.hpp + script_bridge.hpp + script_bridgelist.hpp + script_cargo.hpp + script_cargolist.hpp + script_cargomonitor.hpp + script_client.hpp + script_clientlist.hpp + script_company.hpp + script_companymode.hpp + script_controller.hpp + script_date.hpp + script_depotlist.hpp + script_engine.hpp + script_enginelist.hpp + script_error.hpp + script_event.hpp + script_event_types.hpp + script_execmode.hpp + script_game.hpp + script_gamesettings.hpp + script_goal.hpp + script_group.hpp + script_grouplist.hpp + script_industry.hpp + script_industrylist.hpp + script_industrytype.hpp + script_industrytypelist.hpp + script_info_docs.hpp + script_infrastructure.hpp + script_list.hpp + script_log.hpp + script_map.hpp + script_marine.hpp + script_news.hpp + script_object.hpp + script_order.hpp + script_priorityqueue.hpp + script_rail.hpp + script_railtypelist.hpp + script_road.hpp + script_roadtypelist.hpp + script_sign.hpp + script_signlist.hpp + script_station.hpp + script_stationlist.hpp + script_story_page.hpp + script_storypagelist.hpp + script_storypageelementlist.hpp + script_subsidy.hpp + script_subsidylist.hpp + script_testmode.hpp + script_text.hpp + script_tile.hpp + script_tilelist.hpp + script_town.hpp + script_townlist.hpp + script_tunnel.hpp + script_types.hpp + script_vehicle.hpp + script_vehiclelist.hpp + script_viewport.hpp + script_waypoint.hpp + script_waypointlist.hpp + script_window.hpp + script_accounting.cpp + script_admin.cpp + script_airport.cpp + script_base.cpp + script_basestation.cpp + script_bridge.cpp + script_bridgelist.cpp + script_cargo.cpp + script_cargolist.cpp + script_cargomonitor.cpp + script_client.cpp + script_clientlist.cpp + script_company.cpp + script_companymode.cpp + script_controller.cpp + script_date.cpp + script_depotlist.cpp + script_engine.cpp + script_enginelist.cpp + script_error.cpp + script_event.cpp + script_event_types.cpp + script_execmode.cpp + script_game.cpp + script_gamesettings.cpp + script_goal.cpp + script_group.cpp + script_grouplist.cpp + script_industry.cpp + script_industrylist.cpp + script_industrytype.cpp + script_industrytypelist.cpp + script_infrastructure.cpp + script_list.cpp + script_log.cpp + script_map.cpp + script_marine.cpp + script_news.cpp + script_object.cpp + script_order.cpp + script_priorityqueue.cpp + script_rail.cpp + script_railtypelist.cpp + script_road.cpp + script_roadtypelist.cpp + script_sign.cpp + script_signlist.cpp + script_station.cpp + script_stationlist.cpp + script_story_page.cpp + script_storypagelist.cpp + script_storypageelementlist.cpp + script_subsidy.cpp + script_subsidylist.cpp + script_testmode.cpp + script_text.cpp + script_tile.cpp + script_tilelist.cpp + script_town.cpp + script_townlist.cpp + script_tunnel.cpp + script_vehicle.cpp + script_vehiclelist.cpp + script_viewport.cpp + script_waypoint.cpp + script_waypointlist.cpp + script_window.cpp +) diff --git a/src/settingsgen/CMakeLists.txt b/src/settingsgen/CMakeLists.txt new file mode 100644 index 0000000000..e17b8ad6bf --- /dev/null +++ b/src/settingsgen/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.5) + +project(settingsgen) + +set(sourcefiles + settingsgen.cpp + ../core/alloc_func.cpp + ../misc/getoptdata.cpp + ../ini_load.cpp + ../string.cpp +) +add_definitions(-DSETTINGSGEN) +add_executable(settingsgen ${sourcefiles}) diff --git a/src/sortlist_type.h b/src/sortlist_type.h index a8730d96d9..e5bfe06a91 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -250,7 +250,8 @@ public: * @return true if the list sequence has been altered * */ - bool Sort(SortFunction *compare) + template + bool Sort(Comp compare) { /* Do not sort if the resort bit is not set */ if (!(this->flags & VL_RESORT)) return false; diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt new file mode 100644 index 0000000000..24a38e409f --- /dev/null +++ b/src/sound/CMakeLists.txt @@ -0,0 +1,43 @@ +if (NOT OPTION_DEDICATED) + add_files( + allegro_s.cpp + allegro_s.h + CONDITION Allegro_FOUND + ) + + add_files( + sdl_s.cpp + sdl_s.h + CONDITION SDL_FOUND + ) + + add_files( + sdl2_s.cpp + sdl_s.h + CONDITION SDL2_FOUND + ) + + add_files( + cocoa_s.cpp + cocoa_s.h + CONDITION APPLE + ) + + add_files( + win32_s.cpp + win32_s.h + CONDITION WIN32 + ) + + add_files( + xaudio2_s.cpp + xaudio2_s.h + CONDITION WIN32 AND XAUDIO2_FOUND + ) +endif (NOT OPTION_DEDICATED) + +add_files( + sound_driver.hpp + null_s.cpp + null_s.h +) diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp index 5aa0580407..e89e28a78f 100644 --- a/src/sound/xaudio2_s.cpp +++ b/src/sound/xaudio2_s.cpp @@ -7,8 +7,6 @@ /** @file xaudio2_s.cpp XAudio2 sound driver. */ -#ifdef WITH_XAUDIO2 - #include "../stdafx.h" #include "../openttd.h" #include "../driver.h" @@ -267,5 +265,3 @@ void SoundDriver_XAudio2::Stop() FreeLibrary(_xaudio_dll_handle); CoUninitialize(); } - -#endif diff --git a/src/spriteloader/CMakeLists.txt b/src/spriteloader/CMakeLists.txt new file mode 100644 index 0000000000..5d6a2f865e --- /dev/null +++ b/src/spriteloader/CMakeLists.txt @@ -0,0 +1,5 @@ +add_files( + grf.cpp + grf.hpp + spriteloader.hpp +) diff --git a/src/stdafx.h b/src/stdafx.h index d3e0d72046..460c80797d 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -10,6 +10,13 @@ #ifndef STDAFX_H #define STDAFX_H +#ifdef _MSC_VER + /* Stop Microsoft (and clang-cl) compilers from complaining about potentially-unsafe/potentially-non-standard functions */ +# define _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_WARNINGS +# define _CRT_NONSTDC_NO_WARNINGS +#endif + #if defined(__APPLE__) #include "os/macosx/osx_stdafx.h" #endif /* __APPLE__ */ @@ -173,7 +180,6 @@ #endif /* (_MSC_VER < 1400) */ #pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception) #pragma warning(disable: 4996) // 'function': 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 nullptr pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001 #pragma warning(disable: 6326) // code analyzer: potential comparison of a constant with another constant @@ -194,7 +200,11 @@ #define CDECL _cdecl #define WARN_FORMAT(string, args) - #define FINAL sealed +# ifndef __clang__ +# define FINAL sealed +# else +# define FINAL +# endif /* fallthrough attribute, VS 2017 */ #if (_MSC_VER >= 1910) @@ -430,17 +440,14 @@ void NORETURN CDECL assert_msg_error(int line, const char *file, const char *exp const char *assert_tile_info(uint32 tile); #define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__) -/* For non-debug builds with assertions enabled use the special assertion handler: - * - For MSVC: NDEBUG is set for all release builds and WITH_ASSERT overrides the disabling of asserts. - * - For non MSVC: NDEBUG is set when assertions are disables, _DEBUG is set for non-release builds. - */ -#if (defined(_MSC_VER) && defined(NDEBUG) && defined(WITH_ASSERT)) || (!defined(_MSC_VER) && !defined(NDEBUG) && !defined(_DEBUG)) +/* For non-debug builds with assertions enabled use the special assertion handler. */ +#if defined(NDEBUG) && defined(WITH_ASSERT) #undef assert #define assert(expression) if (unlikely(!(expression))) error("Assertion failed at line %i of %s: %s", __LINE__, __FILE__, #expression); #endif -/* Asserts are enabled if NDEBUG isn't defined, or if we are using MSVC and WITH_ASSERT is defined. */ -#if !defined(NDEBUG) || (defined(_MSC_VER) && defined(WITH_ASSERT)) +/* Asserts are enabled if NDEBUG isn't defined or WITH_ASSERT is defined. */ +#if !defined(NDEBUG) || defined(WITH_ASSERT) #define OTTD_ASSERT #define assert_msg(expression, ...) if (unlikely(!(expression))) assert_msg_error(__LINE__, __FILE__, #expression, nullptr, __VA_ARGS__); #define assert_msg_tile(expression, tile, ...) if (unlikely(!(expression))) assert_msg_error(__LINE__, __FILE__, #expression, assert_tile_info(tile), __VA_ARGS__); diff --git a/src/strgen/CMakeLists.txt b/src/strgen/CMakeLists.txt new file mode 100644 index 0000000000..b8f61cde3b --- /dev/null +++ b/src/strgen/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5) + +project(strgen) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake") + +set(sourcefiles + strgen.cpp + strgen_base.cpp + ../core/alloc_func.cpp + ../misc/getoptdata.cpp + ../string.cpp +) +add_definitions(-DSTRGEN) +add_executable(strgen ${sourcefiles}) + +include(Endian) +add_endian_definition() + + +# Source Files +add_files(strgen_base.cpp) + +# Header Files +add_files(strgen.h) diff --git a/src/table/CMakeLists.txt b/src/table/CMakeLists.txt new file mode 100644 index 0000000000..8988b9a0d5 --- /dev/null +++ b/src/table/CMakeLists.txt @@ -0,0 +1,84 @@ +set(GENERATED_BINARY_DIR ${CMAKE_BINARY_DIR}/generated) +set(TABLE_BINARY_DIR ${GENERATED_BINARY_DIR}/table) + +set(TABLE_INI_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/company_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/currency_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/gameopt_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/misc_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/win32_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/window_settings.ini +) + +# Generate a command and target to create the settings table +add_custom_command_timestamp(OUTPUT ${TABLE_BINARY_DIR}/settings.h + COMMAND ${CMAKE_COMMAND} -E make_directory ${TABLE_BINARY_DIR} + COMMAND settingsgen + -o ${TABLE_BINARY_DIR}/settings.h + -b ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble + -a ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble + ${TABLE_INI_SOURCE_FILES} + DEPENDS settingsgen ${TABLE_INI_SOURCE_FILES} + ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble + ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating table/settings.h" +) +add_custom_target_timestamp(table_settings + DEPENDS + ${TABLE_BINARY_DIR}/settings.h +) + +add_library(settings + INTERFACE +) +target_include_directories(settings + INTERFACE + ${GENERATED_BINARY_DIR} +) +add_dependencies(settings + table_settings +) +add_library(openttd::settings ALIAS settings) + +add_files( + airport_defaults.h + airport_movement.h + airporttile_ids.h + airporttiles.h + animcursors.h + autorail.h + bridge_land.h + build_industry.h + cargo_const.h + clear_land.h + control_codes.h + darklight_colours.h + elrail_data.h + engines.h + genland.h + heightmap_colours.h + industry_land.h + landscape_sprite.h + newgrf_debug_data.h + object_land.h + palette_convert.h + palettes.h + pricebase.h + railtypes.h + road_land.h + roadtypes.h + roadveh_movement.h + sprites.h + station_land.h + strgen_tables.h + string_colours.h + town_land.h + townname.h + track_land.h + train_cmd.h + tree_land.h + unicode.h + water_land.h +) diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt new file mode 100644 index 0000000000..c6251e9391 --- /dev/null +++ b/src/video/CMakeLists.txt @@ -0,0 +1,35 @@ +add_subdirectory(cocoa) + +if (NOT OPTION_DEDICATED) + add_files( + allegro_v.cpp + allegro_v.h + CONDITION Allegro_FOUND + ) + + add_files( + sdl_v.cpp + sdl_v.h + CONDITION SDL_FOUND + ) + + add_files( + sdl2_v.cpp + sdl2_v.h + CONDITION SDL2_FOUND + ) + + add_files( + win32_v.cpp + win32_v.h + CONDITION WIN32 + ) +endif (NOT OPTION_DEDICATED) + +add_files( + dedicated_v.cpp + dedicated_v.h + null_v.cpp + null_v.h + video_driver.hpp +) diff --git a/src/video/cocoa/CMakeLists.txt b/src/video/cocoa/CMakeLists.txt new file mode 100644 index 0000000000..4fff132f37 --- /dev/null +++ b/src/video/cocoa/CMakeLists.txt @@ -0,0 +1,8 @@ +add_files( + cocoa_keys.h + cocoa_v.h + cocoa_v.mm + event.mm + wnd_quartz.mm + CONDITION APPLE +) diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index d6aa2e4f77..f5d6caf8fc 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -5,7 +5,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file null_v.cpp The videio driver that doesn't blit. */ +/** @file null_v.cpp The video driver that doesn't blit. */ #include "../stdafx.h" #include "../gfx_func.h" diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 774e80b2da..60924b37ac 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -470,12 +470,10 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h, bool resize) seprintf(caption, lastof(caption), "OpenTTD %s", _openttd_revision); if (_sdl_window == nullptr) { - Uint32 flags = SDL_WINDOW_SHOWN; + Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; if (_fullscreen) { flags |= SDL_WINDOW_FULLSCREEN; - } else { - flags |= SDL_WINDOW_RESIZABLE; } _sdl_window = SDL_CreateWindow( diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt new file mode 100644 index 0000000000..0d4a85de33 --- /dev/null +++ b/src/widgets/CMakeLists.txt @@ -0,0 +1,63 @@ +add_files( + ai_widget.h + airport_widget.h + autoreplace_widget.h + bootstrap_widget.h + bridge_widget.h + build_vehicle_widget.h + cheat_widget.h + company_widget.h + console_widget.h + date_widget.h + departures_widget.h + depot_widget.h + dock_widget.h + dropdown.cpp + dropdown_func.h + dropdown_type.h + dropdown_widget.h + engine_widget.h + error_widget.h + fios_widget.h + framerate_widget.h + genworld_widget.h + goal_widget.h + graph_widget.h + group_widget.h + highscore_widget.h + industry_widget.h + intro_widget.h + link_graph_legend_widget.h + main_widget.h + misc_widget.h + music_widget.h + network_chat_widget.h + network_content_widget.h + network_widget.h + newgrf_debug_widget.h + newgrf_widget.h + news_widget.h + object_widget.h + order_widget.h + osk_widget.h + plans_widget.h + rail_widget.h + road_widget.h + screenshot_widget.h + settings_widget.h + sign_widget.h + smallmap_widget.h + station_widget.h + statusbar_widget.h + story_widget.h + subsidy_widget.h + terraform_widget.h + timetable_widget.h + toolbar_widget.h + town_widget.h + transparency_widget.h + tree_widget.h + vehicle_widget.h + viewport_widget.h + waypoint_widget.h +) diff --git a/src/window.cpp b/src/window.cpp index 1e67b71401..0d0e9995d7 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -668,7 +668,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count) WidgetType widget_type = (nw != nullptr) ? nw->type : WWT_EMPTY; bool focused_widget_changed = false; - /* If clicked on a window that previously did dot have focus */ + /* If clicked on a window that previously did not have focus */ if (_focused_window != w && // We already have focus, right? (w->window_desc->flags & WDF_NO_FOCUS) == 0 && // Don't lose focus to toolbars widget_type != WWT_CLOSEBOX) { // Don't change focused window if 'X' (close button) was clicked