diff --git a/Makefile.src.in b/Makefile.src.in
index 739a9aa3bc..e0083ce2a6 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -278,8 +278,8 @@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp
-$(SRC_DIR)/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/ottdres.rc.in
- $(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/ottdres.rc
+$(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@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/os/windows/ottdres.rc
FORCE:
@@ -290,7 +290,7 @@ clean:
$(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_ENDIAN) $(CONFIG_CACHE_SOURCE) $(ENDIAN_TARGETS)
mrproper: clean
- $(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/ottdres.rc
+ $(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]'
diff --git a/os/win32/installer/build_installers.bat b/os/windows/installer/build_installers.bat
similarity index 100%
rename from os/win32/installer/build_installers.bat
rename to os/windows/installer/build_installers.bat
diff --git a/os/win32/installer/cdfinder.ini b/os/windows/installer/cdfinder.ini
similarity index 100%
rename from os/win32/installer/cdfinder.ini
rename to os/windows/installer/cdfinder.ini
diff --git a/os/win32/installer/install.nsi b/os/windows/installer/install.nsi
similarity index 100%
rename from os/win32/installer/install.nsi
rename to os/windows/installer/install.nsi
diff --git a/os/win32/installer/top.bmp b/os/windows/installer/top.bmp
similarity index 100%
rename from os/win32/installer/top.bmp
rename to os/windows/installer/top.bmp
diff --git a/os/win32/installer/version_win32.txt b/os/windows/installer/version_win32.txt
similarity index 100%
rename from os/win32/installer/version_win32.txt
rename to os/windows/installer/version_win32.txt
diff --git a/os/win32/installer/version_win64.txt b/os/windows/installer/version_win64.txt
similarity index 100%
rename from os/win32/installer/version_win64.txt
rename to os/windows/installer/version_win64.txt
diff --git a/os/win32/installer/version_win9x.txt b/os/windows/installer/version_win9x.txt
similarity index 100%
rename from os/win32/installer/version_win9x.txt
rename to os/windows/installer/version_win9x.txt
diff --git a/os/win32/installer/welcome.bmp b/os/windows/installer/welcome.bmp
similarity index 100%
rename from os/win32/installer/welcome.bmp
rename to os/windows/installer/welcome.bmp
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 7104b833a1..1c6f48552d 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -44,7 +44,7 @@ Sub UpdateFiles(version)
End If
UpdateFile modified, revision, version, cur_date, "../src/rev.cpp"
- UpdateFile modified, revision, version, cur_date, "../src/ottdres.rc"
+ UpdateFile modified, revision, version, cur_date, "../src/os/windows/ottdres.rc"
End Sub
Function ReadRegistryKey(shive, subkey, valuename, architecture)
@@ -286,6 +286,6 @@ End Function
Dim version
version = DetermineSVNVersion
-If Not (IsCachedVersion(version) And CheckFile("../src/rev.cpp") And CheckFile("../src/ottdres.rc")) Then
+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/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 9e868d5f67..566353e7bb 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -16,7 +16,7 @@
@@ -652,7 +652,7 @@
>
@@ -458,7 +458,7 @@
Filter="asm"
>
@@ -649,7 +649,7 @@
>
@@ -455,7 +455,7 @@
Filter="asm"
>
#include /* SHGetFolderPath */
-#include "win32.h"
+#include "os/windows/win32.h"
/**
* Get the short DOS 8.3 format for paths.
diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp
index 5042571ad5..988884b8f3 100644
--- a/src/music/dmusic.cpp
+++ b/src/music/dmusic.cpp
@@ -16,7 +16,7 @@
#undef WIN32_LEAN_AND_MEAN // Don't exclude rarely-used stuff from Windows headers
#endif
#include "../debug.h"
-#include "../win32.h"
+#include "../os/windows/win32.h"
#include "dmusic.h"
#include
diff --git a/src/os2.cpp b/src/os/os2/os2.cpp
similarity index 94%
rename from src/os2.cpp
rename to src/os/os2/os2.cpp
index a40a46c844..06508b3618 100644
--- a/src/os2.cpp
+++ b/src/os/os2/os2.cpp
@@ -9,16 +9,16 @@
/** @file os2.cpp OS2 related OS support. */
-#include "stdafx.h"
-#include "openttd.h"
-#include "variables.h"
-#include "gui.h"
-#include "fileio_func.h"
-#include "fios.h"
-#include "functions.h"
-#include "core/random_func.hpp"
-#include "string_func.h"
-#include "textbuf_gui.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../variables.h"
+#include "../../gui.h"
+#include "../../fileio_func.h"
+#include "../../fios.h"
+#include "../../functions.h"
+#include "../../core/random_func.hpp"
+#include "../../string_func.h"
+#include "../../textbuf_gui.h"
#include "table/strings.h"
diff --git a/src/unix.cpp b/src/os/unix/unix.cpp
similarity index 97%
rename from src/unix.cpp
rename to src/os/unix/unix.cpp
index dc55a3a37a..bbe916c57f 100644
--- a/src/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -9,12 +9,12 @@
/** @file unix.cpp Implementation of Unix specific file handling. */
-#include "stdafx.h"
-#include "openttd.h"
-#include "variables.h"
-#include "textbuf_gui.h"
-#include "functions.h"
-#include "core/random_func.hpp"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../variables.h"
+#include "../../textbuf_gui.h"
+#include "../../functions.h"
+#include "../../core/random_func.hpp"
#include "table/strings.h"
@@ -117,8 +117,8 @@ bool FiosIsHiddenFile(const struct dirent *ent)
#include
#include
-#include "debug.h"
-#include "string_func.h"
+#include "../../debug.h"
+#include "../../string_func.h"
const char *GetCurrentLocale(const char *param);
diff --git a/src/masm64.rules b/src/os/windows/masm64.rules
similarity index 100%
rename from src/masm64.rules
rename to src/os/windows/masm64.rules
diff --git a/src/ottdres.rc.in b/src/os/windows/ottdres.rc.in
similarity index 100%
rename from src/ottdres.rc.in
rename to src/os/windows/ottdres.rc.in
diff --git a/src/win32.cpp b/src/os/windows/win32.cpp
similarity index 98%
rename from src/win32.cpp
rename to src/os/windows/win32.cpp
index d262abebdd..432755fbe4 100644
--- a/src/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -9,35 +9,35 @@
/** @file win32.cpp Implementation of MS Windows system calls */
-#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "saveload/saveload.h"
-#include "gfx_func.h"
-#include "textbuf_gui.h"
-#include "fileio_func.h"
-#include "fios.h"
-#include "rev.h"
+#include "../../stdafx.h"
+#include "../../openttd.h"
+#include "../../debug.h"
+#include "../../saveload/saveload.h"
+#include "../../gfx_func.h"
+#include "../../textbuf_gui.h"
+#include "../../fileio_func.h"
+#include "../../fios.h"
+#include "../../rev.h"
#include
#include
#include
#include
#include /* SHGetFolderPath */
-#include "variables.h"
+#include "../../variables.h"
#include "win32.h"
-#include "core/alloc_func.hpp"
-#include "functions.h"
-#include "core/random_func.hpp"
-#include "core/bitmath_func.hpp"
-#include "string_func.h"
-#include "gamelog.h"
+#include "../../core/alloc_func.hpp"
+#include "../../functions.h"
+#include "../../core/random_func.hpp"
+#include "../../core/bitmath_func.hpp"
+#include "../../string_func.h"
+#include "../../gamelog.h"
#include
#include
#include
#include
#if defined(_MSC_VER) && !defined(WINCE)
#include
- #include "strings_func.h"
+ #include "../../strings_func.h"
#endif
static bool _has_console;
diff --git a/src/win32.h b/src/os/windows/win32.h
similarity index 100%
rename from src/win32.h
rename to src/os/windows/win32.h
diff --git a/src/win64.asm b/src/os/windows/win64.asm
similarity index 100%
rename from src/win64.asm
rename to src/os/windows/win64.asm
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index fffb867708..efa4295edc 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -13,7 +13,7 @@
#include "../openttd.h"
#include "../gfx_func.h"
#include "../variables.h"
-#include "../win32.h"
+#include "../os/windows/win32.h"
#include "../rev.h"
#include "../blitter/factory.hpp"
#include "../network/network.h"