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
e6431cd0
Commit
e6431cd0
authored
Dec 07, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Dec 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Handle the CompLocator table in the AppSearch action.
parent
44349af1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
27 deletions
+63
-27
appsearch.c
dlls/msi/appsearch.c
+59
-11
package.c
dlls/msi/tests/package.c
+4
-16
No files found.
dlls/msi/appsearch.c
View file @
e6431cd0
...
...
@@ -28,6 +28,7 @@
#include "msiquery.h"
#include "msidefs.h"
#include "winver.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "msipriv.h"
...
...
@@ -157,30 +158,77 @@ static void ACTION_FreeSignature(MSISIGNATURE *sig)
static
UINT
ACTION_AppSearchComponents
(
MSIPACKAGE
*
package
,
LPWSTR
*
appValue
,
MSISIGNATURE
*
sig
)
{
static
const
WCHAR
query
[]
=
{
'
s'
,
'e'
,
'l'
,
'e'
,
'c'
,
't
'
,
' '
,
'*'
,
' '
,
'
f'
,
'r'
,
'o'
,
'm
'
,
' '
,
'
C'
,
'o'
,
'm'
,
'p'
,
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'o'
,
'r
'
,
' '
,
'
w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
'_
'
,
' '
,
'='
,
' '
,
'
S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T
'
,
' '
,
'*'
,
' '
,
'
F'
,
'R'
,
'O'
,
'M
'
,
' '
,
'
`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'o'
,
'r'
,
'`
'
,
' '
,
'
W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
'_'
,
'`
'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
MSIRECORD
*
row
;
LPWSTR
guid
;
static
const
WCHAR
sigquery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'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
};
MSIRECORD
*
row
,
*
rec
;
LPCWSTR
signature
,
guid
;
BOOL
sigpresent
=
TRUE
;
BOOL
isdir
;
UINT
type
;
WCHAR
path
[
MAX_PATH
];
DWORD
size
=
MAX_PATH
;
LPWSTR
ptr
;
DWORD
attr
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
sig
->
Name
));
*
appValue
=
NULL
;
row
=
MSI_QueryGetRecord
(
package
->
db
,
query
,
sig
->
Name
);
row
=
MSI_QueryGetRecord
(
package
->
db
,
query
,
sig
->
Name
);
if
(
!
row
)
{
TRACE
(
"failed to query CompLocator for %s
\n
"
,
debugstr_w
(
sig
->
Name
));
return
ERROR_SUCCESS
;
}
guid
=
msi_dup_record_field
(
row
,
2
);
FIXME
(
"AppSearch CompLocator (%s) unimplemented
\n
"
,
debugstr_w
(
guid
));
msi_free
(
guid
);
msiobj_release
(
&
row
->
hdr
);
signature
=
MSI_RecordGetString
(
row
,
1
);
guid
=
MSI_RecordGetString
(
row
,
2
);
type
=
MSI_RecordGetInteger
(
row
,
3
);
rec
=
MSI_QueryGetRecord
(
package
->
db
,
sigquery
,
signature
);
if
(
!
rec
)
sigpresent
=
FALSE
;
*
path
=
'\0'
;
MsiLocateComponentW
(
guid
,
path
,
&
size
);
if
(
!*
path
)
goto
done
;
attr
=
GetFileAttributesW
(
path
);
if
(
attr
==
INVALID_FILE_ATTRIBUTES
)
goto
done
;
isdir
=
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
);
if
(
type
!=
msidbLocatorTypeDirectory
&&
sigpresent
&&
!
isdir
)
{
*
appValue
=
strdupW
(
path
);
}
else
if
(
!
sigpresent
&&
(
type
!=
msidbLocatorTypeDirectory
||
isdir
))
{
if
(
type
==
msidbLocatorTypeFileName
)
{
ptr
=
strrchrW
(
path
,
'\\'
);
*
(
ptr
+
1
)
=
'\0'
;
}
else
PathAddBackslashW
(
path
);
*
appValue
=
strdupW
(
path
);
}
done:
if
(
rec
)
msiobj_release
(
&
rec
->
hdr
);
msiobj_release
(
&
row
->
hdr
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/tests/package.c
View file @
e6431cd0
...
...
@@ -5228,10 +5228,7 @@ static void test_complocator(void)
lstrcpyA
(
expected
,
CURR_DIR
);
lstrcatA
(
expected
,
"
\\
abelisaurus"
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
}
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"BACTROSAURUS"
,
prop
,
&
size
);
...
...
@@ -5254,10 +5251,7 @@ static void test_complocator(void)
lstrcpyA
(
expected
,
CURR_DIR
);
lstrcatA
(
expected
,
"
\\
"
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
}
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"FALCARIUS"
,
prop
,
&
size
);
...
...
@@ -5300,10 +5294,7 @@ static void test_complocator(void)
lstrcpyA
(
expected
,
CURR_DIR
);
lstrcatA
(
expected
,
"
\\
"
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
}
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"NEOSODON"
,
prop
,
&
size
);
...
...
@@ -5311,10 +5302,7 @@ static void test_complocator(void)
lstrcpyA
(
expected
,
CURR_DIR
);
lstrcatA
(
expected
,
"
\\
neosodon
\\
"
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
}
ok
(
!
lstrcmpA
(
prop
,
expected
),
"Expected %s, got %s
\n
"
,
expected
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"OLOROTITAN"
,
prop
,
&
size
);
...
...
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