[Scummvm-git-logs] scummvm master -> a3500937a9310a9d81efb906248c1d5f636438e8

ccawley2011 ccawley2011 at gmail.com
Sun Sep 6 18:26:42 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6b669ae2fb DEVTOOLS: Fix compiling with MinGW
a3500937a9 CONFIGURE: Allow using pkg-config to detect FriBidi


Commit: 6b669ae2fb5dce1da4fe71cc783fe1191f2765cb
    https://github.com/scummvm/scummvm/commit/6b669ae2fb5dce1da4fe71cc783fe1191f2765cb
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-09-06T19:26:20+01:00

Commit Message:
DEVTOOLS: Fix compiling with MinGW

Changed paths:
    devtools/create_cryo/create_cryo_dat.cpp
    devtools/create_project/create_project.cpp
    devtools/create_supernova/create_image/create_image.cpp


diff --git a/devtools/create_cryo/create_cryo_dat.cpp b/devtools/create_cryo/create_cryo_dat.cpp
index b9b0b2852f..af3de21794 100644
--- a/devtools/create_cryo/create_cryo_dat.cpp
+++ b/devtools/create_cryo/create_cryo_dat.cpp
@@ -20,6 +20,12 @@
  *
  */
 
+// HACK to allow building with the SDL backend on MinGW
+// see bug #1800764 "TOOLS: MinGW tools building broken"
+#ifdef main
+#undef main
+#endif // main
+
 #include <stdio.h>
 
 #include "eden.h"
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 079e5da8ef..a63a87c373 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -28,6 +28,21 @@
 #undef main
 #endif // main
 
+#if (defined(_WIN32) || defined(WIN32)) && !defined(__GNUC__)
+#define USE_WIN32_API
+#endif
+
+#if (defined(_WIN32) || defined(WIN32))
+#define _WIN32_WINNT 0x0502
+#include <windows.h>
+#else
+#include <dirent.h>
+#include <errno.h>
+#include <sstream>
+#include <sys/param.h>
+#include <sys/stat.h>
+#endif
+
 #include "create_project.h"
 #include "config.h"
 
@@ -51,20 +66,6 @@
 #include <cstring>
 #include <ctime>
 
-#if (defined(_WIN32) || defined(WIN32)) && !defined(__GNUC__)
-#define USE_WIN32_API
-#endif
-
-#if (defined(_WIN32) || defined(WIN32))
-#include <windows.h>
-#else
-#include <dirent.h>
-#include <errno.h>
-#include <sstream>
-#include <sys/param.h>
-#include <sys/stat.h>
-#endif
-
 namespace {
 /**
  * Converts the given path to only use slashes as
@@ -1199,7 +1200,7 @@ int getInstalledMSVC() {
 	// Use the registry to get the latest version
 	if (latest == 0) {
 		HKEY key;
-		LSTATUS err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &key);
+		LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &key);
 		if (err == ERROR_SUCCESS && key != NULL) {
 			const MSVCList msvc = getAllMSVCVersions();
 			for (MSVCList::const_reverse_iterator i = msvc.rbegin(); i != msvc.rend(); ++i) {
diff --git a/devtools/create_supernova/create_image/create_image.cpp b/devtools/create_supernova/create_image/create_image.cpp
index 6f71a0c440..e2499f954c 100644
--- a/devtools/create_supernova/create_image/create_image.cpp
+++ b/devtools/create_supernova/create_image/create_image.cpp
@@ -1,3 +1,9 @@
+// HACK to allow building with the SDL backend on MinGW
+// see bug #1800764 "TOOLS: MinGW tools building broken"
+#ifdef main
+#undef main
+#endif // main
+
 #include <fstream>
 #include <iostream>
 #include <sstream>


Commit: a3500937a9310a9d81efb906248c1d5f636438e8
    https://github.com/scummvm/scummvm/commit/a3500937a9310a9d81efb906248c1d5f636438e8
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-09-06T19:26:20+01:00

Commit Message:
CONFIGURE: Allow using pkg-config to detect FriBidi

Changed paths:
    configure


diff --git a/configure b/configure
index f1f5f821b3..854a6eadca 100755
--- a/configure
+++ b/configure
@@ -5416,13 +5416,19 @@ define_in_config_if_yes $_pandoc 'USE_PANDOC'
 # Check for FriBidi
 #
 echocheck "FriBidi"
+if test "$_pkg_config" = "yes" && $_pkgconfig --exists fribidi; then
+	append_var FRIBIDI_LIBS "`$_pkgconfig --libs fribidi`"
+	append_var FRIBIDI_CFLAGS "`$_pkgconfig --cflags fribidi`"
+else
+	append_var FRIBIDI_LIBS "-lfribidi"
+fi
 if test "$_fribidi" = auto ; then
 	_fribidi=no
 	cat > $TMPC << EOF
 #include <fribidi/fribidi.h>
 int main(void) { return 0; }
 EOF
-	cc_check $FRIBIDI_CFLAGS $FRIBIDI_LIBS -lfribidi && _fribidi=yes
+	cc_check $FRIBIDI_CFLAGS $FRIBIDI_LIBS && _fribidi=yes
 fi
 if test "$_fribidi" = yes ; then
 	append_var LIBS "$FRIBIDI_LIBS -lfribidi"




More information about the Scummvm-git-logs mailing list