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
d893cb7d
Commit
d893cb7d
authored
Sep 20, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Sep 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Load the component states in CostFinalize instead of CostInitialize.
parent
ca5c1100
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
27 deletions
+38
-27
action.c
dlls/msi/action.c
+38
-27
package.c
dlls/msi/tests/package.c
+0
-0
No files found.
dlls/msi/action.c
View file @
d893cb7d
...
...
@@ -1118,26 +1118,9 @@ static UINT load_component( MSIRECORD *row, LPVOID param )
comp
->
Condition
=
msi_dup_record_field
(
row
,
5
);
comp
->
KeyPath
=
msi_dup_record_field
(
row
,
6
);
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
switch
(
comp
->
Attributes
)
{
case
msidbComponentAttributesLocalOnly
:
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
break
;
case
msidbComponentAttributesSourceOnly
:
comp
->
Action
=
INSTALLSTATE_SOURCE
;
comp
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
break
;
case
msidbComponentAttributesOptional
:
comp
->
Action
=
INSTALLSTATE_DEFAULT
;
comp
->
ActionRequest
=
INSTALLSTATE_DEFAULT
;
break
;
default:
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
comp
->
Installed
=
INSTALLSTATE_UNKNOWN
;
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
comp
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
return
ERROR_SUCCESS
;
}
...
...
@@ -1343,13 +1326,6 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
file
->
IsCompressed
=
package
->
WordCount
&
MSIWORDCOUNT_COMPRESSED
;
}
if
(
file
->
IsCompressed
)
{
file
->
Component
->
ForceLocalState
=
TRUE
;
file
->
Component
->
Action
=
INSTALLSTATE_LOCAL
;
file
->
Component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
TRACE
(
"File Loaded (%s)
\n
"
,
debugstr_w
(
file
->
File
));
list_add_tail
(
&
package
->
files
,
&
file
->
entry
);
...
...
@@ -1837,6 +1813,32 @@ static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param)
return
ERROR_SUCCESS
;
}
static
void
load_all_component_states
(
MSIPACKAGE
*
package
)
{
MSICOMPONENT
*
comp
;
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
switch
(
comp
->
Attributes
)
{
case
msidbComponentAttributesLocalOnly
:
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
break
;
case
msidbComponentAttributesSourceOnly
:
comp
->
Action
=
INSTALLSTATE_SOURCE
;
comp
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
break
;
case
msidbComponentAttributesOptional
:
comp
->
Action
=
INSTALLSTATE_DEFAULT
;
comp
->
ActionRequest
=
INSTALLSTATE_DEFAULT
;
break
;
default:
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
}
}
/*
* A lot is done in this function aside from just the costing.
...
...
@@ -1876,6 +1878,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
msiobj_release
(
&
view
->
hdr
);
}
load_all_component_states
(
package
);
TRACE
(
"File calculations
\n
"
);
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
...
...
@@ -1886,6 +1890,13 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
if
(
!
comp
)
continue
;
if
(
file
->
IsCompressed
)
{
comp
->
ForceLocalState
=
TRUE
;
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
/* calculate target */
p
=
resolve_folder
(
package
,
comp
->
Directory
,
FALSE
,
FALSE
,
NULL
);
...
...
dlls/msi/tests/package.c
View file @
d893cb7d
This diff is collapsed.
Click to expand it.
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