OpenRCT2 on ReactOS

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
User avatar
janisozaur
Posts: 2
Joined: Sun May 07, 2017 10:56 pm

OpenRCT2 on ReactOS

Post by janisozaur »

This is a copy of a post I made on reddit: https://www.reddit.com/r/reactos/commen ... actos_044/


Hi, OpenRCT2 dev here.

Since I'm maintaining Linux side of our project, ability to compile with Mingw-w64 is important to me when I need to check various things.

Due to that fact, I can also produce builds for platforms that Windows cannot really target anymore, like winnt 5.1. We have made upstream target winnt>=6.0, but there is very little platform code, so reverting it was trivial.

Long story short, here's the obligatory screenshot: [ external image ]https://imgur.com/gallery/H0TdZ

Here's my branch: https://github.com/janisozaur/OpenRCT2/tree/reactos, it was verified working on ArchLinux with Mingw-w64 5.0.2

Since the patch is very small, I'll also quote it down below to help preserve it.

You can fetch a mostly-static test build I made from this link: https://transfer.sh/duCn9/openrct2-reactos.zip – it will autoexpire in two weeks' time. Feel free to mirror it elsewhere if you want to.

OpenRCT2 uses following libs:
  • sdl2
  • sdl2-ttf (can be disabled)
  • fontconfig (can be disabled)
  • libzip (>= 1.0)
  • libpng (>= 1.2)
  • speexdsp
  • curl (only if building with http support)
  • jansson (>= 2.5)
  • openssl (>= 1.0; only if building with multiplayer support)
  • iconv (part of glibc on Linux)
  • zlib
  • gl (commonly provided by Mesa or GPU vendors; can be disabled)
  • cmake
More info on our GitHub page: https://github.com/OpenRCT2/OpenRCT2 or in this post: https://www.reddit.com/r/pcgaming/comme ... d/dd3li3g/

Code: Select all

diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c
index cc528147a..68f6970b8 100644
--- a/src/openrct2/platform/windows.c
+++ b/src/openrct2/platform/windows.c
@@ -14,12 +14,6 @@
  *****************************************************************************/
 #pragma endregion
 
-#ifdef __MINGW32__
-// 0x0600 == vista
-#define WINVER 0x0600
-#define _WIN32_WINNT 0x0600
-#endif // __MINGW32__
-
 #include "../common.h"
 
 #ifdef __WINDOWS__
@@ -954,10 +948,10 @@ uint8 platform_get_locale_date_format()
 {
 	// Retrieve short date format, eg "MM/dd/yyyy"
 	wchar_t dateFormat[20];
-	if (GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SSHORTDATE, dateFormat, sizeof(dateFormat)) == 0)
-	{
+	//if (GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SSHORTDATE, dateFormat, sizeof(dateFormat)) == 0)
+	//{
 		return DATE_FORMAT_DAY_MONTH_YEAR;
-	}
+	//}
 
 	// The only valid characters for format types are: dgyM
 	// We try to find 3 strings of format types, ignore any characters in between.
@@ -1023,7 +1017,7 @@ void platform_get_exe_path(utf8 *outPath, size_t outSize)
 	GetModuleFileNameW(NULL, exePath, MAX_PATH);
 	exeDelimiter = wcsrchr(exePath, *PATH_SEPARATOR);
 	*exeDelimiter = L'\0';
-	wcscpy_s(tempPath, MAX_PATH, exePath);
+	wcscpy(tempPath, exePath);
 	_wfullpath(exePath, tempPath, MAX_PATH);
 	WideCharToMultiByte(CP_UTF8, 0, exePath, MAX_PATH, outPath, (sint32) outSize, NULL, NULL);
 }
@@ -1081,6 +1075,7 @@ utf8* platform_get_username() {
 	return username;
 }
 
+#ifndef __MINGW32__
 ///////////////////////////////////////////////////////////////////////////////
 // File association setup
 ///////////////////////////////////////////////////////////////////////////////
@@ -1276,6 +1271,7 @@ bool platform_setup_uri_protocol()
 	return false;
 }
 
+#endif
 ///////////////////////////////////////////////////////////////////////////////
 
 sint32 platform_get_non_window_flags()
User avatar
EmuandCo
Developer
Posts: 4730
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: OpenRCT2 on ReactOS

Post by EmuandCo »

Cool, I didnt know that RCT was reversed, too. Nice to see that one running on ROS :D
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
User avatar
janisozaur
Posts: 2
Joined: Sun May 07, 2017 10:56 pm

Re: OpenRCT2 on ReactOS

Post by janisozaur »

What are the chances of having the screenshot included in the gallery?
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests