mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
setupapi-SetupPromptForDisk: Added patch to determine path to system32 directory at runtime.
This commit is contained in:
parent
2b8aff1781
commit
92510a34ed
@ -6245,9 +6245,11 @@ fi
|
||||
if test "$enable_setupapi_SetupPromptForDisk" -eq 1; then
|
||||
patch_apply setupapi-SetupPromptForDisk/0001-setupapi-Add-support-for-IDF_CHECKFIRST-flag-in-Setu.patch
|
||||
patch_apply setupapi-SetupPromptForDisk/0002-setupapi-tests-Add-test-for-IDF_CHECKFIRST-and-Setup.patch
|
||||
patch_apply setupapi-SetupPromptForDisk/0003-setupapi-tests-Determine-path-to-system32-directory-.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "setupapi: Add support for IDF_CHECKFIRST flag in SetupPromptForDiskW.", 1 },';
|
||||
echo '+ { "Michael Müller", "setupapi/tests: Add test for IDF_CHECKFIRST and SetupPromptForDiskA/W.", 1 },';
|
||||
echo '+ { "Hermes Belusca-Maito", "setupapi/tests: Determine path to system32 directory at runtime.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 6305ff73db48b24ce806ddc3f345bca987ea2933 Mon Sep 17 00:00:00 2001
|
||||
From: Hermes Belusca-Maito <hermes.belusca-maito@reactos.org>
|
||||
Date: Sun, 9 Oct 2016 19:09:09 +0200
|
||||
Subject: setupapi/tests: Determine path to system32 directory at runtime.
|
||||
|
||||
---
|
||||
dlls/setupapi/tests/dialog.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/setupapi/tests/dialog.c b/dlls/setupapi/tests/dialog.c
|
||||
index 973b1fc..8b47350 100644
|
||||
--- a/dlls/setupapi/tests/dialog.c
|
||||
+++ b/dlls/setupapi/tests/dialog.c
|
||||
@@ -32,12 +32,14 @@
|
||||
|
||||
static void test_SetupPromptForDiskA(void)
|
||||
{
|
||||
- char path[] = "C:\\windows\\system32";
|
||||
char file[] = "kernel32.dll";
|
||||
+ char path[MAX_PATH];
|
||||
char buffer[MAX_PATH];
|
||||
UINT ret;
|
||||
DWORD length;
|
||||
|
||||
+ GetSystemDirectoryA(path, MAX_PATH);
|
||||
+
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, file, 0, IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length);
|
||||
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
|
||||
@@ -66,14 +68,16 @@ static void test_SetupPromptForDiskA(void)
|
||||
|
||||
static void test_SetupPromptForDiskW(void)
|
||||
{
|
||||
- WCHAR path[] = {'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m','3','2','\0'};
|
||||
WCHAR file[] = {'k','e','r','n','e','l','3','2','.','d','l','l','\0'};
|
||||
WCHAR title[] = {'T','e','s','t','\0'};
|
||||
WCHAR disk[] = {'T','e','s','t','d','i','s','k','\0'};
|
||||
+ WCHAR path[MAX_PATH];
|
||||
WCHAR buffer[MAX_PATH];
|
||||
UINT ret;
|
||||
DWORD length;
|
||||
|
||||
+ GetSystemDirectoryW(path, MAX_PATH);
|
||||
+
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
ret = SetupPromptForDiskW(0, title, disk, path, file, 0, IDF_CHECKFIRST, buffer, MAX_PATH-1, &length);
|
||||
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
|
||||
--
|
||||
2.9.0
|
||||
|
Loading…
Reference in New Issue
Block a user