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
ba9f1f77
Commit
ba9f1f77
authored
Feb 10, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Get rid of msi_component_set_state and msi_feature_set_state.
parent
ef05072e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
31 deletions
+43
-31
action.c
dlls/msi/action.c
+0
-0
dialog.c
dlls/msi/dialog.c
+1
-1
files.c
dlls/msi/files.c
+17
-17
helpers.c
dlls/msi/helpers.c
+23
-7
install.c
dlls/msi/install.c
+1
-1
msipriv.h
dlls/msi/msipriv.h
+0
-2
package.c
dlls/msi/tests/package.c
+1
-3
No files found.
dlls/msi/action.c
View file @
ba9f1f77
This diff is collapsed.
Click to expand it.
dlls/msi/dialog.c
View file @
ba9f1f77
...
...
@@ -2125,7 +2125,7 @@ static void
msi_seltree_update_feature_installstate
(
HWND
hwnd
,
HTREEITEM
hItem
,
MSIPACKAGE
*
package
,
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
msi_feature_set_state
(
package
,
feature
,
state
)
;
feature
->
ActionRequest
=
state
;
msi_seltree_sync_item_state
(
hwnd
,
feature
,
hItem
);
ACTION_UpdateComponentStates
(
package
,
feature
);
}
...
...
dlls/msi/files.c
View file @
ba9f1f77
...
...
@@ -888,25 +888,25 @@ static BOOL verify_comp_for_removal(MSICOMPONENT *comp, UINT install_mode)
{
INSTALLSTATE
request
=
comp
->
ActionRequest
;
if
(
request
==
INSTALLSTATE_UNKNOWN
)
return
FALSE
;
if
(
install_mode
==
msidbRemoveFileInstallModeOnInstall
&&
(
request
==
INSTALLSTATE_LOCAL
||
request
==
INSTALLSTATE_SOURCE
))
return
TRUE
;
/* special case */
if
(
request
!=
INSTALLSTATE_SOURCE
&&
comp
->
Attributes
&
msidbComponentAttributesSourceOnly
&&
(
install_mode
==
msidbRemoveFileInstallModeOnRemove
||
install_mode
==
msidbRemoveFileInstallModeOnBoth
))
return
TRUE
;
if
(
request
==
INSTALLSTATE_ABSENT
)
switch
(
request
)
{
if
(
!
comp
->
ComponentId
)
return
FALSE
;
if
(
install_mode
==
msidbRemoveFileInstallModeOnRemove
)
return
TRUE
;
case
INSTALLSTATE_LOCAL
:
case
INSTALLSTATE_SOURCE
:
if
(
install_mode
==
msidbRemoveFileInstallModeOnInstall
||
install_mode
==
msidbRemoveFileInstallModeOnBoth
)
return
TRUE
;
break
;
case
INSTALLSTATE_ABSENT
:
if
(
install_mode
==
msidbRemoveFileInstallModeOnRemove
||
install_mode
==
msidbRemoveFileInstallModeOnBoth
)
return
TRUE
;
break
;
default:
break
;
}
if
(
install_mode
==
msidbRemoveFileInstallModeOnBoth
)
return
TRUE
;
return
FALSE
;
}
...
...
@@ -935,7 +935,7 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
if
(
!
verify_comp_for_removal
(
comp
,
install_mode
))
{
TRACE
(
"Skipping removal due to
missing conditions
\n
"
);
TRACE
(
"Skipping removal due to
install mode
\n
"
);
comp
->
Action
=
comp
->
Installed
;
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/helpers.c
View file @
ba9f1f77
...
...
@@ -675,7 +675,10 @@ void ACTION_UpdateComponentStates( MSIPACKAGE *package, MSIFEATURE *feature )
component
->
Action
,
component
->
ActionRequest
);
if
(
newstate
==
INSTALLSTATE_LOCAL
)
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
else
{
ComponentList
*
clist
;
...
...
@@ -683,9 +686,10 @@ void ACTION_UpdateComponentStates( MSIPACKAGE *package, MSIFEATURE *feature )
component
->
hasLocalFeature
=
FALSE
;
msi_component_set_state
(
package
,
component
,
newstate
);
component
->
Action
=
newstate
;
component
->
ActionRequest
=
newstate
;
/*
if any other feature wants is local we need to set it local
*/
/*
if any other feature wants it local we need to set it local
*/
LIST_FOR_EACH_ENTRY
(
f
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
f
->
ActionRequest
!=
INSTALLSTATE_LOCAL
&&
...
...
@@ -706,14 +710,26 @@ void ACTION_UpdateComponentStates( MSIPACKAGE *package, MSIFEATURE *feature )
if
(
component
->
Attributes
&
msidbComponentAttributesOptional
)
{
if
(
f
->
Attributes
&
msidbFeatureAttributesFavorSource
)
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
{
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
}
else
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
}
else
if
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
{
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
}
else
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
}
}
}
...
...
dlls/msi/install.c
View file @
ba9f1f77
...
...
@@ -1163,7 +1163,7 @@ static UINT MSI_SetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent,
return
ERROR_UNKNOWN_COMPONENT
;
if
(
comp
->
Enabled
)
comp
->
Installed
=
iState
;
comp
->
Action
=
iState
;
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/msipriv.h
View file @
ba9f1f77
...
...
@@ -955,8 +955,6 @@ extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
MSIINSTALLCONTEXT
context
,
DWORD
options
,
LPCWSTR
value
);
extern
UINT
msi_get_local_package_name
(
LPWSTR
path
,
LPCWSTR
suffix
);
extern
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
,
BOOL
replace
);
extern
void
msi_component_set_state
(
MSIPACKAGE
*
,
MSICOMPONENT
*
,
INSTALLSTATE
);
extern
void
msi_feature_set_state
(
MSIPACKAGE
*
,
MSIFEATURE
*
,
INSTALLSTATE
);
extern
MSIASSEMBLY
*
load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
UINT
install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
WCHAR
*
font_version_from_file
(
const
WCHAR
*
);
...
...
dlls/msi/tests/package.c
View file @
ba9f1f77
...
...
@@ -7860,10 +7860,8 @@ static void test_removefiles(void)
installed
=
action
=
0xdeadbeef
;
r
=
MsiGetComponentState
(
hpkg
,
"hydrogen"
,
&
installed
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get component state %u
\n
"
,
r
);
todo_wine
{
ok
(
installed
==
INSTALLSTATE_UNKNOWN
,
"expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
installed
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
todo_wine
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
r
=
MsiSetComponentState
(
hpkg
,
"helium"
,
INSTALLSTATE_LOCAL
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to set component state: %d
\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