shithub: choc

Download patch

ref: e9b9fefcf6b8163de9062430118fd626e79fa2c2
parent: 6904023bfd41b6ee6cd7cc2903e0a142644d9594
author: Fabian Greffrath <fabian@greffrath.com>
date: Tue Dec 18 04:19:22 EST 2018

setup: fix building on Windows

--- a/src/setup/execute.c
+++ b/src/setup/execute.c
@@ -27,6 +27,7 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <process.h>
+#include <shellapi.h>
 
 #else
 
@@ -146,7 +147,7 @@
 boolean OpenFolder(const char *path)
 {
     // "If the function succeeds, it returns a value greater than 32."
-    return ShellExecute(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
+    return (int)ShellExecute(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
 }
 
 // Wait for the specified process to exit.  Returns the exit code.