merge with dev
This commit is contained in:
@@ -669,7 +669,14 @@ if(WIN32)
|
|||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(
|
set(
|
||||||
ABOUT_COMMAND_WITH_ARGS
|
ABOUT_COMMAND_WITH_ARGS
|
||||||
cmake -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/UpdateInfo.cmake -DSYSTEM:STRING=Apple -DCXX_FLAGS:STRING=${CXX_FLAGS} -DLFLAGS:STRING=${LFLAGS} -DCOMPILER_INFO:STRING=${COMPILER_INFO} -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX})
|
cmake
|
||||||
|
-DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR}
|
||||||
|
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
|
||||||
|
-P ${PROJECT_SOURCE_DIR}/UpdateInfo.cmake
|
||||||
|
-DSYSTEM:STRING=Apple
|
||||||
|
-DCXX_FLAGS:STRING=${CXX_FLAGS}
|
||||||
|
-DLFLAGS:STRING=${LFLAGS}
|
||||||
|
-DCOMPILER_INFO:STRING=${COMPILER_INFO})
|
||||||
else()
|
else()
|
||||||
list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux
|
list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux
|
||||||
-DCXX_FLAGS:STRING=${CXX_FLAGS} -DLFLAGS:STRING=${LFLAGS}
|
-DCXX_FLAGS:STRING=${CXX_FLAGS} -DLFLAGS:STRING=${LFLAGS}
|
||||||
|
@@ -1510,8 +1510,6 @@ int Tag::toInt (int ofs, TagType astype) const
|
|||||||
return attrib->interpreter->toInt (this, ofs, astype);
|
return attrib->interpreter->toInt (this, ofs, astype);
|
||||||
}
|
}
|
||||||
|
|
||||||
int a;
|
|
||||||
|
|
||||||
if (astype == INVALID) {
|
if (astype == INVALID) {
|
||||||
astype = type;
|
astype = type;
|
||||||
}
|
}
|
||||||
@@ -1537,10 +1535,15 @@ int Tag::toInt (int ofs, TagType astype) const
|
|||||||
case LONG:
|
case LONG:
|
||||||
return (int)sget4 (value + ofs, getOrder());
|
return (int)sget4 (value + ofs, getOrder());
|
||||||
|
|
||||||
case SRATIONAL:
|
case SRATIONAL: {
|
||||||
case RATIONAL:
|
int a = (int)sget4 (value + ofs + 4, getOrder());
|
||||||
a = (int)sget4 (value + ofs + 4, getOrder());
|
|
||||||
return a == 0 ? 0 : (int)sget4 (value + ofs, getOrder()) / a;
|
return a == 0 ? 0 : (int)sget4 (value + ofs, getOrder()) / a;
|
||||||
|
}
|
||||||
|
|
||||||
|
case RATIONAL: {
|
||||||
|
uint32_t a = (uint32_t)sget4 (value + ofs + 4, getOrder());
|
||||||
|
return a == 0 ? 0 : (uint32_t)sget4 (value + ofs, getOrder()) / a;
|
||||||
|
}
|
||||||
|
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
return (int)toDouble (ofs);
|
return (int)toDouble (ofs);
|
||||||
@@ -1589,10 +1592,14 @@ double Tag::toDouble (int ofs) const
|
|||||||
return (double) ((int)sget4 (value + ofs, getOrder()));
|
return (double) ((int)sget4 (value + ofs, getOrder()));
|
||||||
|
|
||||||
case SRATIONAL:
|
case SRATIONAL:
|
||||||
case RATIONAL:
|
|
||||||
ud = (int)sget4 (value + ofs, getOrder());
|
ud = (int)sget4 (value + ofs, getOrder());
|
||||||
dd = (int)sget4 (value + ofs + 4, getOrder());
|
dd = (int)sget4 (value + ofs + 4, getOrder());
|
||||||
return dd == 0. ? 0. : (double)ud / (double)dd;
|
return dd == 0. ? 0. : ud / dd;
|
||||||
|
|
||||||
|
case RATIONAL:
|
||||||
|
ud = (uint32_t)sget4 (value + ofs, getOrder());
|
||||||
|
dd = (uint32_t)sget4 (value + ofs + 4, getOrder());
|
||||||
|
return dd == 0. ? 0. : ud / dd;
|
||||||
|
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
conv.i = sget4 (value + ofs, getOrder());
|
conv.i = sget4 (value + ofs, getOrder());
|
||||||
@@ -1735,10 +1742,13 @@ void Tag::toString (char* buffer, int ofs) const
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SRATIONAL:
|
case SRATIONAL:
|
||||||
case RATIONAL:
|
|
||||||
sprintf (b, "%d/%d", (int)sget4 (value + 8 * i + ofs, getOrder()), (int)sget4 (value + 8 * i + ofs + 4, getOrder()));
|
sprintf (b, "%d/%d", (int)sget4 (value + 8 * i + ofs, getOrder()), (int)sget4 (value + 8 * i + ofs + 4, getOrder()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RATIONAL:
|
||||||
|
sprintf (b, "%u/%u", (uint32_t)sget4 (value + 8 * i + ofs, getOrder()), (uint32_t)sget4 (value + 8 * i + ofs + 4, getOrder()));
|
||||||
|
break;
|
||||||
|
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
sprintf (b, "%g", toDouble (8 * i + ofs));
|
sprintf (b, "%g", toDouble (8 * i + ofs));
|
||||||
break;
|
break;
|
||||||
|
@@ -434,13 +434,18 @@ public:
|
|||||||
case LONG:
|
case LONG:
|
||||||
return (double) ((int)sget4 (t->getValue() + ofs, t->getOrder()));
|
return (double) ((int)sget4 (t->getValue() + ofs, t->getOrder()));
|
||||||
|
|
||||||
case SRATIONAL:
|
case SRATIONAL: {
|
||||||
case RATIONAL: {
|
|
||||||
const double dividend = (int)sget4 (t->getValue() + ofs, t->getOrder());
|
const double dividend = (int)sget4 (t->getValue() + ofs, t->getOrder());
|
||||||
const double divisor = (int)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
const double divisor = (int)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
||||||
return divisor == 0. ? 0. : dividend / divisor;
|
return divisor == 0. ? 0. : dividend / divisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case RATIONAL: {
|
||||||
|
const double dividend = (uint32_t)sget4 (t->getValue() + ofs, t->getOrder());
|
||||||
|
const double divisor = (uint32_t)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
||||||
|
return divisor == 0. ? 0. : dividend / divisor;
|
||||||
|
}
|
||||||
|
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
return double (sget4 (t->getValue() + ofs, t->getOrder()));
|
return double (sget4 (t->getValue() + ofs, t->getOrder()));
|
||||||
|
|
||||||
@@ -454,8 +459,6 @@ public:
|
|||||||
// Get the value as an int
|
// Get the value as an int
|
||||||
virtual int toInt (const Tag* t, int ofs = 0, TagType astype = INVALID)
|
virtual int toInt (const Tag* t, int ofs = 0, TagType astype = INVALID)
|
||||||
{
|
{
|
||||||
int a;
|
|
||||||
|
|
||||||
if (astype == INVALID || astype == AUTO) {
|
if (astype == INVALID || astype == AUTO) {
|
||||||
astype = t->getType();
|
astype = t->getType();
|
||||||
}
|
}
|
||||||
@@ -480,10 +483,15 @@ public:
|
|||||||
case LONG:
|
case LONG:
|
||||||
return (int)sget4 (t->getValue() + ofs, t->getOrder());
|
return (int)sget4 (t->getValue() + ofs, t->getOrder());
|
||||||
|
|
||||||
case SRATIONAL:
|
case SRATIONAL: {
|
||||||
case RATIONAL:
|
int a = (int)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
||||||
a = (int)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
|
||||||
return a == 0 ? 0 : (int)sget4 (t->getValue() + ofs, t->getOrder()) / a;
|
return a == 0 ? 0 : (int)sget4 (t->getValue() + ofs, t->getOrder()) / a;
|
||||||
|
}
|
||||||
|
|
||||||
|
case RATIONAL: {
|
||||||
|
uint32_t a = (uint32_t)sget4 (t->getValue() + ofs + 4, t->getOrder());
|
||||||
|
return a == 0 ? 0 : (uint32_t)sget4 (t->getValue() + ofs, t->getOrder()) / a;
|
||||||
|
}
|
||||||
|
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
return (int)toDouble (t, ofs);
|
return (int)toDouble (t, ofs);
|
||||||
|
3
tools/INSTALL.readme
Normal file
3
tools/INSTALL.readme
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
To install the RawTherapee application, open the .dmg and drag the RawTherapee app onto the /Applications folder.
|
||||||
|
|
||||||
|
To use the optional rawtherapee-cli command line interface, move rawtherapee-cli into a folder in your $PATH and install the RawTherapee app as above.
|
@@ -236,6 +236,11 @@ ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/icons/Adwaita/index.theme
|
|||||||
"${LOCAL_PREFIX}/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita"
|
"${LOCAL_PREFIX}/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita"
|
||||||
ditto "${LOCAL_PREFIX}/local/share/icons/hicolor" "${RESOURCES}/share/icons/hicolor"
|
ditto "${LOCAL_PREFIX}/local/share/icons/hicolor" "${RESOURCES}/share/icons/hicolor"
|
||||||
|
|
||||||
|
# fix libfreetype install name
|
||||||
|
for lib in "${LIB}"/*; do
|
||||||
|
install_name_tool -change libfreetype.6.dylib "${LIB}"/libfreetype.6.dylib "${lib}"
|
||||||
|
done
|
||||||
|
|
||||||
# pixbuf loaders & immodules
|
# pixbuf loaders & immodules
|
||||||
msg "Build GTK3 databases:"
|
msg "Build GTK3 databases:"
|
||||||
"${LOCAL_PREFIX}"/local/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders
|
"${LOCAL_PREFIX}"/local/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders
|
||||||
@@ -259,11 +264,11 @@ ditto "${PROJECT_SOURCE_DIR}/rtdata/fonts" "${ETC}/fonts"
|
|||||||
ditto "${PROJECT_SOURCE_DATA_DIR}/"{rawtherapee,profile}.icns "${RESOURCES}"
|
ditto "${PROJECT_SOURCE_DATA_DIR}/"{rawtherapee,profile}.icns "${RESOURCES}"
|
||||||
ditto "${PROJECT_SOURCE_DATA_DIR}/PkgInfo" "${CONTENTS}"
|
ditto "${PROJECT_SOURCE_DATA_DIR}/PkgInfo" "${CONTENTS}"
|
||||||
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist.in" "${CONTENTS}/Info.plist"
|
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist.in" "${CONTENTS}/Info.plist"
|
||||||
|
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/cliInfo.plist.in" "${LIB}/Info.plist"
|
||||||
sed -i "" -e "s|@version@|${PROJECT_FULL_VERSION}|
|
sed -i "" -e "s|@version@|${PROJECT_FULL_VERSION}|
|
||||||
s|@shortVersion@|${PROJECT_VERSION}|
|
s|@shortVersion@|${PROJECT_VERSION}|
|
||||||
s|@arch@|${arch}|" \
|
s|@arch@|${arch}|" \
|
||||||
"${CONTENTS}/Info.plist"
|
"${CONTENTS}/Info.plist"
|
||||||
plutil -convert binary1 "${CONTENTS}/Info.plist"
|
|
||||||
update-mime-database -V "${RESOURCES}/share/mime"
|
update-mime-database -V "${RESOURCES}/share/mime"
|
||||||
|
|
||||||
msg "Build glib database:"
|
msg "Build glib database:"
|
||||||
@@ -279,23 +284,25 @@ 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,cli}; 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 /Applications/"${LIB}" "${EXECUTABLE}"-cli
|
||||||
|
ditto "${EXECUTABLE}"-cli "${APP}"/..
|
||||||
|
|
||||||
# Codesign the app
|
# Codesign the app
|
||||||
if [[ -n $CODESIGNID ]]; then
|
if [[ -n $CODESIGNID ]]; then
|
||||||
msg "Codesigning Application."
|
msg "Codesigning Application."
|
||||||
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/rt.entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements
|
iconv -f UTF-8 -t ASCII "${PROJECT_SOURCE_DATA_DIR}"/rt.entitlements > "${CMAKE_BUILD_TYPE}"/rt.entitlements
|
||||||
plutil -convert binary1 "${CMAKE_BUILD_TYPE}"/rt.entitlements
|
iconv -f UTF-8 -t ASCII "${PROJECT_SOURCE_DATA_DIR}"/rt-cli.entitlements > "${CMAKE_BUILD_TYPE}"/rt-cli.entitlements
|
||||||
mv "${EXECUTABLE}"-cli "${LIB}"
|
mv "${EXECUTABLE}"-cli "${LIB}"
|
||||||
for frameworklibs in "${LIB}"/*; do
|
for frameworklibs in "${LIB}"/*{dylib,so}; do
|
||||||
codesign -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee --force --verbose -o runtime --timestamp "${frameworklibs}"
|
codesign -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee --force --verbose -o runtime --timestamp --entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements "${frameworklibs}"
|
||||||
done
|
done
|
||||||
codesign --timestamp --strict -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee -o runtime --entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements "${APP}"
|
codesign --force -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee -o runtime --entitlements "${CMAKE_BUILD_TYPE}"/rt-cli.entitlements "${LIB}"/rawtherapee-cli
|
||||||
|
codesign --deep --timestamp --strict -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee -o runtime --entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements "${APP}"
|
||||||
spctl -a -vvvv "${APP}"
|
spctl -a -vvvv "${APP}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -345,7 +352,7 @@ function CreateDmg {
|
|||||||
CreateWebloc 'Report Bug' 'https://github.com/Beep6581/RawTherapee/issues/new'
|
CreateWebloc 'Report Bug' 'https://github.com/Beep6581/RawTherapee/issues/new'
|
||||||
|
|
||||||
# Disk image name
|
# Disk image name
|
||||||
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}"
|
dmg_name="${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}"
|
||||||
lower_build_type="$(tr '[:upper:]' '[:lower:]' <<< "$CMAKE_BUILD_TYPE")"
|
lower_build_type="$(tr '[:upper:]' '[:lower:]' <<< "$CMAKE_BUILD_TYPE")"
|
||||||
if [[ $lower_build_type != release ]]; then
|
if [[ $lower_build_type != release ]]; then
|
||||||
dmg_name="${dmg_name}_${lower_build_type}"
|
dmg_name="${dmg_name}_${lower_build_type}"
|
||||||
@@ -390,6 +397,7 @@ function CreateDmg {
|
|||||||
xcrun stapler staple "${dmg_name}.dmg" # staple the ticket
|
xcrun stapler staple "${dmg_name}.dmg" # staple the ticket
|
||||||
xcrun stapler validate -v "${dmg_name}.dmg"
|
xcrun stapler validate -v "${dmg_name}.dmg"
|
||||||
echo "dmg Notarization success"
|
echo "dmg Notarization success"
|
||||||
|
rm *dmg.zip
|
||||||
break
|
break
|
||||||
elif [[ $status1 = "in" ]]; then
|
elif [[ $status1 = "in" ]]; then
|
||||||
echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again"
|
echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again"
|
||||||
@@ -404,10 +412,12 @@ function CreateDmg {
|
|||||||
|
|
||||||
# Zip disk image for redistribution
|
# Zip disk image for redistribution
|
||||||
msg "Zipping disk image for redistribution:"
|
msg "Zipping disk image for redistribution:"
|
||||||
zip "${dmg_name}.zip" "${dmg_name}.dmg"
|
mkdir "${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}_folder"
|
||||||
rm "${dmg_name}.dmg"
|
ditto {"${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}.dmg","rawtherapee-cli","${PROJECT_SOURCE_DATA_DIR}/INSTALL.readme.rtf"} "${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}_folder"
|
||||||
msg "Removing disk image caches:"
|
zip -r "${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}_folder/"
|
||||||
rm -rf "${srcDir}"
|
# rm "${dmg_name}.dmg"
|
||||||
|
# msg "Removing disk image caches:"
|
||||||
|
# rm -rf "${srcDir}"
|
||||||
}
|
}
|
||||||
CreateDmg
|
CreateDmg
|
||||||
msg "Finishing build:"
|
msg "Finishing build:"
|
||||||
|
@@ -1,19 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>application-identifier</key>
|
<key>com.apple.application-identifier</key>
|
||||||
<string>com.rawtherapee.RawTherapee</string>
|
<string>com.rawtherapee.RawTherapee</string>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
|
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
|
||||||
<array>
|
<array>
|
||||||
<string>/</string>
|
<string>/</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
</dict>
|
||||||
<true />
|
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
|
||||||
<true />
|
|
||||||
<key>com.apple.security.app-sandbox</key>
|
|
||||||
<true />
|
|
||||||
<key>com.apple.security.files.downloads.read-write</key>
|
|
||||||
<true />
|
|
||||||
</dict>
|
|
||||||
</plist>
|
</plist>
|
Reference in New Issue
Block a user