Skip to content
Permalink
Browse files

Remove: DOS support

In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.

Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.

Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.

By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.

Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
  • Loading branch information...
TrueBrain committed Mar 19, 2019
1 parent 559d4e8 commit 72c5f2b3eed77120d86ecf636e07c71eb23b4bd5
Showing with 21 additions and 1,305 deletions.
  1. +0 −6 Makefile.bundle.in
  2. +0 −4 Makefile.src.in
  3. +0 −22 README.md
  4. +14 −22 config.lib
  5. +1 −2 configure
  6. +0 −3 os/dos/cwsdpmi/README.licensing
  7. BIN os/dos/cwsdpmi/cwsdpmi.exe
  8. +0 −173 os/dos/cwsdpmi/cwsdpmi.txt
  9. BIN os/dos/cwsdpmi/cwsdstub.exe
  10. +0 −3 os/dos/exe2coff/README.licensing
  11. +0 −339 os/dos/exe2coff/copying
  12. +0 −48 os/dos/exe2coff/copying.dj
  13. +0 −481 os/dos/exe2coff/copying.lib
  14. +0 −94 os/dos/exe2coff/exe2coff.c
  15. +0 −11 os/dos/make_dos_binary_selfcontained.sh
  16. +1 −4 source.list
  17. +1 −1 src/core/endian_type.hpp
  18. +1 −1 src/cpu.cpp
  19. +1 −5 src/fileio.cpp
  20. +0 −2 src/intro_gui.cpp
  21. +0 −1 src/lang/afrikaans.txt
  22. +0 −1 src/lang/arabic_egypt.txt
  23. +0 −1 src/lang/basque.txt
  24. +0 −1 src/lang/belarusian.txt
  25. +0 −1 src/lang/brazilian_portuguese.txt
  26. +0 −1 src/lang/bulgarian.txt
  27. +0 −1 src/lang/catalan.txt
  28. +0 −1 src/lang/croatian.txt
  29. +0 −1 src/lang/czech.txt
  30. +0 −1 src/lang/danish.txt
  31. +0 −1 src/lang/dutch.txt
  32. +0 −1 src/lang/english.txt
  33. +0 −1 src/lang/english_AU.txt
  34. +0 −1 src/lang/english_US.txt
  35. +0 −1 src/lang/esperanto.txt
  36. +0 −1 src/lang/estonian.txt
  37. +0 −1 src/lang/faroese.txt
  38. +0 −1 src/lang/finnish.txt
  39. +0 −1 src/lang/french.txt
  40. +0 −1 src/lang/gaelic.txt
  41. +0 −1 src/lang/galician.txt
  42. +0 −1 src/lang/german.txt
  43. +0 −1 src/lang/greek.txt
  44. +0 −1 src/lang/hebrew.txt
  45. +0 −1 src/lang/hungarian.txt
  46. +0 −1 src/lang/icelandic.txt
  47. +0 −1 src/lang/indonesian.txt
  48. +0 −1 src/lang/irish.txt
  49. +0 −1 src/lang/italian.txt
  50. +0 −1 src/lang/japanese.txt
  51. +0 −1 src/lang/korean.txt
  52. +0 −1 src/lang/latin.txt
  53. +0 −1 src/lang/latvian.txt
  54. +0 −1 src/lang/lithuanian.txt
  55. +0 −1 src/lang/luxembourgish.txt
  56. +0 −1 src/lang/malay.txt
  57. +0 −1 src/lang/norwegian_bokmal.txt
  58. +0 −1 src/lang/norwegian_nynorsk.txt
  59. +0 −1 src/lang/polish.txt
  60. +0 −1 src/lang/portuguese.txt
  61. +0 −1 src/lang/romanian.txt
  62. +0 −1 src/lang/russian.txt
  63. +0 −1 src/lang/serbian.txt
  64. +0 −1 src/lang/simplified_chinese.txt
  65. +0 −1 src/lang/slovak.txt
  66. +0 −1 src/lang/slovenian.txt
  67. +0 −1 src/lang/spanish.txt
  68. +0 −1 src/lang/spanish_MX.txt
  69. +0 −1 src/lang/swedish.txt
  70. +0 −1 src/lang/tamil.txt
  71. +0 −1 src/lang/thai.txt
  72. +0 −1 src/lang/traditional_chinese.txt
  73. +0 −1 src/lang/turkish.txt
  74. +0 −1 src/lang/ukrainian.txt
  75. +0 −1 src/lang/unfinished/chuvash.txt
  76. +0 −1 src/lang/unfinished/frisian.txt
  77. +0 −1 src/lang/unfinished/persian.txt
  78. +0 −1 src/lang/unfinished/urdu.txt
  79. +0 −1 src/lang/vietnamese.txt
  80. +0 −1 src/lang/welsh.txt
  81. +1 −13 src/stdafx.h
  82. +1 −11 src/video/allegro_v.cpp
@@ -89,12 +89,6 @@ ifdef MENU_DIR
endif
ifeq ($(TTD), openttd.exe)
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
ifeq ($(OS), DOS)
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/"
ifndef STRIP
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.exe" "$(TTD_DIR)/"
endif
endif
endif

