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
575cc67d
Commit
575cc67d
authored
Oct 26, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use msi_feature_set_state and msi_component_set_state where possible.
parent
6395ff6a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
61 deletions
+30
-61
action.c
dlls/msi/action.c
+5
-23
dialog.c
dlls/msi/dialog.c
+1
-2
events.c
dlls/msi/events.c
+5
-12
helpers.c
dlls/msi/helpers.c
+6
-22
install.c
dlls/msi/install.c
+1
-2
msipriv.h
dlls/msi/msipriv.h
+12
-0
No files found.
dlls/msi/action.c
View file @
575cc67d
...
...
@@ -1150,8 +1150,7 @@ static UINT load_component( MSIRECORD *row, LPVOID param )
comp
->
KeyPath
=
msi_dup_record_field
(
row
,
6
);
comp
->
Installed
=
INSTALLSTATE_UNKNOWN
;
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
comp
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
msi_component_set_state
(
comp
,
INSTALLSTATE_UNKNOWN
);
return
ERROR_SUCCESS
;
}
...
...
@@ -1282,8 +1281,7 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
feature
->
Attributes
=
MSI_RecordGetInteger
(
row
,
8
);
feature
->
Installed
=
INSTALLSTATE_UNKNOWN
;
feature
->
Action
=
INSTALLSTATE_UNKNOWN
;
feature
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
msi_feature_set_state
(
feature
,
INSTALLSTATE_UNKNOWN
);
list_add_tail
(
&
package
->
features
,
&
feature
->
entry
);
...
...
@@ -1665,14 +1663,11 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
override
=
msi_dup_property
(
package
,
property
);
if
(
!
override
)
return
FALSE
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
strcmpiW
(
override
,
all
)
==
0
)
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
}
msi_feature_set_state
(
feature
,
state
);
else
{
LPWSTR
ptr
=
override
;
...
...
@@ -1683,8 +1678,7 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
if
((
ptr2
&&
strncmpW
(
ptr
,
feature
->
Feature
,
ptr2
-
ptr
)
==
0
)
||
(
!
ptr2
&&
strcmpW
(
ptr
,
feature
->
Feature
)
==
0
))
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
msi_feature_set_state
(
feature
,
state
);
break
;
}
if
(
ptr2
)
...
...
@@ -1702,18 +1696,6 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
return
TRUE
;
}
static
void
msi_feature_set_state
(
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
}
static
void
msi_component_set_state
(
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
{
comp
->
ActionRequest
=
state
;
comp
->
Action
=
state
;
}
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
{
int
install_level
;
...
...
dlls/msi/dialog.c
View file @
575cc67d
...
...
@@ -1766,8 +1766,7 @@ msi_seltree_menu( HWND hwnd, HTREEITEM hItem )
case
INSTALLSTATE_LOCAL
:
case
INSTALLSTATE_ADVERTISED
:
case
INSTALLSTATE_ABSENT
:
feature
->
ActionRequest
=
r
;
feature
->
Action
=
r
;
msi_feature_set_state
(
feature
,
r
);
break
;
default:
FIXME
(
"select feature and all children
\n
"
);
...
...
dlls/msi/events.c
View file @
575cc67d
...
...
@@ -185,10 +185,8 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
else
{
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
feature
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
feature
->
Action
=
INSTALLSTATE_LOCAL
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_LOCAL
);
ACTION_UpdateComponentStates
(
package
,
argument
);
}
return
ERROR_SUCCESS
;
...
...
@@ -207,10 +205,8 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
else
{
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
feature
->
ActionRequest
=
INSTALLSTATE_ABSENT
;
feature
->
Action
=
INSTALLSTATE_ABSENT
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_ABSENT
);
ACTION_UpdateComponentStates
(
package
,
argument
);
}
return
ERROR_SUCCESS
;
...
...
@@ -229,10 +225,7 @@ static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument,
else
{
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
feature
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
feature
->
Action
=
INSTALLSTATE_SOURCE
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_SOURCE
);
ACTION_UpdateComponentStates
(
package
,
argument
);
}
return
ERROR_SUCCESS
;
...
...
dlls/msi/helpers.c
View file @
575cc67d
...
...
@@ -865,17 +865,13 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
continue
;
if
(
newstate
==
INSTALLSTATE_LOCAL
)
{
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
component
->
Action
=
INSTALLSTATE_LOCAL
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
else
{
ComponentList
*
clist
;
MSIFEATURE
*
f
;
component
->
ActionRequest
=
newstate
;
component
->
Action
=
newstate
;
msi_component_set_state
(
component
,
newstate
);
/*if any other feature wants is local we need to set it local*/
LIST_FOR_EACH_ENTRY
(
f
,
&
package
->
features
,
MSIFEATURE
,
entry
)
...
...
@@ -897,26 +893,14 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
if
(
component
->
Attributes
&
msidbComponentAttributesOptional
)
{
if
(
f
->
Attributes
&
msidbFeatureAttributesFavorSource
)
{
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
else
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
}
else
if
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
{
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
else
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
}
}
}
...
...
dlls/msi/install.c
View file @
575cc67d
...
...
@@ -539,8 +539,7 @@ UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE* package, LPCWSTR szFeature,
feature
->
Attributes
&
msidbFeatureAttributesDisallowAdvertise
)
return
ERROR_FUNCTION_FAILED
;
feature
->
ActionRequest
=
iState
;
feature
->
Action
=
iState
;
msi_feature_set_state
(
feature
,
iState
);
ACTION_UpdateComponentStates
(
package
,
szFeature
);
...
...
dlls/msi/msipriv.h
View file @
575cc67d
...
...
@@ -713,6 +713,18 @@ extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action);
extern
void
ACTION_FinishCustomActions
(
MSIPACKAGE
*
package
);
extern
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
BOOL
execute
);
static
inline
void
msi_feature_set_state
(
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
}
static
inline
void
msi_component_set_state
(
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
{
comp
->
ActionRequest
=
state
;
comp
->
Action
=
state
;
}
/* actions in other modules */
extern
UINT
ACTION_AppSearch
(
MSIPACKAGE
*
package
);
extern
UINT
ACTION_FindRelatedProducts
(
MSIPACKAGE
*
package
);
...
...
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