diff --git a/.travis.yml b/.travis.yml index aefcb6fa..0cda8740 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,13 @@ +sudo: required language: cpp compiler: g++ -dist: xenial -sudo: required - -before_install: - - sudo apt remove --purge imagemagick imagemagick-common - - sudo apt-get update +matrix: + include: + - os: linux + dist: xenial + - os: osx + osx_image: xcode8 -install: - - sudo apt-get install cmake tree qtbase5-dev libpng-dev libjpeg-dev liblcms2-dev libtiff-dev libbz2-dev zlib1g-dev liblzma-dev - - sudo apt-get install scons autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool - - sudo apt-get install libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make - - sudo apt-get install openssl p7zip-full patch perl pkg-config python ruby sed unzip wget xz-utils wine - - sudo apt-get install libfreetype6-dev libfontconfig1-dev - script: - sh res/travis.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d284fcf..e2c9677f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,10 @@ set(COMPANY "Cyan") set(COPYRIGHT "Copyright Ole-Andre Rodlie, INRIA. All rights reserved.") set(IDENTIFIER "net.fxarena.cyan") +if(CMAKE_BUILD_TYPE MATCHES RELEASE) + add_definitions(-DQT_NO_DEBUG_OUTPUT) +endif() + if(APPLE) set(ICON_FILE ${RESOURCE_FOLDER}/${PROJECT_NAME}.icns) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") diff --git a/cyan.pro b/cyan.pro index 355538d3..30fa4e37 100644 --- a/cyan.pro +++ b/cyan.pro @@ -59,8 +59,18 @@ TEMPLATE = app CONFIG += c++11 QT_CONFIG -= no-pkg-config CONFIG += link_pkgconfig -PKGCONFIG += lcms2 ImageMagick++ -LIBS += `pkg-config --libs --static ImageMagick++` +PKGCONFIG += lcms2 +MAGICK_CONFIG = ImageMagick++ +!isEmpty(MAGICK): MAGICK_CONFIG = $${MAGICK} +PKG_CONFIG_BIN = pkg-config +!isEmpty(CUSTOM_PKG_CONFIG): PKG_CONFIG_BIN = $${CUSTOM_PKG_CONFIG} + +PKGCONFIG += $${MAGICK_CONFIG} +LIBS += `$${PKG_CONFIG_BIN} --libs --static $${MAGICK_CONFIG}` + +isEmpty(PREFIX): PREFIX = /usr/local +isEmpty(DOCDIR): DOCDIR = $$PREFIX/share/doc +isEmpty(MANDIR): MANDIR = $$PREFIX/share/man DEFINES += CYAN_VERSION=\"\\\"$${VERSION}$${VERSION_TYPE}\\\"\" DEFINES += CYAN_GIT=\"\\\"$${GIT}\\\"\" @@ -69,10 +79,55 @@ QMAKE_TARGET_PRODUCT = "$${TARGET}" QMAKE_TARGET_DESCRIPTION = "$${TARGET}" QMAKE_TARGET_COPYRIGHT = "Copyright Ole-Andre Rodlie, INRIA" +CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT + +unix:!mac { + target.path = $${PREFIX}/bin + target_desktop.path = $${PREFIX}/share/applications + target_desktop.files = res/cyan.desktop + target_docs.path = $${DOCDIR}/$${TARGET}-$${VERSION} + target_docs.files = LICENSE + INSTALLS += target target_desktop target_docs + + icon16.files = res/hicolor/16x16/apps/cyan.png + icon16.path = $${PREFIX}/share/icons/hicolor/16x16/apps + icon20.files = res/hicolor/20x20/apps/cyan.png + icon20.path = $${PREFIX}/share/icons/hicolor/20x20/apps + icon22.files = res/hicolor/22x22/apps/cyan.png + icon22.path = $${PREFIX}/share/icons/hicolor/22x22/apps + icon24.files = res/hicolor/24x24/apps/cyan.png + icon24.path = $${PREFIX}/share/icons/hicolor/24x24/apps + icon32.files = res/hicolor/32x32/apps/cyan.png + icon32.path = $${PREFIX}/share/icons/hicolor/32x32/apps + icon48.files = res/hicolor/48x48/apps/cyan.png + icon48.path = $${PREFIX}/share/icons/hicolor/48x48/apps + icon64.files = res/hicolor/64x64/apps/cyan.png + icon64.path = $${PREFIX}/share/icons/hicolor/64x64/apps + icon72.files = res/hicolor/72x72/apps/cyan.png + icon72.path = $${PREFIX}/share/icons/hicolor/72x72/apps + icon96.files = res/hicolor/96x96/apps/cyan.png + icon96.path = $${PREFIX}/share/icons/hicolor/96x96/apps + icon128.files = res/hicolor/128x128/apps/cyan.png + icon128.path = $${PREFIX}/share/icons/hicolor/128x128/apps + icon160.files = res/hicolor/160x160/apps/cyan.png + icon160.path = $${PREFIX}/share/icons/hicolor/160x160/apps + icon192.files = res/hicolor/192x192/apps/cyan.png + icon192.path = $${PREFIX}/share/icons/hicolor/192x192/apps + icon256.files = res/hicolor/256x256/apps/cyan.png + icon256.path = $${PREFIX}/share/icons/hicolor/256x256/apps + icon512.files = res/hicolor/512x512/apps/cyan.png + icon512.path = $${PREFIX}/share/icons/hicolor/512x512/apps + + INSTALLS += icon16 icon20 icon22 \ + icon24 icon32 icon48 \ + icon64 icon72 icon96 \ + icon128 icon160 icon192 \ + icon256 icon512 +} mac { ICON = res/Cyan.icns QMAKE_INFO_PLIST = res/Info.plist - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10 QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp } diff --git a/docs/ChangeLog b/docs/ChangeLog index c35f4e39..a1941467 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,4 +1,4 @@ -## 1.2.0 - TBA +## 1.2.0 - 20181203 * Major "behind-the-scene" changes * Improved performance diff --git a/docs/README.md b/docs/README.md index 0c6f9590..6be0b70d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,12 +19,11 @@ Cyan is an open source cross-platform image viewer and converter, designed for [ # Requirements - * 4GB RAM (+) - * Microsoft Windows 7 x64 (+) - * Apple Mac OS X Lion 10.7 (+) - * Linux/FreeBSD (source-only) + * [![Download for Windows](https://github.com/rodlie/cyan/raw/master/docs/images/download_for_windows.png)](https://github.com/rodlie/cyan/releases/latest) Microsoft Windows 7/8/10 x64 + * [![Download for Mac](https://github.com/rodlie/cyan/raw/master/docs/images/download_for_mac.png)](https://github.com/rodlie/cyan/releases/latest) Apple Mac OS X 10.10-10.14 + * [![Download for Linux](https://github.com/rodlie/cyan/raw/master/docs/images/download_for_linux.png)](https://github.com/rodlie/cyan/releases/latest) GNU/Linux x86_64 (glibc 2.23+/libgcc 5.4+) - Recommended requirements and additional files: +## Recommended * A bitmap editor * [GIMP](https://www.gimp.org) diff --git a/docs/_config.yml b/docs/_config.yml index 6a8079ac..bc5228e7 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,5 @@ theme: jekyll-theme-minimal title: Cyan -description: Open Source prepress image viewer and converter +description: Open source prepress image viewer and converter logo: https://github.com/rodlie/cyan/raw/master/res/hicolor/256x256/apps/cyan.png -show_downloads: true +show_downloads: false diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index b8955405..f6fd9556 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -18,7 +18,8 @@ {% endif %} - + + {% if site.show_downloads %}
The source repository is hosted on Github and the binaries are hosted on Sourceforge. Travis CI is used to build and deploy the binaries.
+Hosted on Github and Sourceforge. Travis CI is used to build and deploy the binaries.
diff --git a/docs/images/cyan-promo-01.png b/docs/images/cyan-promo-01.png index 612d35c7..878f2848 100644 Binary files a/docs/images/cyan-promo-01.png and b/docs/images/cyan-promo-01.png differ diff --git a/docs/images/download_for_linux.png b/docs/images/download_for_linux.png new file mode 100644 index 00000000..2d00b11c Binary files /dev/null and b/docs/images/download_for_linux.png differ diff --git a/docs/images/download_for_mac.png b/docs/images/download_for_mac.png new file mode 100644 index 00000000..b1343716 Binary files /dev/null and b/docs/images/download_for_mac.png differ diff --git a/docs/images/download_for_windows.png b/docs/images/download_for_windows.png new file mode 100644 index 00000000..884fb5f6 Binary files /dev/null and b/docs/images/download_for_windows.png differ diff --git a/res/travis.sh b/res/travis.sh index 29395e81..257a8480 100755 --- a/res/travis.sh +++ b/res/travis.sh @@ -1,4 +1,34 @@ #!/bin/sh +# Copyright Ole-André Rodlie, INRIA. +# +# ole.andre.rodlie@gmail.com +# +# This software is governed by the CeCILL license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and / or redistribute the software under the terms of the CeCILL +# license as circulated by CEA, CNRS and INRIA at the following URL +# "https://www.cecill.info". +# +# As a counterpart to the access to the source code and rights to +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights and the subsequent licensors have only limited +# liability. +# +# In this respect, the user's attention is drawn to the associated risks +# with loading, using, modifying and / or developing or reproducing the +# software by the user in light of its specific status of free software, +# that can mean that it is complicated to manipulate, and that also +# so that it is for developers and experienced +# professionals having in-depth computer knowledge. Users are therefore +# encouraged to test and test the software's suitability +# Requirements in the conditions of their systems +# data to be ensured and, more generally, to use and operate +# same conditions as regards security. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL license and that you accept its terms. + set -e SETUP=${SETUP:-1} @@ -7,9 +37,10 @@ if [ "${SETUP}" = 1 ]; then sudo chmod 777 /opt fi +OS=`uname -s` CWD=`pwd` MXE=/opt/mxe -SDK=/opt/`uname -s` +SDK=/opt/${OS} DEPLOY=/opt/deploy COMMIT="${TRAVIS_COMMIT}" @@ -18,114 +49,159 @@ if [ "${TRAVIS_TAG}" != "" ]; then fi if [ "${SETUP}" = 1 ]; then - -echo "Extracting win64 sdk ..." -mkdir -p $MXE -wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-win64.tar.xz/download && mv download download.tar.xz -tar xf download.tar.xz -C $MXE/ -rm -f download.tar.xz - -echo "Extracting xenial64 sdk ..." -wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-xenial64.tar.xz/download && mv download download.tar.xz -sudo tar xf download.tar.xz -C / -rm -f download.tar.xz - -echo "Extracting linux64 sdk ..." -wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-linux64.tar.xz/download && mv download download.tar.xz -tar xf download.tar.xz -C /opt -rm -f download.tar.xz - -echo "Extracting sdk legal ..." -wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-legal.tar.xz/download && mv download download.tar.xz -tar xf download.tar.xz -C /opt -rm -f download.tar.xz - -echo "Building CI ..." -mkdir -p $CWD/ci -cd $CWD/ci -cmake -DCMAKE_INSTALL_PREFIX=/usr .. -make -make test -make DESTDIR=`pwd`/pkg install -tree pkg - + echo "Extracting sdk legal ..." + wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-legal.tar.xz/download && mv download download.tar.xz + tar xf download.tar.xz -C /opt + rm -f download.tar.xz + if [ "${OS}" = "Linux" ]; then + echo "Setup ubuntu ..." + sudo apt remove --purge imagemagick imagemagick-common + sudo apt-get update + sudo apt-get install cmake tree qtbase5-dev libpng-dev libjpeg-dev liblcms2-dev libtiff-dev libbz2-dev zlib1g-dev liblzma-dev + sudo apt-get install scons autoconf automake autopoint bash bison bzip2 gettext git gperf intltool + sudo apt-get install openssl patch perl pkg-config python ruby sed unzip wget xz-utils wine + sudo apt-get install libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool libxml-parser-perl make + sudo apt-get install flex g++ g++-multilib libc6-dev-i386 wine p7zip-full libfreetype6-dev libfontconfig1-dev + echo "Extracting win64 sdk ..." + mkdir -p ${MXE} + wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-win64.tar.xz/download && mv download download.tar.xz + tar xf download.tar.xz -C ${MXE}/ + rm -f download.tar.xz + echo "Extracting xenial64 sdk ..." + wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-xenial64.tar.xz/download && mv download download.tar.xz + sudo tar xf download.tar.xz -C / + rm -f download.tar.xz + echo "Extracting linux64 sdk ..." + wget https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-linux64.tar.xz/download && mv download download.tar.xz + tar xf download.tar.xz -C /opt + rm -f download.tar.xz + elif [ "${OS}" = "Darwin" ]; then + curl -L https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-mac11clang6.tar.xz/download --output download.tar.xz + tar xf download.tar.xz -C /opt + rm -f download.tar.xz + curl -L https://sourceforge.net/projects/prepress/files/sdk/cyan-1.2-sdk-mac11.tar.xz/download --output download.tar.xz + tar xf download.tar.xz -C /opt + rm -f download.tar.xz + fi fi -# I can't get cmake+qt+static to work, so fallback to qmake ... -cd ${CWD} -export PATH="${SDK}/bin:/usr/bin:/bin" -export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" -echo "===> Building for Linux64 ..." -mkdir -p ${CWD}/linux64 && cd ${CWD}/linux64 -qmake GIT=${COMMIT} CONFIG+=release PREFIX=/usr ../cyan.pro -make -strip -s build/Cyan -mv build/Cyan . -mkdir -p ${CWD}/linux64-test && cd ${CWD}/linux64-test -qmake ../tests.pro -make - -echo "===> Building win64 ..." -mkdir -p ${CWD}/win64 -cd ${CWD}/win64 -TARGET=x86_64-w64-mingw32.static -MINGW="${MXE}/usr/${TARGET}" -CMAKE="${TARGET}-cmake" -QT=${MINGW}/qt5 -QMAKE=${QT}/bin/qmake -STRIP="${MXE}/usr/bin/${TARGET}-strip" -PATH="${MXE}/usr/bin:/usr/bin:/bin" -PKG_CONFIG_PATH="${MINGW}/lib/pkgconfig" -${QMAKE} GIT=${COMMIT} CONFIG+=release ../cyan.pro -make -${STRIP} -s build/Cyan.exe -mv build/Cyan.exe . -mkdir -p ${CWD}/win64-test && cd ${CWD}/win64-test -${QMAKE} ../tests.pro -make +if [ "${OS}" = "Linux" ]; then + echo "Building CI ..." + mkdir -p $CWD/ci + cd $CWD/ci + cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make + make test + make DESTDIR=`pwd`/pkg install + tree pkg + + cd ${CWD} + export PATH="${SDK}/bin:/usr/bin:/bin" + export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" + echo "===> Building for Linux64 ..." + mkdir -p ${CWD}/linux64 && cd ${CWD}/linux64 + qmake GIT=${COMMIT} CONFIG+=release PREFIX=/usr ../cyan.pro + make + strip -s build/Cyan + mv build/Cyan . + mkdir -p ${CWD}/linux64-test && cd ${CWD}/linux64-test + qmake ../tests.pro + make + + echo "===> Building win64 ..." + mkdir -p ${CWD}/win64 + cd ${CWD}/win64 + TARGET=x86_64-w64-mingw32.static + MINGW="${MXE}/usr/${TARGET}" + CMAKE="${TARGET}-cmake" + QT=${MINGW}/qt5 + QMAKE=${QT}/bin/qmake + STRIP="${MXE}/usr/bin/${TARGET}-strip" + PATH="${MXE}/usr/bin:/usr/bin:/bin" + PKG_CONFIG_PATH="${MINGW}/lib/pkgconfig" + ${QMAKE} GIT=${COMMIT} CONFIG+=release ../cyan.pro + make + ${STRIP} -s build/Cyan.exe + mv build/Cyan.exe . + mkdir -p ${CWD}/win64-test && cd ${CWD}/win64-test + ${QMAKE} ../tests.pro + make +elif [ "${OS}" = "Darwin" ]; then + echo "===> Building mac64 ..." + PKG_CONFIG=${SDK}/bin/pkg-config + PKG_CONFIG_PATH="${SDK}/lib/pkgconfig:${PKG_CONFIG_PATH}" + PATH=${SDK}/bin:/usr/bin:/bin + mkdir -p ${CWD}/mac64 && cd ${CWD}/mac64 + qmake GIT=${COMMIT} CONFIG+=release ../cyan.pro + make + MP=/opt/local/lib/libomp/libomp.dylib + cp ${MP} build/Cyan.app/Contents/MacOS/ + install_name_tool -change ${MP} @executable_path/libomp.dylib build/Cyan.app/Contents/MacOS/Cyan + install_name_tool -id @executable_path/libomp.dylib build/Cyan.app/Contents/MacOS/libomp.dylib + strip -u -r build/Cyan.app/Contents/MacOS/* + mv build/Cyan.app . + mkdir -p ${CWD}/mac64-test && cd ${CWD}/mac64-test + qmake ../tests.pro + make +fi echo "===> Creating archives ..." -mkdir -p ${CWD}/deploy $DEPLOY && cd ${CWD}/deploy +mkdir -p ${CWD}/deploy ${DEPLOY} && cd ${CWD}/deploy TAG=`date "+%Y%m%d%H%M"` if [ "${TRAVIS_TAG}" != "" ]; then echo "===> RELEASE MODE" TAG="${TRAVIS_TAG}" fi -mkdir -p Cyan-${TAG}-Windows/third-party Cyan-${TAG}-Linux/third-party -cp ${CWD}/LICENSE Cyan-${TAG}-Windows/ -cp ${CWD}/LICENSE Cyan-${TAG}-Linux/ - -cp -a /opt/legal/Windows/* Cyan-${TAG}-Windows/third-party/ -cp -a /opt/legal/Linux/* Cyan-${TAG}-Linux/third-party/ - -cp ${CWD}/win64/Cyan.exe Cyan-${TAG}-Windows/ -cp ${CWD}/linux64/Cyan Cyan-${TAG}-Linux/ - -cp ${CWD}/res/cyan.desktop Cyan-${TAG}-Linux/ -cp -a ${CWD}/res/hicolor/128x128/apps/cyan.png Cyan-${TAG}-Linux/ - -7za -mx=9 a -r Cyan-${TAG}-Windows.7z Cyan-${TAG}-Windows -WIN_CHECKSUM=`sha256sum Cyan-${TAG}-Windows.7z | awk '{print $1}'` -cp Cyan-${TAG}-Windows.7z $DEPLOY/ -echo "===> Windows checksum ${WIN_CHECKSUM}" - -tar cvvf Cyan-${TAG}-Linux.tar Cyan-${TAG}-Linux -xz -9 Cyan-${TAG}-Linux.tar -mv Cyan-${TAG}-Linux.tar.xz Cyan-${TAG}-Linux.txz -cp Cyan-${TAG}-Linux.txz $DEPLOY/ -LIN_CHECKSUM=`sha256sum Cyan-${TAG}-Linux.txz | awk '{print $1}'` -echo "===> Linux checksum ${LIN_CHECKSUM}" +if [ "${OS}" = "Linux" ]; then + mkdir -p Cyan-${TAG}-Windows/third-party Cyan-${TAG}-Linux/third-party + cp ${CWD}/LICENSE Cyan-${TAG}-Windows/ + cp ${CWD}/LICENSE Cyan-${TAG}-Linux/ + cp -a /opt/legal/Windows/* Cyan-${TAG}-Windows/third-party/ + cp -a /opt/legal/Linux/* Cyan-${TAG}-Linux/third-party/ + cp ${CWD}/win64/Cyan.exe Cyan-${TAG}-Windows/ + cp ${CWD}/linux64/Cyan Cyan-${TAG}-Linux/ + cp ${CWD}/res/cyan.desktop Cyan-${TAG}-Linux/ + cp -a ${CWD}/res/hicolor/128x128/apps/cyan.png Cyan-${TAG}-Linux/ + 7za -mx=9 a -r Cyan-${TAG}-Windows.7z Cyan-${TAG}-Windows + WIN_CHECKSUM=`sha256sum Cyan-${TAG}-Windows.7z | awk '{print $1}'` + cp Cyan-${TAG}-Windows.7z ${DEPLOY}/ + echo "===> Windows checksum ${WIN_CHECKSUM}" + tar cvvf Cyan-${TAG}-Linux.tar Cyan-${TAG}-Linux + xz -9 Cyan-${TAG}-Linux.tar + mv Cyan-${TAG}-Linux.tar.xz Cyan-${TAG}-Linux.txz + cp Cyan-${TAG}-Linux.txz ${DEPLOY}/ + LIN_CHECKSUM=`sha256sum Cyan-${TAG}-Linux.txz | awk '{print $1}'` + echo "===> Linux checksum ${LIN_CHECKSUM}" +elif [ "${OS}" = "Darwin" ]; then + mkdir -p Cyan-${TAG}-Mac/third-party + cp ${CWD}/LICENSE Cyan-${TAG}-Mac/ + cp -a /opt/legal/Mac/* Cyan-${TAG}-Mac/third-party/ + cp -a ${CWD}/mac64/Cyan.app Cyan-${TAG}-Mac/ + hdiutil create -volname "Cyan ${TAG}" -srcfolder Cyan-${TAG}-Mac -ov -format UDBZ Cyan-${TAG}-Mac.dmg + cp Cyan-${TAG}-Mac.dmg ${DEPLOY}/ + MAC_CHECKSUM=`shasum -a 256 Cyan-${TAG}-Mac.dmg | awk '{print $1}'` + echo "===> Mac checksum ${MAC_CHECKSUM}" +fi if [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ "${TRAVIS_PULL_REQUEST}" != "" ]; then -echo "===> Uploading archives to transfer.sh ..." - UPLOAD_WIN=`curl --upload-file ./Cyan-${TAG}-Windows.7z https://transfer.sh/Cyan-${TAG}-Windows.7z` - UPLOAD_LIN=`curl --upload-file ./Cyan-${TAG}-Linux.txz https://transfer.sh/Cyan-${TAG}-Linux.txz` - echo "===> Windows snapshot ${UPLOAD_WIN}" - echo "===> Linux snapshot ${UPLOAD_LIN}" - if [ "${UPLOAD_WIN}" != "" ] && [ "${UPLOAD_LIN}" != "" ]; then - COMMENT="**CI for this pull request:** Windows build is available at ${UPLOAD_WIN} with SHA256 checksum ${WIN_CHECKSUM}. Linux build is available at ${UPLOAD_LIN} with SHA256 checksum ${LIN_CHECKSUM}." + echo "===> Uploading archives to transfer.sh ..." + if [ "${OS}" = "Linux" ]; then + UPLOAD_WIN=`curl --upload-file ./Cyan-${TAG}-Windows.7z https://transfer.sh/Cyan-${TAG}-Windows.7z` + UPLOAD_LIN=`curl --upload-file ./Cyan-${TAG}-Linux.txz https://transfer.sh/Cyan-${TAG}-Linux.txz` + echo "===> Windows snapshot ${UPLOAD_WIN}" + echo "===> Linux snapshot ${UPLOAD_LIN}" + if [ "${UPLOAD_WIN}" != "" ] && [ "${UPLOAD_LIN}" != "" ]; then + COMMENT="**CI for this pull request:** Windows build is available at ${UPLOAD_WIN} with SHA256 checksum ${WIN_CHECKSUM}. Linux build is available at ${UPLOAD_LIN} with SHA256 checksum ${LIN_CHECKSUM}." + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST -d "{\"body\": \"${COMMENT}\"}" "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" + fi + elif [ "${OS}" = "Darwin" ]; then + UPLOAD_MAC=`curl --upload-file ./Cyan-${TAG}-Mac.dmg https://transfer.sh/Cyan-${TAG}-Mac.dmg` + echo "===> Mac snapshot ${UPLOAD_MAC}" + if [ "${UPLOAD_MAC}" != "" ]; then + COMMENT="**CI for this pull request:** Mac build is available at ${UPLOAD_MAC} with SHA256 checksum ${MAC_CHECKSUM}." curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST -d "{\"body\": \"${COMMENT}\"}" "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" + fi fi fi diff --git a/src/cyan.cpp b/src/cyan.cpp index 21d4f5f8..c5741906 100644 --- a/src/cyan.cpp +++ b/src/cyan.cpp @@ -90,7 +90,7 @@ Cyan::Cyan(QWidget *parent) , bitDepth(Q_NULLPTR) , imageInfoDock(Q_NULLPTR) , imageInfoTree(Q_NULLPTR) - , ignoreAction(false) + , ignoreConvertAction(false) , progBar(Q_NULLPTR) { // style app @@ -112,7 +112,7 @@ Cyan::Cyan(QWidget *parent) palette.setColor(QPalette::Disabled, QPalette::Text, Qt::darkGray); palette.setColor(QPalette::Disabled, QPalette::ButtonText, Qt::darkGray); qApp->setPalette(palette); - setStyleSheet(QString("*{font-size: %1pt;}").arg(QString::number(CYAN_FONT_SIZE))); + setStyleSheet(QString("*{ font-size: %1pt; }").arg(QString::number(CYAN_FONT_SIZE))); QString padding = "margin-right:5px;"; setWindowTitle(qApp->applicationName()); setWindowIcon(QIcon(":/cyan.png")); @@ -524,8 +524,8 @@ void Cyan::aboutCyan() QString devel = CYAN_GIT; if (!devel.isEmpty()) { version = QString("%1