Merge branch 'master' into gtk3

This commit is contained in:
Beep6581 2016-02-23 09:26:00 +01:00
commit cb916f7c2d
17 changed files with 132 additions and 73 deletions

View File

@ -98,6 +98,8 @@ option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
option (WITH_BZIP "Build with Bzip2 support" ON) option (WITH_BZIP "Build with Bzip2 support" ON)
option (WITH_MYFILE_MMAP "Build using memory mapped file" ON) option (WITH_MYFILE_MMAP "Build using memory mapped file" ON)
option (WITH_LTO "Build with link-time optimizations" OFF) 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 (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 (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) 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") SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
endif (WITH_LTO) 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) if (OPTION_OMP)
find_package(OpenMP) find_package(OpenMP)
if (OPENMP_FOUND) if (OPENMP_FOUND)

View File

@ -57,7 +57,7 @@ if (WIN32)
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) 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}) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR})
endif (WIN32) endif (WIN32)
@ -103,7 +103,7 @@ if (APPLE)
elseif (PROC_BIT_DEPTH MATCHES 64) elseif (PROC_BIT_DEPTH MATCHES 64)
list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64) list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64)
endif (PROC_BIT_DEPTH MATCHES 32) 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 add_custom_target(macosx_bundle
COMMAND ${MACOSX_BUNDLE_COMMAND} COMMAND ${MACOSX_BUNDLE_COMMAND}

View File

@ -69,7 +69,7 @@
#define ALIGNED64 #define ALIGNED64
#define ALIGNED16 #define ALIGNED16
#endif #endif
#ifndef __clang__ #if !defined(__clang__) && defined _OPENMP
#define _RT_NESTED_OPENMP _OPENMP #define _RT_NESTED_OPENMP
#endif #endif
#endif #endif

View File

@ -174,7 +174,7 @@ void safe_build_subdir_list (Glib::RefPtr<Gio::File> &dir, std::vector<Glib::ust
return; 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)) { if (info->get_file_type() == Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || add_hidden)) {
subDirs.push_back (info->get_name()); subDirs.push_back (info->get_name());

View File

@ -476,7 +476,13 @@ void ImageArea::addCropWindow ()
cw->setEditSubscriber (getCurrSubscriber()); cw->setEditSubscriber (getCurrSubscriber());
cw->enable(); // start processing! cw->enable(); // start processing!
cw->centerCrop(); {
int anchorX = 0;
int anchorY = 0;
mainCropWindow->getCropAnchorPosition(anchorX, anchorY);
cw->setCropAnchorPosition(anchorX, anchorY);
}
mainCropWindow->setObservedCropWin (cropWins.front()); mainCropWindow->setObservedCropWin (cropWins.front());
if(cropWins.size() == 1) { // after first detail window we already have high quality if(cropWins.size() == 1) { // after first detail window we already have high quality

View File

@ -1,16 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ ! "$1" ]]; then 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 exit
fi fi
hg update "$1" git checkout "$1" || exit 0
tools/generateReleaseInfo tools/generateReleaseInfo
mkdir rawtherapee-"$1" mkdir rawtherapee-"$1"
mv ReleaseInfo.cmake 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 #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 git archive --format=tar "$1" > rawtherapee-"$1".tar
tar --append --file=rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake
xz -z -9e rawtherapee-"$1".tar xz -z -9e rawtherapee-"$1".tar
rm -r rawtherapee-"$1" rm -r rawtherapee-"$1"
hg update git checkout

View File

@ -111,7 +111,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>rawtherapee</string> <string>rawtherapee</string>
<key>CFBundleGetInfoString</key> <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> <key>CFBundleIconFile</key>
<string>rawtherapee.icns</string> <string>rawtherapee.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>

View File

@ -4,7 +4,8 @@ cwd="$(cd "$(dirname "$0")"; pwd)"
app="${cwd%/Contents/*}" app="${cwd%/Contents/*}"
etc="${cwd}"/etc 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 cups_dir=/tmp/RT4
install -d ${cups_dir} install -d ${cups_dir}
cp -f /usr/lib/libcups.2.dylib ${cups_dir} cp -f /usr/lib/libcups.2.dylib ${cups_dir}

View 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

View File

