DEVTOOLS: Fix compiling with MinGW
This commit is contained in:
parent
5ae7976242
commit
f572ce3d9e
3 changed files with 28 additions and 15 deletions
|
@ -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 <stdio.h>
|
||||||
|
|
||||||
#include "eden.h"
|
#include "eden.h"
|
||||||
|
|
|
@ -28,6 +28,21 @@
|
||||||
#undef main
|
#undef main
|
||||||
#endif // 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 "create_project.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
@ -51,20 +66,6 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#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 {
|
namespace {
|
||||||
/**
|
/**
|
||||||
* Converts the given path to only use slashes as
|
* Converts the given path to only use slashes as
|
||||||
|
@ -1199,7 +1200,7 @@ int getInstalledMSVC() {
|
||||||
// Use the registry to get the latest version
|
// Use the registry to get the latest version
|
||||||
if (latest == 0) {
|
if (latest == 0) {
|
||||||
HKEY key;
|
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) {
|
if (err == ERROR_SUCCESS && key != NULL) {
|
||||||
const MSVCList msvc = getAllMSVCVersions();
|
const MSVCList msvc = getAllMSVCVersions();
|
||||||
for (MSVCList::const_reverse_iterator i = msvc.rbegin(); i != msvc.rend(); ++i) {
|
for (MSVCList::const_reverse_iterator i = msvc.rbegin(); i != msvc.rend(); ++i) {
|
||||||
|
|
|
@ -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 <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue