diff --git a/.gitignore b/.gitignore index cca53a616..3b0a45212 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ +Makefile +src/*/Makefile +vendors/*/Makefile src/xpiks-qt/build* +src/xpiks-qt/BUILDNO *.pro.user *.autosave src/xpiks-tests/build-* @@ -15,7 +19,11 @@ hunspell-1.6.0 *.a .qmake.stash moc_*.cpp +moc_*.h *.exe installer/packages/xpiks/data/ *.qm UiTestsStubPlugin/ +debian/*.debhelper +debian/*.debhelper.* +debian/xpiks/* \ No newline at end of file diff --git a/BUILD.md b/BUILD.md index 3572cafdb..d1b3628f7 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,107 +1,22 @@ -**The most detailed instructions** can be found at this page: **http://ribtoks.github.io/xpiks/blog/2014/building-xpiks-alone** +**Prerequisits** -* +- here assumed that you have generic dev pakages installed +- install dependenices listed in debian/control file including `hunspell` library from recommended list +- install development packages listed in debian/control file -This space was intentionally left blank. +**Automatic build instructions:** -* - -**Simplified instructions:** - -***Prepare the source tree*** - -- git clone Xpiks repo -- `git submodule init` & `git submodule update --recursive` -- rename `tinyAES/aes.c` to `tinyAES/aes.cpp` -- ensure you have `git` available in your PATH - -***Mac OS X / Windows : build third-parties*** - -Zlib: - -- [windows] you will also need to download **zlib 1.2.11** and extract it in the `src/` directory -- [windows] open project `src/zlib-project/zlib.pro` in Qt Creator, execute `Run qmake`, execute `Build` -- [windows] copy built library (e.g. `z.lib`) from the build directory to the `src/libs` directory - -Hunspell: - -- download **Hunspell 1.6.0** from http://hunspell.sourceforge.net/ and extract it in the `src/` directory -- open project `src/hunspell/hunspell.pro` in Qt Creator, execute `Run qmake`, execute `Build` -- copy built library (e.g. `libhunspell.a`) from the build directory to the `src/libs` directory - -cpp-libface: - -- follow instructions in `src/cpp-libface/README.md` to build libface -- copy built library to `src/libs` directory - -ssdll: - -- follow instructions in `src/ssdll/README.md` to build ssdll -- copy built library to `src/libs` directory - -Quazip: - -- open project `src/quazip/quazip/quazip.pro` in Qt Creator, execute `Run qmake`, execute `Build` -- copy built library (e.g. `quazip.lib` and `quazip.dll`) from the build directory to the `src/libs` directory - -LibCurl: - -- [windows] do `git clone https://github.com/blackrosezy/build-libcurl-windows.git` and execute `build.bat` -- [windows] copy contests of `lib/dll-debug-x64` contents to the `src/libs/` directory -- [windows] build exiv2 library (see steps below) - -***OS X build of exiv2 library*** - -- open Terminal in the directory of exiv2 sources and do the following -- `mkdir build-Debug && cd build-Debug` -- `/Applications/CMake.app/Contents/bin/cmake .. -DEXIV2_ENABLE_SHARED=off -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_CXX_STANDARD=11` -- `make` - -***Visual Studio 2015 build of exiv2 library*** +- Go to the sources root directory (where you can find `xpiks.pro` file) +- `debuild -i -us -uc -b` -- download **exiv2 v0.25** library from http://www.exiv2.org/ and extract it somewhere -- download **expat-2.1.1** library from https://sourceforge.net/projects/expat/ and extract it on same level as exiv2 -- rename directory `expat-2.1.1/` to `expat\` -- open `msvc2005\exiv2.sln` and upgrade all projects -- from each project remove file `localtime.c` -- open file `include\exiv2\exv_msvs.h` and enable unicode support, disable png, curl and ssh (alternatively, you can overwrite this file with the one in the _Xpiks_ repository via path `src/exiv2-0.25/include/exiv2/exv_msvs.h`) -- in Visual Studio select `"Build" -> "Batch build"` and mark all _DebugDLL_ and _ReleaseDLL_ builds for your platform (x64 or x86) -- press "Build" -- copy build artifacts (`libexiv2.dll`, `libexiv2.lib`, `libexpat.dll`, `libexpat.lib`) to `src/libs` directory in _Xpiks_ repository +**Manual build** -***Manual build*** -- install Qt 5.6 or later from official website (or from repository in case of Linux) -- [linux] install development packages for `libcurl`, `hunspell`, `quazip`, `zlib`, `libexiv` -- [linux] install `exiftool` (this **is not** necessary since Xpiks 1.3.1) and `expat` (this **is** necessary since Xpiks 1.3.1) -- open main project in Qt Creator, execute `Run qmake`, execute `Build` +- open main project (`src/xpiks-qt/xpiks-qt.pro`) in Qt Creator, execute `Run qmake`, execute `Build` - you can open, build and run tests project (`src/xpiks-tests/xpiks-tests.pro`) additionally If you want to create Xpiks executable for everyday usage, before each `Run qmake` step described below, select `Release` in Qt Creator. Select `Debug` (the default) in all other cases. -**Linux package build** - -This chapter assumes that you have installed generic development packages for your OS. - -***Additional requirements*** - -In some cases you neet to install `libcurl-devel`, `hunspell-devel`, `quazip-devel`, `libexiv-devel` packages (they can have slightly different names in your distribution) if it is not installed as a build requirement. - -***Debian package build*** - -- Install build dependecies from repository (QT) -- cd to _xpiks-qt_ subdirectory -- `debuild -i -us -uc -b` - -***OpenSUSE RPM build*** - -- Install rpmbuild. -- `mkdir -p ~/rpmbuild/{RPMS,SRPMS,SPECS,BUILD,BUILDROOT,SOURCES}` -- `tar -czf xpiks-qt.tar.gz xpiks-qt/ tiny-aes/ cpp-libface/ libs/ ssdll/` -- Copy this source tarball in `~/rpmbuild/SOURCES` -- Copy the the spec from `xpiks-qt/RPM` folder to `~/rpmbuild/SPECS` -- `rpmbuild -ba ~/rpmbuild/SPECS/xpiks.spec` -- It will complain about missing dependecies, you have to install them as well +***Additional notes*** -***More*** +This guide was written based on *Ubuntu 18*. In other versions or debain derivatives packages can have slightly different names. -Xpiks uses English dictionaries from http://cgit.freedesktop.org/libreoffice/dictionaries/tree/. In Windows they are stored in the `dict/` subdirectory, in OS X they are in the `Resources/` directory of a bundle. diff --git a/INSTALL.md b/INSTALL.md index c571ffb77..7c4c1bec6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,39 +1,11 @@ -# Basic install # +**Linux installation** -**OS X installation** +Provided .deb file is created for *Ubuntu 18* but may work on other debian/Ubuntu derivatives -To install Xpiks in OS X do the following: - -- unpack Xpiks from dmg and drag'n'drop it to the Applications - -Optionally you can download and install Exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) and enable it in Xpiks Settings in the External tab. - -**Windows intallation** - -- extract Xpiks archive wherever you want. Launch xpiks-qt.exe - -Also you can use the distribution of Xpiks as portable installation. - -**Debian installation** - -Install the deb file from latest release with all dependencies. +Install the .deb file from latest release with all dependencies. # Special instructions # -**Linux** Install all recommended packages: - libhunspell - hunspell-en-us - -**Debian stretch** - -Should work as is. - -**Ubuntu >= 16.10** - -!!! Will not work with Unity beacause of application menu -Should work as is with any other desktop environment - -**OpenSuse Leap 42.2** - -Should work as is. diff --git a/README.md b/README.md index 52f385438..5a54f4a68 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,19 @@ Xpiks is a free and open source keywording and uploading tool for microstock pho - extensible with plugins - works under Linux, OS X and Windows +This for is for Linux only. It contains changes and support files for creating a debian package for *Ubuntu 18*. +For more recent code and other platforms see original project : https://github.com/ribtoks/xpiks/ + **How to build** -Please see the [BUILD.md](https://github.com/ribtoks/xpiks/blob/master/BUILD.md) file +Please see the [BUILD.md] file **How to install** -Please see the [INSTALL.md](https://github.com/ribtoks/xpiks/blob/master/INSTALL.md) file +Please see the [INSTALL.md] file **How to contribute** Please see the [CONTRIBUTING.md](https://github.com/ribtoks/xpiks/blob/master/CONTRIBUTING.md) file + +If you would like to create packages for other flavors of linux, I can integrated them into this repository as well. diff --git a/build_vendors_linux.sh b/build_vendors_linux.sh deleted file mode 100755 index 16477ecfd..000000000 --- a/build_vendors_linux.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# simple script for unix base system for vendors preparation -BUILD_MODE=${1} - -case ${BUILD_MODE} in - release) - TARGET="release" - ;; - debug|travis-ci) - TARGET="debug" - ;; - fullrelease) - TARGET="release" - ;; - fulldebug) - TARGET="debug" - ;; - *) - echo "$(basename ${0}) error: Invalid command arguments" - echo " usage: $(basename ${0}) [optional make flags]" - exit 1 - ;; -esac - -shift -MAKE_FLAGS="${*}" # do we need argument validation? - -### output prefix -GREEN_COLOR='\033[0;32m' -RESET_COLOR='\033[0m' -PRINT_PREFIX="${GREEN_COLOR}[VENDORS]${RESET_COLOR}" - -echo -e "${PRINT_PREFIX} Start vendors preparation for ${BUILD_MODE} with make flags: ${MAKE_FLAGS}" - -### find root dir -ROOT_DIR=$(git rev-parse --show-toplevel) -cd ${ROOT_DIR} - -### translations -echo -e "${PRINT_PREFIX} Generating translations..." -cd ${ROOT_DIR}/src/xpiks-qt/deps/translations/ -make ${MAKE_FLAGS} -echo -e "${PRINT_PREFIX} Generating translations... - done." - -if [ ${BUILD_MODE} == "fulldebug" ] || [ ${BUILD_MODE} == "fullrelease" ] -then - echo "Full mode" - ### libthmbnlr - echo -e "${PRINT_PREFIX} Building libthmbnlr..." - cd ${ROOT_DIR}/../libthmbnlr/src/libthmbnlr - qmake "CONFIG+=${TARGET}" libthmbnlr.pro - make ${MAKE_FLAGS} -# cp libthmbnlr.a ${ROOT_DIR}/libs/${TARGET} - echo -e "${PRINT_PREFIX} Building libthmbnlr... - done." - - ### libxpks - echo -e "${PRINT_PREFIX} Building libxpks..." - cd ${ROOT_DIR}/../libxpks/src/xpks - qmake "CONFIG+=${TARGET}" xpks.pro - make ${MAKE_FLAGS} - cp libxpks.a ${ROOT_DIR}/libs/${TARGET} - echo -e "${PRINT_PREFIX} Building libxpks... - done." -else - echo "Normal mode" - ### libthmbnlr - echo -e "${PRINT_PREFIX} Building libthmbnlr..." - cd ${ROOT_DIR}/vendors/libthmbnlr - qmake "CONFIG+=${TARGET}" thmbnlr.pro - make ${MAKE_FLAGS} - echo -e "${PRINT_PREFIX} Building libthmbnlr... - done." - - ### libxpks - echo -e "${PRINT_PREFIX} Building libxpks..." - cd ${ROOT_DIR}/src/libxpks_stub - qmake "CONFIG+=${TARGET}" libxpks_stub.pro - make ${MAKE_FLAGS} - cp libxpks.a ${ROOT_DIR}/libs/${TARGET} - echo -e "${PRINT_PREFIX} Building libxpks... - done." -fi - -### tiny-aes -echo -e "${PRINT_PREFIX} Renaming tiny-aes..." -cd ${ROOT_DIR}/vendors/tiny-aes -mv aes.c aes.cpp -echo -e "${PRINT_PREFIX} Renaming tiny-aes... - done." - -### cpp-libface -echo -e "${PRINT_PREFIX} Building cpp-libface..." -cd ${ROOT_DIR}/vendors/cpp-libface/libface-project -qmake "CONFIG+=${TARGET}" libface.pro -make ${MAKE_FLAGS} -cp libface.so.1.0.0 ${ROOT_DIR}/libs/${TARGET} -cd ${ROOT_DIR}/libs/${TARGET} -ln -s libface.so.1.0.0 libface.so -ln -s libface.so.1.0.0 libface.so.1 -ln -s libface.so.1.0.0 libface.so.1.0 -echo -e "${PRINT_PREFIX} Building cpp-libface... - done." - -### chillout -#echo -e "${PRINT_PREFIX} Building chillout..." -#cd ${ROOT_DIR}/vendors/chillout/src/chillout -#qmake "CONFIG+=${TARGET}" chillout.pro -#make ${MAKE_FLAGS} -#cp libchillout.a ${ROOT_DIR}/libs/${TARGET} -#echo -e "${PRINT_PREFIX} Building chillout... - done." - -### ssdll -echo -e "${PRINT_PREFIX} Building ssdll..." -cd ${ROOT_DIR}/vendors/ssdll/src/ssdll/ -qmake "CONFIG+=${TARGET}" ssdll.pro -make ${MAKE_FLAGS} -cp libssdll.so.1.0.0 ${ROOT_DIR}/libs/${TARGET} -cd ${ROOT_DIR}/libs/${TARGET} -ln -s libssdll.so.1.0.0 libssdll.so -ln -s libssdll.so.1.0.0 libssdll.so.1 -ln -s libssdll.so.1.0.0 libssdll.so.1.0 -echo -e "${PRINT_PREFIX} Building ssdll... - done." - -### quazip -#echo -e "${PRINT_PREFIX} Building quazip..." -#cd ${ROOT_DIR}/vendors/quazip/quazip/ -#qmake "CONFIG+=${TARGET}" quazip.pro -#make ${MAKE_FLAGS} -#cp libquazip.so.1.0.0 ${ROOT_DIR}/libs/${TARGET} -#cd ${ROOT_DIR}/libs/${TARGET} -#ln -s libquazip.so.1.0.0 libquazip.so -#ln -s libquazip.so.1.0.0 libquazip.so.1 -#ln -s libquazip.so.1.0.0 libquazip.so.1.0 -#echo -e "${PRINT_PREFIX} Building quazip... - done." - -### hunspell -#echo -e "${PRINT_PREFIX} Building hunspell..." -#cd ${ROOT_DIR}/vendors/hunspell/ -#qmake "CONFIG+=${TARGET}" hunspell.pro -#make ${MAKE_FLAGS} -#echo -e "${PRINT_PREFIX} Building hunspell... - done." - -### recoverty -#echo -e "${PRINT_PREFIX} Building recoverty..." -#cd ${ROOT_DIR}/src/recoverty/ -#qmake "CONFIG+=${TARGET}" recoverty.pro -#make ${MAKE_FLAGS} -#RECOVERTY_DIR=${ROOT_DIR}/src/xpiks-qt/deps/recoverty -#mkdir -p ${RECOVERTY_DIR} -#cp Recoverty ${RECOVERTY_DIR}/ -#echo -e "${PRINT_PREFIX} Building recoverty... - done."# - -echo -e "${PRINT_PREFIX} Vendors preparation for ${BUILD_MODE}: done." diff --git a/src/xpiks-qt/debian/changelog b/debian/changelog similarity index 98% rename from src/xpiks-qt/debian/changelog rename to debian/changelog index 728c02600..93d81ef47 100644 --- a/src/xpiks-qt/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -xpiks (1.4) UNRELEASED; urgency=medium +xpiks (1.5.2) UNRELEASED; urgency=medium + [ Artiom ] * Major features: presets for keywords #207 @@ -22,7 +23,7 @@ xpiks (1.4) UNRELEASED; urgency=medium dismiss timeout setting change didn't work as expected #301 - -- Artiom Tue, 07 Mar 2017 21:36:24 +0000 + -- artiom Sun, 04 Nov 2018 22:30:31 +1100 xpiks (1.3.4) testing; urgency=medium diff --git a/src/xpiks-qt/debian/compat b/debian/compat similarity index 100% rename from src/xpiks-qt/debian/compat rename to debian/compat diff --git a/src/xpiks-qt/debian/control b/debian/control similarity index 86% rename from src/xpiks-qt/debian/control rename to debian/control index f3e449208..37d3d30c0 100644 --- a/src/xpiks-qt/debian/control +++ b/debian/control @@ -6,12 +6,12 @@ Maintainer: Artiom.M Package: xpiks Architecture: amd64 -Depends: libc6 (>=2.14), libqt5concurrent5 (>= 5.6), libqt5core5a (>= 5.6), libqt5gui5 (>= 5.6), libqt5network5 (>= 5.6), +Depends: libc6 (>=2.14), libqt5concurrent5 (>= 5.6), libqt5core5a (>= 5.6), libqt5gui5 (>= 5.6), libqt5network5 (>= 5.6), libqt5qml5 (>= 5.6), libqt5quick5 (>= 5.6), libqt5widgets5 (>= 5.6),libqt5svg5 (>= 5.6), libquazip5-1, zlib1g (>= 1:1.1.4), - libcurl3 (>=7.4), libimage-exiftool-perl, qml-module-qtquick-window2, qml-module-qtquick2, qml-module-qtquick-controls, + libcurl4 (>=7.4), libimage-exiftool-perl, qml-module-qtquick-window2, qml-module-qtquick2, qml-module-qtquick-controls, qml-module-qtquick-dialogs, qml-module-qtquick-layouts, qml-module-qtquick-privatewidgets, qml-module-qtgraphicaleffects, - qml-module-qt-labs-folderlistmodel, qml-module-qt-labs-settings -Recommends: hunspell-en-us, libhunspell-1.3-0 + qml-module-qt-labs-folderlistmodel, qml-module-qt-labs-settings +Recommends: hunspell-en-us, libhunspell-1.6-0 Section: graphics Priority: optional Homepage: https://github.com/Ribtoks/xpiks diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..b810feb6a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,3 @@ +Files: * +Copyright: 2014 Taras Kushnir +License: MPL-2.0 diff --git a/debian/files b/debian/files new file mode 100644 index 000000000..08d75b3c7 --- /dev/null +++ b/debian/files @@ -0,0 +1,3 @@ +xpiks-dbgsym_1.5.2_amd64.ddeb debug optional +xpiks_1.5.2_amd64.buildinfo - - +xpiks_1.5.2_amd64.deb graphics optional diff --git a/debian/install b/debian/install new file mode 100644 index 000000000..4e20df5eb --- /dev/null +++ b/debian/install @@ -0,0 +1,5 @@ +debian/xpiks.desktop usr/share/applications +debian/xpiks.png usr/share/icons +src/xpiks-qt/deps/whatsnew.txt usr/share/Xpiks/Xpiks +src/xpiks-qt/deps/terms_and_conditions.txt usr/share/Xpiks/Xpiks +src/xpiks-qt/deps/translations/*.qm usr/share/Xpiks/Xpiks/translations \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..000649864 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +GITROOT=$(shell git rev-parse --show-toplevel) + +%: + dh $@ + +#override_dh_auto_configure: +# dh_auto_configure +# $(shell pwd)/build_vendors_linux.sh release + +#override_dh_shlibdeps: +# dh_shlibdeps -l$(shell pwd)/lib/Linux/$(DEB_BUILD_GNU_CPU) +# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(GITROOT)/libs/release \ No newline at end of file diff --git a/src/xpiks-qt/debian/source/format b/debian/source/format similarity index 100% rename from src/xpiks-qt/debian/source/format rename to debian/source/format diff --git a/src/xpiks-qt/debian/source/include-binaries b/debian/source/include-binaries similarity index 100% rename from src/xpiks-qt/debian/source/include-binaries rename to debian/source/include-binaries diff --git a/src/xpiks-qt/debian/xpiks.desktop b/debian/xpiks.desktop similarity index 100% rename from src/xpiks-qt/debian/xpiks.desktop rename to debian/xpiks.desktop diff --git a/src/xpiks-qt/debian/xpiks.png b/debian/xpiks.png similarity index 100% rename from src/xpiks-qt/debian/xpiks.png rename to debian/xpiks.png diff --git a/debian/xpiks.substvars b/debian/xpiks.substvars new file mode 100644 index 000000000..638740234 --- /dev/null +++ b/debian/xpiks.substvars @@ -0,0 +1,3 @@ +shlibs:Depends=libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), libgcc1 (>= 1:3.0), libhunspell-1.6-0, libqt5concurrent5 (>= 5.6.0~rc), libqt5core5a (>= 5.9.0~beta), libqt5gui5 (>= 5.8.0), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.4.0), libqt5widgets5 (>= 5.0.2), libquazip5-1 (>= 0.7.3), libstdc++6 (>= 5.2), xpiks, zlib1g (>= 1:1.1.4) +misc:Depends= +misc:Pre-Depends= diff --git a/src/libxpks_stub/libxpks_stub.pro b/src/libxpks_stub/libxpks_stub.pro index a45869494..715ed707e 100644 --- a/src/libxpks_stub/libxpks_stub.pro +++ b/src/libxpks_stub/libxpks_stub.pro @@ -1,88 +1,90 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2017-08-26T18:24:58 -# -#------------------------------------------------- - -QT += gui qml - -TARGET = xpks -TEMPLATE = lib -CONFIG += staticlib -CONFIG += c++11 - -DEFINES += QT_NO_CAST_TO_ASCII \ - QT_RESTRICTED_CAST_FROM_ASCII \ - QT_NO_CAST_FROM_BYTEARRAY - -DEFINES += QT_MESSAGELOGCONTEXT - -CONFIG(debug, debug|release) { - LIBS += -L"$$PWD/../../libs/debug" -} else { - LIBS += -L"$$PWD/../../libs/release" -} - -CONFIG(debug, debug|release) { - message("Building debug") - DEFINES += WITH_PLUGINS - DEFINES += FAKE_WARNINGS - #QMAKE_CXXFLAGS += -fsanitize=thread -} else { - message("Building release") - DEFINES += WITH_LOGS -} - -INCLUDEPATH += ../xpiks-qt - -LIBS += -lcurl - -macx { - INCLUDEPATH += "../../vendors/libcurl/include" -} - -win32 { - DEFINES += QT_NO_PROCESS_COMBINED_ARGUMENT_START - INCLUDEPATH += "../../vendors/libcurl/include" - - LIBS -= -lcurl - - CONFIG(debug, debug|release) { - EXE_DIR = debug - LIBS += -llibcurl_debug - LIBS -= -lquazip - LIBS += -lquazipd - } - - CONFIG(release, debug|release) { - EXE_DIR = release - LIBS += -llibcurl - } -} - -unix { - target.path = /usr/lib - INSTALLS += target -} - -HEADERS += \ - MetadataIO/metadatareadingworker.h \ - MetadataIO/metadatawritingworker.h \ - MetadataIO/readingorchestrator.h \ - MetadataIO/writingorchestrator.h \ - Connectivity/ftpcoordinator.h \ - Connectivity/conectivityhelpers.h \ - Connectivity/curlftpuploader.h \ - Connectivity/ftpuploaderworker.h \ - Connectivity/uploadbatch.h \ - Connectivity/uploadcontext.h - -SOURCES += \ - MetadataIO/metadatareadingworker.cpp \ - MetadataIO/metadatawritingworker.cpp \ - MetadataIO/readingorchestrator.cpp \ - MetadataIO/writingorchestrator.cpp \ - Connectivity/conectivityhelpers.cpp \ - Connectivity/curlftpuploader.cpp \ - Connectivity/ftpcoordinator.cpp \ - Connectivity/ftpuploaderworker.cpp +#------------------------------------------------- +# +# Project created by QtCreator 2017-08-26T18:24:58 +# +#------------------------------------------------- + +QT += gui qml + +TARGET = xpks +TEMPLATE = lib +CONFIG += staticlib +CONFIG += c++11 + +DEFINES += QT_NO_CAST_TO_ASCII \ + QT_RESTRICTED_CAST_FROM_ASCII \ + QT_NO_CAST_FROM_BYTEARRAY + +DEFINES += QT_MESSAGELOGCONTEXT + +CONFIG(debug, debug|release) { + LIBS += -L"$$PWD/../../libs/debug" +} else { + LIBS += -L"$$PWD/../../libs/release" +} + +CONFIG(debug, debug|release) { + message("Building debug") + DEFINES += WITH_PLUGINS + DEFINES += FAKE_WARNINGS + #QMAKE_CXXFLAGS += -fsanitize=thread + DESTDIR = ../../libs/debug +} else { + message("Building release") + DEFINES += WITH_LOGS + DESTDIR = ../../libs/release +} + +INCLUDEPATH += ../xpiks-qt + +LIBS += -lcurl + +macx { + INCLUDEPATH += "../../vendors/libcurl/include" +} + +win32 { + DEFINES += QT_NO_PROCESS_COMBINED_ARGUMENT_START + INCLUDEPATH += "../../vendors/libcurl/include" + + LIBS -= -lcurl + + CONFIG(debug, debug|release) { + EXE_DIR = debug + LIBS += -llibcurl_debug + LIBS -= -lquazip + LIBS += -lquazipd + } + + CONFIG(release, debug|release) { + EXE_DIR = release + LIBS += -llibcurl + } +} + +unix { + target.path = /usr/lib + INSTALLS += target +} + +HEADERS += \ + MetadataIO/metadatareadingworker.h \ + MetadataIO/metadatawritingworker.h \ + MetadataIO/readingorchestrator.h \ + MetadataIO/writingorchestrator.h \ + Connectivity/ftpcoordinator.h \ + Connectivity/conectivityhelpers.h \ + Connectivity/curlftpuploader.h \ + Connectivity/ftpuploaderworker.h \ + Connectivity/uploadbatch.h \ + Connectivity/uploadcontext.h + +SOURCES += \ + MetadataIO/metadatareadingworker.cpp \ + MetadataIO/metadatawritingworker.cpp \ + MetadataIO/readingorchestrator.cpp \ + MetadataIO/writingorchestrator.cpp \ + Connectivity/conectivityhelpers.cpp \ + Connectivity/curlftpuploader.cpp \ + Connectivity/ftpcoordinator.cpp \ + Connectivity/ftpuploaderworker.cpp diff --git a/src/xpiks-qt/Commands/commandmanager.cpp b/src/xpiks-qt/Commands/commandmanager.cpp index 0d9ef6bdb..f16ee2eb1 100644 --- a/src/xpiks-qt/Commands/commandmanager.cpp +++ b/src/xpiks-qt/Commands/commandmanager.cpp @@ -408,13 +408,13 @@ void Commands::CommandManager::connectEntitiesSignalsSlots() const { m_KeywordsSuggestor, &Suggestion::KeywordsSuggestor::onLanguageChanged); } - if (m_HelpersQmlWrapper != NULL && m_UpdateService != NULL) { - QObject::connect(m_UpdateService, &Connectivity::UpdateService::updateAvailable, - m_HelpersQmlWrapper, &Helpers::HelpersQmlWrapper::updateAvailable); +// if (m_HelpersQmlWrapper != NULL && m_UpdateService != NULL) { +// QObject::connect(m_UpdateService, &Connectivity::UpdateService::updateAvailable, +// m_HelpersQmlWrapper, &Helpers::HelpersQmlWrapper::updateAvailable); - QObject::connect(m_UpdateService, &Connectivity::UpdateService::updateDownloaded, - m_HelpersQmlWrapper, &Helpers::HelpersQmlWrapper::updateIsDownloaded); - } +// QObject::connect(m_UpdateService, &Connectivity::UpdateService::updateDownloaded, +// m_HelpersQmlWrapper, &Helpers::HelpersQmlWrapper::updateIsDownloaded); +// } if (m_WarningsModel != NULL && m_WarningsService != NULL) { QObject::connect(m_WarningsService, &Warnings::WarningsService::queueIsEmpty, diff --git a/src/xpiks-qt/Commands/commandmanager.h b/src/xpiks-qt/Commands/commandmanager.h index 1c33a66b6..2b530f873 100644 --- a/src/xpiks-qt/Commands/commandmanager.h +++ b/src/xpiks-qt/Commands/commandmanager.h @@ -355,7 +355,7 @@ namespace Commands { SpellCheck::SpellCheckSuggestionModel *m_SpellCheckSuggestionModel; MetadataIO::MetadataIOService *m_MetadataIOService; //Connectivity::TelemetryService *m_TelemetryService; - Connectivity::UpdateService *m_UpdateService; + //Connectivity::UpdateService *m_UpdateService; Models::LogsModel *m_LogsModel; MetadataIO::MetadataIOCoordinator *m_MetadataIOCoordinator; Plugins::PluginManager *m_PluginManager; diff --git a/src/xpiks-qt/Models/artitemsmodel.cpp b/src/xpiks-qt/Models/artitemsmodel.cpp index b3fbd5a17..a93dd1fbf 100644 --- a/src/xpiks-qt/Models/artitemsmodel.cpp +++ b/src/xpiks-qt/Models/artitemsmodel.cpp @@ -1390,7 +1390,7 @@ namespace Models { #ifdef QT_DEBUG m_DestroyedList.push_back(artwork); #else - metadata->deleteLater(); + artwork->deleteLater(); #endif } else { LOG_DEBUG << "Metadata #" << artwork->getItemID() << "is locked. Postponing destruction..."; diff --git a/src/xpiks-qt/RPM/xpiks.spec b/src/xpiks-qt/RPM/xpiks.spec deleted file mode 100644 index 95e2b7619..000000000 --- a/src/xpiks-qt/RPM/xpiks.spec +++ /dev/null @@ -1,60 +0,0 @@ -Summary: Xpiks -Name: xpiks -Version: 1.4 -Release: 1 -License: GPLv3 -Group: Applications/Internet -Source: xpiks-qt.tar.gz -BuildRoot: /var/tmp/%{name}-buildroot -BuildRequires: libqt5-qtdeclarative-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-linguist-devel libquazip-qt5-devel quazip-devel hunspell-devel curl-devel libexiv2-devel -Requires: libqt5-qtgraphicaleffects libqt5-qtquickcontrols - -%description -Cross-platform (X) Photo Keywording Software - Xpiks is a free and open source keywording and uploading tool for - microstock photographers and illustrators with no hidden fees. - If you're tired with copy and pasting keywords from one stock to another, - Xpiks would be a great time saver for you! - -%prep -%setup -q -n xpiks-qt - -%build -cd ../cpp-libface -make install-lib -cd - -cd ../ssdll/src/ssdll -qmake -r QMAKE_CXXFLAGS+=-std=gnu++11 -spec linux-g++-64 -make install -cd - - -cd deps/translations -make -cd - -qmake-qt5 -r -spec linux-g++-64 - -%install -rm -rf %{buildroot} -make install INSTALL_ROOT="%buildroot"; -mkdir -p %{buildroot}%{_datadir}/applications/ -install -D %{_builddir}/xpiks-qt/debian/xpiks.desktop %{buildroot}%{_datadir}/applications/ -mkdir -p %{buildroot}%{_datadir}/icons/ -install -D %{_builddir}/xpiks-qt/debian/xpiks.png %{buildroot}%{_datadir}/icons/ -mkdir -p %{buildroot}%{_datadir}/Xpiks/Xpiks/ -install -D %{_builddir}/xpiks-qt/deps/whatsnew.txt %{buildroot}%{_datadir}/Xpiks/Xpiks/ -install -D %{_builddir}/xpiks-qt/deps/terms_and_conditions.txt %{buildroot}%{_datadir}/Xpiks/Xpiks/ -mkdir -p %{buildroot}%{_datadir}/Xpiks/Xpiks/translations -install -D %{_builddir}/xpiks-qt/deps/translations/*.qm %{buildroot}%{_datadir}/Xpiks/Xpiks/translations - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root) -%{_bindir}/* -%{_datadir}/* - - -%changelog -* Wed Mar 2 2016 Artiom Molchanov -- RPM build on OpenSuse diff --git a/src/xpiks-qt/debian/copyright b/src/xpiks-qt/debian/copyright deleted file mode 100644 index 8f274eccd..000000000 --- a/src/xpiks-qt/debian/copyright +++ /dev/null @@ -1,19 +0,0 @@ -Xpiks - cross platform application for -keywording and uploading images for microstocks -Copyright (C) 2014-2015 Taras Kushnir - -Xpiks is distributed under the GNU General Public License, version 3.0 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see -or /usr/share/common-licenses/GPL-3 . diff --git a/src/xpiks-qt/debian/install b/src/xpiks-qt/debian/install deleted file mode 100644 index cdebf177f..000000000 --- a/src/xpiks-qt/debian/install +++ /dev/null @@ -1,5 +0,0 @@ -debian/xpiks.desktop usr/share/applications -debian/xpiks.png usr/share/icons -deps/whatsnew.txt usr/share/Xpiks/Xpiks -deps/terms_and_conditions.txt usr/share/Xpiks/Xpiks -deps/translations/*.qm usr/share/Xpiks/Xpiks/translations \ No newline at end of file diff --git a/src/xpiks-qt/debian/rules b/src/xpiks-qt/debian/rules deleted file mode 100755 index 4f2c774f2..000000000 --- a/src/xpiks-qt/debian/rules +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/make -f -%: - dh $@ - diff --git a/src/xpiks-qt/xpiks-qt.pro b/src/xpiks-qt/xpiks-qt.pro index cd81fb31f..74b4aa35c 100644 --- a/src/xpiks-qt/xpiks-qt.pro +++ b/src/xpiks-qt/xpiks-qt.pro @@ -6,7 +6,7 @@ QT += qml quick widgets concurrent svg CONFIG += qtquickcompiler CONFIG += c++11 -VERSION = 1.4.2.0 +VERSION = 1.5.2.1 QMAKE_TARGET_PRODUCT = Xpiks QMAKE_TARGET_DESCRIPTION = "Cross-Platform Image Keywording Software" QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2014-2017 Taras Kushnir" @@ -186,9 +186,6 @@ ICON = xpiks-qt.icns RC_ICONS = xpiks-qt.ico -# Default rules for deployment. -include(deployment.pri) - HEADERS += \ Models/artitemsmodel.h \ Models/artworkmetadata.h \ @@ -593,7 +590,7 @@ travis-ci { SOURCES += ../../vendors/libthmbnlr/thumbnailcreator_stub.cpp } -linux-g++-64 { +unix:!macx { message("for Linux") target.path=/usr/bin/ @@ -602,7 +599,7 @@ linux-g++-64 { BUILDNO = $$system($$PWD/buildno.sh) UNAME = $$system(cat /proc/version | tr -d \'()\') - + #QMAKE_PRE_LINK=$$PWD/build_vendors_linux.sh } linux-qtcreator { @@ -623,5 +620,8 @@ linux-static { message("Static build.") } +# Default rules for deployment. +include(deployment.pri) + DEFINES += BUILDNUMBER=$${BUILDNO} DEFINES += BRANCHNAME=$${BRANCH_NAME} diff --git a/vendors/libthmbnlr/thmbnlr.pro b/vendors/libthmbnlr/libthmbnlr.pro similarity index 100% rename from vendors/libthmbnlr/thmbnlr.pro rename to vendors/libthmbnlr/libthmbnlr.pro diff --git a/xpiks.pro b/xpiks.pro new file mode 100644 index 000000000..96d5b51c5 --- /dev/null +++ b/xpiks.pro @@ -0,0 +1,18 @@ +TEMPLATE = subdirs + +SUBDIRS = \ + vendors/libthmbnlr/libthmbnlr.pro \ # sub-project names + src/libxpks_stub/libxpks_stub.pro \ + vendors/cpp-libface/libface-project/libface.pro \ + ssdll \ + app + +# where to find the sub projects - give the folders +ssdll.subdir = vendors/ssdll/src/ssdll/ +app.subdir = src/xpiks-qt + + +# what subproject depends on others +app.depends = libthmbnlr libxpks_stub libface ssdll + +CONFIG += ordered \ No newline at end of file