@ -5,7 +5,7 @@
# these are very important variables. Must be set into rtdata/CMakeLists.txt! # these are very important variables. Must be set into rtdata/CMakeLists.txt!
# - PROJECT_NAME # - PROJECT_NAME
# - PROJECT_SOURCE_DIR # - PROJECT_SOURCE_DIR
# - PROJECT_VERSION (if without mercurial) # - PROJECT_VERSION (if without git)
# - CMAKE_BUILD_TYPE # - CMAKE_BUILD_TYPE
# - PROC_BIT_DEPTH # - PROC_BIT_DEPTH
# - GTK_PREFIX # - GTK_PREFIX
@ -13,9 +13,11 @@
function message { function message {
printf '\e[34m-- %s\e[m\n' "$*" printf '\e[34m-- %s\e[m\n' "$*"
} }
function GetDependencies { function GetDependencies {
otool -L "$1" | awk 'NR >= 2 && $1 !~ /^(\/usr\/lib|\/System|@executable_path|@rpath)\// { print $1 }' otool -L "$1" | awk 'NR >= 2 && $1 !~ /^(\/usr\/lib|\/System|@executable_path|@rpath)\// { print $1 }'
} }
function CheckLink { function CheckLink {
GetDependencies "$1" | while read; do GetDependencies "$1" | while read; do
local dest="${LIB}/$(basename "${REPLY}")" local dest="${LIB}/$(basename "${REPLY}")"
@ -30,15 +32,20 @@ if test ! -d "${CMAKE_BUILD_TYPE}"; then
fi fi
# update project version # update project version
if test -x $(which hg) -a -d "${PROJECT_SOURCE_DIR}/.hg"; then if test -x "$(which git)" -a -d "${PROJECT_SOURCE_DIR}/.git"; then
PROJECT_VERSION=$(hg -R "${PROJECT_SOURCE_DIR}" parents --template "{latesttag}.{latesttagdistance}") # 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 fi
# if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling, # if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling,
# 'MINIMUM_VERSION' will be used host OS X version. # '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 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 fi
# check for pango-querymodules. Pango 1.38.0 and above do not include it. # 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}" CheckLink "${EXECUTABLE}"
message "Copying library modules from ${GTK_PREFIX}" 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}"}/gdk-pixbuf-2.0
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/gtk-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}"}/pango
message "Removing static libraries and cache files" message "Removing static libraries and cache files"
find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read; do rm "${REPLY}"; done 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" 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 # executable loader
# note: executable is renamed to 'rawtherapee-bin'. # note: executable is renamed to 'rawtherapee-bin'.
mv "${MACOS}"/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}" cp "${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
sed -i "" -e "s|@version@|${PROJECT_VERSION}| sed -i "" -e "s|@version@|${PROJECT_VERSION}|
s|@shortVersion@|$(echo ${PROJECT_VERSION} | cut -d. -f-3)| s|@shortVersion@|${PROJECT_VERSION}|
s|@arch@|${arch}|" \ s|@arch@|${arch}|" \
"${CONTENTS}"/Info.plist "${CONTENTS}"/Info.plist
plutil -convert binary1 "${CONTENTS}"/Info.plist plutil -convert binary1 "${CONTENTS}"/Info.plist
@ -165,31 +172,31 @@ plutil -convert binary1 "${CONTENTS}"/Info.plist
function CreateDmg { function CreateDmg {
local srcdir=$(mktemp -dt $$) local srcdir="$(mktemp -dt $$)"
message "Preparing disk image sources at ${srcdir}" message "Preparing disk image sources at ${srcdir}"
mv "${APP}" ${srcdir} mv "${APP}" "${srcdir}"
cp AboutThisBuild.txt ${srcdir} cp AboutThisBuild.txt "${srcdir}"
ln -s /Applications ${srcdir} ln -s /Applications "${srcdir}"
# web bookmarks # web bookmarks
function CreateWebloc { function CreateWebloc {
defaults write ${srcdir}/"$1" URL "$2" defaults write "${srcdir}/$1" URL "$2"
mv ${srcdir}/"$1".{plist,webloc} mv "${srcdir}/$1".{plist,webloc}
} }
CreateWebloc 'RawTherapee Blog' 'http://www.rawtherapee.com' 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 # disk image name
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_VERSION}" dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}"
if ! echo ${CMAKE_BUILD_TYPE} | grep -sqi "release"; then if ! echo "${CMAKE_BUILD_TYPE}" | grep -sqi "release"; then
dmg_name="${dmg_name}_$(echo ${CMAKE_BUILD_TYPE} | tr '[:upper:]' '[:lower:]')" dmg_name="${dmg_name}_$(echo ${CMAKE_BUILD_TYPE} | tr '[:upper:]' '[:lower:]')"
fi fi
message "Creating disk image" 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" message "Removing disk image caches"
rm -rf ${srcdir} rm -rf "${srcdir}"
} }
CreateDmg CreateDmg

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB