Update icon cache after uninstall: Closes #5755
Now using a post-uninstall target to ensure that desktop and icon caches are updated *after* the icon/.desktop file are deleted.
This commit is contained in:
parent
f87a450431
commit
be64553a8e
4 changed files with 18 additions and 5 deletions
|
|
@ -82,6 +82,12 @@ add_custom_target(
|
|||
# a depends clause in add_custom_target (which would make it run last).
|
||||
add_dependencies(uninstall uninstall-base)
|
||||
|
||||
# This gets fired in the root-level Makefile to ensure an post-uninstall cleanup happens after
|
||||
# everything has has been removed
|
||||
add_custom_target(
|
||||
post-uninstall
|
||||
)
|
||||
|
||||
# Dist
|
||||
# This generates the dist tarballs
|
||||
add_custom_target(
|
||||
|
|
|
|||
|
|
@ -12,10 +12,15 @@ all:
|
|||
@$(MAKE) -C $(BUILD_DIR)
|
||||
@cp $(BUILD_BINARIES) .
|
||||
|
||||
.PHONY: install uninstall
|
||||
install uninstall:
|
||||
.PHONY: install
|
||||
install:
|
||||
@$(MAKE) -C $(BUILD_DIR) $@
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
@$(MAKE) -C $(BUILD_DIR) $@
|
||||
@$(MAKE) -C $(BUILD_DIR) post-uninstall
|
||||
|
||||
.PHONY: pot_file
|
||||
pot_file:
|
||||
@$(MAKE) -C $(BUILD_DIR) $@
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if (DESKTOP_UPDATE)
|
|||
update-desktop-database
|
||||
)
|
||||
|
||||
add_dependencies(uninstall uninstall-desktop-update)
|
||||
add_dependencies(post-uninstall uninstall-desktop-update)
|
||||
else ()
|
||||
install(
|
||||
CODE "message (STATUS \"Not updating desktop database\")"
|
||||
|
|
|
|||
|
|
@ -44,15 +44,17 @@ if (ICON_UPDATE)
|
|||
CODE
|
||||
"execute_process (COMMAND gtk-update-icon-cache -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)"
|
||||
CODE
|
||||
"message (STATUS \"Updating icon cache\")"
|
||||
"message (STATUS \"Updated icon cache in ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor\")"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
uninstall-icon-cache
|
||||
COMMAND
|
||||
gtk-update-icon-cache -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor
|
||||
COMMENT
|
||||
"Updated icon cache after uninstall in ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor"
|
||||
)
|
||||
|
||||
add_dependencies(uninstall uninstall-icon-cache)
|
||||
add_dependencies(post-uninstall uninstall-icon-cache)
|
||||
endif ()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue