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
d4814f98
Commit
d4814f98
authored
Nov 04, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Also roll back changes made in PublishProduct.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6233eace
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
25 deletions
+32
-25
action.c
dlls/msi/action.c
+32
-25
No files found.
dlls/msi/action.c
View file @
d4814f98
...
...
@@ -145,6 +145,8 @@ static const WCHAR szUnpublishComponents[] =
{
'U'
,
'n'
,
'p'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
static
const
WCHAR
szUnpublishFeatures
[]
=
{
'U'
,
'n'
,
'p'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'F'
,
'e'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szUnpublishProduct
[]
=
{
'U'
,
'n'
,
'p'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
0
};
static
const
WCHAR
szUnregisterComPlus
[]
=
{
'U'
,
'n'
,
'r'
,
'e'
,
'g'
,
'i'
,
's'
,
't'
,
'e'
,
'r'
,
'C'
,
'o'
,
'm'
,
'P'
,
'l'
,
'u'
,
's'
,
0
};
static
const
WCHAR
szUnregisterTypeLibraries
[]
=
...
...
@@ -5283,28 +5285,10 @@ static UINT msi_unpublish_icons( MSIPACKAGE *package )
return
ERROR_SUCCESS
;
}
static
UINT
msi_unpublish_product
(
MSIPACKAGE
*
package
,
const
WCHAR
*
remove
)
static
UINT
ACTION_UnpublishProduct
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
szUpgradeCode
[]
=
{
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
WCHAR
*
upgrade
,
**
features
;
BOOL
full_uninstall
=
TRUE
;
MSIFEATURE
*
feature
;
WCHAR
*
upgrade
;
MSIPATCHINFO
*
patch
;
UINT
i
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
feature
->
Action
==
INSTALLSTATE_LOCAL
)
full_uninstall
=
FALSE
;
}
features
=
msi_split_string
(
remove
,
','
);
for
(
i
=
0
;
features
&&
features
[
i
];
i
++
)
{
if
(
!
strcmpW
(
features
[
i
],
szAll
))
full_uninstall
=
TRUE
;
}
msi_free
(
features
);
if
(
!
full_uninstall
)
return
ERROR_SUCCESS
;
MSIREG_DeleteProductKey
(
package
->
ProductCode
);
MSIREG_DeleteUserDataProductKey
(
package
->
ProductCode
,
package
->
Context
);
...
...
@@ -5340,10 +5324,32 @@ static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
return
ERROR_SUCCESS
;
}
static
BOOL
is_full_uninstall
(
MSIPACKAGE
*
package
)
{
WCHAR
**
features
,
*
remove
=
msi_dup_property
(
package
->
db
,
szRemove
);
MSIFEATURE
*
feature
;
BOOL
ret
=
TRUE
;
UINT
i
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
feature
->
Action
==
INSTALLSTATE_LOCAL
)
ret
=
FALSE
;
}
features
=
msi_split_string
(
remove
,
','
);
for
(
i
=
0
;
features
&&
features
[
i
];
i
++
)
{
if
(
!
strcmpW
(
features
[
i
],
szAll
))
ret
=
TRUE
;
}
msi_free
(
features
);
msi_free
(
remove
);
return
ret
;
}
static
UINT
ACTION_InstallFinalize
(
MSIPACKAGE
*
package
)
{
UINT
rc
;
WCHAR
*
remove
;
/* first do the same as an InstallExecute */
rc
=
execute_script
(
package
,
SCRIPT_INSTALL
);
...
...
@@ -5355,9 +5361,9 @@ static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
remove
=
msi_dup_property
(
package
->
db
,
szRemove
);
rc
=
msi_unpublish_product
(
package
,
remov
e
);
msi_free
(
remove
);
if
(
is_full_uninstall
(
package
))
rc
=
ACTION_UnpublishProduct
(
packag
e
);
return
rc
;
}
...
...
@@ -7673,7 +7679,7 @@ StandardActions[] =
{
szProcessComponents
,
ACTION_ProcessComponents
,
szProcessComponents
},
{
szPublishComponents
,
ACTION_PublishComponents
,
szUnpublishComponents
},
{
szPublishFeatures
,
ACTION_PublishFeatures
,
szUnpublishFeatures
},
{
szPublishProduct
,
ACTION_PublishProduct
,
NULL
},
{
szPublishProduct
,
ACTION_PublishProduct
,
szUnpublishProduct
},
{
szRegisterClassInfo
,
ACTION_RegisterClassInfo
,
szUnregisterClassInfo
},
{
szRegisterComPlus
,
ACTION_RegisterComPlus
,
szUnregisterComPlus
},
{
szRegisterExtensionInfo
,
ACTION_RegisterExtensionInfo
,
szUnregisterExtensionInfo
},
...
...
@@ -7702,6 +7708,7 @@ StandardActions[] =
{
szStopServices
,
ACTION_StopServices
,
szStartServices
},
{
szUnpublishComponents
,
ACTION_UnpublishComponents
,
szPublishComponents
},
{
szUnpublishFeatures
,
ACTION_UnpublishFeatures
,
szPublishFeatures
},
{
szUnpublishProduct
,
ACTION_UnpublishProduct
,
NULL
},
/* for rollback only */
{
szUnregisterClassInfo
,
ACTION_UnregisterClassInfo
,
szRegisterClassInfo
},
{
szUnregisterComPlus
,
ACTION_UnregisterComPlus
,
szRegisterComPlus
},
{
szUnregisterExtensionInfo
,
ACTION_UnregisterExtensionInfo
,
szRegisterExtensionInfo
},
...
...
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