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
5d85497a
Commit
5d85497a
authored
Aug 18, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Handle signature filenames in short|long notation.
parent
0c044c10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
appsearch.c
dlls/msi/appsearch.c
+7
-1
package.c
dlls/msi/tests/package.c
+22
-3
No files found.
dlls/msi/appsearch.c
View file @
5d85497a
...
@@ -89,7 +89,7 @@ static UINT ACTION_AppSearchGetSignature(MSIPACKAGE *package, MSISIGNATURE *sig,
...
@@ -89,7 +89,7 @@ static UINT ACTION_AppSearchGetSignature(MSIPACKAGE *package, MSISIGNATURE *sig,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
' '
,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
' '
,
'w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
' '
,
'='
,
' '
,
'w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'\''
,
'%'
,
's'
,
'\''
,
0
};
LPWSTR
minVersion
,
maxVersion
;
LPWSTR
minVersion
,
maxVersion
,
p
;
MSIRECORD
*
row
;
MSIRECORD
*
row
;
DWORD
time
;
DWORD
time
;
...
@@ -106,6 +106,12 @@ static UINT ACTION_AppSearchGetSignature(MSIPACKAGE *package, MSISIGNATURE *sig,
...
@@ -106,6 +106,12 @@ static UINT ACTION_AppSearchGetSignature(MSIPACKAGE *package, MSISIGNATURE *sig,
/* get properties */
/* get properties */
sig
->
File
=
msi_dup_record_field
(
row
,
2
);
sig
->
File
=
msi_dup_record_field
(
row
,
2
);
if
((
p
=
strchrW
(
sig
->
File
,
'|'
)))
{
p
++
;
memmove
(
sig
->
File
,
p
,
(
strlenW
(
p
)
+
1
)
*
sizeof
(
WCHAR
));
}
minVersion
=
msi_dup_record_field
(
row
,
3
);
minVersion
=
msi_dup_record_field
(
row
,
3
);
if
(
minVersion
)
if
(
minVersion
)
{
{
...
...
dlls/msi/tests/package.c
View file @
5d85497a
...
@@ -7507,7 +7507,7 @@ static void test_appsearch(void)
...
@@ -7507,7 +7507,7 @@ static void test_appsearch(void)
UINT
r
;
UINT
r
;
MSIHANDLE
hdb
;
MSIHANDLE
hdb
;
CHAR
prop
[
MAX_PATH
];
CHAR
prop
[
MAX_PATH
];
DWORD
size
=
MAX_PATH
;
DWORD
size
;
hdb
=
create_package_db
();
hdb
=
create_package_db
();
ok
(
hdb
,
"failed to create package database
\n
"
);
ok
(
hdb
,
"failed to create package database
\n
"
);
...
@@ -7518,17 +7518,29 @@ static void test_appsearch(void)
...
@@ -7518,17 +7518,29 @@ static void test_appsearch(void)
r
=
add_appsearch_entry
(
hdb
,
"'WEBBROWSERPROG', 'NewSignature1'"
);
r
=
add_appsearch_entry
(
hdb
,
"'WEBBROWSERPROG', 'NewSignature1'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add entry: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add entry: %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'NOTEPAD', 'NewSignature2'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add entry: %d
\n
"
,
r
);
r
=
create_reglocator_table
(
hdb
);
r
=
create_reglocator_table
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create RegLocator table: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create RegLocator table: %d
\n
"
,
r
);
r
=
add_reglocator_entry
(
hdb
,
"'NewSignature1', 0, 'htmlfile
\\
shell
\\
open
\\
command', '', 1"
);
r
=
add_reglocator_entry
(
hdb
,
"'NewSignature1', 0, 'htmlfile
\\
shell
\\
open
\\
command', '', 1"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create RegLocator table: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create RegLocator table: %d
\n
"
,
r
);
r
=
create_drlocator_table
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create DrLocator table: %d
\n
"
,
r
);
r
=
add_drlocator_entry
(
hdb
,
"'NewSignature2', 0, 'c:
\\
windows
\\
system32', 0"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create RegLocator table: %d
\n
"
,
r
);
r
=
create_signature_table
(
hdb
);
r
=
create_signature_table
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create Signature table: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create Signature table: %d
\n
"
,
r
);
r
=
add_signature_entry
(
hdb
,
"'NewSignature1', 'FileName', '', '', '', '', '', '', ''"
);
r
=
add_signature_entry
(
hdb
,
"'NewSignature1', 'FileName', '', '', '', '', '', '', ''"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot create Signature table: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add signature: %d
\n
"
,
r
);
r
=
add_signature_entry
(
hdb
,
"'NewSignature2', 'NOTEPAD.EXE|notepad.exe', '', '', '', '', '', '', ''"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add signature: %d
\n
"
,
r
);
r
=
package_from_db
(
hdb
,
&
hpkg
);
r
=
package_from_db
(
hdb
,
&
hpkg
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
...
@@ -7538,12 +7550,14 @@ static void test_appsearch(void)
...
@@ -7538,12 +7550,14 @@ static void test_appsearch(void)
return
;
return
;
}
}
ok
(
r
==
ERROR_SUCCESS
,
"failed to create package %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to create package %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hdb
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
r
=
MsiDoAction
(
hpkg
,
"AppSearch"
);
ok
(
r
==
ERROR_SUCCESS
,
"AppSearch failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"AppSearch failed: %d
\n
"
,
r
);
size
=
sizeof
(
prop
);
r
=
MsiGetPropertyA
(
hpkg
,
"WEBBROWSERPROG"
,
prop
,
&
size
);
r
=
MsiGetPropertyA
(
hpkg
,
"WEBBROWSERPROG"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
todo_wine
todo_wine
...
@@ -7551,6 +7565,11 @@ static void test_appsearch(void)
...
@@ -7551,6 +7565,11 @@ static void test_appsearch(void)
ok
(
lstrlenA
(
prop
)
!=
0
,
"Expected non-zero length
\n
"
);
ok
(
lstrlenA
(
prop
)
!=
0
,
"Expected non-zero length
\n
"
);
}
}
size
=
sizeof
(
prop
);
r
=
MsiGetPropertyA
(
hpkg
,
"NOTEPAD"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
done:
MsiCloseHandle
(
hpkg
);
MsiCloseHandle
(
hpkg
);
DeleteFileA
(
msifile
);
DeleteFileA
(
msifile
);
}
}
...
...
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