diff options
| author | past-due <30942300+past-due@users.noreply.github.com> | 2018-11-28 18:33:10 -0500 |
|---|---|---|
| committer | past-due <30942300+past-due@users.noreply.github.com> | 2018-11-28 18:33:10 -0500 |
| commit | 1225d80d11124aaa0be7f437772c1b3b9db5efc1 (patch) | |
| tree | 3fa2a3edc6e14034118a355e7f08f1cfc4085b93 | |
| parent | d562441fc96e160444cf476351b986bd410e5a2b (diff) | |
| download | vcpkg-1225d80d11124aaa0be7f437772c1b3b9db5efc1.tar.gz vcpkg-1225d80d11124aaa0be7f437772c1b3b9db5efc1.zip | |
[physfs] Fix Win10 GetUserProfileDirectory() problem
Fixes GetUserProfileDirectory issue on Win10 build 1809(+?)
See: https://hg.icculus.org/icculus/physfs/rev/ece6769c0676
| -rw-r--r-- | ports/physfs/CONTROL | 2 | ||||
| -rw-r--r-- | ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch | 25 | ||||
| -rw-r--r-- | ports/physfs/portfile.cmake | 8 |
3 files changed, 33 insertions, 2 deletions
diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index a937d38bf..5d5d69755 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 3.0.1 +Version: 3.0.1-1 Description: a library to provide abstract access to various archives Build-Depends: zlib diff --git a/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch b/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch new file mode 100644 index 000000000..4338e52e5 --- /dev/null +++ b/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch @@ -0,0 +1,25 @@ + +diff -r a29fef4a20fd -r ece6769c0676 src/physfs_platform_windows.c +--- a/src/physfs_platform_windows.c Wed May 16 19:54:51 2018 -0400 ++++ b/src/physfs_platform_windows.c Wed Oct 03 22:40:57 2018 -0400 +@@ -566,7 +566,6 @@ + else + { + DWORD psize = 0; +- WCHAR dummy = 0; + LPWSTR wstr = NULL; + BOOL rc = 0; + +@@ -575,7 +574,7 @@ + * psize. Also note that the second parameter can't be + * NULL or the function fails. + */ +- rc = pGetDir(accessToken, &dummy, &psize); ++ rc = pGetDir(accessToken, NULL, &psize); + GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ + + /* Allocate memory for the profile directory */ + + + + diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index 08b49e69f..feee3b456 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -6,7 +6,13 @@ vcpkg_download_distfile(ARCHIVE FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" SHA512 ddf3b075ccb506da5e9a1ce96001be402752b9b777c2e816a85d48aff3626ff0886ea43eb07bd300fe3a9f59b9a002f54d822c51d483a4ee94b38378534c1879 ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PHYSFS_VERSION} + PATCHES + physfs.3.0.1.GetUserProfileDirectory.patch # Fixes GetUserProfileDirectory issue on Win10 build 1809(+?); See: https://hg.icculus.org/icculus/physfs/rev/ece6769c0676 +) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) |