### Packing the current bundle into several compressed file formats ###
@@ -270,10 +270,6 @@ $(TTD): $(OBJS) $(CONFIG_CACHE_LINKER)
ifdef STRIP
$(Q)$(STRIP) $@
endif
ifeq ($(OS), DOS)
$(E) '$(STAGE) Adding CWSDPMI stub to $@'
$(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@
endif

# Revision files

@@ -152,7 +152,6 @@ OpenTTD has been ported to several platforms and operating systems. It should
not be very difficult to port it to a new platform. The currently working
platforms are:
- DOS (Allegro)
- FreeBSD (SDL)
- Haiku (SDL)
- Linux (SDL or Allegro)
@@ -555,17 +554,6 @@ Use '`make`', but do a '`./configure`' before the first build.
A comprehensive GNU build environment is required to build the OS/2 version.
See the docs/Readme_OS2.txt file for more information.
### DOS:
A build environment with DJGPP is needed as well as libraries such as
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
website. Compilation is straight forward: use '`make`', but do a '`./configure`'
before the first build. The build binary will need cwsdpmi.exe to be in
the same directory as the openttd executable. cwsdpmi.exe can be found in
the os/dos/cwsdpmi subdirectory. If you compile with stripping turned on a
binary will be generated that does not need cwsdpmi.exe by adding the
cswdstub.exe to the created OpenTTD binary.
### 7.1) Required/optional libraries
The following libraries are used by OpenTTD for:
@@ -752,16 +740,6 @@ License 2.1, and partly under the (3-clause) BSD license. The exact licensing
terms can be found in src/3rdparty/os2/getaddrinfo.c resp.
src/3rdparty/os2/getnameinfo.c.
The exe2coff implementation in os/dos/exe2coff is available under the
GPL, with a number of additional terms. See os/dos/exe2coff/copying and
os/dos/exe2coff/copying.dj for the exact licensing terms.
The CWSDPMI implementation in os/dos/cwsdpmi is distributed under a
custom binary-only license that prohibits modification. The exact
licensing terms can be found in os/dos/cwsdpmi/cwsdpmi.txt. The sources
for these files can be downloaded at its author site, at
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip.
CONTRIBUTING.md is adapted from
[Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
under the [Creative Commons Attribution 3.0 Unported
@@ -553,10 +553,10 @@ check_params() {

# Check if all params have valid values

# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS)$'`" ]; then
# 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|DOS]"
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
@@ -623,7 +623,7 @@ check_params() {
detect_sse_capable_architecture

if [ "$enable_static" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
enable_static="2"
else
enable_static="0"
@@ -633,8 +633,8 @@ check_params() {
if [ "$enable_static" != "0" ]; then
log 1 "checking static... yes"

if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ]; then
log 1 "WARNING: static is only known to work on Windows, DOS, and MacOSX"
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
@@ -644,7 +644,7 @@ check_params() {
fi

if [ "$enable_unicode" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
enable_unicode="2"
else
enable_unicode="0"
@@ -784,10 +784,7 @@ check_params() {
log 1 "checking console application... enabled"
fi

if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then
log 1 "checking network... DOS, skipping"
enable_network=0
elif [ "$enable_network" != "0" ]; then
if [ "$enable_network" != "0" ]; then
log 1 "checking network... found"
else
log 1 "checking network... disabled"
@@ -1023,10 +1020,6 @@ check_params() {
grfcodec=""
fi

if [ "$os" = "DOS" ]; then
with_threads="0"
fi

if [ "$os" != "OSX" ] && [ "$with_application_bundle" != "0" ]; then
if [ "$with_application_bundle" = "1" ]; then
with_application_bundle="0"
@@ -1129,7 +1122,7 @@ check_params() {
fi

if [ "$personal_dir" = "1" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "HAIKU" ]; then
personal_dir="OpenTTD"
elif [ "$os" = "OSX" ]; then
personal_dir="Documents/OpenTTD"
@@ -1603,11 +1596,11 @@ make_cflags_and_ldflags() {
fi
fi

if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then
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" != "DOS" ]; then
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "MINGW" ]; then
LIBS="$LIBS -lc"
fi

@@ -2328,7 +2321,7 @@ detect_awk() {

detect_os() {
if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, SUNOS, CYGWIN, MINGW, OS2, and DOS
# 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 '
@@ -2345,7 +2338,6 @@ detect_os() {
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
/dos/ { print "DOS"; exit}
'`

if [ -z "$os" ]; then
@@ -2369,7 +2361,7 @@ detect_os() {
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, OS2, and DOS"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, HAIKU, SUNOS, CYGWIN, MINGW, and OS2"
exit 1
fi

@@ -3453,7 +3445,7 @@ showhelp() {
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/DOS/HAIKU"
echo " MINGW/OS2/HAIKU"
echo ""
echo "Paths:"
echo " --prefix-dir=dir specifies the prefix for all installed"
@@ -75,7 +75,7 @@ save_params
make_cflags_and_ldflags

EXE=""
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ]; then
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ]; then
EXE=".exe"
fi

@@ -116,7 +116,6 @@ AWKCOMMAND='
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
if ($0 == "DOS" && "'$os'" != "DOS") { next; }
if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; }
if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; }

This file was deleted.

Oops, something went wrong.
Binary file not shown.

This file was deleted.

Oops, something went wrong.
Binary file not shown.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 72c5f2b

Please sign in to comment.
You can’t perform that action at this time.