Browse Source

Merge pull request #11733 from Michael-Gardner/HPCC-20612

HPCC-20612 Add logic to remove hpcc-systems.desktop entry from unity, and rework install

Reviewed-By: Xiaoming Wang <xiaoming.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 years ago
parent
commit
cb128ab29b

+ 0 - 5
initfiles/bash/etc/init.d/install-init.in

@@ -210,11 +210,6 @@ if [ -d ${INSTALL_DIR}/etc/bash_completion.d ] && [ -d /etc/bash_completion.d ];
     done
 fi
 
-# Ubuntu Unity Launcher
-if [ -f ${INSTALL_DIR}/share/hpcc-systems.desktop ] && [ -d /usr/share/applications ]; then
-    installFile ${INSTALL_DIR}/share/hpcc-systems.desktop /usr/share/applications 1 || exit 1
-fi
-
 # SSH config dir
 if [ ! -d ${homePath}/.ssh ]; then
     mkdir -p ${homePath}/.ssh

+ 8 - 0
initfiles/componentfiles/launcher/CMakeLists.txt

@@ -17,3 +17,11 @@
 
 install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/hpcc-systems.desktop DESTINATION share COMPONENT Runtime )
 install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LN.png DESTINATION share COMPONENT Runtime )
+
+if(PLATFORM)
+    SET_DEPENDENCIES(CPACK_DEBIAN_PACKAGE_DEPENDS xterm)
+    configure_file(hpcc-systems-desktop.install.in hpcc-systems-desktop.install @ONLY)
+    configure_file(hpcc-systems-desktop.uninstall.in hpcc-systems-desktop.uninstall @ONLY)
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hpcc-systems-desktop.install DESTINATION etc/init.d/install COMPONENT Runtime)
+    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hpcc-systems-desktop.uninstall DESTINATION etc/init.d/uninstall COMPONENT Runtime)
+endif()

+ 1 - 0
initfiles/componentfiles/launcher/hpcc-systems-desktop.install.in

@@ -0,0 +1 @@
+installFile @INSTALL_DIR@/share/hpcc-systems.desktop /usr/share/applications 1 || exit 1

+ 2 - 0
initfiles/componentfiles/launcher/hpcc-systems-desktop.uninstall.in

@@ -0,0 +1,2 @@
+removeSymlink "/usr/share/applications/hpcc-systems.desktop"
+