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
62219754
Commit
62219754
authored
May 19, 2008
by
James Hawkins
Committed by
Alexandre Julliard
May 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't enable a feature's components if that feature is disabled.
parent
47711cc6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
5 deletions
+181
-5
action.c
dlls/msi/action.c
+5
-5
install.c
dlls/msi/tests/install.c
+176
-0
No files found.
dlls/msi/action.c
View file @
62219754
...
@@ -1780,9 +1780,6 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
...
@@ -1780,9 +1780,6 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
* 9) FILEADDLOCAL
* 9) FILEADDLOCAL
* 10) FILEADDSOURCE
* 10) FILEADDSOURCE
* 11) FILEADDDEFAULT
* 11) FILEADDDEFAULT
* I have confirmed that if ADDLOCAL is stated then the INSTALLLEVEL is
* ignored for all the features. seems strange, especially since it is not
* documented anywhere, but it is how it works.
*
*
* I am still ignoring a lot of these. But that is ok for now, ADDLOCAL and
* I am still ignoring a lot of these. But that is ok for now, ADDLOCAL and
* REMOVE are the big ones, since we don't handle administrative installs
* REMOVE are the big ones, since we don't handle administrative installs
...
@@ -1840,8 +1837,11 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
...
@@ -1840,8 +1837,11 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{
{
ComponentList
*
cl
;
ComponentList
*
cl
;
TRACE
(
"Examining Feature %s (Installed %i, Action %i)
\n
"
,
TRACE
(
"Examining Feature %s (Level %i, Installed %i, Action %i)
\n
"
,
debugstr_w
(
feature
->
Feature
),
feature
->
Installed
,
feature
->
Action
);
debugstr_w
(
feature
->
Feature
),
feature
->
Level
,
feature
->
Installed
,
feature
->
Action
);
if
(
!
feature
->
Level
)
continue
;
/* features with components that have compressed files are made local */
/* features with components that have compressed files are made local */
LIST_FOR_EACH_ENTRY
(
cl
,
&
feature
->
Components
,
ComponentList
,
entry
)
LIST_FOR_EACH_ENTRY
(
cl
,
&
feature
->
Components
,
ComponentList
,
entry
)
...
...
dlls/msi/tests/install.c
View file @
62219754
...
@@ -630,6 +630,67 @@ static const CHAR ca51_custom_action_dat[] = "Action\tType\tSource\tTarget\n"
...
@@ -630,6 +630,67 @@ static const CHAR ca51_custom_action_dat[] = "Action\tType\tSource\tTarget\n"
"GoodSetProperty
\t
51
\t
MYPROP
\t
42
\n
"
"GoodSetProperty
\t
51
\t
MYPROP
\t
42
\n
"
"BadSetProperty
\t
51
\t\t
MYPROP
\n
"
;
"BadSetProperty
\t
51
\t\t
MYPROP
\n
"
;
static
const
CHAR
is_feature_dat
[]
=
"Feature
\t
Feature_Parent
\t
Title
\t
Description
\t
Display
\t
Level
\t
Directory_
\t
Attributes
\n
"
"s38
\t
S38
\t
L64
\t
L255
\t
I2
\t
i2
\t
S72
\t
i2
\n
"
"Feature
\t
Feature
\n
"
"one
\t\t\t\t
2
\t
1
\t\t
0
\n
"
/* favorLocal */
"two
\t\t\t\t
2
\t
1
\t\t
1
\n
"
/* favorSource */
"three
\t\t\t\t
2
\t
1
\t\t
4
\n
"
/* favorAdvertise */
"four
\t\t\t\t
2
\t
0
\t\t
0"
;
/* disabled */
static
const
CHAR
is_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"alpha
\t\t
MSITESTDIR
\t
0
\t\t
alpha_file
\n
"
/* favorLocal:Local */
"beta
\t\t
MSITESTDIR
\t
1
\t\t
beta_file
\n
"
/* favorLocal:Source */
"gamma
\t\t
MSITESTDIR
\t
2
\t\t
gamma_file
\n
"
/* favorLocal:Optional */
"theta
\t\t
MSITESTDIR
\t
0
\t\t
theta_file
\n
"
/* favorSource:Local */
"delta
\t\t
MSITESTDIR
\t
1
\t\t
delta_file
\n
"
/* favorSource:Source */
"epsilon
\t\t
MSITESTDIR
\t
2
\t\t
epsilon_file
\n
"
/* favorSource:Optional */
"zeta
\t\t
MSITESTDIR
\t
0
\t\t
zeta_file
\n
"
/* favorAdvertise:Local */
"iota
\t\t
MSITESTDIR
\t
1
\t\t
iota_file
\n
"
/* favorAdvertise:Source */
"eta
\t\t
MSITESTDIR
\t
2
\t\t
eta_file
\n
"
/* favorAdvertise:Optional */
"kappa
\t\t
MSITESTDIR
\t
0
\t\t
kappa_file
\n
"
/* disabled:Local */
"lambda
\t\t
MSITESTDIR
\t
1
\t\t
lambda_file
\n
"
/* disabled:Source */
"mu
\t\t
MSITESTDIR
\t
2
\t\t
mu_file
\n
"
;
/* disabled:Optional */
static
const
CHAR
is_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"one
\t
alpha
\n
"
"one
\t
beta
\n
"
"one
\t
gamma
\n
"
"two
\t
theta
\n
"
"two
\t
delta
\n
"
"two
\t
epsilon
\n
"
"three
\t
zeta
\n
"
"three
\t
iota
\n
"
"three
\t
eta
\n
"
"four
\t
kappa
\n
"
"four
\t
lambda
\n
"
"four
\t
mu"
;
static
const
CHAR
is_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"alpha_file
\t
alpha
\t
alpha
\t
500
\t\t\t
8192
\t
1
\n
"
"beta_file
\t
beta
\t
beta
\t
500
\t\t\t
8291
\t
2
\n
"
"gamma_file
\t
gamma
\t
gamma
\t
500
\t\t\t
8192
\t
3
\n
"
"theta_file
\t
theta
\t
theta
\t
500
\t\t\t
8192
\t
4
\n
"
"delta_file
\t
delta
\t
delta
\t
500
\t\t\t
8192
\t
5
\n
"
"epsilon_file
\t
epsilon
\t
epsilon
\t
500
\t\t\t
8192
\t
6
\n
"
"zeta_file
\t
zeta
\t
zeta
\t
500
\t\t\t
8192
\t
7
\n
"
"iota_file
\t
iota
\t
iota
\t
500
\t\t\t
8192
\t
8
\n
"
"eta_file
\t
eta
\t
eta
\t
500
\t\t\t
8192
\t
9
\n
"
"kappa_file
\t
kappa
\t
kappa
\t
500
\t\t\t
8192
\t
10
\n
"
"lambda_file
\t
lambda
\t
lambda
\t
500
\t\t\t
8192
\t
11
\n
"
"mu_file
\t
mu
\t
mu
\t
500
\t\t\t
8192
\t
12"
;
static
const
CHAR
is_media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
"i2
\t
i4
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
"Media
\t
DiskId
\n
"
"1
\t
12
\t\t\t
DISK1
\t\n
"
;
typedef
struct
_msi_table
typedef
struct
_msi_table
{
{
const
CHAR
*
filename
;
const
CHAR
*
filename
;
...
@@ -968,6 +1029,18 @@ static const msi_table ca51_tables[] =
...
@@ -968,6 +1029,18 @@ static const msi_table ca51_tables[] =
ADD_TABLE
(
ca51_custom_action
),
ADD_TABLE
(
ca51_custom_action
),
};
};
static
const
msi_table
is_tables
[]
=
{
ADD_TABLE
(
is_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
is_feature
),
ADD_TABLE
(
is_feature_comp
),
ADD_TABLE
(
is_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
is_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* cabinet definitions */
/* make the max size large so there is only one cab file */
/* make the max size large so there is only one cab file */
...
@@ -4289,6 +4362,108 @@ static void test_customaction51(void)
...
@@ -4289,6 +4362,108 @@ static void test_customaction51(void)
RemoveDirectory
(
"msitest"
);
RemoveDirectory
(
"msitest"
);
}
}
static
void
test_installstate
(
void
)
{
UINT
r
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
alpha"
,
500
);
create_file
(
"msitest
\\
beta"
,
500
);
create_file
(
"msitest
\\
gamma"
,
500
);
create_file
(
"msitest
\\
theta"
,
500
);
create_file
(
"msitest
\\
delta"
,
500
);
create_file
(
"msitest
\\
epsilon"
,
500
);
create_file
(
"msitest
\\
zeta"
,
500
);
create_file
(
"msitest
\\
iota"
,
500
);
create_file
(
"msitest
\\
eta"
,
500
);
create_file
(
"msitest
\\
kappa"
,
500
);
create_file
(
"msitest
\\
lambda"
,
500
);
create_file
(
"msitest
\\
mu"
,
500
);
create_database
(
msifile
,
is_tables
,
sizeof
(
is_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
alpha"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
beta"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
gamma"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
theta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
delta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
epsilon"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
zeta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
iota"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
eta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
kappa"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lambda"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
mu"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=
\"
one,two,three,four
\"
"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
alpha"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
beta"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
gamma"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
theta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
delta"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
epsilon"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
zeta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
iota"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
eta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
kappa"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lambda"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
mu"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"ADDSOURCE=
\"
one,two,three,four
\"
"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
alpha"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
beta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
gamma"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
theta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
delta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
epsilon"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
zeta"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
iota"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
eta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
kappa"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lambda"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
mu"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=
\"
one,two,three,four
\"
"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
alpha"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
beta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
gamma"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
theta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
delta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
epsilon"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
zeta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
iota"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
eta"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
kappa"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lambda"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
mu"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File installed
\n
"
);
DeleteFile
(
msifile
);
DeleteFile
(
"msitest
\\
alpha"
);
DeleteFile
(
"msitest
\\
beta"
);
DeleteFile
(
"msitest
\\
gamma"
);
DeleteFile
(
"msitest
\\
theta"
);
DeleteFile
(
"msitest
\\
delta"
);
DeleteFile
(
"msitest
\\
epsilon"
);
DeleteFile
(
"msitest
\\
zeta"
);
DeleteFile
(
"msitest
\\
iota"
);
DeleteFile
(
"msitest
\\
eta"
);
DeleteFile
(
"msitest
\\
kappa"
);
DeleteFile
(
"msitest
\\
lambda"
);
DeleteFile
(
"msitest
\\
mu"
);
RemoveDirectory
(
"msitest"
);
}
START_TEST
(
install
)
START_TEST
(
install
)
{
{
DWORD
len
;
DWORD
len
;
...
@@ -4339,6 +4514,7 @@ START_TEST(install)
...
@@ -4339,6 +4514,7 @@ START_TEST(install)
test_writeregistryvalues
();
test_writeregistryvalues
();
test_sourcefolder
();
test_sourcefolder
();
test_customaction51
();
test_customaction51
();
test_installstate
();
SetCurrentDirectoryA
(
prev_path
);
SetCurrentDirectoryA
(
prev_path
);
}
}
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