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
1fe30e00
Commit
1fe30e00
authored
Mar 02, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Skip the FindRelatedProducts action when product is already installed.
parent
e637839a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
0 deletions
+95
-0
install.c
dlls/msi/tests/install.c
+89
-0
upgrade.c
dlls/msi/upgrade.c
+6
-0
No files found.
dlls/msi/tests/install.c
View file @
1fe30e00
...
...
@@ -1552,6 +1552,55 @@ static const CHAR rrv_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
frp_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
"
"product.txt
\t
product
\t
product.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
;
static
const
CHAR
frp_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
"
"product
\t\t\t
product feature
\t
1
\t
2
\t
MSITESTDIR
\t
0
\n
"
;
static
const
CHAR
frp_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"product
\t
product
\n
"
;
static
const
CHAR
frp_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
"
"product
\t
{44725EE0-EEA8-40BD-8162-A48224A2FEA1}
\t
MSITESTDIR
\t
0
\t\t
product.txt
\n
"
;
static
const
CHAR
frp_custom_action_dat
[]
=
"Action
\t
Type
\t
Source
\t
Target
\t
ISComments
\n
"
"s72
\t
i2
\t
S64
\t
S0
\t
S255
\n
"
"CustomAction
\t
Action
\n
"
"TestProp
\t
19
\t\t\t
PROP set
\n
"
;
static
const
CHAR
frp_upgrade_dat
[]
=
"UpgradeCode
\t
VersionMin
\t
VersionMax
\t
Language
\t
Attributes
\t
Remove
\t
ActionProperty
\n
"
"s38
\t
S20
\t
S20
\t
S255
\t
i4
\t
S255
\t
s72
\n
"
"Upgrade
\t
UpgradeCode
\t
VersionMin
\t
VersionMax
\t
Language
\t
Attributes
\n
"
"{4C0EAA15-0264-4E5A-8758-609EF142B92D}
\t
1.1.1
\t
2.2.2
\t\t
768
\t\t
PROP
\n
"
;
static
const
CHAR
frp_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"FindRelatedProducts
\t\t
50
\n
"
"TestProp
\t
PROP AND NOT REMOVE
\t
51
\n
"
"LaunchConditions
\t\t
100
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"CostFinalize
\t\t
1000
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"ProcessComponents
\t\t
1600
\n
"
"RemoveFiles
\t\t
1700
\n
"
"InstallFiles
\t\t
2000
\n
"
"RegisterProduct
\t\t
5000
\n
"
"PublishFeatures
\t\t
5100
\n
"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -2429,6 +2478,20 @@ static const msi_table rrv_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
frp_tables
[]
=
{
ADD_TABLE
(
directory
),
ADD_TABLE
(
frp_component
),
ADD_TABLE
(
frp_feature
),
ADD_TABLE
(
frp_feature_comp
),
ADD_TABLE
(
frp_file
),
ADD_TABLE
(
frp_upgrade
),
ADD_TABLE
(
frp_custom_action
),
ADD_TABLE
(
frp_install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -8503,6 +8566,31 @@ static void test_remove_registry_values(void)
delete_test_files
();
}
static
void
test_find_related_products
(
void
)
{
UINT
r
;
create_test_files
();
create_file
(
"msitest
\\
product.txt"
,
1000
);
create_database
(
msifile
,
frp_tables
,
sizeof
(
frp_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* install again, so it finds the upgrade code */
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
product.txt"
,
TRUE
),
"file not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"directory not removed
\n
"
);
delete_test_files
();
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -8607,6 +8695,7 @@ START_TEST(install)
test_publish_components
();
test_remove_duplicate_files
();
test_remove_registry_values
();
test_find_related_products
();
DeleteFileA
(
log_file
);
...
...
dlls/msi/upgrade.c
View file @
1fe30e00
...
...
@@ -202,6 +202,12 @@ UINT ACTION_FindRelatedProducts(MSIPACKAGE *package)
UINT
rc
=
ERROR_SUCCESS
;
MSIQUERY
*
view
;
if
(
msi_get_property_int
(
package
,
szInstalled
,
0
))
{
TRACE
(
"Skipping FindRelatedProducts action: product already installed
\n
"
);
return
ERROR_SUCCESS
;
}
if
(
check_unique_action
(
package
,
szFindRelatedProducts
))
{
TRACE
(
"Skipping FindRelatedProducts action: already done on client side
\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