macOS build fixes suggestions take 2
Suggestion for resolving CMakeLists.txt , macosx_bundle.sh , executable_loader.in Please review + double-check on macOS
This commit is contained in:
@@ -203,20 +203,31 @@ endif()
|
|||||||
|
|
||||||
if(NOT DEFINED DESKTOPDIR)
|
if(NOT DEFINED DESKTOPDIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications") # Absolute
|
if(BUILD_BUNDLE)
|
||||||
#set(DESKTOPDIR "${DATADIR}/share/applications") # Relative
|
set(DESKTOPDIR "${DATADIR}/share/applications")
|
||||||
|
else()
|
||||||
|
set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED ICONSDIR)
|
if(NOT DEFINED ICONSDIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
if(BUILD_BUNDLE)
|
||||||
|
set(ICONSDIR "${DATADIR}/share/icons")
|
||||||
|
else()
|
||||||
|
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED APPDATADIR)
|
if(NOT DEFINED APPDATADIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
|
if(BUILD_BUNDLE)
|
||||||
|
set(APPDATADIR "${DATADIR}/share/appdata")
|
||||||
|
else()
|
||||||
|
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -421,7 +432,9 @@ install(FILES RELEASE_NOTES.txt DESTINATION "${CREDITSDIR}" OPTIONAL)
|
|||||||
|
|
||||||
# The standard location for man pages in Linux is /usr/share/man
|
# The standard location for man pages in Linux is /usr/share/man
|
||||||
# Use "manpath" to see the search paths for man pages on your system.
|
# Use "manpath" to see the search paths for man pages on your system.
|
||||||
if(UNIX OR WIN32)
|
if(BUILD_BUNDLE)
|
||||||
|
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/share/man/man1")
|
||||||
|
else()
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1")
|
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -437,4 +450,3 @@ add_subdirectory(rtexif)
|
|||||||
add_subdirectory(rtengine)
|
add_subdirectory(rtengine)
|
||||||
add_subdirectory(rtgui)
|
add_subdirectory(rtgui)
|
||||||
add_subdirectory(rtdata)
|
add_subdirectory(rtdata)
|
||||||
|
|
||||||
|
@@ -41,7 +41,9 @@ export RT_CACHE="${HOME}/Library/Application Support/RawTherapee/cache"
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
-psn_*) shift ;;
|
-psn_*) shift ;;
|
||||||
esac
|
esac
|
||||||
|
if [[ -d "/tmp/RawTherapee.app" ]]; then
|
||||||
|
rm -rf "/tmp/RawTherapee.app"
|
||||||
|
fi
|
||||||
ln -sf "${app}" /tmp
|
ln -sf "${app}" /tmp
|
||||||
|
|
||||||
exec "${cwd}/rawtherapee-bin" "$@"
|
exec "${cwd}/rawtherapee-bin" "$@"
|
||||||
|
@@ -154,7 +154,7 @@ ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/index.theme
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
# Install names
|
# Install names
|
||||||
find -E "${MACOS}" -type f -regex '.*/(rawtherapee|.*\.(dylib|so))' | while read x; do
|
find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee|.*\.(dylib|so))' | while read x; do
|
||||||
msg "Modifying install names: ${x}"
|
msg "Modifying install names: ${x}"
|
||||||
{
|
{
|
||||||
# id
|
# id
|
||||||
@@ -167,7 +167,7 @@ find -E "${MACOS}" -type f -regex '.*/(rawtherapee|.*\.(dylib|so))' | while read
|
|||||||
done
|
done
|
||||||
|
|
||||||
msg "Registering @loader_path into the executable:"
|
msg "Registering @loader_path into the executable:"
|
||||||
echo " install_name_tool -add_rpath @loader_path/lib '${EXECUTABLE}'" | bash -v
|
echo " install_name_tool -add_rpath @loader_path/../Frameworks '${EXECUTABLE}'" | bash -v
|
||||||
|
|
||||||
msg "Installing required application bundle files:"
|
msg "Installing required application bundle files:"
|
||||||
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}/tools/osx"
|
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}/tools/osx"
|
||||||
|
Reference in New Issue
Block a user