mac:sync build directories locations
This commit is contained in:
@@ -200,7 +200,11 @@ endif()
|
|||||||
|
|
||||||
if(NOT DEFINED DOCDIR)
|
if(NOT DEFINED DOCDIR)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(DOCDIR "${DATADIR}/share/doc")
|
if(APPLE)
|
||||||
|
set(DOCDIR "${DATADIR}/doc")
|
||||||
|
else()
|
||||||
|
set(DOCDIR "${DATADIR}/share/doc")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
||||||
endif()
|
endif()
|
||||||
@@ -208,7 +212,11 @@ endif()
|
|||||||
|
|
||||||
if(NOT DEFINED CREDITSDIR)
|
if(NOT DEFINED CREDITSDIR)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(CREDITSDIR "${DATADIR}")
|
if(APPLE)
|
||||||
|
set(CREDITSDIR "${DATADIR}")
|
||||||
|
else()
|
||||||
|
set(CREDITSDIR "${DATADIR}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
set(CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
||||||
endif()
|
endif()
|
||||||
@@ -216,7 +224,11 @@ endif()
|
|||||||
|
|
||||||
if(NOT DEFINED LICENCEDIR)
|
if(NOT DEFINED LICENCEDIR)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(LICENCEDIR "${DATADIR}")
|
if(APPLE)
|
||||||
|
set(LICENCEDIR "${CREDITSDIR}")
|
||||||
|
else()
|
||||||
|
set(LICENCEDIR "${DATADIR}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
set(LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
|
||||||
endif()
|
endif()
|
||||||
@@ -225,7 +237,11 @@ endif()
|
|||||||
if(NOT DEFINED DESKTOPDIR)
|
if(NOT DEFINED DESKTOPDIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(DESKTOPDIR "${DATADIR}/share/applications")
|
if(APPLE)
|
||||||
|
set(DESKTOPDIR "${DATADIR}/applications")
|
||||||
|
else()
|
||||||
|
set(DESKTOPDIR "${DATADIR}/share/applications")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||||
endif()
|
endif()
|
||||||
@@ -235,7 +251,11 @@ endif()
|
|||||||
if(NOT DEFINED ICONSDIR)
|
if(NOT DEFINED ICONSDIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(ICONSDIR "${DATADIR}/share/icons")
|
if(APPLE)
|
||||||
|
set(ICONSDIR "${DATADIR}/icons")
|
||||||
|
else()
|
||||||
|
set(ICONSDIR "${DATADIR}/share/icons")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
||||||
endif()
|
endif()
|
||||||
@@ -245,7 +265,11 @@ endif()
|
|||||||
if(NOT DEFINED APPDATADIR)
|
if(NOT DEFINED APPDATADIR)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(BUILD_BUNDLE)
|
if(BUILD_BUNDLE)
|
||||||
set(APPDATADIR "${DATADIR}/share/metainfo")
|
if(APPLE)
|
||||||
|
set(APPDATADIR "${DATADIR}/share/metainfo")
|
||||||
|
else()
|
||||||
|
set(APPDATADIR "${DATADIR}/share/metainfo")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
fNormal="$(tput sgr0)"
|
fNormal="$(tput sgr0)"
|
||||||
fBold="$(tput bold)"
|
fBold="$(tput bold)"
|
||||||
# Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else.
|
# Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else.
|
||||||
fMagenta="$(tput setaf 5)"
|
fMagenta="$(tput setaf 3)"
|
||||||
fRed="$(tput setaf 1)"
|
fRed="$(tput setaf 1)"
|
||||||
|
|
||||||
function msg {
|
function msg {
|
||||||
@@ -125,11 +125,16 @@ msg "Removing old files:"
|
|||||||
rm -rf "${APP}" *.dmg *.zip
|
rm -rf "${APP}" *.dmg *.zip
|
||||||
|
|
||||||
msg "Creating bundle container:"
|
msg "Creating bundle container:"
|
||||||
install -d "${APP}" "${RESOURCES}" "${MACOS}" "${LIB}" "${ETC}"
|
cd "${CMAKE_INSTALL_PREEFIX}"
|
||||||
|
install -d "${APP}"
|
||||||
|
install -d "${RESOURCES}"
|
||||||
|
install -d "${MACOS}"
|
||||||
|
install -d "${LIB}"
|
||||||
|
install -d "${ETC}"
|
||||||
|
|
||||||
echo "\n--------\n" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
echo "\n--------\n" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${CMAKE_BUILD_TYPE}/${RESOURCES}/AboutThisBuild.txt"
|
echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
echo "Bundle date: $(date -Ru) ZULU" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
echo "Bundle date: $(date -Ru) ZULU" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
echo "Bundle epoch: $(date +%s)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
echo "Bundle epoch: $(date +%s)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||||
@@ -250,15 +255,15 @@ ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/glib-2.0/schemas
|
|||||||
|
|
||||||
# Append an LC_RPATH
|
# Append an LC_RPATH
|
||||||
msg "Registering @rpath into the main executable."
|
msg "Registering @rpath into the main executable."
|
||||||
install_name_tool -add_rpath /Applications/"${LIB}" ${EXECUTABLE}
|
install_name_tool -add_rpath /Applications/"${LIB}" "${EXECUTABLE}"
|
||||||
|
|
||||||
ModifyInstallNames
|
ModifyInstallNames
|
||||||
|
|
||||||
# fix @rpath in Frameworks
|
# fix @rpath in Frameworks
|
||||||
msg "Registering @rpath in Frameworks folder."
|
msg "Registering @rpath in Frameworks folder."
|
||||||
for frameworklibs in "${LIB}"/*{dylib,so} ; do
|
for frameworklibs in "${LIB}"/*{dylib,so} ; do
|
||||||
install_name_tool -delete_rpath ${LOCAL_PREFIX}/local/lib ${frameworklibs}
|
install_name_tool -delete_rpath ${LOCAL_PREFIX}/local/lib "${frameworklibs}"
|
||||||
install_name_tool -add_rpath /Applications/"${LIB}" ${frameworklibs}
|
install_name_tool -add_rpath /Applications/"${LIB}" "${frameworklibs}"
|
||||||
done
|
done
|
||||||
install_name_tool -delete_rpath RawTherapee.app/Contents/Frameworks "${EXECUTABLE}"-cli
|
install_name_tool -delete_rpath RawTherapee.app/Contents/Frameworks "${EXECUTABLE}"-cli
|
||||||
install_name_tool -add_rpath @executable_path "${EXECUTABLE}"-cli
|
install_name_tool -add_rpath @executable_path "${EXECUTABLE}"-cli
|
||||||
@@ -370,5 +375,4 @@ CreateDmg
|
|||||||
msg "Finishing build:"
|
msg "Finishing build:"
|
||||||
echo "Script complete."
|
echo "Script complete."
|
||||||
#
|
#
|
||||||
# TODO filter out the benign errors
|
# TODO filter out the benign errors; Build a fancy dmg
|
||||||
# Build a fancy dmg
|
|
||||||
|
Reference in New Issue
Block a user