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
605e0b7b
Commit
605e0b7b
authored
Apr 30, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add support for uninstalling global assemblies.
parent
9790edd2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
5 deletions
+49
-5
assembly.c
dlls/msi/assembly.c
+39
-0
files.c
dlls/msi/files.c
+9
-5
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/assembly.c
View file @
605e0b7b
...
@@ -425,6 +425,45 @@ UINT msi_install_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
...
@@ -425,6 +425,45 @@ UINT msi_install_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
UINT
msi_uninstall_assembly
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
comp
)
{
HRESULT
hr
;
IAssemblyCache
*
cache
;
MSIASSEMBLY
*
assembly
=
comp
->
assembly
;
MSIFEATURE
*
feature
=
NULL
;
if
(
comp
->
assembly
->
feature
)
feature
=
msi_get_loaded_feature
(
package
,
comp
->
assembly
->
feature
);
if
(
assembly
->
application
)
{
if
(
feature
)
feature
->
Action
=
INSTALLSTATE_ABSENT
;
return
ERROR_SUCCESS
;
}
TRACE
(
"removing %s
\n
"
,
debugstr_w
(
assembly
->
display_name
));
if
(
assembly
->
attributes
==
msidbAssemblyAttributesWin32
)
{
cache
=
package
->
cache_sxs
;
hr
=
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
assembly
->
display_name
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
WARN
(
"failed to uninstall assembly 0x%08x
\n
"
,
hr
);
}
else
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
CLR_VERSION_MAX
;
i
++
)
{
if
(
!
assembly
->
clr_version
[
i
])
continue
;
cache
=
package
->
cache_net
[
i
];
hr
=
IAssemblyCache_UninstallAssembly
(
cache
,
0
,
assembly
->
display_name
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
WARN
(
"failed to uninstall assembly 0x%08x
\n
"
,
hr
);
}
}
if
(
feature
)
feature
->
Action
=
INSTALLSTATE_ABSENT
;
assembly
->
installed
=
FALSE
;
return
ERROR_SUCCESS
;
}
static
WCHAR
*
build_local_assembly_path
(
const
WCHAR
*
filename
)
static
WCHAR
*
build_local_assembly_path
(
const
WCHAR
*
filename
)
{
{
UINT
i
;
UINT
i
;
...
...
dlls/msi/files.c
View file @
605e0b7b
...
@@ -1308,22 +1308,26 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
...
@@ -1308,22 +1308,26 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msi_ui_actiondata
(
package
,
szRemoveFiles
,
uirow
);
msi_ui_actiondata
(
package
,
szRemoveFiles
,
uirow
);
msiobj_release
(
&
uirow
->
hdr
);
msiobj_release
(
&
uirow
->
hdr
);
}
}
msi_init_assembly_caches
(
package
);
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
{
MSIFOLDER
*
folder
;
comp
->
Action
=
msi_get_component_action
(
package
,
comp
);
comp
->
Action
=
msi_get_component_action
(
package
,
comp
);
if
(
comp
->
Action
!=
INSTALLSTATE_ABSENT
)
continue
;
if
(
comp
->
Action
!=
INSTALLSTATE_ABSENT
)
continue
;
if
(
comp
->
assembly
&&
!
comp
->
assembly
->
application
)
continue
;
if
(
comp
->
Attributes
&
msidbComponentAttributesPermanent
)
if
(
comp
->
Attributes
&
msidbComponentAttributesPermanent
)
{
{
TRACE
(
"permanent component, not removing directory
\n
"
);
TRACE
(
"permanent component, not removing directory
\n
"
);
continue
;
continue
;
}
}
folder
=
msi_get_loaded_folder
(
package
,
comp
->
Directory
);
if
(
comp
->
assembly
&&
!
comp
->
assembly
->
application
)
msi_uninstall_assembly
(
package
,
comp
);
else
{
MSIFOLDER
*
folder
=
msi_get_loaded_folder
(
package
,
comp
->
Directory
);
remove_folder
(
folder
);
remove_folder
(
folder
);
}
}
}
msi_destroy_assembly_caches
(
package
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
dlls/msi/msipriv.h
View file @
605e0b7b
...
@@ -1027,6 +1027,7 @@ extern UINT msi_create_empty_local_file(LPWSTR path, LPCWSTR suffix) DECLSPEC_HI
...
@@ -1027,6 +1027,7 @@ extern UINT msi_create_empty_local_file(LPWSTR path, LPCWSTR suffix) DECLSPEC_HI
extern
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
,
BOOL
replace
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_set_sourcedir_props
(
MSIPACKAGE
*
package
,
BOOL
replace
)
DECLSPEC_HIDDEN
;
extern
MSIASSEMBLY
*
msi_load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
MSIASSEMBLY
*
msi_load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_uninstall_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_init_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_init_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
void
msi_destroy_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
void
msi_destroy_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
WCHAR
*
msi_font_version_from_file
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
WCHAR
*
msi_font_version_from_file
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
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