Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3bec162d
Commit
3bec162d
authored
Aug 25, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Skip the component action detection logic if there is no product code.
parent
d596ae29
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
44 deletions
+30
-44
action.c
dlls/msi/action.c
+8
-8
helpers.c
dlls/msi/helpers.c
+6
-6
msipriv.h
dlls/msi/msipriv.h
+9
-2
format.c
dlls/msi/tests/format.c
+1
-4
package.c
dlls/msi/tests/package.c
+6
-24
No files found.
dlls/msi/action.c
View file @
3bec162d
...
...
@@ -1193,7 +1193,7 @@ static UINT load_component( MSIRECORD *row, LPVOID param )
comp
->
KeyPath
=
msi_dup_record_field
(
row
,
6
);
comp
->
Installed
=
INSTALLSTATE_UNKNOWN
;
msi_component_set_state
(
comp
,
INSTALLSTATE_UNKNOWN
);
msi_component_set_state
(
package
,
comp
,
INSTALLSTATE_UNKNOWN
);
return
ERROR_SUCCESS
;
}
...
...
@@ -1943,34 +1943,34 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{
if
((
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
&&
!
component
->
ForceLocalState
)
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
else
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
continue
;
}
/* if any feature is local, the component must be local too */
if
(
component
->
hasLocalFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
continue
;
}
if
(
component
->
hasSourceFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
continue
;
}
if
(
component
->
hasAdvertiseFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_ADVERTISED
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_ADVERTISED
);
continue
;
}
TRACE
(
"nobody wants component %s
\n
"
,
debugstr_w
(
component
->
Component
));
if
(
component
->
anyAbsent
)
msi_component_set_state
(
component
,
INSTALLSTATE_ABSENT
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_ABSENT
);
}
LIST_FOR_EACH_ENTRY
(
component
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
...
...
@@ -1978,7 +1978,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
if
(
component
->
Action
==
INSTALLSTATE_DEFAULT
)
{
TRACE
(
"%s was default, setting to local
\n
"
,
debugstr_w
(
component
->
Component
));
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
}
TRACE
(
"Result: Component %s (Installed %i, Action %i)
\n
"
,
...
...
dlls/msi/helpers.c
View file @
3bec162d
...
...
@@ -891,7 +891,7 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
continue
;
if
(
newstate
==
INSTALLSTATE_LOCAL
)
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
else
{
ComponentList
*
clist
;
...
...
@@ -899,7 +899,7 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
component
->
hasLocalFeature
=
FALSE
;
msi_component_set_state
(
component
,
newstate
);
msi_component_set_state
(
package
,
component
,
newstate
);
/*if any other feature wants is local we need to set it local*/
LIST_FOR_EACH_ENTRY
(
f
,
&
package
->
features
,
MSIFEATURE
,
entry
)
...
...
@@ -922,14 +922,14 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
if
(
component
->
Attributes
&
msidbComponentAttributesOptional
)
{
if
(
f
->
Attributes
&
msidbFeatureAttributesFavorSource
)
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
else
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
}
else
if
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_SOURCE
);
else
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
msi_component_set_state
(
package
,
component
,
INSTALLSTATE_LOCAL
);
}
}
}
...
...
dlls/msi/msipriv.h
View file @
3bec162d
...
...
@@ -901,9 +901,16 @@ static inline void msi_feature_set_state(MSIPACKAGE *package,
}
}
static
inline
void
msi_component_set_state
(
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
static
inline
void
msi_component_set_state
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
{
if
(
state
==
INSTALLSTATE_ABSENT
)
if
(
!
package
->
ProductCode
)
{
comp
->
ActionRequest
=
state
;
comp
->
Action
=
state
;
}
else
if
(
state
==
INSTALLSTATE_ABSENT
)
{
switch
(
comp
->
Installed
)
{
...
...
dlls/msi/tests/format.c
View file @
3bec162d
...
...
@@ -2417,10 +2417,7 @@ static void test_formatrecord_tables(void)
MsiRecordSetString
(
hrec
,
1
,
"[$parietal]"
);
r
=
MsiFormatRecord
(
hpkg
,
hrec
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"format record failed: %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmp
(
buf
,
expected
),
"Expected '%s', got %s
\n
"
,
expected
,
buf
);
}
ok
(
!
lstrcmp
(
buf
,
expected
),
"Expected '%s', got %s
\n
"
,
expected
,
buf
);
sprintf
(
buf
,
"%sI am a really long directory
\\
temporal.txt"
,
root
);
DeleteFile
(
buf
);
...
...
dlls/msi/tests/package.c
View file @
3bec162d
...
...
@@ -5830,10 +5830,7 @@ static void test_featureparents(void)
r
=
MsiGetComponentState
(
hpkg
,
"virgo"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected virgo INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected virgo INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected virgo INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5854,10 +5851,7 @@ static void test_featureparents(void)
r
=
MsiGetComponentState
(
hpkg
,
"cepheus"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected cepheus INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected cepheus INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected cepheus INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5878,10 +5872,7 @@ static void test_featureparents(void)
r
=
MsiGetComponentState
(
hpkg
,
"monoceros"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected monoceros INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected monoceros INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected monoceros INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5940,10 +5931,7 @@ static void test_featureparents(void)
r
=
MsiGetComponentState
(
hpkg
,
"virgo"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected virgo INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected virgo INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected virgo INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5964,20 +5952,14 @@ static void test_featureparents(void)
r
=
MsiGetComponentState
(
hpkg
,
"cepheus"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected cepheus INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected cepheus INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected cepheus INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetComponentState
(
hpkg
,
"andromeda"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected andromeda INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected andromeda INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_SOURCE
,
"Expected andromeda INSTALLSTATE_SOURCE, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
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