From 014eb110f14f72373c6ed1fc0b3beedb87abbce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 9 Oct 2014 01:44:18 +0200 Subject: [PATCH] Add patch for SHFileOperationW. --- README.md | 3 +- patches/Makefile | 16 +++++++ ...eturn-value-for-SHFileOperationW-dep.patch | 46 +++++++++++++++++++ patches/shell32-SHFileOperation/definition | 4 ++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 patches/shell32-SHFileOperation/0001-shell32-Choose-return-value-for-SHFileOperationW-dep.patch create mode 100644 patches/shell32-SHFileOperation/definition diff --git a/README.md b/README.md index a1866751..19a193bf 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,9 @@ Wine. All those differences are also documented on the Included bugfixes and improvements ================================== -**Bugfixes and features included in the next upcoming release [1]:** +**Bugfixes and features included in the next upcoming release [2]:** +* Anno 1602 installer depends on Windows 98 behavior of SHFileOperationW * Wine ignores IDF_CHECKFIRST flag in SetupPromptForDisk ([Wine Bug #20465](http://bugs.winehq.org/show_bug.cgi?id=20465)) diff --git a/patches/Makefile b/patches/Makefile index 10a09704..98fdc0ee 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -66,6 +66,7 @@ PATCHLIST := \ shell32-Icons.ok \ shell32-RunDLL_CallEntry16.ok \ shell32-SHCreateSessionKey.ok \ + shell32-SHFileOperation.ok \ shlwapi-PathIsDirectoryEmptyW.ok \ shlwapi-UrlCombine.ok \ user32-Dialog_Paint_Event.ok \ @@ -1070,6 +1071,21 @@ shell32-SHCreateSessionKey.ok: echo '+ { "shell32-SHCreateSessionKey", "Dmitry Timoshkov", "shell32: Implement SHCreateSessionKey." },'; \ ) > shell32-SHCreateSessionKey.ok +# Patchset shell32-SHFileOperation +# | +# | Included patches: +# | * Choose return value for SHFileOperationW depending on windows version. [by Michael Müller] +# | +# | Modified files: +# | * dlls/shell32/shlfileop.c +# | +.INTERMEDIATE: shell32-SHFileOperation.ok +shell32-SHFileOperation.ok: + $(call APPLY_FILE,shell32-SHFileOperation/0001-shell32-Choose-return-value-for-SHFileOperationW-dep.patch) + @( \ + echo '+ { "shell32-SHFileOperation", "Michael Müller", "Choose return value for SHFileOperationW depending on windows version." },'; \ + ) > shell32-SHFileOperation.ok + # Patchset shlwapi-PathIsDirectoryEmptyW # | # | Included patches: diff --git a/patches/shell32-SHFileOperation/0001-shell32-Choose-return-value-for-SHFileOperationW-dep.patch b/patches/shell32-SHFileOperation/0001-shell32-Choose-return-value-for-SHFileOperationW-dep.patch new file mode 100644 index 00000000..5007d895 --- /dev/null +++ b/patches/shell32-SHFileOperation/0001-shell32-Choose-return-value-for-SHFileOperationW-dep.patch @@ -0,0 +1,46 @@ +From 3bd2667c70cd1b9ef472d353ffe16220823cdc35 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Thu, 31 Jul 2014 04:52:01 +0200 +Subject: shell32: Choose return value for SHFileOperationW depending on + windows version + +--- + dlls/shell32/shlfileop.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c +index 62d7880..249970a 100644 +--- a/dlls/shell32/shlfileop.c ++++ b/dlls/shell32/shlfileop.c +@@ -1022,7 +1022,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) + + /* empty list */ + if (!szFiles[0]) +- return ERROR_ACCESS_DENIED; ++ return ERROR_ACCESS_DENIED; /* S_OK for Windows 95/98 */ + + flList->feFiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + flList->num_alloc * sizeof(FILE_ENTRY)); +@@ -1555,7 +1555,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) + ZeroMemory(&flTo, sizeof(FILE_LIST)); + + if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) ++ { ++ if (ret != ERROR_ACCESS_DENIED) ++ return ret; ++ ++ /* Win 9X */ ++ if (GetVersion() & 0x80000000) ++ return S_OK; ++ ++ FIXME("The return value of this function call depends on the windows version.\n"); ++ FIXME("For old software it might be necessary to set the windows version to 95/98 using winecfg.\n"); ++ + return ret; ++ } + + if (lpFileOp->wFunc != FO_DELETE) + parse_file_list(&flTo, lpFileOp->pTo); +-- +1.9.1 + diff --git a/patches/shell32-SHFileOperation/definition b/patches/shell32-SHFileOperation/definition new file mode 100644 index 00000000..29b2c8a0 --- /dev/null +++ b/patches/shell32-SHFileOperation/definition @@ -0,0 +1,4 @@ +Author: Michael Müller +Subject: Choose return value for SHFileOperationW depending on windows version. +Revision: 1 +Fixes: Anno 1602 installer depends on Windows 98 behavior of SHFileOperationW