Merge branch 'master' into gtk3
This commit is contained in:
commit
cb916f7c2d
@ -98,6 +98,8 @@ option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
|
||||
option (WITH_BZIP "Build with Bzip2 support" ON)
|
||||
option (WITH_MYFILE_MMAP "Build using memory mapped file" ON)
|
||||
option (WITH_LTO "Build with link-time optimizations" OFF)
|
||||
option (WITH_SAN "Build with run-time sanitizer" OFF)
|
||||
option (WITH_PROF "Build with profiling instrumentation" OFF)
|
||||
option (OPTION_OMP "Build with OpenMP support" ON)
|
||||
option (STRICT_MUTEX "True (recommended): MyMutex will behave like POSIX Mutex; False: MyMutex will behave like POSIX RecMutex; Note: forced to ON for Debug builds" ON)
|
||||
option (TRACE_MYRWMUTEX "Trace RT's custom R/W Mutex (Debug builds only); redirecting std::out to a file is strongly recommended!" OFF)
|
||||
@ -274,6 +276,18 @@ if (WITH_LTO)
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
|
||||
endif (WITH_LTO)
|
||||
|
||||
if (WITH_SAN)
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${WITH_SAN}")
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${WITH_SAN}")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${WITH_SAN}")
|
||||
endif (WITH_SAN)
|
||||
|
||||
if (WITH_PROF)
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
|
||||
SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
||||
endif (WITH_PROF)
|
||||
|
||||
if (OPTION_OMP)
|
||||
find_package(OpenMP)
|
||||
if (OPENMP_FOUND)
|
||||
|
@ -57,7 +57,7 @@ if (WIN32)
|
||||
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
|
||||
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss")
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/../tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss")
|
||||
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR})
|
||||
endif (WIN32)
|
||||
|
||||
@ -103,7 +103,7 @@ if (APPLE)
|
||||
elseif (PROC_BIT_DEPTH MATCHES 64)
|
||||
list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64)
|
||||
endif (PROC_BIT_DEPTH MATCHES 32)
|
||||
list (APPEND MACOSX_BUNDLE_COMMAND sh "${PROJECT_SOURCE_DIR}/rtdata/osx/macosx_bundle.sh")
|
||||
list (APPEND MACOSX_BUNDLE_COMMAND sh "${PROJECT_SOURCE_DIR}/tools/osx/macosx_bundle.sh")
|
||||
|
||||
add_custom_target(macosx_bundle
|
||||
COMMAND ${MACOSX_BUNDLE_COMMAND}
|
||||
|
@ -69,7 +69,7 @@
|
||||
#define ALIGNED64
|
||||
#define ALIGNED16
|
||||
#endif
|
||||
#ifndef __clang__
|
||||
#define _RT_NESTED_OPENMP _OPENMP
|
||||
#if !defined(__clang__) && defined _OPENMP
|
||||
#define _RT_NESTED_OPENMP
|
||||
#endif
|
||||
#endif
|
||||
|
@ -174,7 +174,7 @@ void safe_build_subdir_list (Glib::RefPtr<Gio::File> &dir, std::vector<Glib::ust
|
||||
return;
|
||||
}
|
||||
|
||||
SAFE_ENUMERATOR_CODE_START("standard::name,standard::type,standard::is_hidden")
|
||||
SAFE_ENUMERATOR_CODE_START("standard::name,standard::type,standard::is-hidden")
|
||||
|
||||
if (info->get_file_type() == Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || add_hidden)) {
|
||||
subDirs.push_back (info->get_name());
|
||||
|
@ -476,7 +476,13 @@ void ImageArea::addCropWindow ()
|
||||
cw->setEditSubscriber (getCurrSubscriber());
|
||||
cw->enable(); // start processing!
|
||||
|
||||
cw->centerCrop();
|
||||
{
|
||||
int anchorX = 0;
|
||||
int anchorY = 0;
|
||||
mainCropWindow->getCropAnchorPosition(anchorX, anchorY);
|
||||
cw->setCropAnchorPosition(anchorX, anchorY);
|
||||
}
|
||||
|
||||
mainCropWindow->setObservedCropWin (cropWins.front());
|
||||
|
||||
if(cropWins.size() == 1) { // after first detail window we already have high quality
|
||||
|
@ -1,16 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! "$1" ]]; then
|
||||
printf "%s\n" "Usage: $0 <hg tag>" "Example: $0 4.0.10"
|
||||
printf "%s\n" "Usage: $0 <git tag>" "Example: $0 4.2"
|
||||
exit
|
||||
fi
|
||||
|
||||
hg update "$1"
|
||||
git checkout "$1" || exit 0
|
||||
tools/generateReleaseInfo
|
||||
mkdir rawtherapee-"$1"
|
||||
mv ReleaseInfo.cmake rawtherapee-"$1"
|
||||
hg archive -X ".hg*" -X "rtgui/config.h" -X "rtgui/version.h" -X "rtdata/rawtherapee.desktop" rawtherapee-"$1".tar
|
||||
tar -rf rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake
|
||||
#hg archive -X ".hg*" -X "rtgui/config.h" -X "rtgui/version.h" -X "rtdata/rawtherapee.desktop" rawtherapee-"$1".tar
|
||||
git archive --format=tar "$1" > rawtherapee-"$1".tar
|
||||
tar --append --file=rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake
|
||||
xz -z -9e rawtherapee-"$1".tar
|
||||
rm -r rawtherapee-"$1"
|
||||
hg update
|
||||
git checkout
|
||||
|
@ -111,7 +111,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>rawtherapee</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@version@, Copyright © 2004-2013 Gábor Horváth</string>
|
||||
<string>@version@, Copyright © 2004-2010 Gábor Horváth, 2010-2016 RT dev team</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>rawtherapee.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
@ -4,7 +4,8 @@ cwd="$(cd "$(dirname "$0")"; pwd)"
|
||||
app="${cwd%/Contents/*}"
|
||||
etc="${cwd}"/etc
|
||||
|
||||
# for different os x version (issue 1795)
|
||||
# for different os x versions
|
||||
# see https://github.com/Beep6581/RawTherapee/issues/1779
|
||||
cups_dir=/tmp/RT4
|
||||
install -d ${cups_dir}
|
||||
cp -f /usr/lib/libcups.2.dylib ${cups_dir}
|
30
tools/osx/libiconv_1.14_rt.patch
Normal file
30
tools/osx/libiconv_1.14_rt.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/lib/iconv.c b/lib/iconv.c
|
||||
index 3785296..24a0f07 100644
|
||||
--- a/lib/iconv.c
|
||||
+++ b/lib/iconv.c
|
||||
@@ -607,4 +607,25 @@ strong_alias (libiconv, iconv)
|
||||
strong_alias (libiconv_close, iconv_close)
|
||||
#endif
|
||||
|
||||
+#undef iconv_open
|
||||
+#undef iconv
|
||||
+#undef iconv_close
|
||||
+
|
||||
+LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode)
|
||||
+{
|
||||
+ return libiconv_open(tocode, fromcode);
|
||||
+}
|
||||
+
|
||||
+LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd,
|
||||
+ ICONV_CONST char * * inbuf, size_t *inbytesleft,
|
||||
+ char * * outbuf, size_t *outbytesleft)
|
||||
+{
|
||||
+ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
+}
|
||||
+
|
||||
+LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd)
|
||||
+{
|
||||
+ return libiconv_close(icd);
|
||||
+}
|
||||
+
|
||||
#endif
|
@ -5,7 +5,7 @@
|
||||
# these are very important variables. Must be set into rtdata/CMakeLists.txt!
|
||||
# - PROJECT_NAME
|
||||
# - PROJECT_SOURCE_DIR
|
||||
# - PROJECT_VERSION (if without mercurial)
|
||||
# - PROJECT_VERSION (if without git)
|
||||
# - CMAKE_BUILD_TYPE
|
||||
# - PROC_BIT_DEPTH
|
||||
# - GTK_PREFIX
|
||||
@ -13,9 +13,11 @@
|
||||
function message {
|
||||
printf '\e[34m-- %s\e[m\n' "$*"
|
||||
}
|
||||
|
||||
function GetDependencies {
|
||||
otool -L "$1" | awk 'NR >= 2 && $1 !~ /^(\/usr\/lib|\/System|@executable_path|@rpath)\// { print $1 }'
|
||||
}
|
||||
|
||||
function CheckLink {
|
||||
GetDependencies "$1" | while read; do
|
||||
local dest="${LIB}/$(basename "${REPLY}")"
|
||||
@ -30,15 +32,20 @@ if test ! -d "${CMAKE_BUILD_TYPE}"; then
|
||||
fi
|
||||
|
||||
# update project version
|
||||
if test -x $(which hg) -a -d "${PROJECT_SOURCE_DIR}/.hg"; then
|
||||
PROJECT_VERSION=$(hg -R "${PROJECT_SOURCE_DIR}" parents --template "{latesttag}.{latesttagdistance}")
|
||||
if test -x "$(which git)" -a -d "${PROJECT_SOURCE_DIR}/.git"; then
|
||||
# This is what the version ought to look like to be accurate in the git universe:
|
||||
PROJECT_FULL_VERSION="$(git describe --tags --always)_$(git symbolic-ref --short -q HEAD)"
|
||||
# outputs: 4.2-677-g904467b_master
|
||||
# but Apple requirements https://goo.gl/eWDQv6 state we should use this:
|
||||
PROJECT_VERSION="$(git describe --tags --always | sed -e 's/-g.*//' -e 's/-/./')"
|
||||
# outputs: 4.2.677
|
||||
fi
|
||||
|
||||
# if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling,
|
||||
# 'MINIMUM_VERSION' will be used host OS X version.
|
||||
MINIMUM_SYSTEM_VERSION=$(otool -l "${CMAKE_BUILD_TYPE}"/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')
|
||||
MINIMUM_SYSTEM_VERSION="$(otool -l "${CMAKE_BUILD_TYPE}"/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')"
|
||||
if test ! -n "${MINIMUM_SYSTEM_VERSION}"; then
|
||||
MINIMUM_SYSTEM_VERSION=$(sw_vers -productVersion | cut -d. -f-2)
|
||||
MINIMUM_SYSTEM_VERSION="$(sw_vers -productVersion | cut -d. -f-2)"
|
||||
fi
|
||||
|
||||
# check for pango-querymodules. Pango 1.38.0 and above do not include it.
|
||||
@ -93,9 +100,9 @@ message "Copying dependencies from ${GTK_PREFIX}"
|
||||
CheckLink "${EXECUTABLE}"
|
||||
|
||||
message "Copying library modules from ${GTK_PREFIX}"
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/gdk-pixbuf-2.0
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/gtk-2.0
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/pango
|
||||
ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/gdk-pixbuf-2.0
|
||||
ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/gtk-2.0
|
||||
ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/pango
|
||||
|
||||
message "Removing static libraries and cache files"
|
||||
find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read; do rm "${REPLY}"; done
|
||||
@ -147,7 +154,7 @@ echo " install_name_tool -add_rpath @loader_path/lib '${EXECUTABLE}'" | bash -
|
||||
|
||||
|
||||
message "Installing required application bundle files"
|
||||
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}"/rtdata/osx
|
||||
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}"/tools/osx
|
||||
# executable loader
|
||||
# note: executable is renamed to 'rawtherapee-bin'.
|
||||
mv "${MACOS}"/rawtherapee{,-bin}
|
||||
@ -157,7 +164,7 @@ cp "${PROJECT_SOURCE_DATA_DIR}"/{rawtherapee,profile}.icns "${RESOURCES}"
|
||||
cp "${PROJECT_SOURCE_DATA_DIR}"/PkgInfo "${CONTENTS}"
|
||||
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/Info.plist.in "${CONTENTS}"/Info.plist
|
||||
sed -i "" -e "s|@version@|${PROJECT_VERSION}|
|
||||
s|@shortVersion@|$(echo ${PROJECT_VERSION} | cut -d. -f-3)|
|
||||
s|@shortVersion@|${PROJECT_VERSION}|
|
||||
s|@arch@|${arch}|" \
|
||||
"${CONTENTS}"/Info.plist
|
||||
plutil -convert binary1 "${CONTENTS}"/Info.plist
|
||||
@ -165,31 +172,31 @@ plutil -convert binary1 "${CONTENTS}"/Info.plist
|
||||
|
||||
|
||||
function CreateDmg {
|
||||
local srcdir=$(mktemp -dt $$)
|
||||
local srcdir="$(mktemp -dt $$)"
|
||||
|
||||
message "Preparing disk image sources at ${srcdir}"
|
||||
mv "${APP}" ${srcdir}
|
||||
cp AboutThisBuild.txt ${srcdir}
|
||||
ln -s /Applications ${srcdir}
|
||||
mv "${APP}" "${srcdir}"
|
||||
cp AboutThisBuild.txt "${srcdir}"
|
||||
ln -s /Applications "${srcdir}"
|
||||
|
||||
# web bookmarks
|
||||
function CreateWebloc {
|
||||
defaults write ${srcdir}/"$1" URL "$2"
|
||||
mv ${srcdir}/"$1".{plist,webloc}
|
||||
defaults write "${srcdir}/$1" URL "$2"
|
||||
mv "${srcdir}/$1".{plist,webloc}
|
||||
}
|
||||
CreateWebloc 'RawTherapee Blog' 'http://www.rawtherapee.com'
|
||||
CreateWebloc 'Online Manual' 'https://docs.google.com/document/d/1DHLb_6xNQsEInxiuU8pz1-sWNinnj09bpBUA4_Vl8w8/edit'
|
||||
CreateWebloc 'Online Manual' 'http://rawpedia.rawtherapee.com/'
|
||||
|
||||
# disk image name
|
||||
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_VERSION}"
|
||||
if ! echo ${CMAKE_BUILD_TYPE} | grep -sqi "release"; then
|
||||
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}"
|
||||
if ! echo "${CMAKE_BUILD_TYPE}" | grep -sqi "release"; then
|
||||
dmg_name="${dmg_name}_$(echo ${CMAKE_BUILD_TYPE} | tr '[:upper:]' '[:lower:]')"
|
||||
fi
|
||||
|
||||
message "Creating disk image"
|
||||
hdiutil create -format UDBZ -srcdir ${srcdir} -volname "${PROJECT_NAME}_${PROJECT_VERSION}" "${dmg_name}".dmg
|
||||
hdiutil create -format UDBZ -srcdir "${srcdir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}".dmg
|
||||
|
||||
message "Removing disk image caches"
|
||||
rm -rf ${srcdir}
|
||||
rm -rf "${srcdir}"
|
||||
}
|
||||
CreateDmg
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Loading…
x
Reference in New Issue
Block a user