Skip to content
Permalink
Browse files

Remove extraneous Mac browser app aliases

- Should handle Finder pref set to hide extensions (e.g. missing .app)
  • Loading branch information
dakcarto committed Oct 12, 2012
1 parent 6fcd937 commit f230f51a536b78c0e3ba6d9b96282ee079c2daa3
Showing with 5 additions and 7 deletions.
  1. +5 −7 images/icons/mac/browser/CMakeLists.txt
@@ -2,10 +2,8 @@
FILE (GLOB ICONS *.icns)
INSTALL (FILES ${ICONS}
DESTINATION "${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app/Contents/Resources")
# create alias now, so alias file gets correct icon, delete first if it exists
# could be more than one alias if previous build failed
FILE (GLOB ALIASES "$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/QGIS Browser.app*")
FOREACH(browserAlias ${ALIASES})
FILE (REMOVE "${browserAlias}")
ENDFOREACH(browserAlias)
INSTALL (CODE "EXECUTE_PROCESS(COMMAND osascript -e \"tell application \\\"Finder\\\" to make alias file to POSIX file \\\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app\\\" at POSIX file \\\"$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/\\\"\")")

# create alias now, so alias file gets correct icon, delete first if any exist
SET (BROWSERNAME "QGIS Browser")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND /usr/bin/find \"$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}\" -name \"${BROWSERNAME}*\" -maxdepth 1 -type f -delete)")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND /usr/bin/osascript -e \"tell application \\\"Finder\\\" to make alias file to POSIX file \\\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/${BROWSERNAME}.app\\\" at POSIX file \\\"$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/\\\"\")")

0 comments on commit f230f51

Please sign in to comment.
You can’t perform that action at this time.