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
a2df31ae
Commit
a2df31ae
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Only publish the product if at least one feature is to be installed.
parent
624bbbe7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
33 deletions
+20
-33
action.c
dlls/msi/action.c
+17
-0
install.c
dlls/msi/tests/install.c
+3
-33
No files found.
dlls/msi/action.c
View file @
a2df31ae
...
...
@@ -3241,6 +3241,19 @@ static UINT ITERATE_PublishProduct(MSIRECORD *row, LPVOID param)
return
ERROR_SUCCESS
;
}
static
BOOL
msi_check_publish
(
MSIPACKAGE
*
package
)
{
MSIFEATURE
*
feature
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
feature
->
ActionRequest
==
INSTALLSTATE_LOCAL
)
return
TRUE
;
}
return
FALSE
;
}
/*
* 99% of the work done here is only done for
* advertised installs. However this is where the
...
...
@@ -3275,6 +3288,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
DWORD
size
;
MSIHANDLE
hDb
,
hSumInfo
;
/* FIXME: also need to publish if the product is in advertise mode */
if
(
!
msi_check_publish
(
package
))
return
ERROR_SUCCESS
;
/* write out icon files */
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
Query
,
&
view
);
...
...
dlls/msi/tests/install.c
View file @
a2df31ae
...
...
@@ -1594,6 +1594,9 @@ static void test_publish(void)
MsiSetInternalUI
(
INSTALLUILEVEL_FULL
,
NULL
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
if
(
state
!=
INSTALLSTATE_UNKNOWN
)
{
skip
(
"Install database not in a clean state
\n
"
);
...
...
@@ -1602,9 +1605,6 @@ static void test_publish(void)
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"montecristo"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
...
...
@@ -1775,10 +1775,7 @@ static void test_publish(void)
ok
(
pf_exists
(
"msitest"
),
"File deleted
\n
"
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
todo_wine
...
...
@@ -1827,10 +1824,7 @@ static void test_publish(void)
ok
(
pf_exists
(
"msitest"
),
"File deleted
\n
"
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
todo_wine
...
...
@@ -1859,10 +1853,7 @@ static void test_publish(void)
ok
(
state
==
INSTALLSTATE_DEFAULT
,
"Expected INSTALLSTATE_DEFAULT, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"montecristo"
);
todo_wine
...
...
@@ -1888,10 +1879,7 @@ static void test_publish(void)
}
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
\
todo_wine
...
...
@@ -1920,10 +1908,7 @@ static void test_publish(void)
ok
(
state
==
INSTALLSTATE_DEFAULT
,
"Expected INSTALLSTATE_DEFAULT, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"montecristo"
);
todo_wine
...
...
@@ -2108,10 +2093,7 @@ static void test_publish(void)
}
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
}
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
todo_wine
...
...
@@ -2161,11 +2143,8 @@ static void test_publishsourcelist(void)
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"REGISTER_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -2176,11 +2155,8 @@ static void test_publishsourcelist(void)
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PROCESS_COMPONENTS=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -2191,11 +2167,8 @@ static void test_publishsourcelist(void)
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_FEATURES=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -2206,11 +2179,8 @@ static void test_publishsourcelist(void)
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
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