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
01eb9300
Commit
01eb9300
authored
Dec 14, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Publish the patch information.
parent
5aac1ec6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
5 deletions
+71
-5
action.c
dlls/msi/action.c
+56
-5
helpers.c
dlls/msi/helpers.c
+7
-0
msipriv.h
dlls/msi/msipriv.h
+7
-0
package.c
dlls/msi/package.c
+1
-0
No files found.
dlls/msi/action.c
View file @
01eb9300
...
@@ -490,18 +490,29 @@ static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db
...
@@ -490,18 +490,29 @@ static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db
if
(
!
si
)
if
(
!
si
)
return
ERROR_FUNCTION_FAILED
;
return
ERROR_FUNCTION_FAILED
;
msi_check_patch_applicable
(
package
,
si
);
if
(
msi_check_patch_applicable
(
package
,
si
)
!=
ERROR_SUCCESS
)
{
TRACE
(
"Patch not applicable
\n
"
);
return
ERROR_SUCCESS
;
}
package
->
patch
=
msi_alloc
(
sizeof
(
MSIPATCHINFO
));
if
(
!
package
->
patch
)
return
ERROR_OUTOFMEMORY
;
package
->
patch
->
patchcode
=
msi_suminfo_dup_string
(
si
,
PID_REVNUMBER
);
if
(
!
package
->
patch
->
patchcode
)
return
ERROR_OUTOFMEMORY
;
/* enumerate the substorage */
/* enumerate the substorage */
str
=
msi_suminfo_dup_string
(
si
,
PID_LASTAUTHOR
);
str
=
msi_suminfo_dup_string
(
si
,
PID_LASTAUTHOR
);
package
->
patch
->
transforms
=
str
;
substorage
=
msi_split_string
(
str
,
';'
);
substorage
=
msi_split_string
(
str
,
';'
);
for
(
i
=
0
;
substorage
&&
substorage
[
i
]
&&
r
==
ERROR_SUCCESS
;
i
++
)
for
(
i
=
0
;
substorage
&&
substorage
[
i
]
&&
r
==
ERROR_SUCCESS
;
i
++
)
r
=
msi_apply_substorage_transform
(
package
,
patch_db
,
substorage
[
i
]
);
r
=
msi_apply_substorage_transform
(
package
,
patch_db
,
substorage
[
i
]
);
msi_free
(
substorage
);
msi_free
(
str
);
/* FIXME: parse the sources in PID_REVNUMBER and do something with them... */
msi_free
(
substorage
);
msiobj_release
(
&
si
->
hdr
);
msiobj_release
(
&
si
->
hdr
);
return
r
;
return
r
;
...
@@ -3568,6 +3579,39 @@ static BOOL msi_check_unpublish(MSIPACKAGE *package)
...
@@ -3568,6 +3579,39 @@ static BOOL msi_check_unpublish(MSIPACKAGE *package)
return
TRUE
;
return
TRUE
;
}
}
static
UINT
msi_publish_patch
(
MSIPACKAGE
*
package
,
HKEY
prodkey
,
HKEY
hudkey
)
{
WCHAR
patch_squashed
[
GUID_SIZE
];
HKEY
patches
;
LONG
res
;
UINT
r
=
ERROR_FUNCTION_FAILED
;
static
const
WCHAR
szPatches
[]
=
{
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
'e'
,
's'
,
0
};
res
=
RegCreateKeyExW
(
prodkey
,
szPatches
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
patches
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
return
ERROR_FUNCTION_FAILED
;
squash_guid
(
package
->
patch
->
patchcode
,
patch_squashed
);
res
=
RegSetValueExW
(
patches
,
szPatches
,
0
,
REG_MULTI_SZ
,
(
const
BYTE
*
)
patch_squashed
,
(
lstrlenW
(
patch_squashed
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
res
=
RegSetValueExW
(
patches
,
patch_squashed
,
0
,
REG_SZ
,
(
const
BYTE
*
)
package
->
patch
->
transforms
,
(
lstrlenW
(
package
->
patch
->
transforms
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
res
==
ERROR_SUCCESS
)
r
=
ERROR_SUCCESS
;
done:
RegCloseKey
(
patches
);
return
r
;
}
/*
/*
* 99% of the work done here is only done for
* 99% of the work done here is only done for
* advertised installs. However this is where the
* advertised installs. However this is where the
...
@@ -3598,6 +3642,13 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
...
@@ -3598,6 +3642,13 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
goto
end
;
if
(
package
->
patch
)
{
rc
=
msi_publish_patch
(
package
,
hukey
,
hudkey
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
}
rc
=
msi_publish_product_properties
(
package
,
hukey
);
rc
=
msi_publish_product_properties
(
package
,
hukey
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
goto
end
;
...
...
dlls/msi/helpers.c
View file @
01eb9300
...
@@ -661,6 +661,13 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
...
@@ -661,6 +661,13 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
msi_free
(
package
->
script
);
msi_free
(
package
->
script
);
}
}
if
(
package
->
patch
)
{
msi_free
(
package
->
patch
->
patchcode
);
msi_free
(
package
->
patch
->
transforms
);
msi_free
(
package
->
patch
);
}
msi_free
(
package
->
BaseURL
);
msi_free
(
package
->
BaseURL
);
msi_free
(
package
->
PackagePath
);
msi_free
(
package
->
PackagePath
);
msi_free
(
package
->
ProductCode
);
msi_free
(
package
->
ProductCode
);
...
...
dlls/msi/msipriv.h
View file @
01eb9300
...
@@ -144,6 +144,12 @@ typedef struct tagMSIMEDIAINFO
...
@@ -144,6 +144,12 @@ typedef struct tagMSIMEDIAINFO
WCHAR
source
[
MAX_PATH
];
WCHAR
source
[
MAX_PATH
];
}
MSIMEDIAINFO
;
}
MSIMEDIAINFO
;
typedef
struct
tagMSIPATCHINFO
{
LPWSTR
patchcode
;
LPWSTR
transforms
;
}
MSIPATCHINFO
;
typedef
struct
_column_info
typedef
struct
_column_info
{
{
LPCWSTR
table
;
LPCWSTR
table
;
...
@@ -294,6 +300,7 @@ typedef struct tagMSIPACKAGE
...
@@ -294,6 +300,7 @@ typedef struct tagMSIPACKAGE
{
{
MSIOBJECTHDR
hdr
;
MSIOBJECTHDR
hdr
;
MSIDATABASE
*
db
;
MSIDATABASE
*
db
;
MSIPATCHINFO
*
patch
;
struct
list
components
;
struct
list
components
;
struct
list
features
;
struct
list
features
;
struct
list
files
;
struct
list
files
;
...
...
dlls/msi/package.c
View file @
01eb9300
...
@@ -731,6 +731,7 @@ static MSIPACKAGE *msi_alloc_package( void )
...
@@ -731,6 +731,7 @@ static MSIPACKAGE *msi_alloc_package( void )
list_init
(
&
package
->
sourcelist_info
);
list_init
(
&
package
->
sourcelist_info
);
list_init
(
&
package
->
sourcelist_media
);
list_init
(
&
package
->
sourcelist_media
);
package
->
patch
=
NULL
;
package
->
ActionFormat
=
NULL
;
package
->
ActionFormat
=
NULL
;
package
->
LastAction
=
NULL
;
package
->
LastAction
=
NULL
;
package
->
dialog
=
NULL
;
package
->
dialog
=
NULL
;
...
...
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