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
dd305c37
Commit
dd305c37
authored
May 11, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
May 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the SourceDir property to the registered source if the product is installed.
parent
41a7f025
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
action.c
dlls/msi/action.c
+27
-18
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+3
-5
patch.c
dlls/msi/tests/patch.c
+1
-1
No files found.
dlls/msi/action.c
View file @
dd305c37
...
...
@@ -688,31 +688,41 @@ static BOOL ui_sequence_exists( MSIPACKAGE *package )
static
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
,
BOOL
replace
)
{
LPWSTR
p
,
db
;
LPWSTR
source
,
check
;
DWORD
len
;
static
const
WCHAR
szOriginalDatabase
[]
=
{
'O'
,
'r'
,
'i'
,
'g'
,
'i'
,
'n'
,
'a'
,
'l'
,
'D'
,
'a'
,
't'
,
'a'
,
'b'
,
'a'
,
's'
,
'e'
,
0
};
db
=
msi_dup_property
(
package
->
db
,
szOriginalDatabase
);
if
(
!
db
)
return
ERROR_OUTOFMEMORY
;
if
(
msi_get_property_int
(
package
->
db
,
szInstalled
,
0
))
{
HKEY
hkey
;
p
=
strrchrW
(
db
,
'\\'
);
if
(
!
p
)
MSIREG_OpenInstallProps
(
package
->
ProductCode
,
package
->
Context
,
NULL
,
&
hkey
,
FALSE
);
source
=
msi_reg_get_val_str
(
hkey
,
INSTALLPROPERTY_INSTALLSOURCEW
);
RegCloseKey
(
hkey
);
}
else
{
p
=
strrchrW
(
db
,
'/'
);
LPWSTR
p
,
db
;
DWORD
len
;
db
=
msi_dup_property
(
package
->
db
,
szOriginalDatabase
);
if
(
!
db
)
return
ERROR_OUTOFMEMORY
;
p
=
strrchrW
(
db
,
'\\'
);
if
(
!
p
)
{
msi_free
(
db
);
return
ERROR_SUCCESS
;
p
=
strrchrW
(
db
,
'/'
);
if
(
!
p
)
{
msi_free
(
db
);
return
ERROR_SUCCESS
;
}
}
}
len
=
p
-
db
+
2
;
source
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
lstrcpynW
(
source
,
db
,
len
);
len
=
p
-
db
+
2
;
source
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
);
lstrcpynW
(
source
,
db
,
len
);
msi_free
(
db
);
}
check
=
msi_dup_property
(
package
->
db
,
cszSourceDir
);
if
(
!
check
||
replace
)
...
...
@@ -729,7 +739,6 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
msi_free
(
check
);
msi_free
(
source
);
msi_free
(
db
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/msipriv.h
View file @
dd305c37
...
...
@@ -1113,6 +1113,7 @@ static const WCHAR szInprocHandler[] = {'I','n','p','r','o','c','H','a','n','d',
static
const
WCHAR
szInprocHandler32
[]
=
{
'I'
,
'n'
,
'p'
,
'r'
,
'o'
,
'c'
,
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
'r'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
szMIMEDatabase
[]
=
{
'M'
,
'I'
,
'M'
,
'E'
,
'\\'
,
'D'
,
'a'
,
't'
,
'a'
,
'b'
,
'a'
,
's'
,
'e'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
' '
,
'T'
,
'y'
,
'p'
,
'e'
,
'\\'
,
0
};
static
const
WCHAR
szLocalPackage
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szOriginalDatabase
[]
=
{
'O'
,
'r'
,
'i'
,
'g'
,
'i'
,
'n'
,
'a'
,
'l'
,
'D'
,
'a'
,
't'
,
'a'
,
'b'
,
'a'
,
's'
,
'e'
,
0
};
/* memory allocation macro functions */
static
void
*
msi_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
...
...
dlls/msi/package.c
View file @
dd305c37
...
...
@@ -1225,8 +1225,6 @@ static UINT apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code )
UINT
MSI_OpenPackageW
(
LPCWSTR
szPackage
,
MSIPACKAGE
**
pPackage
)
{
static
const
WCHAR
OriginalDatabase
[]
=
{
'O'
,
'r'
,
'i'
,
'g'
,
'i'
,
'n'
,
'a'
,
'l'
,
'D'
,
'a'
,
't'
,
'a'
,
'b'
,
'a'
,
's'
,
'e'
,
0
};
static
const
WCHAR
Database
[]
=
{
'D'
,
'A'
,
'T'
,
'A'
,
'B'
,
'A'
,
'S'
,
'E'
,
0
};
static
const
WCHAR
dotmsi
[]
=
{
'.'
,
'm'
,
's'
,
'i'
,
0
};
MSIDATABASE
*
db
=
NULL
;
...
...
@@ -1339,15 +1337,15 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
msi_set_property
(
package
->
db
,
Database
,
db
->
path
);
if
(
UrlIsW
(
szPackage
,
URLIS_URL
)
)
msi_set_property
(
package
->
db
,
OriginalDatabase
,
szPackage
);
msi_set_property
(
package
->
db
,
sz
OriginalDatabase
,
szPackage
);
else
if
(
szPackage
[
0
]
==
'#'
)
msi_set_property
(
package
->
db
,
OriginalDatabase
,
db
->
path
);
msi_set_property
(
package
->
db
,
sz
OriginalDatabase
,
db
->
path
);
else
{
WCHAR
fullpath
[
MAX_PATH
];
GetFullPathNameW
(
szPackage
,
MAX_PATH
,
fullpath
,
NULL
);
msi_set_property
(
package
->
db
,
OriginalDatabase
,
fullpath
);
msi_set_property
(
package
->
db
,
sz
OriginalDatabase
,
fullpath
);
}
msi_set_context
(
package
);
...
...
dlls/msi/tests/patch.c
View file @
dd305c37
...
...
@@ -775,7 +775,7 @@ static void test_simple_patch( void )
r
=
MsiGetProductInfoA
(
"{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"
,
"InstallSource"
,
path
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
todo_wine
ok
(
!
strcasecmp
(
path
,
install_source
),
"wrong path %s
\n
"
,
path
);
ok
(
!
strcasecmp
(
path
,
install_source
),
"wrong path %s
\n
"
,
path
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
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