]> granicus.if.org Git - nethack/commitdiff
more folder bits
authornhmall <nhmall@nethack.org>
Wed, 30 Oct 2019 22:34:03 +0000 (18:34 -0400)
committernhmall <nhmall@nethack.org>
Wed, 30 Oct 2019 22:34:03 +0000 (18:34 -0400)
.travis.yml
sys/winnt/windmain.c

index a83a0bee6dc2ba97c95fad0749dcd7951dedb569..06c78402b03ff2dd1a7f18eb1459d3ac10d381c6 100644 (file)
@@ -78,7 +78,7 @@ matrix:
 #     install: choco install mingw
       env: DESCR=windows-mingw
       script:
-        - find /c -iname 'Shlobj.h' -print
+#        - find /c -iname 'Shlobj.h' -print
         - git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses
         - export ADD_CURSES=Y
         - export PDCURSES_TOP=../../pdcurses
index 0c91294bb646b7ac3dd02989dab92e127f161101..1e140b0d686caeb50f8b78f812475ac7e2190504 100644 (file)
@@ -13,8 +13,6 @@
 #include <errno.h>
 #ifndef __MINGW32__
 #include <appmodel.h>
-#else
-#include <knownfolders.h>
 #endif
 #include <ShlObj.h>
 
@@ -23,6 +21,14 @@ extern LONG GetCurrentPackageFullName(UINT32 *packageFullNameLength,
                       PWSTR  packageFullName);
 extern HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid,
                       DWORD dwFlags, HANDLE hToken, PWSTR  *ppszPath);
+#ifdef INITGUID
+#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2,{ b1, b2, b3, b4, b5, b6, b7, b8 } }
+#else
+#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID name
+#endif
+DEFINE_KNOWN_FOLDER (FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97);
+DEFINE_KNOWN_FOLDER (FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91);
+DEFINE_KNOWN_FOLDER (FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73);
 #endif
 
 #if 0