[Scummvm-git-logs] scummvm master -> c245ef06032d7384638e3bd5fbaf2bc9ca74f2f9
dreammaster
noreply at scummvm.org
Thu May 19 03:14:10 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c245ef0603 DEVTOOLS: Fix Visual Studio compilation for create_engine
Commit: c245ef06032d7384638e3bd5fbaf2bc9ca74f2f9
https://github.com/scummvm/scummvm/commit/c245ef06032d7384638e3bd5fbaf2bc9ca74f2f9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-05-18T20:13:57-07:00
Commit Message:
DEVTOOLS: Fix Visual Studio compilation for create_engine
Changed paths:
devtools/create_engine/create_engine.cpp
diff --git a/devtools/create_engine/create_engine.cpp b/devtools/create_engine/create_engine.cpp
index 13f29c60ab9..3757798baa9 100644
--- a/devtools/create_engine/create_engine.cpp
+++ b/devtools/create_engine/create_engine.cpp
@@ -25,7 +25,11 @@
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
+#ifdef _MSC_VER
+#include <windows.h>
+#else
#include <unistd.h>
+#endif
// Specified engine name with different cases
#define MAX_LINE_LENGTH 256
@@ -176,10 +180,18 @@ int main(int argc, char *argv[]) {
char prefix[100];
char prefix2[100];
+#ifdef _MSC_VER
+ if (GetFileAttributesA("../../engines") != INVALID_FILE_ATTRIBUTES) {
+#else
if (!access("../../engines", F_OK)) {
+#endif
strcpy(prefix, "../..");
strcpy(prefix2, ".");
+#ifdef _MSC_VER
+ } else if (GetFileAttributesA("engines") != INVALID_FILE_ATTRIBUTES) {
+#else
} else if (!access("engines", F_OK)) {
+#endif
strcpy(prefix, ".");
strcpy(prefix2, "devtools/create_engine");
} else {
@@ -195,7 +207,11 @@ int main(int argc, char *argv[]) {
printf("Creating directory %s...", folder);
fflush(stdout);
+#ifdef _MSC_VER
+ if (!CreateDirectoryA(folder, NULL)) {
+#else
if (mkdir(folder, 0755)) {
+#endif
printf("Could not create engine folder.\n");
return 0;
}
More information about the Scummvm-git-logs
mailing list