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
1d46cdf1
Commit
1d46cdf1
authored
Jul 25, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Always load all the components.
parent
5c8b22f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
80 deletions
+68
-80
action.c
dlls/msi/action.c
+67
-74
install.c
dlls/msi/tests/install.c
+1
-4
package.c
dlls/msi/tests/package.c
+0
-2
No files found.
dlls/msi/action.c
View file @
1d46cdf1
...
...
@@ -1095,13 +1095,16 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
return
rc
;
}
static
MSICOMPONENT
*
load_component
(
MSIRECORD
*
row
)
static
UINT
load_component
(
MSIRECORD
*
row
,
LPVOID
param
)
{
MSIPACKAGE
*
package
=
param
;
MSICOMPONENT
*
comp
;
comp
=
msi_alloc_zero
(
sizeof
(
MSICOMPONENT
)
);
if
(
!
comp
)
return
comp
;
return
ERROR_FUNCTION_FAILED
;
list_add_tail
(
&
package
->
components
,
&
comp
->
entry
);
/* fill in the data */
comp
->
Component
=
msi_dup_record_field
(
row
,
1
);
...
...
@@ -1118,26 +1121,41 @@ static MSICOMPONENT* load_component( MSIRECORD * row )
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_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
break
;
default:
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
comp
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
case
msidbComponentAttributesLocalOnly
:
case
msidbComponentAttributesOptional
:
comp
->
Action
=
INSTALLSTATE_LOCAL
;
comp
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
break
;
case
msidbComponentAttributesSourceOnly
:
comp
->
Action
=
INSTALLSTATE_SOURCE
;
comp
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
break
;
default:
comp
->
Action
=
INSTALLSTATE_UNKNOWN
;
comp
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
}
comp
->
Enabled
=
TRUE
;
return
ERROR_SUCCESS
;
}
static
UINT
load_all_components
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'`'
,
0
};
MSIQUERY
*
view
;
UINT
r
;
if
(
!
list_empty
(
&
package
->
components
))
return
ERROR_SUCCESS
;
return
comp
;
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
MSI_IterateRecords
(
view
,
NULL
,
load_component
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
}
typedef
struct
{
...
...
@@ -1158,56 +1176,24 @@ static UINT add_feature_component( MSIFEATURE *feature, MSICOMPONENT *comp )
return
ERROR_SUCCESS
;
}
static
UINT
iterate_component_check
(
MSIRECORD
*
row
,
LPVOID
param
)
{
_ilfs
*
ilfs
=
(
_ilfs
*
)
param
;
MSIPACKAGE
*
package
=
ilfs
->
package
;
MSIFEATURE
*
feature
=
ilfs
->
feature
;
MSICOMPONENT
*
comp
;
comp
=
load_component
(
row
);
if
(
!
comp
)
return
ERROR_FUNCTION_FAILED
;
list_add_tail
(
&
package
->
components
,
&
comp
->
entry
);
add_feature_component
(
feature
,
comp
);
TRACE
(
"Loaded new component %p
\n
"
,
comp
);
return
ERROR_SUCCESS
;
}
static
UINT
iterate_load_featurecomponents
(
MSIRECORD
*
row
,
LPVOID
param
)
{
_ilfs
*
ilfs
=
(
_ilfs
*
)
param
;
LPCWSTR
component
;
DWORD
rc
;
MSICOMPONENT
*
comp
;
MSIQUERY
*
view
;
static
const
WCHAR
Query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'`'
,
' '
,
'='
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
component
=
MSI_RecordGetString
(
row
,
1
);
/* check to see if the component is already loaded */
comp
=
get_loaded_component
(
ilfs
->
package
,
component
);
if
(
comp
)
if
(
!
comp
)
{
TRACE
(
"Component %s already loaded
\n
"
,
debugstr_w
(
component
)
);
add_feature_component
(
ilfs
->
feature
,
comp
);
return
ERROR_SUCCESS
;
ERR
(
"unknown component %s
\n
"
,
debugstr_w
(
component
));
return
ERROR_FUNCTION_FAILED
;
}
rc
=
MSI_OpenQuery
(
ilfs
->
package
->
db
,
&
view
,
Query
,
component
);
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_component_check
,
ilfs
);
msiobj_release
(
&
view
->
hdr
);
add_feature_component
(
ilfs
->
feature
,
comp
);
comp
->
Enabled
=
TRUE
;
return
ERROR_SUCCESS
;
}
...
...
@@ -1271,6 +1257,27 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
return
ERROR_SUCCESS
;
}
static
UINT
load_all_features
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'e'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
'`'
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'`'
,
0
};
MSIQUERY
*
view
;
UINT
r
;
if
(
!
list_empty
(
&
package
->
features
))
return
ERROR_SUCCESS
;
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
MSI_IterateRecords
(
view
,
NULL
,
load_feature
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
}
static
LPWSTR
folder_split_path
(
LPWSTR
p
,
WCHAR
ch
)
{
if
(
!
p
)
...
...
@@ -1361,12 +1368,6 @@ static UINT load_all_files(MSIPACKAGE *package)
*/
static
UINT
ACTION_CostInitialize
(
MSIPACKAGE
*
package
)
{
MSIQUERY
*
view
;
UINT
rc
;
static
const
WCHAR
Query_all
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'e'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
'`'
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'`'
,
0
};
static
const
WCHAR
szCosting
[]
=
{
'C'
,
'o'
,
's'
,
't'
,
'i'
,
'n'
,
'g'
,
'C'
,
'o'
,
'm'
,
'p'
,
'l'
,
'e'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szZero
[]
=
{
'0'
,
0
};
...
...
@@ -1375,19 +1376,11 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package)
return
ERROR_SUCCESS
;
MSI_SetPropertyW
(
package
,
szCosting
,
szZero
);
MSI_SetPropertyW
(
package
,
cszRootDrive
,
c_colon
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
Query_all
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
if
(
list_empty
(
&
package
->
features
))
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
load_feature
,
package
);
msiobj_release
(
&
view
->
hdr
);
}
MSI_SetPropertyW
(
package
,
cszRootDrive
,
c_colon
);
load_all_files
(
package
);
load_all_components
(
package
);
load_all_features
(
package
);
load_all_files
(
package
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/tests/install.c
View file @
1d46cdf1
...
...
@@ -661,10 +661,7 @@ static void test_MsiSetComponentState(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiDoAction
(
package
,
"CostInitialize"
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiDoAction
(
package
,
"FileCost"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
dlls/msi/tests/package.c
View file @
1d46cdf1
...
...
@@ -315,10 +315,8 @@ static void test_getsourcepath( void )
r
=
MsiGetSourcePath
(
hpkg
,
"TARGETDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_DIRECTORY
,
"return value wrong
\n
"
);
todo_wine
{
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
}
r
=
MsiDoAction
(
hpkg
,
"CostFinalize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost finalize failed
\n
"
);
...
...
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