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
5e46fc90
Commit
5e46fc90
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Delay publishing of the SourceList until the PublishProduct action.
parent
08443b3b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
13 deletions
+111
-13
action.c
dlls/msi/action.c
+17
-0
files.c
dlls/msi/files.c
+7
-11
helpers.c
dlls/msi/helpers.c
+20
-1
msipriv.h
dlls/msi/msipriv.h
+24
-0
package.c
dlls/msi/package.c
+39
-0
install.c
dlls/msi/tests/install.c
+4
-1
No files found.
dlls/msi/action.c
View file @
5e46fc90
...
@@ -3251,6 +3251,8 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
...
@@ -3251,6 +3251,8 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
{
{
UINT
rc
;
UINT
rc
;
MSIQUERY
*
view
;
MSIQUERY
*
view
;
MSISOURCELISTINFO
*
info
;
MSIMEDIADISK
*
disk
;
static
const
WCHAR
Query
[]
=
static
const
WCHAR
Query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'I'
,
'c'
,
'o'
,
'n'
,
'`'
,
0
};
'`'
,
'I'
,
'c'
,
'o'
,
'n'
,
'`'
,
0
};
...
@@ -3363,6 +3365,21 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
...
@@ -3363,6 +3365,21 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc
=
ERROR_SUCCESS
;
rc
=
ERROR_SUCCESS
;
}
}
/* publish the SourceList info */
LIST_FOR_EACH_ENTRY
(
info
,
&
package
->
sourcelist_info
,
MSISOURCELISTINFO
,
entry
)
{
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
info
->
context
,
info
->
options
,
info
->
property
,
info
->
value
);
}
LIST_FOR_EACH_ENTRY
(
disk
,
&
package
->
sourcelist_media
,
MSIMEDIADISK
,
entry
)
{
MsiSourceListAddMediaDiskW
(
package
->
ProductCode
,
NULL
,
disk
->
context
,
disk
->
options
,
disk
->
disk_id
,
disk
->
volume_label
,
disk
->
disk_prompt
);
}
end:
end:
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hukey
);
RegCloseKey
(
hukey
);
...
...
dlls/msi/files.c
View file @
5e46fc90
...
@@ -580,14 +580,12 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
...
@@ -580,14 +580,12 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
lstrcatW
(
mi
->
source
,
mi
->
cabinet
);
lstrcatW
(
mi
->
source
,
mi
->
cabinet
);
}
}
MsiSourceListAddMediaDiskW
(
package
->
ProductCode
,
NULL
,
msi_package_add_media_disk
(
package
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
mi
->
disk_id
,
mi
->
volume_label
,
mi
->
disk_prompt
);
mi
->
disk_id
,
mi
->
volume_label
,
mi
->
disk_prompt
);
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
msi_package_add_info
(
package
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
source
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
source
);
msi_free
(
source_dir
);
msi_free
(
source_dir
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
@@ -754,10 +752,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
...
@@ -754,10 +752,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
if
(
ptr
)
if
(
ptr
)
{
{
ptr
++
;
ptr
++
;
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
msi_package_add_info
(
package
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
ptr
);
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
ptr
);
}
}
schedule_install_files
(
package
);
schedule_install_files
(
package
);
...
...
dlls/msi/helpers.c
View file @
5e46fc90
...
@@ -489,7 +489,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
...
@@ -489,7 +489,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
{
{
INT
i
;
INT
i
;
struct
list
*
item
,
*
cursor
;
struct
list
*
item
,
*
cursor
;
TRACE
(
"Freeing package action data
\n
"
);
TRACE
(
"Freeing package action data
\n
"
);
remove_tracked_tempfiles
(
package
);
remove_tracked_tempfiles
(
package
);
...
@@ -607,6 +607,25 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
...
@@ -607,6 +607,25 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
msi_free
(
appid
);
msi_free
(
appid
);
}
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
sourcelist_info
)
{
MSISOURCELISTINFO
*
info
=
LIST_ENTRY
(
item
,
MSISOURCELISTINFO
,
entry
);
list_remove
(
&
info
->
entry
);
msi_free
(
info
->
value
);
msi_free
(
info
);
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
sourcelist_media
)
{
MSIMEDIADISK
*
info
=
LIST_ENTRY
(
item
,
MSIMEDIADISK
,
entry
);
list_remove
(
&
info
->
entry
);
msi_free
(
info
->
volume_label
);
msi_free
(
info
->
disk_prompt
);
msi_free
(
info
);
}
if
(
package
->
script
)
if
(
package
->
script
)
{
{
for
(
i
=
0
;
i
<
TOTAL_SCRIPTS
;
i
++
)
for
(
i
=
0
;
i
<
TOTAL_SCRIPTS
;
i
++
)
...
...
dlls/msi/msipriv.h
View file @
5e46fc90
...
@@ -113,6 +113,25 @@ typedef struct tagMSIRECORD
...
@@ -113,6 +113,25 @@ typedef struct tagMSIRECORD
MSIFIELD
fields
[
1
];
/* nb. array size is count+1 */
MSIFIELD
fields
[
1
];
/* nb. array size is count+1 */
}
MSIRECORD
;
}
MSIRECORD
;
typedef
struct
tagMSISOURCELISTINFO
{
struct
list
entry
;
DWORD
context
;
DWORD
options
;
LPCWSTR
property
;
LPWSTR
value
;
}
MSISOURCELISTINFO
;
typedef
struct
tagMSIMEDIADISK
{
struct
list
entry
;
DWORD
context
;
DWORD
options
;
DWORD
disk_id
;
LPWSTR
volume_label
;
LPWSTR
disk_prompt
;
}
MSIMEDIADISK
;
typedef
const
struct
tagMSICOLUMNHASHENTRY
*
MSIITERHANDLE
;
typedef
const
struct
tagMSICOLUMNHASHENTRY
*
MSIITERHANDLE
;
typedef
struct
tagMSIVIEWOPS
typedef
struct
tagMSIVIEWOPS
...
@@ -249,6 +268,9 @@ typedef struct tagMSIPACKAGE
...
@@ -249,6 +268,9 @@ typedef struct tagMSIPACKAGE
struct
list
subscriptions
;
struct
list
subscriptions
;
struct
list
sourcelist_info
;
struct
list
sourcelist_media
;
unsigned
char
scheduled_action_running
:
1
;
unsigned
char
scheduled_action_running
:
1
;
unsigned
char
commit_action_running
:
1
;
unsigned
char
commit_action_running
:
1
;
unsigned
char
rollback_action_running
:
1
;
unsigned
char
rollback_action_running
:
1
;
...
@@ -664,6 +686,8 @@ extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTA
...
@@ -664,6 +686,8 @@ extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTA
extern
UINT
MSI_GetFeatureStateW
(
MSIPACKAGE
*
,
LPCWSTR
,
INSTALLSTATE
*
,
INSTALLSTATE
*
);
extern
UINT
MSI_GetFeatureStateW
(
MSIPACKAGE
*
,
LPCWSTR
,
INSTALLSTATE
*
,
INSTALLSTATE
*
);
extern
UINT
WINAPI
MSI_SetFeatureStateW
(
MSIPACKAGE
*
,
LPCWSTR
,
INSTALLSTATE
);
extern
UINT
WINAPI
MSI_SetFeatureStateW
(
MSIPACKAGE
*
,
LPCWSTR
,
INSTALLSTATE
);
extern
LPCWSTR
msi_download_file
(
LPCWSTR
szUrl
,
LPWSTR
filename
);
extern
LPCWSTR
msi_download_file
(
LPCWSTR
szUrl
,
LPWSTR
filename
);
extern
UINT
msi_package_add_info
(
MSIPACKAGE
*
,
DWORD
,
DWORD
,
LPCWSTR
,
LPWSTR
);
extern
UINT
msi_package_add_media_disk
(
MSIPACKAGE
*
,
DWORD
,
DWORD
,
DWORD
,
LPWSTR
,
LPWSTR
);
/* for deformating */
/* for deformating */
extern
UINT
MSI_FormatRecordW
(
MSIPACKAGE
*
,
MSIRECORD
*
,
LPWSTR
,
DWORD
*
);
extern
UINT
MSI_FormatRecordW
(
MSIPACKAGE
*
,
MSIRECORD
*
,
LPWSTR
,
DWORD
*
);
...
...
dlls/msi/package.c
View file @
5e46fc90
...
@@ -699,6 +699,8 @@ static MSIPACKAGE *msi_alloc_package( void )
...
@@ -699,6 +699,8 @@ static MSIPACKAGE *msi_alloc_package( void )
list_init
(
&
package
->
extensions
);
list_init
(
&
package
->
extensions
);
list_init
(
&
package
->
progids
);
list_init
(
&
package
->
progids
);
list_init
(
&
package
->
RunningActions
);
list_init
(
&
package
->
RunningActions
);
list_init
(
&
package
->
sourcelist_info
);
list_init
(
&
package
->
sourcelist_media
);
package
->
ActionFormat
=
NULL
;
package
->
ActionFormat
=
NULL
;
package
->
LastAction
=
NULL
;
package
->
LastAction
=
NULL
;
...
@@ -1573,3 +1575,40 @@ HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
...
@@ -1573,3 +1575,40 @@ HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj )
return
S_OK
;
return
S_OK
;
}
}
UINT
msi_package_add_info
(
MSIPACKAGE
*
package
,
DWORD
context
,
DWORD
options
,
LPCWSTR
property
,
LPWSTR
value
)
{
MSISOURCELISTINFO
*
info
;
info
=
msi_alloc
(
sizeof
(
MSISOURCELISTINFO
));
if
(
!
info
)
return
ERROR_OUTOFMEMORY
;
info
->
context
=
context
;
info
->
options
=
options
;
info
->
property
=
property
;
info
->
value
=
strdupW
(
value
);
list_add_head
(
&
package
->
sourcelist_info
,
&
info
->
entry
);
return
ERROR_SUCCESS
;
}
UINT
msi_package_add_media_disk
(
MSIPACKAGE
*
package
,
DWORD
context
,
DWORD
options
,
DWORD
disk_id
,
LPWSTR
volume_label
,
LPWSTR
disk_prompt
)
{
MSIMEDIADISK
*
disk
;
disk
=
msi_alloc
(
sizeof
(
MSIMEDIADISK
));
if
(
!
disk
)
return
ERROR_OUTOFMEMORY
;
disk
->
context
=
context
;
disk
->
options
=
options
;
disk
->
disk_id
=
disk_id
;
disk
->
volume_label
=
strdupW
(
volume_label
);
disk
->
disk_prompt
=
strdupW
(
disk_prompt
);
list_add_head
(
&
package
->
sourcelist_media
,
&
disk
->
entry
);
return
ERROR_SUCCESS
;
}
dlls/msi/tests/install.c
View file @
5e46fc90
...
@@ -1706,7 +1706,10 @@ static void test_publish(void)
...
@@ -1706,7 +1706,10 @@ static void test_publish(void)
ok
(
pf_exists
(
"msitest"
),
"File deleted
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File deleted
\n
"
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
...
...
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