Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
547d62da
Commit
547d62da
authored
Jun 11, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Store the original INF file path in a .pnf file.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
007a9c97
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
Makefile.in
dlls/setupapi/Makefile.in
+1
-1
misc.c
dlls/setupapi/misc.c
+16
-1
setupapi_private.h
dlls/setupapi/setupapi_private.h
+2
-0
misc.c
dlls/setupapi/tests/misc.c
+2
-2
No files found.
dlls/setupapi/Makefile.in
View file @
547d62da
EXTRADEFS
=
-D_SETUPAPI_
MODULE
=
setupapi.dll
IMPORTLIB
=
setupapi
IMPORTS
=
uuid version advapi32 rpcrt4
IMPORTS
=
uuid version advapi32 rpcrt4
kernelbase
DELAYIMPORTS
=
shell32 wintrust ole32 winspool.drv comdlg32 user32
EXTRADLLFLAGS
=
-mno-cygwin
...
...
dlls/setupapi/misc.c
View file @
547d62da
...
...
@@ -31,6 +31,7 @@
#include "softpub.h"
#include "mscat.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "wine/debug.h"
...
...
@@ -962,10 +963,11 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location,
DWORD
buffer_size
,
DWORD
*
required_size
,
WCHAR
**
filepart
)
{
BOOL
ret
=
FALSE
;
WCHAR
target
[
MAX_PATH
],
catalog_file
[
MAX_PATH
],
*
p
;
WCHAR
target
[
MAX_PATH
],
catalog_file
[
MAX_PATH
],
pnf_path
[
MAX_PATH
],
*
p
;
static
const
WCHAR
inf
[]
=
{
'\\'
,
'i'
,
'n'
,
'f'
,
'\\'
,
0
};
static
const
WCHAR
wszVersion
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
wszCatalogFile
[]
=
{
'C'
,
'a'
,
't'
,
'a'
,
'l'
,
'o'
,
'g'
,
'F'
,
'i'
,
'l'
,
'e'
,
0
};
FILE
*
pnf_file
;
unsigned
int
i
;
DWORD
size
;
HINF
hinf
;
...
...
@@ -1069,6 +1071,19 @@ done:
if
(
style
&
SP_COPY_DELETESOURCE
)
DeleteFileW
(
source
);
if
(
ret
)
{
wcscpy
(
pnf_path
,
target
);
PathRemoveExtensionW
(
pnf_path
);
PathAddExtensionW
(
pnf_path
,
L".pnf"
);
if
((
pnf_file
=
_wfopen
(
pnf_path
,
L"w"
)))
{
fputws
(
PNF_HEADER
,
pnf_file
);
fputws
(
source
,
pnf_file
);
fclose
(
pnf_file
);
}
}
size
=
lstrlenW
(
target
)
+
1
;
if
(
dest
)
{
...
...
dlls/setupapi/setupapi_private.h
View file @
547d62da
...
...
@@ -43,6 +43,8 @@
#define REGPART_RENAME "\\Rename"
#define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
#define PNF_HEADER L"Wine PNF header\n"
extern
HINSTANCE
SETUPAPI_hInstance
DECLSPEC_HIDDEN
;
static
inline
void
*
__WINE_ALLOC_SIZE
(
2
)
heap_realloc_zero
(
void
*
mem
,
size_t
len
)
...
...
dlls/setupapi/tests/misc.c
View file @
547d62da
...
...
@@ -320,7 +320,7 @@ static void test_SetupCopyOEMInf(void)
DeleteFileA
(
dest
);
strcpy
(
pnf
,
dest
);
*
(
strrchr
(
pnf
,
'.'
)
+
1
)
=
'p'
;
ok
(
!
file_exists
(
pnf
),
"Expected pnf '%s' to not exist
\n
"
,
pnf
);
todo_wine
ok
(
!
file_exists
(
pnf
),
"Expected pnf '%s' to not exist
\n
"
,
pnf
);
res
=
SetupUninstallOEMInfA
(
strrchr
(
orig_dest
,
'\\'
)
+
1
,
0
,
NULL
);
ok
(
res
,
"Failed to uninstall '%s', error %u.
\n
"
,
orig_dest
,
GetLastError
());
...
...
@@ -328,7 +328,7 @@ static void test_SetupCopyOEMInf(void)
DeleteFileA
(
orig_dest
);
strcpy
(
pnf
,
dest
);
*
(
strrchr
(
pnf
,
'.'
)
+
1
)
=
'p'
;
ok
(
!
file_exists
(
pnf
),
"Expected pnf '%s' to not exist
\n
"
,
pnf
);
todo_wine
ok
(
!
file_exists
(
pnf
),
"Expected pnf '%s' to not exist
\n
"
,
pnf
);
GetWindowsDirectoryA
(
orig_dest
,
sizeof
(
orig_dest
));
strcat
(
orig_dest
,
"
\\
inf
\\
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment