diff --git a/.github/workflows/rssguard.yml b/.github/workflows/rssguard.yml index 762da670f..1b9b1c0f5 100644 --- a/.github/workflows/rssguard.yml +++ b/.github/workflows/rssguard.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [windows-2019, ubuntu-18.04, macos-10.15] - use_webengine: ["true", "false"] + use_webengine: ["ON", "OFF"] include: - os: windows-2019 script_name: .\resources\scripts\github-actions\build-windows.ps1 @@ -67,10 +67,10 @@ jobs: name: "Development builds" tag_name: "devbuild" files: | - .\rssguard-build\src\rssguard\rssguard-*win64.exe - .\rssguard-build\src\rssguard\rssguard-*win64.7z - ./rssguard-build/src/rssguard/rssguard-*mac64.dmg - ./rssguard-build/src/rssguard/rssguard-*linux64.AppImage + .\rssguard-build\rssguard-*win64.exe + .\rssguard-build\rssguard-*win64.7z + ./rssguard-build/rssguard-*mac64.dmg + ./rssguard-build/rssguard-*linux64.AppImage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -80,9 +80,9 @@ jobs: with: prerelease: false files: | - .\rssguard-build\src\rssguard\rssguard-*win64.exe - .\rssguard-build\src\rssguard\rssguard-*win64.7z - ./rssguard-build/src/rssguard/rssguard-*mac64.dmg - ./rssguard-build/src/rssguard/rssguard-*linux64.AppImage + .\rssguard-build\rssguard-*win64.exe + .\rssguard-build\rssguard-*win64.7z + ./rssguard-build/rssguard-*mac64.dmg + ./rssguard-build/rssguard-*linux64.AppImage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..27efe9ed0 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,248 @@ +################################################################# +# +# For license of this file, see /LICENSE.md. +# +# This is RSS Guard compilation script for cmake. +# +# Usage (out of source build type, we have two side by side folders: +# empty "build-dir" and RSS Guard repository "rssguard-dir"): +# a) DEBUG build for testing. +# cd build-dir +# cmake -DCMAKE_BUILD_TYPE="Debug" ../rssguard-dir/ +# cmake --build . +# cmake --install . +# +# b) RELEASE build for production use. +# cd build-dir +# cmake -DCMAKE_BUILD_TYPE="Release" ../rssguard-dir/ +# cmake --build . +# cmake --install . +# +# Variables: +# USE_WEBENGINE - if specified, then QtWebEngine module for internal web browser is used. +# Otherwise simple text component is used and some features will be disabled. +# Default value is "false". If QtWebEngine is installed during compilation, then +# value of this variable is tweaked automatically. +# {FEEDLY,GMAIL,INOREADER}_CLIENT_ID - preconfigured OAuth cliend ID. +# {FEEDLY,GMAIL,INOREADER}_CLIENT_SECRET - preconfigured OAuth cliend SECRET. +# +# Other information: +# - supports Windows, Linux, *BSD, macOS, OS/2, Android, +# - Qt 5.9.0 or newer is required, +# - cmake 3.9.0 or newer is required, +# - if you wish to make packages for Windows, then you must initialize all submodules within repository before compilation, +# - C++ 11/17 is required. +# +# Building on OS/2: +# RSS Guard can run on OS/2 and if you want to compile it by yourself, you need to make sure that +# your OS/2 distro is up-to-date and you have all dependencies installed: os2-base, all gcc-* packages, +# libc and libcx up-to-date, kbuild-make, ash, binutils, all relevant qt5-* packages. +# +# After your dependecies are installed, then you can compile via standard `cmake -> make -> make install` steps +# and package with: 7z.exe a -t7z -mmt -mx9 "rssguard.7z" "/LICENSE.md. -# -# This is RSS Guard compilation script for qmake. -# -# Usage (out of source build type, we have two side by side folders: -# empty "build-dir" and RSS Guard repository "rssguard-dir"): -# a) DEBUG build for testing. -# cd build-dir -# qmake ../rssguard-dir/build.pro -r CONFIG+=debug PREFIX=./usr -# make -# make install -# -# b) RELEASE build for production use. -# cd build-dir -# qmake ../rssguard-dir/build.pro -r CONFIG+=release PREFIX=./usr -# make -# make install -# -# Variables: -# USE_WEBENGINE - if specified, then QtWebEngine module for internal web browser is used. -# Otherwise simple text component is used and some features will be disabled. -# Default value is "false". If QtWebEngine is installed during compilation, then -# value of this variable is tweaked automatically. -# PREFIX - specifies base folder to which files are copied during "make install" -# step, defaults to "$$OUT_PWD/usr" on Linux and to "$$OUT_PWD/app" on Windows. Behavior -# of this variable can be mimicked with $INSTALL_ROOT variable on Linux. Note that -# RSS Guard's installation is automatically relocatable, in other words, no -# absolute OS-dependent paths are used. -# {FEEDLY,GMAIL,INOREADER}_CLIENT_ID - preconfigured OAuth cliend ID. -# {FEEDLY,GMAIL,INOREADER}_CLIENT_SECRET - preconfigured OAuth cliend SECRET. -# -# Other information: -# - supports Windows, Linux, macOS, OS/2, Android, -# - Qt 5.9.0 or higher is required, -# - if you wish to make packages for Windows, then you must initialize all submodules within repository before compilation, -# - C++ 11/17 is required. -# -# Building on OS/2: -# RSS Guard can run on OS/2 and if you want to compile it by yourself, you need to make sure that -# your OS/2 distro is up-to-date and you have all dependencies installed: os2-base, all gcc-* packages, -# libc and libcx up-to-date, kbuild-make, ash, binutils, all relevant qt5-* packages. -# -# After your dependecies are installed, then you can compile via standard `qmake -> make -> make install` steps -# and package with: 7z.exe a -t7z -mmt -mx9 "rssguard.7z" " $$shell_quote($$PREFIX/Contents/Info.plist) && \ - rm -f $$shell_quote($$PREFIX/Contents/Info.plist.in) - info_plist2.path = $$quote($$PREFIX/Contents/) - - # Install PkgInfo - pkginfo.extra = @printf "APPL????" > $$shell_quote($$PREFIX/Contents/PkgInfo) - pkginfo.path = $$quote($$PREFIX/Contents/) - - INSTALLS += target lib icns_icon info_plist info_plist2 pkginfo - - INSTALL_HEADERS_PREFIX = $$shell_quote($$PREFIX/Contents/Resources/Include/librssguard) -} - -message($$MSG_PREFIX: Prefix for headers is \"$$INSTALL_HEADERS_PREFIX\".) - -# Create install step for each folder of public headers. -for(header, INSTALL_HEADERS) { - path = $${INSTALL_HEADERS_PREFIX}/$${dirname(header)} - path = $$shell_quote($$path) - - message($$MSG_PREFIX: Adding header \"$$header\" to \"make install\" step with path \"$$path\".) - - eval(headers_$${dirname(header)}.files += $$header) - eval(headers_$${dirname(header)}.path = $$path) - eval(INSTALLS *= headers_$${dirname(header)}) -} diff --git a/pri/vars.pri b/pri/vars.pri deleted file mode 100644 index 39bbe87da..000000000 --- a/pri/vars.pri +++ /dev/null @@ -1,75 +0,0 @@ -APP_NAME = "RSS Guard" -APP_LOW_NAME = "rssguard" -APP_REVERSE_NAME = "com.github.rssguard" -APP_LOW_H_NAME = ".rssguard" -APP_AUTHOR = "Martin Rotter" -APP_COPYRIGHT = "(C) 2011-2022 $$APP_AUTHOR" -APP_VERSION = "4.1.3" -APP_LONG_NAME = "$$APP_NAME $$APP_VERSION" -APP_EMAIL = "rotter.martinos@gmail.com" -APP_URL = "https://github.com/martinrotter/rssguard" -APP_URL_ISSUES = "https://github.com/martinrotter/rssguard/issues" -APP_URL_ISSUES_NEW = "https://github.com/martinrotter/rssguard/issues/new" -APP_URL_DOCUMENTATION = "https://github.com/martinrotter/rssguard/blob/master/resources/docs/Documentation.md" -APP_USERAGENT = "RSS Guard/$$APP_VERSION" -APP_DONATE_URL = "https://martinrotter.github.io/donate" - -message($$MSG_PREFIX: Welcome RSS Guard qmake script.) - -!versionAtLeast(QT_VERSION, 5.9.0) { - warning($$MSG_PREFIX: At least Qt \"5.9.0\" is required!!!) -} - -isEmpty(USE_WEBENGINE) { - USE_WEBENGINE = false - message($$MSG_PREFIX: USE_WEBENGINE variable is not set.) - - qtHaveModule(webenginewidgets) { - USE_WEBENGINE = true - } - else { - USE_WEBENGINE = false - } -} - -isEmpty(FEEDLY_CLIENT_ID)|isEmpty(FEEDLY_CLIENT_SECRET) { - FEEDLY_OFFICIAL_SUPPORT = false - - message($$MSG_PREFIX: Feedly client ID/secret variables are not set. Disabling official support.) -} -else { - FEEDLY_OFFICIAL_SUPPORT = true - DEFINES *= FEEDLY_OFFICIAL_SUPPORT - DEFINES *= FEEDLY_CLIENT_ID='"\\\"$$FEEDLY_CLIENT_ID\\\""' - DEFINES *= FEEDLY_CLIENT_SECRET='"\\\"$$FEEDLY_CLIENT_SECRET\\\""' - - message($$MSG_PREFIX: Enabling official Feedly support.) -} - -isEmpty(GMAIL_CLIENT_ID)|isEmpty(GMAIL_CLIENT_SECRET) { - GMAIL_OFFICIAL_SUPPORT = false - - message($$MSG_PREFIX: Gmail client ID/secret variables are not set.) -} -else { - GMAIL_OFFICIAL_SUPPORT = true - DEFINES *= GMAIL_OFFICIAL_SUPPORT - DEFINES *= GMAIL_CLIENT_ID='"\\\"$$GMAIL_CLIENT_ID\\\""' - DEFINES *= GMAIL_CLIENT_SECRET='"\\\"$$GMAIL_CLIENT_SECRET\\\""' - - message($$MSG_PREFIX: Enabling official Gmail support.) -} - -isEmpty(INOREADER_CLIENT_ID)|isEmpty(INOREADER_CLIENT_SECRET) { - INOREADER_OFFICIAL_SUPPORT = false - - message($$MSG_PREFIX: Inoreader client ID/secret variables are not set.) -} -else { - INOREADER_OFFICIAL_SUPPORT = true - DEFINES *= INOREADER_OFFICIAL_SUPPORT - DEFINES *= INOREADER_CLIENT_ID='"\\\"$$INOREADER_CLIENT_ID\\\""' - DEFINES *= INOREADER_CLIENT_SECRET='"\\\"$$INOREADER_CLIENT_SECRET\\\""' - - message($$MSG_PREFIX: Enabling official Inoreader support.) -} diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml index a3b76e844..b5d780895 100644 --- a/resources/desktop/com.github.rssguard.appdata.xml +++ b/resources/desktop/com.github.rssguard.appdata.xml @@ -26,7 +26,7 @@ https://github.com/sponsors/martinrotter - + none diff --git a/resources/docs/Documentation.md b/resources/docs/Documentation.md index 640699a64..fe5a1bc41 100644 --- a/resources/docs/Documentation.md +++ b/resources/docs/Documentation.md @@ -45,6 +45,7 @@ I highly recommend to download RSS Guard only from reputable sources. RSS Guard is a cross-platform application, and at this point it is known to work on: * Windows 7+ * GNU/Linux (including PinePhone and other Linux-based phone operating systems) +* BSD (FreeBSD, OpenBSD, NetBSD, etc.) * macOS 10.10+ * OS/2 (ArcaOS, eComStation) diff --git a/resources/macosx/Info.plist.in b/resources/macosx/Info.plist.in index 9ffa42f19..9924d7970 100644 --- a/resources/macosx/Info.plist.in +++ b/resources/macosx/Info.plist.in @@ -9,11 +9,11 @@ CFBundleDevelopmentRegion English CFBundleExecutable - @EXECUTABLE@ + @CMAKE_PROJECT_NAME@ CFBundleGetInfoString - @EXECUTABLE@ (C) 2011-2016 Martin Rotter + @CMAKE_PROJECT_NAME@ (C) 2011-2016 Martin Rotter CFBundleIconFile - @ICON@ + @CMAKE_PROJECT_NAME@.icns CFBundleIdentifier org.martinrotter.rssguard CFBundleInfoDictionaryVersion @@ -23,7 +23,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - @SHORT_VERSION@ + @CMAKE_PROJECT_VERSION@ CFBundleSignature @TYPEINFO@ CFBundleVersion diff --git a/resources/nsis/NSIS.definitions.nsh.in b/resources/nsis/NSIS.definitions.nsh.in index 546f7364e..cf2b30585 100644 --- a/resources/nsis/NSIS.definitions.nsh.in +++ b/resources/nsis/NSIS.definitions.nsh.in @@ -1,11 +1,11 @@ ; For license of this file, see /LICENSE.md. -!define VERSION "@APP_VERSION@" -!define APP_VERSION "@APP_VERSION@" +!define VERSION "@CMAKE_PROJECT_VERSION@" +!define APP_VERSION "@CMALE_PROJECT_VERSION@" !define APP_NAME "@APP_NAME@" -!define EXE_NAME "@EXE_NAME@" -!define LICENSE_FILE "@PWD@\..\..\resources\text\COPYING_GNU_GPL" -!define MUI_ICON "@PWD@\..\..\resources\graphics\@APP_LOW_NAME@.ico" -!define MUI_UNICON "@PWD@\..\..\resources\graphics\@APP_LOW_NAME@.ico" +!define EXE_NAME "@CMAKE_PROJECT_NAME@.exe" +!define LICENSE_FILE "@CMAKE_SOURCE_DIR@\resources\text\COPYING_GNU_GPL" +!define MUI_ICON "@CMAKE_SOURCE_DIR@\resources\graphics\@CMAKE_PROJECT_NAME@.ico" +!define MUI_UNICON "@CMAKE_SOURCE_DIR@\resources\graphics\@CMAKE_PROJECT_NAME@.ico" !define PATCH "0" -!define BINARY_TREE "@OUT_PWD@\app" \ No newline at end of file +!define BINARY_TREE "@CMAKE_BINARY_DIR@\app" diff --git a/resources/rssguard.rc.in b/resources/rssguard.rc.in new file mode 100644 index 000000000..af3c95da8 --- /dev/null +++ b/resources/rssguard.rc.in @@ -0,0 +1,41 @@ +#include + +IDI_ICON1 ICON "@CMAKE_PROJECT_NAME@.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + FILEFLAGSMASK 0x3fL + #ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG + #else + FILEFLAGS 0x0L + #endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_UNKNOWN + FILESUBTYPE VFT2_UNKNOWN + +BEGIN + BLOCK "StringFileInfo" + + BEGIN + BLOCK "040904b0" + + BEGIN + VALUE "CompanyName", "@APP_AUTHOR@" + VALUE "FileDescription", "@APP_NAME@" + VALUE "FileVersion","@CMAKE_PROJECT_VERSION@" + VALUE "InternalName", "@CMAKE_PROJECT_NAME@" + VALUE "LegalCopyright", "@APP_COPYRIGHT@" + VALUE "OriginalFilename", "@CMAKE_PROJECT_NAME@.exe" + VALUE "ProductName", "@APP_NAME@" + VALUE "ProductVersion","@CMAKE_PROJECT_VERSION@" + END + END + + BLOCK "VarFileInfo" + + BEGIN + VALUE "Translation", 0x0409, 1200 + END +END diff --git a/resources/scripts/github-actions/build-linux-mac.sh b/resources/scripts/github-actions/build-linux-mac.sh index c71a76ae5..7a4d61d7e 100755 --- a/resources/scripts/github-actions/build-linux-mac.sh +++ b/resources/scripts/github-actions/build-linux-mac.sh @@ -7,9 +7,11 @@ webengine="$2" if [[ "$os" == *"ubuntu"* ]]; then echo "We are building for GNU/Linux on Ubuntu." is_linux=true + prefix="AppDir/usr" else echo "We are building for macOS." is_linux=false + prefix="RSS Guard.app" fi echo "OS: $os; WebEngine: $webengine" @@ -19,8 +21,8 @@ if [ $is_linux = true ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic -y sudo apt-get update - sudo apt-get -y install qt515tools qt515base qt515webengine qt515svg qt515multimedia - sudo apt-get -y install openssl libssl-dev libgl1-mesa-dev gstreamer1.0-alsa gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-qt5 gstreamer1.0-pulseaudio + sudo apt-get -qy install qt515tools qt515base qt515webengine qt515svg qt515multimedia + sudo apt-get -qy install cmake ninja-build openssl libssl-dev libgl1-mesa-dev gstreamer1.0-alsa gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-qt5 gstreamer1.0-pulseaudio source /opt/qt515/bin/qt515-env.sh else @@ -34,33 +36,34 @@ else echo "Qt will be installed to: $QTPATH" aqt install-qt -O "$QTPATH" "mac" "desktop" "$QTVERSION" "clang_64" -m "qtwebengine" + aqt install-tool -O "$QTPATH" "mac" "desktop" "tools_cmake" + aqt install-tool -O "$QTPATH" "mac" "desktop" "tools_ninja" export QT_PLUGIN_PATH="$QTPATH/$QTVERSION/clang_64/plugins" - export PATH="$QTBIN:$PATH" + export PATH="$QTBIN:$QTPATH/Tools/CMake/bin:$QTPATH/Tools/Ninja:$PATH" fi -qmake --version +cmake --version # Build application and package it. -git_tag=$(git describe --tags `git rev-list --tags --max-count=1`) +git_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) git_revision=$(git rev-parse --short HEAD) mkdir rssguard-build && cd rssguard-build -qmake .. "USE_WEBENGINE=$webengine" "FEEDLY_CLIENT_ID=$FEEDLY_CLIENT_ID" "FEEDLY_CLIENT_SECRET=$FEEDLY_CLIENT_SECRET" "GMAIL_CLIENT_ID=$GMAIL_CLIENT_ID" "GMAIL_CLIENT_SECRET=$GMAIL_CLIENT_SECRET" "INOREADER_CLIENT_ID=$INOREADER_CLIENT_ID" "INOREADER_CLIENT_SECRET=$INOREADER_CLIENT_SECRET" -make -make install -cd "src/rssguard" - +cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DREVISION_FROM_GIT=ON -DUSE_WEBENGINE="$webengine" -DFEEDLY_CLIENT_ID="$FEEDLY_CLIENT_ID" -DFEEDLY_CLIENT_SECRET="$FEEDLY_CLIENT_SECRET" -DGMAIL_CLIENT_ID="$GMAIL_CLIENT_ID" -DGMAIL_CLIENT_SECRET="$GMAIL_CLIENT_SECRET" -DINOREADER_CLIENT_ID="$INOREADER_CLIENT_ID" -DINOREADER_CLIENT_SECRET="$INOREADER_CLIENT_SECRET" +cmake --build . +cmake --install . --prefix "$prefix" + if [ $is_linux = true ]; then # Obtain linuxdeployqt. - wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage + wget -qc https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage chmod a+x linuxdeployqt-continuous-x86_64.AppImage # Copy Gstreamer libs. install -v -Dm755 "/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner" "AppDir/usr/lib/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner" gst_executables="-executable=AppDir/usr/lib/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner" - for plugin in $(ls /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgst*.so); do + for plugin in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgst*.so; do basen=$(basename "$plugin") install -v -Dm755 "$plugin" "AppDir/usr/lib/gstreamer-1.0/$basen" gst_executables="${gst_executables} -executable=AppDir/usr/lib/gstreamer-1.0/$basen" @@ -73,7 +76,7 @@ if [ $is_linux = true ]; then ./linuxdeployqt-continuous-x86_64.AppImage "./AppDir/usr/share/applications/com.github.rssguard.desktop" -bundle-non-qt-libs -no-translations $gst_executables ./linuxdeployqt-continuous-x86_64.AppImage "./AppDir/usr/share/applications/com.github.rssguard.desktop" -bundle-non-qt-libs -no-translations $gst_executables - if [[ "$webengine" == "true" ]]; then + if [[ "$webengine" == "ON" ]]; then # Copy some NSS3 files to prevent WebEngine crashes. cp /usr/lib/x86_64-linux-gnu/nss/* ./AppDir/usr/lib/ -v fi @@ -84,7 +87,7 @@ if [ $is_linux = true ]; then set -- R*.AppImage imagename="$1" - if [[ "$webengine" == "true" ]]; then + if [[ "$webengine" == "ON" ]]; then imagenewname="rssguard-${git_tag}-${git_revision}-linux64.AppImage" else imagenewname="rssguard-${git_tag}-${git_revision}-nowebengine-linux64.AppImage" @@ -92,7 +95,6 @@ if [ $is_linux = true ]; then else # Fix .dylib linking. install_name_tool -change "librssguard.dylib" "@executable_path/librssguard.dylib" "RSS Guard.app/Contents/MacOS/rssguard" - install_name_tool -change "librssguard.dylib" "@executable_path/librssguard.dylib" "rssguard" otool -L "RSS Guard.app/Contents/MacOS/rssguard" macdeployqt "./RSS Guard.app" -dmg diff --git a/resources/scripts/github-actions/build-windows.ps1 b/resources/scripts/github-actions/build-windows.ps1 index c252cb940..cb29c4462 100755 --- a/resources/scripts/github-actions/build-windows.ps1 +++ b/resources/scripts/github-actions/build-windows.ps1 @@ -76,14 +76,12 @@ cd "$old_pwd" # Build application. mkdir "rssguard-build" cd "rssguard-build" -& "$qt_qmake" "..\build.pro" "-r" "USE_WEBENGINE=$webengine" "FEEDLY_CLIENT_ID=$env:FEEDLY_CLIENT_ID" "FEEDLY_CLIENT_SECRET=$env:FEEDLY_CLIENT_SECRET" "GMAIL_CLIENT_ID=$env:GMAIL_CLIENT_ID" "GMAIL_CLIENT_SECRET=$env:GMAIL_CLIENT_SECRET" "INOREADER_CLIENT_ID=$env:INOREADER_CLIENT_ID" "INOREADER_CLIENT_SECRET=$env:INOREADER_CLIENT_SECRET" "CONFIG-=debug" "CONFIG-=debug_and_release" "CONFIG*=release" -nmake.exe - -cd "src\rssguard" -nmake.exe install +& "$cmake_path" ".." -G Ninja -DCMAKE_BUILD_TYPE="Release" -DREVISION_FROM_GIT=ON -DUSE_WEBENGINE="$webengine" -DFEEDLY_CLIENT_ID="$env:FEEDLY_CLIENT_ID" -DFEEDLY_CLIENT_SECRET="$env:FEEDLY_CLIENT_SECRET" -DGMAIL_CLIENT_ID="$env:GMAIL_CLIENT_ID" -DGMAIL_CLIENT_SECRET="$env:GMAIL_CLIENT_SECRET" -DINOREADER_CLIENT_ID="$env:INOREADER_CLIENT_ID" -DINOREADER_CLIENT_SECRET="$env:INOREADER_CLIENT_SECRET" +& "$cmake_path" --build . +& "$cmake_path" --install . --prefix app cd "app" -windeployqt.exe --verbose 1 --no-compiler-runtime --no-translations --release rssguard.exe librssguard.dll +windeployqt.exe --verbose 1 --no-compiler-runtime --no-translations --release rssguard.exe rssguard.dll cd ".." # Copy OpenSSL. @@ -94,7 +92,7 @@ Copy-Item -Path "$openssl_base_path\bin\libssl*.dll" -Destination ".\app\" Copy-Item -Path "$maria_path\lib\libmariadb.dll" -Destination ".\app\" Copy-Item -Path "$qt_sqldrivers_path\plugins\sqldrivers\qsqlmysql.dll" -Destination ".\app\sqldrivers\" -Force -if ($webengine -eq "true") { +if ($webengine -eq "ON") { $packagebase = "rssguard-${git_tag}-${git_revision}-win64" } else { @@ -107,4 +105,4 @@ else { # Create NSIS installation package. & "$old_pwd\resources\scripts\nsis\makensis.exe" "/XOutFile $packagebase.exe" ".\NSIS.template.in" -ls \ No newline at end of file +ls diff --git a/resources/scripts/redist/msvcp140.dll b/resources/scripts/redist/msvcp140.dll index fdc5eebb2..464f03c48 100644 Binary files a/resources/scripts/redist/msvcp140.dll and b/resources/scripts/redist/msvcp140.dll differ diff --git a/resources/scripts/redist/msvcp140_1.dll b/resources/scripts/redist/msvcp140_1.dll index 60efb919c..cdfcee814 100644 Binary files a/resources/scripts/redist/msvcp140_1.dll and b/resources/scripts/redist/msvcp140_1.dll differ diff --git a/resources/scripts/redist/msvcp140_2.dll b/resources/scripts/redist/msvcp140_2.dll new file mode 100755 index 000000000..6a3eb071b Binary files /dev/null and b/resources/scripts/redist/msvcp140_2.dll differ diff --git a/resources/scripts/redist/vcruntime140.dll b/resources/scripts/redist/vcruntime140.dll index 8974ee3d0..dee137284 100644 Binary files a/resources/scripts/redist/vcruntime140.dll and b/resources/scripts/redist/vcruntime140.dll differ diff --git a/resources/scripts/redist/vcruntime140_1.dll b/resources/scripts/redist/vcruntime140_1.dll index b176c9d54..c9f512545 100644 Binary files a/resources/scripts/redist/vcruntime140_1.dll and b/resources/scripts/redist/vcruntime140_1.dll differ diff --git a/src/librssguard/CMakeLists.txt b/src/librssguard/CMakeLists.txt new file mode 100644 index 000000000..70df4f193 --- /dev/null +++ b/src/librssguard/CMakeLists.txt @@ -0,0 +1,555 @@ +set(SOURCES + core/feeddownloader.cpp + core/feeddownloader.h + core/feedsmodel.cpp + core/feedsmodel.h + core/feedsproxymodel.cpp + core/feedsproxymodel.h + core/filterutils.cpp + core/filterutils.h + core/message.cpp + core/message.h + core/messagefilter.cpp + core/messagefilter.h + core/messageobject.cpp + core/messageobject.h + core/messagesforfiltersmodel.cpp + core/messagesforfiltersmodel.h + core/messagesmodel.cpp + core/messagesmodel.h + core/messagesmodelcache.cpp + core/messagesmodelcache.h + core/messagesmodelsqllayer.cpp + core/messagesmodelsqllayer.h + core/messagesproxymodel.cpp + core/messagesproxymodel.h + database/databasecleaner.cpp + database/databasecleaner.h + database/databasedriver.cpp + database/databasedriver.h + database/databasefactory.cpp + database/databasefactory.h + database/databasequeries.cpp + database/databasequeries.h + database/mariadbdriver.cpp + database/mariadbdriver.h + database/sqlitedriver.cpp + database/sqlitedriver.h + definitions/definitions.h + definitions/typedefs.h + dynamic-shortcuts/dynamicshortcuts.cpp + dynamic-shortcuts/dynamicshortcuts.h + dynamic-shortcuts/dynamicshortcutswidget.cpp + dynamic-shortcuts/dynamicshortcutswidget.h + dynamic-shortcuts/shortcutcatcher.cpp + dynamic-shortcuts/shortcutcatcher.h + exceptions/applicationexception.cpp + exceptions/applicationexception.h + exceptions/feedfetchexception.cpp + exceptions/feedfetchexception.h + exceptions/filteringexception.cpp + exceptions/filteringexception.h + exceptions/ioexception.cpp + exceptions/ioexception.h + exceptions/networkexception.cpp + exceptions/networkexception.h + exceptions/scriptexception.cpp + exceptions/scriptexception.h + gui/dialogs/formabout.cpp + gui/dialogs/formabout.h + gui/dialogs/formaddaccount.cpp + gui/dialogs/formaddaccount.h + gui/dialogs/formaddeditlabel.cpp + gui/dialogs/formaddeditlabel.h + gui/dialogs/formbackupdatabasesettings.cpp + gui/dialogs/formbackupdatabasesettings.h + gui/dialogs/formdatabasecleanup.cpp + gui/dialogs/formdatabasecleanup.h + gui/dialogs/formmain.cpp + gui/dialogs/formmain.h + gui/dialogs/formmessagefiltersmanager.cpp + gui/dialogs/formmessagefiltersmanager.h + gui/dialogs/formrestoredatabasesettings.cpp + gui/dialogs/formrestoredatabasesettings.h + gui/dialogs/formsettings.cpp + gui/dialogs/formsettings.h + gui/dialogs/formupdate.cpp + gui/dialogs/formupdate.h + gui/feedmessageviewer.cpp + gui/feedmessageviewer.h + gui/feedsview.cpp + gui/feedsview.h + gui/guiutilities.cpp + gui/guiutilities.h + gui/messagebox.cpp + gui/messagebox.h + gui/messagepreviewer.cpp + gui/messagepreviewer.h + gui/messagesview.cpp + gui/messagesview.h + gui/newspaperpreviewer.cpp + gui/newspaperpreviewer.h + gui/notifications/notificationseditor.cpp + gui/notifications/notificationseditor.h + gui/notifications/singlenotificationeditor.cpp + gui/notifications/singlenotificationeditor.h + gui/reusable/baselineedit.cpp + gui/reusable/baselineedit.h + gui/reusable/basetreeview.cpp + gui/reusable/basetreeview.h + gui/reusable/colortoolbutton.cpp + gui/reusable/colortoolbutton.h + gui/reusable/comboboxwithstatus.cpp + gui/reusable/comboboxwithstatus.h + gui/reusable/edittableview.cpp + gui/reusable/edittableview.h + gui/reusable/helpspoiler.cpp + gui/reusable/helpspoiler.h + gui/reusable/labelsmenu.cpp + gui/reusable/labelsmenu.h + gui/reusable/labelwithstatus.cpp + gui/reusable/labelwithstatus.h + gui/reusable/lineeditwithstatus.cpp + gui/reusable/lineeditwithstatus.h + gui/reusable/messagecountspinbox.cpp + gui/reusable/messagecountspinbox.h + gui/reusable/networkproxydetails.cpp + gui/reusable/networkproxydetails.h + gui/reusable/nonclosablemenu.cpp + gui/reusable/nonclosablemenu.h + gui/reusable/plaintoolbutton.cpp + gui/reusable/plaintoolbutton.h + gui/reusable/progressbarwithtext.cpp + gui/reusable/progressbarwithtext.h + gui/reusable/resizablestackedwidget.cpp + gui/reusable/resizablestackedwidget.h + gui/reusable/searchtextwidget.cpp + gui/reusable/searchtextwidget.h + gui/reusable/squeezelabel.cpp + gui/reusable/squeezelabel.h + gui/reusable/styleditemdelegatewithoutfocus.cpp + gui/reusable/styleditemdelegatewithoutfocus.h + gui/reusable/timespinbox.cpp + gui/reusable/timespinbox.h + gui/reusable/treeviewcolumnsmenu.cpp + gui/reusable/treeviewcolumnsmenu.h + gui/reusable/widgetwithstatus.cpp + gui/reusable/widgetwithstatus.h + gui/settings/settingsbrowsermail.cpp + gui/settings/settingsbrowsermail.h + gui/settings/settingsdatabase.cpp + gui/settings/settingsdatabase.h + gui/settings/settingsdownloads.cpp + gui/settings/settingsdownloads.h + gui/settings/settingsfeedsmessages.cpp + gui/settings/settingsfeedsmessages.h + gui/settings/settingsgeneral.cpp + gui/settings/settingsgeneral.h + gui/settings/settingsgui.cpp + gui/settings/settingsgui.h + gui/settings/settingslocalization.cpp + gui/settings/settingslocalization.h + gui/settings/settingsnodejs.cpp + gui/settings/settingsnodejs.h + gui/settings/settingsnotifications.cpp + gui/settings/settingsnotifications.h + gui/settings/settingspanel.cpp + gui/settings/settingspanel.h + gui/settings/settingsshortcuts.cpp + gui/settings/settingsshortcuts.h + gui/systemtrayicon.cpp + gui/systemtrayicon.h + gui/tabbar.cpp + gui/tabbar.h + gui/tabcontent.cpp + gui/tabcontent.h + gui/tabwidget.cpp + gui/tabwidget.h + gui/toolbars/basetoolbar.cpp + gui/toolbars/basetoolbar.h + gui/toolbars/feedstoolbar.cpp + gui/toolbars/feedstoolbar.h + gui/toolbars/messagestoolbar.cpp + gui/toolbars/messagestoolbar.h + gui/toolbars/statusbar.cpp + gui/toolbars/statusbar.h + gui/toolbars/toolbareditor.cpp + gui/toolbars/toolbareditor.h + miscellaneous/application.cpp + miscellaneous/application.h + miscellaneous/autosaver.cpp + miscellaneous/autosaver.h + miscellaneous/externaltool.cpp + miscellaneous/externaltool.h + miscellaneous/feedreader.cpp + miscellaneous/feedreader.h + miscellaneous/iconfactory.cpp + miscellaneous/iconfactory.h + miscellaneous/iofactory.cpp + miscellaneous/iofactory.h + miscellaneous/localization.cpp + miscellaneous/localization.h + miscellaneous/mutex.cpp + miscellaneous/mutex.h + miscellaneous/nodejs.cpp + miscellaneous/nodejs.h + miscellaneous/notification.cpp + miscellaneous/notification.h + miscellaneous/notificationfactory.cpp + miscellaneous/notificationfactory.h + miscellaneous/regexfactory.cpp + miscellaneous/regexfactory.h + miscellaneous/settings.cpp + miscellaneous/settings.h + miscellaneous/settingsproperties.h + miscellaneous/singleapplication.cpp + miscellaneous/singleapplication.h + miscellaneous/skinfactory.cpp + miscellaneous/skinfactory.h + miscellaneous/systemfactory.cpp + miscellaneous/systemfactory.h + miscellaneous/templates.h + miscellaneous/textfactory.cpp + miscellaneous/textfactory.h + network-web/basenetworkaccessmanager.cpp + network-web/basenetworkaccessmanager.h + network-web/cookiejar.cpp + network-web/cookiejar.h + network-web/downloader.cpp + network-web/downloader.h + network-web/downloadmanager.cpp + network-web/downloadmanager.h + network-web/httpresponse.cpp + network-web/httpresponse.h + network-web/networkfactory.cpp + network-web/networkfactory.h + network-web/oauth2service.cpp + network-web/oauth2service.h + network-web/oauthhttphandler.cpp + network-web/oauthhttphandler.h + network-web/silentnetworkaccessmanager.cpp + network-web/silentnetworkaccessmanager.h + network-web/webfactory.cpp + network-web/webfactory.h + services/abstract/accountcheckmodel.cpp + services/abstract/accountcheckmodel.h + services/abstract/cacheforserviceroot.cpp + services/abstract/cacheforserviceroot.h + services/abstract/category.cpp + services/abstract/category.h + services/abstract/feed.cpp + services/abstract/feed.h + services/abstract/gui/authenticationdetails.cpp + services/abstract/gui/authenticationdetails.h + services/abstract/gui/formaccountdetails.cpp + services/abstract/gui/formaccountdetails.h + services/abstract/gui/formcategorydetails.cpp + services/abstract/gui/formcategorydetails.h + services/abstract/gui/formfeeddetails.cpp + services/abstract/gui/formfeeddetails.h + services/abstract/importantnode.cpp + services/abstract/importantnode.h + services/abstract/label.cpp + services/abstract/label.h + services/abstract/labelsnode.cpp + services/abstract/labelsnode.h + services/abstract/recyclebin.cpp + services/abstract/recyclebin.h + services/abstract/rootitem.cpp + services/abstract/rootitem.h + services/abstract/serviceentrypoint.h + services/abstract/serviceroot.cpp + services/abstract/serviceroot.h + services/abstract/unreadnode.cpp + services/abstract/unreadnode.h + services/feedly/definitions.h + services/feedly/feedlyentrypoint.cpp + services/feedly/feedlyentrypoint.h + services/feedly/feedlynetwork.cpp + services/feedly/feedlynetwork.h + services/feedly/feedlyserviceroot.cpp + services/feedly/feedlyserviceroot.h + services/feedly/gui/feedlyaccountdetails.cpp + services/feedly/gui/feedlyaccountdetails.h + services/feedly/gui/formeditfeedlyaccount.cpp + services/feedly/gui/formeditfeedlyaccount.h + services/gmail/definitions.h + services/gmail/gmailentrypoint.cpp + services/gmail/gmailentrypoint.h + services/gmail/gmailnetworkfactory.cpp + services/gmail/gmailnetworkfactory.h + services/gmail/gmailserviceroot.cpp + services/gmail/gmailserviceroot.h + services/gmail/gui/emailrecipientcontrol.cpp + services/gmail/gui/emailrecipientcontrol.h + services/gmail/gui/formaddeditemail.cpp + services/gmail/gui/formaddeditemail.h + services/gmail/gui/formdownloadattachment.cpp + services/gmail/gui/formdownloadattachment.h + services/gmail/gui/formeditgmailaccount.cpp + services/gmail/gui/formeditgmailaccount.h + services/gmail/gui/gmailaccountdetails.cpp + services/gmail/gui/gmailaccountdetails.h + services/greader/definitions.h + services/greader/greaderentrypoint.cpp + services/greader/greaderentrypoint.h + services/greader/greadernetwork.cpp + services/greader/greadernetwork.h + services/greader/greaderserviceroot.cpp + services/greader/greaderserviceroot.h + services/greader/gui/formeditgreaderaccount.cpp + services/greader/gui/formeditgreaderaccount.h + services/greader/gui/greaderaccountdetails.cpp + services/greader/gui/greaderaccountdetails.h + services/owncloud/definitions.h + services/owncloud/gui/formeditowncloudaccount.cpp + services/owncloud/gui/formeditowncloudaccount.h + services/owncloud/gui/owncloudaccountdetails.cpp + services/owncloud/gui/owncloudaccountdetails.h + services/owncloud/owncloudfeed.cpp + services/owncloud/owncloudfeed.h + services/owncloud/owncloudnetworkfactory.cpp + services/owncloud/owncloudnetworkfactory.h + services/owncloud/owncloudserviceentrypoint.cpp + services/owncloud/owncloudserviceentrypoint.h + services/owncloud/owncloudserviceroot.cpp + services/owncloud/owncloudserviceroot.h + services/reddit/definitions.h + services/reddit/gui/formeditredditaccount.cpp + services/reddit/gui/formeditredditaccount.h + services/reddit/gui/redditaccountdetails.cpp + services/reddit/gui/redditaccountdetails.h + services/reddit/redditcategory.cpp + services/reddit/redditcategory.h + services/reddit/redditentrypoint.cpp + services/reddit/redditentrypoint.h + services/reddit/redditnetworkfactory.cpp + services/reddit/redditnetworkfactory.h + services/reddit/redditserviceroot.cpp + services/reddit/redditserviceroot.h + services/reddit/redditsubscription.cpp + services/reddit/redditsubscription.h + services/standard/atomparser.cpp + services/standard/atomparser.h + services/standard/definitions.h + services/standard/feedparser.cpp + services/standard/feedparser.h + services/standard/gui/formeditstandardaccount.cpp + services/standard/gui/formeditstandardaccount.h + services/standard/gui/formstandardfeeddetails.cpp + services/standard/gui/formstandardfeeddetails.h + services/standard/gui/formstandardimportexport.cpp + services/standard/gui/formstandardimportexport.h + services/standard/gui/standardfeeddetails.cpp + services/standard/gui/standardfeeddetails.h + services/standard/jsonparser.cpp + services/standard/jsonparser.h + services/standard/rdfparser.cpp + services/standard/rdfparser.h + services/standard/rssparser.cpp + services/standard/rssparser.h + services/standard/standardcategory.cpp + services/standard/standardcategory.h + services/standard/standardfeed.cpp + services/standard/standardfeed.h + services/standard/standardfeedsimportexportmodel.cpp + services/standard/standardfeedsimportexportmodel.h + services/standard/standardserviceentrypoint.cpp + services/standard/standardserviceentrypoint.h + services/standard/standardserviceroot.cpp + services/standard/standardserviceroot.h + services/tt-rss/definitions.h + services/tt-rss/gui/formeditttrssaccount.cpp + services/tt-rss/gui/formeditttrssaccount.h + services/tt-rss/gui/formttrssfeeddetails.cpp + services/tt-rss/gui/formttrssfeeddetails.h + services/tt-rss/gui/formttrssnote.cpp + services/tt-rss/gui/formttrssnote.h + services/tt-rss/gui/ttrssaccountdetails.cpp + services/tt-rss/gui/ttrssaccountdetails.h + services/tt-rss/gui/ttrssfeeddetails.cpp + services/tt-rss/gui/ttrssfeeddetails.h + services/tt-rss/ttrssfeed.cpp + services/tt-rss/ttrssfeed.h + services/tt-rss/ttrssnetworkfactory.cpp + services/tt-rss/ttrssnetworkfactory.h + services/tt-rss/ttrssnotetopublish.h + services/tt-rss/ttrssserviceentrypoint.cpp + services/tt-rss/ttrssserviceentrypoint.h + services/tt-rss/ttrssserviceroot.cpp + services/tt-rss/ttrssserviceroot.h +) + +# Add mimesis. +list(APPEND SOURCES + 3rd-party/mimesis/mimesis.cpp + 3rd-party/mimesis/mimesis.hpp + 3rd-party/mimesis/quoted-printable.cpp + 3rd-party/mimesis/quoted-printable.hpp +) + +# Add boolinq. +list(APPEND SOURCES + 3rd-party/boolinq/boolinq.h +) + +# Add SimpleCrypt. +list(APPEND SOURCES + 3rd-party/sc/simplecrypt.cpp + 3rd-party/sc/simplecrypt.h +) + +if(APPLE) + list(APPEND SOURCES + miscellaneous/disablewindowtabbing.mm + ) +endif() + +if(USE_WEBENGINE) + list(APPEND SOURCES + # WebEngine-based web (and message) browser. + gui/reusable/discoverfeedsbutton.cpp + gui/reusable/discoverfeedsbutton.h + gui/reusable/locationlineedit.cpp + gui/reusable/locationlineedit.h + gui/webbrowser.cpp + gui/webbrowser.h + gui/webviewer.cpp + gui/webviewer.h + network-web/googlesuggest.cpp + network-web/googlesuggest.h + network-web/webpage.cpp + network-web/webpage.h + + # Add AdBlock sources. + network-web/adblock/adblockdialog.cpp + network-web/adblock/adblockdialog.h + network-web/adblock/adblockicon.cpp + network-web/adblock/adblockicon.h + network-web/adblock/adblockmanager.cpp + network-web/adblock/adblockmanager.h + network-web/adblock/adblockrequestinfo.cpp + network-web/adblock/adblockrequestinfo.h + network-web/adblock/adblockurlinterceptor.cpp + network-web/adblock/adblockurlinterceptor.h + network-web/networkurlinterceptor.cpp + network-web/networkurlinterceptor.h + network-web/urlinterceptor.h + ) +else() + list(APPEND SOURCES + # Lite non-WebEngine message browser. + gui/messagetextbrowser.cpp + gui/messagetextbrowser.h + gui/messagebrowser.cpp + gui/messagebrowser.h + ) +endif() + +qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/sql.qrc) +qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/rssguard.qrc) + +if(APPLE OR WIN32 OR OS2) + qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/icons.qrc) +endif() + +if(WIN32) + enable_language("RC") + list(APPEND SOURCES "${CMAKE_BINARY_DIR}/rssguard.rc") +endif() + +add_library(rssguard SHARED ${SOURCES} ${QM_FILES}) + +target_compile_definitions(rssguard PRIVATE RSSGUARD_DLLSPEC=Q_DECL_EXPORT) + +target_include_directories(rssguard + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/gui + ${CMAKE_CURRENT_SOURCE_DIR}/gui/dialogs + ${CMAKE_CURRENT_SOURCE_DIR}/gui/reusable + ${CMAKE_CURRENT_SOURCE_DIR}/dynamic-shortcuts + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gui/notifications + ${CMAKE_CURRENT_SOURCE_DIR}/gui/toolbars +) + +target_link_libraries(rssguard PUBLIC + Qt::Core + Qt::Gui + Qt::Network + Qt::Qml + Qt::Sql + Qt::Widgets + Qt::Xml +) + +if(QT_VERSION_MAJOR EQUAL 6) + target_link_libraries(rssguard PUBLIC + Qt::Core5Compat + ) +endif() + +if(USE_WEBENGINE) + target_link_libraries(rssguard PUBLIC + Qt::WebEngineWidgets + ) +endif() + +if(NOT OS2) + target_link_libraries(rssguard PUBLIC + Qt::Multimedia + ) +endif() + +if(UNIX AND NOT APPLE AND NOT ANDROID) + target_link_libraries(rssguard PUBLIC + Qt::DBus + ) +endif() + +if(APPLE) + target_compile_options(rssguard PUBLIC -mmacosx-version-min=10.8) + target_link_options(rssguard PUBLIC -mmacosx-version-min=10.8) + target_link_libraries(rssguard PUBLIC + "-framework AppKit" + ) +elseif(WIN32) + target_link_libraries(rssguard PUBLIC + Shell32.lib + odbc32 + ) +endif() + +if(WIN32 OR OS2) + install(TARGETS rssguard DESTINATION .) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION include + FILES_MATCHING PATTERN "services/abstract/*.h" + ) + install(DIRECTORY services/abstract + DESTINATION include/librssguard/services + FILES_MATCHING PATTERN "*.h" + ) +elseif(UNIX AND NOT APPLE AND NOT ANDROID) + include (GNUInstallDirs) + install(TARGETS rssguard + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + install(DIRECTORY services/abstract + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/librssguard/services + FILES_MATCHING PATTERN "*.h" + ) +elseif(APPLE) + install(TARGETS rssguard + DESTINATION Contents/MacOS + ) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION Contents/Resources/Include + FILES_MATCHING PATTERN "services/abstract/*.h" + ) + install(DIRECTORY services/abstract + DESTINATION Contents/Resources/Include/librssguard/services + FILES_MATCHING PATTERN "*.h" + ) +endif() diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h index cd5fa7445..015358561 100644 --- a/src/librssguard/definitions/definitions.h +++ b/src/librssguard/definitions/definitions.h @@ -197,7 +197,7 @@ #define APP_SKIN_METADATA_FILE "metadata.xml" #define APP_STYLE_DEFAULT "Fusion" -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) #define APP_THEME_DEFAULT "" #else #define APP_THEME_DEFAULT "Breeze" @@ -268,6 +268,12 @@ #if defined(Q_OS_LINUX) #define OS_ID "Linux" +#elif defined(Q_OS_FREEBSD) +#define OS_ID "FreeBSD" +#elif defined(Q_OS_NETBSD) +#define OS_ID "NetBSD" +#elif defined(Q_OS_OPENBSD) +#define OS_ID "OpenBSD" #elif defined(Q_OS_OS2) #define OS_ID "OS/2" #elif defined(Q_OS_OSX) @@ -276,6 +282,8 @@ #define OS_ID "Windows" #elif defined(Q_OS_ANDROID) #define OS_ID "Android" +#elif defined(Q_OS_UNIX) +#define OS_ID "Unix" #else #define OS_ID "" #endif @@ -295,7 +303,7 @@ #define APP_INITIAL_FEEDS_PATH QSL(":/initial_feeds") #define APP_LANG_PATH QSL(":/localization") -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) #define APP_DESKTOP_SOURCE_ENTRY_FILE "com.github.rssguard.desktop.autostart" #define APP_DESKTOP_ENTRY_FILE "com.github.rssguard.desktop" diff --git a/src/librssguard/gui/settings/settingsbrowsermail.cpp b/src/librssguard/gui/settings/settingsbrowsermail.cpp index 5572bbb64..f3ccd9d65 100644 --- a/src/librssguard/gui/settings/settingsbrowsermail.cpp +++ b/src/librssguard/gui/settings/settingsbrowsermail.cpp @@ -82,7 +82,7 @@ void SettingsBrowserMail::selectBrowserExecutable() { qApp->homeFolder(), //: File filter for external browser selection dialog. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) tr("Executables (*)")); #else tr("Executables (*.*)")); @@ -126,7 +126,7 @@ void SettingsBrowserMail::selectEmailExecutable() { qApp->homeFolder(), //: File filter for external e-mail selection dialog. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) tr("Executables (*)")); #else tr("Executables (*.*)")); diff --git a/src/librssguard/gui/settings/settingsgui.cpp b/src/librssguard/gui/settings/settingsgui.cpp index cab1230a2..7a9963a29 100644 --- a/src/librssguard/gui/settings/settingsgui.cpp +++ b/src/librssguard/gui/settings/settingsgui.cpp @@ -132,7 +132,7 @@ void SettingsGui::loadSettings() { if (icon_theme_name == QSL(APP_NO_THEME)) { // Add just "no theme" on other systems. //: Label for disabling icon theme. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) m_ui->m_cmbIconTheme->addItem(tr("system icon theme"), APP_NO_THEME); #else m_ui->m_cmbIconTheme->addItem(tr("no icon theme"), APP_NO_THEME); diff --git a/src/librssguard/librssguard.pro b/src/librssguard/librssguard.pro deleted file mode 100644 index 7bee40602..000000000 --- a/src/librssguard/librssguard.pro +++ /dev/null @@ -1,554 +0,0 @@ -TEMPLATE = lib - -unix|mac|os2 { - TARGET = rssguard -} -else { - TARGET = librssguard -} - -MSG_PREFIX = "librssguard" -APP_TYPE = "core library" - -include(../../pri/vars.pri) -include(../../pri/defs.pri) - -message($$MSG_PREFIX: Shadow copy build directory \"$$OUT_PWD\".) -message($$MSG_PREFIX: $$APP_NAME version is: \"$$APP_VERSION\".) -message($$MSG_PREFIX: Detected Qt version: \"$$QT_VERSION\".) -message($$MSG_PREFIX: Build destination directory: \"$$DESTDIR\".) -message($$MSG_PREFIX: Build revision: \"$$APP_REVISION\".) -message($$MSG_PREFIX: lrelease executable name: \"$$LRELEASE\".) - -include(../../pri/build_opts.pri) - -DEFINES *= RSSGUARD_DLLSPEC=Q_DECL_EXPORT -CONFIG += unversioned_libname unversioned_soname skip_target_version_ext - -RESOURCES += ../../resources/sql.qrc \ - ../../resources/rssguard.qrc - -mac|os2|win32 { - RESOURCES += ../../resources/icons.qrc -} - -HEADERS += core/feeddownloader.h \ - core/feedsmodel.h \ - core/feedsproxymodel.h \ - core/filterutils.h \ - core/message.h \ - core/messagefilter.h \ - core/messageobject.h \ - core/messagesforfiltersmodel.h \ - core/messagesmodel.h \ - core/messagesmodelcache.h \ - core/messagesmodelsqllayer.h \ - core/messagesproxymodel.h \ - database/databasecleaner.h \ - database/databasedriver.h \ - database/databasefactory.h \ - database/databasequeries.h \ - database/mariadbdriver.h \ - database/sqlitedriver.h \ - definitions/definitions.h \ - definitions/typedefs.h \ - dynamic-shortcuts/dynamicshortcuts.h \ - dynamic-shortcuts/dynamicshortcutswidget.h \ - dynamic-shortcuts/shortcutcatcher.h \ - exceptions/applicationexception.h \ - exceptions/feedfetchexception.h \ - exceptions/filteringexception.h \ - exceptions/ioexception.h \ - exceptions/networkexception.h \ - exceptions/scriptexception.h \ - gui/notifications/notificationseditor.h \ - gui/notifications/singlenotificationeditor.h \ - gui/reusable/baselineedit.h \ - gui/reusable/basetreeview.h \ - gui/reusable/helpspoiler.h \ - gui/reusable/progressbarwithtext.h \ - gui/reusable/resizablestackedwidget.h \ - gui/settings/settingsnodejs.h \ - gui/settings/settingsnotifications.h \ - gui/toolbars/basetoolbar.h \ - gui/reusable/comboboxwithstatus.h \ - gui/reusable/colortoolbutton.h \ - gui/dialogs/formabout.h \ - gui/dialogs/formaddaccount.h \ - gui/dialogs/formaddeditlabel.h \ - gui/dialogs/formbackupdatabasesettings.h \ - gui/dialogs/formdatabasecleanup.h \ - gui/dialogs/formmain.h \ - gui/dialogs/formmessagefiltersmanager.h \ - gui/dialogs/formrestoredatabasesettings.h \ - gui/dialogs/formsettings.h \ - gui/dialogs/formupdate.h \ - gui/feedmessageviewer.h \ - gui/toolbars/feedstoolbar.h \ - gui/feedsview.h \ - gui/guiutilities.h \ - gui/reusable/labelsmenu.h \ - gui/reusable/labelwithstatus.h \ - gui/reusable/lineeditwithstatus.h \ - gui/reusable/squeezelabel.h \ - gui/reusable/edittableview.h \ - gui/messagebox.h \ - gui/reusable/messagecountspinbox.h \ - gui/messagepreviewer.h \ - gui/toolbars/messagestoolbar.h \ - gui/messagesview.h \ - gui/reusable/networkproxydetails.h \ - gui/newspaperpreviewer.h \ - gui/reusable/nonclosablemenu.h \ - gui/reusable/plaintoolbutton.h \ - gui/reusable/searchtextwidget.h \ - gui/settings/settingsbrowsermail.h \ - gui/settings/settingsdatabase.h \ - gui/settings/settingsdownloads.h \ - gui/settings/settingsfeedsmessages.h \ - gui/settings/settingsgeneral.h \ - gui/settings/settingsgui.h \ - gui/settings/settingslocalization.h \ - gui/settings/settingspanel.h \ - gui/settings/settingsshortcuts.h \ - gui/toolbars/statusbar.h \ - gui/reusable/styleditemdelegatewithoutfocus.h \ - gui/systemtrayicon.h \ - gui/tabbar.h \ - gui/tabcontent.h \ - gui/tabwidget.h \ - gui/reusable/timespinbox.h \ - gui/toolbars/toolbareditor.h \ - gui/reusable/treeviewcolumnsmenu.h \ - gui/reusable/widgetwithstatus.h \ - miscellaneous/application.h \ - miscellaneous/autosaver.h \ - miscellaneous/externaltool.h \ - miscellaneous/feedreader.h \ - miscellaneous/iconfactory.h \ - miscellaneous/iofactory.h \ - miscellaneous/localization.h \ - miscellaneous/mutex.h \ - miscellaneous/nodejs.h \ - miscellaneous/notification.h \ - miscellaneous/notificationfactory.h \ - miscellaneous/regexfactory.h \ - miscellaneous/settings.h \ - miscellaneous/settingsproperties.h \ - miscellaneous/singleapplication.h \ - miscellaneous/skinfactory.h \ - miscellaneous/systemfactory.h \ - miscellaneous/templates.h \ - miscellaneous/textfactory.h \ - network-web/basenetworkaccessmanager.h \ - network-web/cookiejar.h \ - network-web/downloader.h \ - network-web/downloadmanager.h \ - network-web/httpresponse.h \ - network-web/networkfactory.h \ - network-web/oauth2service.h \ - network-web/oauthhttphandler.h \ - network-web/silentnetworkaccessmanager.h \ - network-web/webfactory.h \ - services/abstract/accountcheckmodel.h \ - services/abstract/cacheforserviceroot.h \ - services/abstract/category.h \ - services/abstract/feed.h \ - services/abstract/gui/authenticationdetails.h \ - services/abstract/gui/formaccountdetails.h \ - services/abstract/gui/formcategorydetails.h \ - services/abstract/gui/formfeeddetails.h \ - services/abstract/importantnode.h \ - services/abstract/label.h \ - services/abstract/labelsnode.h \ - services/abstract/recyclebin.h \ - services/abstract/rootitem.h \ - services/abstract/serviceentrypoint.h \ - services/abstract/serviceroot.h \ - services/abstract/unreadnode.h \ - services/feedly/definitions.h \ - services/feedly/feedlyentrypoint.h \ - services/feedly/feedlynetwork.h \ - services/feedly/feedlyserviceroot.h \ - services/feedly/gui/feedlyaccountdetails.h \ - services/feedly/gui/formeditfeedlyaccount.h \ - services/gmail/definitions.h \ - services/gmail/gmailentrypoint.h \ - services/gmail/gmailnetworkfactory.h \ - services/gmail/gmailserviceroot.h \ - services/gmail/gui/emailrecipientcontrol.h \ - services/gmail/gui/formaddeditemail.h \ - services/gmail/gui/formdownloadattachment.h \ - services/gmail/gui/formeditgmailaccount.h \ - services/gmail/gui/gmailaccountdetails.h \ - services/greader/definitions.h \ - services/greader/greaderentrypoint.h \ - services/greader/greadernetwork.h \ - services/greader/greaderserviceroot.h \ - services/greader/gui/formeditgreaderaccount.h \ - services/greader/gui/greaderaccountdetails.h \ - services/owncloud/definitions.h \ - services/owncloud/gui/formeditowncloudaccount.h \ - services/owncloud/gui/owncloudaccountdetails.h \ - services/owncloud/owncloudfeed.h \ - services/owncloud/owncloudnetworkfactory.h \ - services/owncloud/owncloudserviceentrypoint.h \ - services/owncloud/owncloudserviceroot.h \ - services/reddit/definitions.h \ - services/reddit/gui/formeditredditaccount.h \ - services/reddit/gui/redditaccountdetails.h \ - services/reddit/redditcategory.h \ - services/reddit/redditentrypoint.h \ - services/reddit/redditnetworkfactory.h \ - services/reddit/redditserviceroot.h \ - services/reddit/redditsubscription.h \ - services/standard/atomparser.h \ - services/standard/definitions.h \ - services/standard/feedparser.h \ - services/standard/gui/formeditstandardaccount.h \ - services/standard/gui/formstandardfeeddetails.h \ - services/standard/gui/formstandardimportexport.h \ - services/standard/gui/standardfeeddetails.h \ - services/standard/jsonparser.h \ - services/standard/rdfparser.h \ - services/standard/rssparser.h \ - services/standard/standardcategory.h \ - services/standard/standardfeed.h \ - services/standard/standardfeedsimportexportmodel.h \ - services/standard/standardserviceentrypoint.h \ - services/standard/standardserviceroot.h \ - services/tt-rss/definitions.h \ - services/tt-rss/gui/formeditttrssaccount.h \ - services/tt-rss/gui/formttrssfeeddetails.h \ - services/tt-rss/gui/formttrssnote.h \ - services/tt-rss/gui/ttrssaccountdetails.h \ - services/tt-rss/gui/ttrssfeeddetails.h \ - services/tt-rss/ttrssfeed.h \ - services/tt-rss/ttrssnetworkfactory.h \ - services/tt-rss/ttrssnotetopublish.h \ - services/tt-rss/ttrssserviceentrypoint.h \ - services/tt-rss/ttrssserviceroot.h - -SOURCES += core/feeddownloader.cpp \ - core/feedsmodel.cpp \ - core/feedsproxymodel.cpp \ - core/filterutils.cpp \ - core/message.cpp \ - core/messagefilter.cpp \ - core/messageobject.cpp \ - core/messagesforfiltersmodel.cpp \ - core/messagesmodel.cpp \ - core/messagesmodelcache.cpp \ - core/messagesmodelsqllayer.cpp \ - core/messagesproxymodel.cpp \ - database/databasecleaner.cpp \ - database/databasedriver.cpp \ - database/databasefactory.cpp \ - database/databasequeries.cpp \ - database/mariadbdriver.cpp \ - database/sqlitedriver.cpp \ - dynamic-shortcuts/dynamicshortcuts.cpp \ - dynamic-shortcuts/dynamicshortcutswidget.cpp \ - dynamic-shortcuts/shortcutcatcher.cpp \ - exceptions/applicationexception.cpp \ - exceptions/feedfetchexception.cpp \ - exceptions/filteringexception.cpp \ - exceptions/ioexception.cpp \ - exceptions/networkexception.cpp \ - exceptions/scriptexception.cpp \ - gui/notifications/notificationseditor.cpp \ - gui/notifications/singlenotificationeditor.cpp \ - gui/reusable/baselineedit.cpp \ - gui/reusable/basetreeview.cpp \ - gui/reusable/helpspoiler.cpp \ - gui/reusable/progressbarwithtext.cpp \ - gui/reusable/resizablestackedwidget.cpp \ - gui/settings/settingsnodejs.cpp \ - gui/settings/settingsnotifications.cpp \ - gui/toolbars/basetoolbar.cpp \ - gui/reusable/comboboxwithstatus.cpp \ - gui/reusable/colortoolbutton.cpp \ - gui/dialogs/formabout.cpp \ - gui/dialogs/formaddaccount.cpp \ - gui/dialogs/formaddeditlabel.cpp \ - gui/dialogs/formbackupdatabasesettings.cpp \ - gui/dialogs/formdatabasecleanup.cpp \ - gui/dialogs/formmain.cpp \ - gui/dialogs/formmessagefiltersmanager.cpp \ - gui/dialogs/formrestoredatabasesettings.cpp \ - gui/dialogs/formsettings.cpp \ - gui/dialogs/formupdate.cpp \ - gui/feedmessageviewer.cpp \ - gui/toolbars/feedstoolbar.cpp \ - gui/feedsview.cpp \ - gui/guiutilities.cpp \ - gui/reusable/labelsmenu.cpp \ - gui/reusable/edittableview.cpp \ - gui/reusable/labelwithstatus.cpp \ - gui/reusable/squeezelabel.cpp \ - gui/reusable/lineeditwithstatus.cpp \ - gui/messagebox.cpp \ - gui/reusable/messagecountspinbox.cpp \ - gui/messagepreviewer.cpp \ - gui/toolbars/messagestoolbar.cpp \ - gui/messagesview.cpp \ - gui/reusable/networkproxydetails.cpp \ - gui/newspaperpreviewer.cpp \ - gui/reusable/nonclosablemenu.cpp \ - gui/reusable/plaintoolbutton.cpp \ - gui/reusable/searchtextwidget.cpp \ - gui/settings/settingsbrowsermail.cpp \ - gui/settings/settingsdatabase.cpp \ - gui/settings/settingsdownloads.cpp \ - gui/settings/settingsfeedsmessages.cpp \ - gui/settings/settingsgeneral.cpp \ - gui/settings/settingsgui.cpp \ - gui/settings/settingslocalization.cpp \ - gui/settings/settingspanel.cpp \ - gui/settings/settingsshortcuts.cpp \ - gui/toolbars/statusbar.cpp \ - gui/reusable/styleditemdelegatewithoutfocus.cpp \ - gui/systemtrayicon.cpp \ - gui/tabbar.cpp \ - gui/tabcontent.cpp \ - gui/tabwidget.cpp \ - gui/reusable/timespinbox.cpp \ - gui/toolbars/toolbareditor.cpp \ - gui/reusable/treeviewcolumnsmenu.cpp \ - gui/reusable/widgetwithstatus.cpp \ - miscellaneous/application.cpp \ - miscellaneous/autosaver.cpp \ - miscellaneous/externaltool.cpp \ - miscellaneous/feedreader.cpp \ - miscellaneous/iconfactory.cpp \ - miscellaneous/iofactory.cpp \ - miscellaneous/localization.cpp \ - miscellaneous/mutex.cpp \ - miscellaneous/nodejs.cpp \ - miscellaneous/notification.cpp \ - miscellaneous/notificationfactory.cpp \ - miscellaneous/regexfactory.cpp \ - miscellaneous/settings.cpp \ - miscellaneous/singleapplication.cpp \ - miscellaneous/skinfactory.cpp \ - miscellaneous/systemfactory.cpp \ - miscellaneous/textfactory.cpp \ - network-web/basenetworkaccessmanager.cpp \ - network-web/cookiejar.cpp \ - network-web/downloader.cpp \ - network-web/downloadmanager.cpp \ - network-web/httpresponse.cpp \ - network-web/networkfactory.cpp \ - network-web/oauth2service.cpp \ - network-web/oauthhttphandler.cpp \ - network-web/silentnetworkaccessmanager.cpp \ - network-web/webfactory.cpp \ - services/abstract/accountcheckmodel.cpp \ - services/abstract/cacheforserviceroot.cpp \ - services/abstract/category.cpp \ - services/abstract/feed.cpp \ - services/abstract/gui/authenticationdetails.cpp \ - services/abstract/gui/formaccountdetails.cpp \ - services/abstract/gui/formcategorydetails.cpp \ - services/abstract/gui/formfeeddetails.cpp \ - services/abstract/importantnode.cpp \ - services/abstract/label.cpp \ - services/abstract/labelsnode.cpp \ - services/abstract/recyclebin.cpp \ - services/abstract/rootitem.cpp \ - services/abstract/serviceroot.cpp \ - services/abstract/unreadnode.cpp \ - services/feedly/feedlyentrypoint.cpp \ - services/feedly/feedlynetwork.cpp \ - services/feedly/feedlyserviceroot.cpp \ - services/feedly/gui/feedlyaccountdetails.cpp \ - services/feedly/gui/formeditfeedlyaccount.cpp \ - services/gmail/gmailentrypoint.cpp \ - services/gmail/gmailnetworkfactory.cpp \ - services/gmail/gmailserviceroot.cpp \ - services/gmail/gui/emailrecipientcontrol.cpp \ - services/gmail/gui/formaddeditemail.cpp \ - services/gmail/gui/formdownloadattachment.cpp \ - services/gmail/gui/formeditgmailaccount.cpp \ - services/gmail/gui/gmailaccountdetails.cpp \ - services/greader/greaderentrypoint.cpp \ - services/greader/greadernetwork.cpp \ - services/greader/greaderserviceroot.cpp \ - services/greader/gui/formeditgreaderaccount.cpp \ - services/greader/gui/greaderaccountdetails.cpp \ - services/owncloud/gui/formeditowncloudaccount.cpp \ - services/owncloud/gui/owncloudaccountdetails.cpp \ - services/owncloud/owncloudfeed.cpp \ - services/owncloud/owncloudnetworkfactory.cpp \ - services/owncloud/owncloudserviceentrypoint.cpp \ - services/owncloud/owncloudserviceroot.cpp \ - services/reddit/gui/formeditredditaccount.cpp \ - services/reddit/gui/redditaccountdetails.cpp \ - services/reddit/redditcategory.cpp \ - services/reddit/redditentrypoint.cpp \ - services/reddit/redditnetworkfactory.cpp \ - services/reddit/redditserviceroot.cpp \ - services/reddit/redditsubscription.cpp \ - services/standard/atomparser.cpp \ - services/standard/feedparser.cpp \ - services/standard/gui/formeditstandardaccount.cpp \ - services/standard/gui/formstandardfeeddetails.cpp \ - services/standard/gui/formstandardimportexport.cpp \ - services/standard/gui/standardfeeddetails.cpp \ - services/standard/jsonparser.cpp \ - services/standard/rdfparser.cpp \ - services/standard/rssparser.cpp \ - services/standard/standardcategory.cpp \ - services/standard/standardfeed.cpp \ - services/standard/standardfeedsimportexportmodel.cpp \ - services/standard/standardserviceentrypoint.cpp \ - services/standard/standardserviceroot.cpp \ - services/tt-rss/gui/formeditttrssaccount.cpp \ - services/tt-rss/gui/formttrssfeeddetails.cpp \ - services/tt-rss/gui/formttrssnote.cpp \ - services/tt-rss/gui/ttrssaccountdetails.cpp \ - services/tt-rss/gui/ttrssfeeddetails.cpp \ - services/tt-rss/ttrssfeed.cpp \ - services/tt-rss/ttrssnetworkfactory.cpp \ - services/tt-rss/ttrssserviceentrypoint.cpp \ - services/tt-rss/ttrssserviceroot.cpp - -mac { - OBJECTIVE_SOURCES += miscellaneous/disablewindowtabbing.mm -} - -FORMS += gui/dialogs/formabout.ui \ - gui/dialogs/formaddaccount.ui \ - gui/dialogs/formaddeditlabel.ui \ - gui/dialogs/formbackupdatabasesettings.ui \ - gui/dialogs/formdatabasecleanup.ui \ - gui/dialogs/formmain.ui \ - gui/dialogs/formmessagefiltersmanager.ui \ - gui/dialogs/formrestoredatabasesettings.ui \ - gui/dialogs/formsettings.ui \ - gui/dialogs/formupdate.ui \ - gui/notifications/notificationseditor.ui \ - gui/notifications/singlenotificationeditor.ui \ - gui/reusable/networkproxydetails.ui \ - gui/newspaperpreviewer.ui \ - gui/reusable/searchtextwidget.ui \ - gui/settings/settingsbrowsermail.ui \ - gui/settings/settingsdatabase.ui \ - gui/settings/settingsdownloads.ui \ - gui/settings/settingsfeedsmessages.ui \ - gui/settings/settingsgeneral.ui \ - gui/settings/settingsgui.ui \ - gui/settings/settingslocalization.ui \ - gui/settings/settingsnodejs.ui \ - gui/settings/settingsnotifications.ui \ - gui/settings/settingsshortcuts.ui \ - gui/toolbars/toolbareditor.ui \ - network-web/downloaditem.ui \ - network-web/downloadmanager.ui \ - services/abstract/gui/authenticationdetails.ui \ - services/abstract/gui/formaccountdetails.ui \ - services/abstract/gui/formcategorydetails.ui \ - services/abstract/gui/formfeeddetails.ui \ - services/feedly/gui/feedlyaccountdetails.ui \ - services/gmail/gui/formaddeditemail.ui \ - services/gmail/gui/formdownloadattachment.ui \ - services/gmail/gui/gmailaccountdetails.ui \ - services/greader/gui/greaderaccountdetails.ui \ - services/owncloud/gui/owncloudaccountdetails.ui \ - services/reddit/gui/redditaccountdetails.ui \ - services/standard/gui/formstandardimportexport.ui \ - services/standard/gui/standardfeeddetails.ui \ - services/tt-rss/gui/formttrssnote.ui \ - services/tt-rss/gui/ttrssaccountdetails.ui \ - services/tt-rss/gui/ttrssfeeddetails.ui - - -equals(USE_WEBENGINE, true) { - HEADERS += gui/reusable/locationlineedit.h \ - gui/webviewer.h \ - gui/webbrowser.h \ - gui/reusable/discoverfeedsbutton.h \ - network-web/googlesuggest.h \ - network-web/webpage.h - - SOURCES += gui/reusable/locationlineedit.cpp \ - gui/webviewer.cpp \ - gui/webbrowser.cpp \ - gui/reusable/discoverfeedsbutton.cpp \ - network-web/googlesuggest.cpp \ - network-web/webpage.cpp - - # Add AdBlock sources. - HEADERS += \ - network-web/adblock/adblockdialog.h \ - network-web/adblock/adblockicon.h \ - network-web/adblock/adblockmanager.h \ - network-web/adblock/adblockurlinterceptor.h \ - network-web/adblock/adblockrequestinfo.h \ - network-web/urlinterceptor.h \ - network-web/networkurlinterceptor.h - - SOURCES += \ - network-web/adblock/adblockdialog.cpp \ - network-web/adblock/adblockicon.cpp \ - network-web/adblock/adblockmanager.cpp \ - network-web/adblock/adblockurlinterceptor.cpp \ - network-web/adblock/adblockrequestinfo.cpp \ - network-web/networkurlinterceptor.cpp - - FORMS += \ - network-web/adblock/adblockdialog.ui -} -else { - HEADERS += gui/messagetextbrowser.h \ - gui/messagebrowser.h - SOURCES += gui/messagetextbrowser.cpp \ - gui/messagebrowser.cpp -} - -# Add mimesis. -SOURCES += $$files(3rd-party/mimesis/*.cpp, false) -HEADERS += $$files(3rd-party/mimesis/*.hpp, false) - -# Add boolinq. -HEADERS += $$files(3rd-party/boolinq/*.h, false) - -# Add SimpleCrypt. -SOURCES += $$files(3rd-party/sc/*.cpp, false) -HEADERS += $$files(3rd-party/sc/*.h, false) - - -INCLUDEPATH += $$PWD/. \ - $$PWD/gui \ - $$PWD/gui/dialogs \ - $$PWD/gui/reusable \ - $$PWD/gui/toolbars \ - $$PWD/gui/notifications \ - $$PWD/dynamic-shortcuts - -TRANSLATIONS += $$files($$PWD/../../localization/rssguard_*.ts, false) \ - $$files($$PWD/../../localization/qtbase_*.ts, false) - -load(uic) -uic.commands -= -no-stringliteral - -TR_EXCLUDE += $(QTDIR) - -# Create new "make lupdate" target. -lupdate.target = lupdate -lupdate.commands = lupdate -no-obsolete -pro $$shell_quote($$shell_path($$PWD/librssguard.pro)) -ts $$shell_quote($$shell_path($$PWD/../../localization/rssguard_en.ts)) - -QMAKE_EXTRA_TARGETS += lupdate - -# Make sure QM translations are nerated. -qtPrepareTool(LRELEASE, lrelease) { - message($$MSG_PREFIX: Running: \"$$LRELEASE\" -compress $$TRANSLATIONS) - system($$LRELEASE -compress $$TRANSLATIONS) -} - -mac { - IDENTIFIER = $$APP_REVERSE_NAME - CONFIG -= app_bundle - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8 - LIBS += -framework AppKit -} diff --git a/src/librssguard/miscellaneous/application.cpp b/src/librssguard/miscellaneous/application.cpp index b4a10a292..4b67cabd5 100644 --- a/src/librssguard/miscellaneous/application.cpp +++ b/src/librssguard/miscellaneous/application.cpp @@ -31,7 +31,7 @@ #include #include -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) #include #include #endif @@ -91,7 +91,7 @@ Application::Application(const QString& id, int& argc, char** argv) connect(this, &Application::commitDataRequest, this, &Application::onCommitData); connect(this, &Application::saveStateRequest, this, &Application::onSaveState); -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QString app_dir = QString::fromLocal8Bit(qgetenv("APPDIR")); if (!app_dir.isEmpty()) { @@ -623,7 +623,7 @@ void Application::showMessagesNumber(int unread_messages, bool any_feed_has_unre m_trayIcon->setNumber(unread_messages, any_feed_has_unread_messages); } -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QDBusMessage signal = QDBusMessage::createSignal(QSL("/"), QSL("com.canonical.Unity.LauncherEntry"), QSL("Update")); diff --git a/src/librssguard/miscellaneous/iconfactory.cpp b/src/librssguard/miscellaneous/iconfactory.cpp index 8b0190437..5cbda1d49 100644 --- a/src/librssguard/miscellaneous/iconfactory.cpp +++ b/src/librssguard/miscellaneous/iconfactory.cpp @@ -92,7 +92,7 @@ void IconFactory::loadCurrentIconTheme() { if (installed_themes.contains(theme_name_from_settings)) { // Desired icon theme is installed and can be loaded. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) if (theme_name_from_settings.isEmpty()) { qDebugNN << LOGSEC_GUI << "Loading default system icon theme."; } @@ -108,7 +108,7 @@ void IconFactory::loadCurrentIconTheme() { else { // Desired icon theme is not currently available. // Activate "default" or "no" icon theme instead. -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) qWarningNN << "Icon theme" << QUOTE_W_SPACE(theme_name_from_settings) << "cannot be loaded because it is not installed. Activating \"no\" icon theme."; diff --git a/src/librssguard/miscellaneous/settings.cpp b/src/librssguard/miscellaneous/settings.cpp index b1e5935e8..787947879 100644 --- a/src/librssguard/miscellaneous/settings.cpp +++ b/src/librssguard/miscellaneous/settings.cpp @@ -491,8 +491,8 @@ SettingsProperties Settings::determineProperties() { else { // We will use PORTABLE settings only and only if it is available and NON-PORTABLE // settings was not initialized before. -#if defined(Q_OS_LINUX) || defined (Q_OS_ANDROID) || defined (Q_OS_MACOSOS) - // DO NOT use portable settings for Linux, it is really not used on that platform. +#if defined(Q_OS_UNIX) + // DO NOT use portable settings for *nix, it is really not used on that platform. const bool will_we_use_portable_settings = false; #else const QString exe_path = qApp->applicationDirPath(); diff --git a/src/librssguard/miscellaneous/systemfactory.cpp b/src/librssguard/miscellaneous/systemfactory.cpp index 6f4598a77..db2321b5d 100644 --- a/src/librssguard/miscellaneous/systemfactory.cpp +++ b/src/librssguard/miscellaneous/systemfactory.cpp @@ -58,8 +58,8 @@ SystemFactory::AutoStartStatus SystemFactory::autoStartStatus() const { else { return AutoStartStatus::Disabled; } -#elif defined(Q_OS_LINUX) - // Use proper freedesktop.org way to auto-start the application on Linux. +#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) + // Use proper freedesktop.org way to auto-start the application. // INFO: http://standards.freedesktop.org/autostart-spec/latest/ const QString desktop_file_location = autostartDesktopFileLocation(); @@ -86,7 +86,7 @@ SystemFactory::AutoStartStatus SystemFactory::autoStartStatus() const { #endif } -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QString SystemFactory::autostartDesktopFileLocation() const { const QString xdg_config_path(qgetenv("XDG_CONFIG_HOME")); QString desktop_file_location; @@ -136,7 +136,7 @@ bool SystemFactory::setAutoStartStatus(AutoStartStatus new_status) { default: return false; } -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) // Note that we expect here that no other program uses // "rssguard.desktop" desktop file. const QString destination_file = autostartDesktopFileLocation(); diff --git a/src/librssguard/miscellaneous/systemfactory.h b/src/librssguard/miscellaneous/systemfactory.h index e32b4af6c..3048e6705 100644 --- a/src/librssguard/miscellaneous/systemfactory.h +++ b/src/librssguard/miscellaneous/systemfactory.h @@ -55,7 +55,7 @@ class SystemFactory : public QObject { // new status failed. bool setAutoStartStatus(AutoStartStatus new_status); -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) // Returns standard location where auto-start .desktop files // should be placed. QString autostartDesktopFileLocation() const; diff --git a/src/librssguard/network-web/webfactory.cpp b/src/librssguard/network-web/webfactory.cpp index ee08d7f59..c26dbabea 100644 --- a/src/librssguard/network-web/webfactory.cpp +++ b/src/librssguard/network-web/webfactory.cpp @@ -306,7 +306,7 @@ void WebFactory::createMenu(QMenu* menu) { actions << createEngineSettingsAction(tr("Plugins enabled"), QWebEngineSettings::WebAttribute::PluginsEnabled); actions << createEngineSettingsAction(tr("Fullscreen enabled"), QWebEngineSettings::WebAttribute::FullScreenSupportEnabled); -#if !defined(Q_OS_LINUX) +#if !defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) actions << createEngineSettingsAction(tr("Screen capture enabled"), QWebEngineSettings::WebAttribute::ScreenCaptureEnabled); actions << createEngineSettingsAction(tr("WebGL enabled"), QWebEngineSettings::WebAttribute::WebGLEnabled); actions << createEngineSettingsAction(tr("Accelerate 2D canvas"), QWebEngineSettings::WebAttribute::Accelerated2dCanvasEnabled); diff --git a/src/librssguard/services/reddit/gui/formeditredditaccount.h b/src/librssguard/services/reddit/gui/formeditredditaccount.h index 51618a790..7811bd19a 100644 --- a/src/librssguard/services/reddit/gui/formeditredditaccount.h +++ b/src/librssguard/services/reddit/gui/formeditredditaccount.h @@ -1,7 +1,7 @@ // For license of this file, see /LICENSE.md. -#ifndef FORMEDITINOREADERACCOUNT_H -#define FORMEDITINOREADERACCOUNT_H +#ifndef FORMEDITREDDITACCOUNT_H +#define FORMEDITREDDITACCOUNT_H #include "services/abstract/gui/formaccountdetails.h" @@ -26,4 +26,4 @@ class FormEditRedditAccount : public FormAccountDetails { RedditAccountDetails* m_details; }; -#endif // FORMEDITINOREADERACCOUNT_H +#endif // FORMEDITREDDITACCOUNT_H diff --git a/src/rssguard/CMakeLists.txt b/src/rssguard/CMakeLists.txt new file mode 100644 index 000000000..c3f906751 --- /dev/null +++ b/src/rssguard/CMakeLists.txt @@ -0,0 +1,87 @@ +if(WIN32) + enable_language("RC") + add_executable(app main.cpp ${CMAKE_BINARY_DIR}/rssguard.rc) + set_property(TARGET app PROPERTY WIN32_EXECUTABLE true) +else() + add_executable(app main.cpp) +endif() + +target_compile_definitions(app PRIVATE RSSGUARD_DLLSPEC=Q_DECL_IMPORT) +set_target_properties(app PROPERTIES OUTPUT_NAME ${CMAKE_PROJECT_NAME}) + +target_include_directories(app PUBLIC + ${CMAKE_BINARY_DIR}/src/librssguard/rssguard_autogen/include +) + +target_link_libraries(app PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets + rssguard +) + +if(QT_VERSION_MAJOR EQUAL 6) + target_link_libraries(app PUBLIC + Qt::Core5Compat + ) +endif() + +if(APPLE) + target_compile_options(app PUBLIC -mmacosx-version-min=10.10) + target_link_options(app PUBLIC -mmacosx-version-min=10.10) + set_target_properties(app PROPERTIES + MACOSX_BUNDLE FALSE + ) +elseif(WIN32) + target_link_libraries(app PUBLIC + Shell32.lib + odbc32 + ) +endif() + +if(WIN32) + install(TARGETS app DESTINATION .) + install(FILES ${CMAKE_SOURCE_DIR}/resources/graphics/${CMAKE_PROJECT_NAME}.ico + DESTINATION . + ) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources/scripts/redist/ + DESTINATION . + FILES_MATCHING PATTERN "*.dll" + ) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources/scripts/clang-format + DESTINATION . + FILES_MATCHING PATTERN "*.exe" + ) +elseif(OS2) + install(TARGETS app DESTINATION .) +elseif(UNIX AND NOT APPLE AND NOT ANDROID) + include (GNUInstallDirs) + install(TARGETS app + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + install(FILES ${CMAKE_SOURCE_DIR}/resources/desktop/${APP_REVERSE_NAME}.desktop + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications + ) + install(FILES ${CMAKE_SOURCE_DIR}/resources/desktop/${APP_REVERSE_NAME}.appdata.xml + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo + ) + install(FILES ${CMAKE_SOURCE_DIR}/resources/graphics/${CMAKE_PROJECT_NAME}.png + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps + ) +elseif(APPLE) + install(TARGETS app + DESTINATION Contents/MacOS + ) + install(FILES ${CMAKE_SOURCE_DIR}/resources/macosx/${CMAKE_PROJECT_NAME}.icns + DESTINATION Contents/Resources + ) + install(FILES + ${CMAKE_SOURCE_DIR}/resources/macosx/Info.plist.in + ${CMAKE_BINARY_DIR}/Info.plist + DESTINATION Contents + ) + file(WRITE PkgInfo "APPL????") + install(FILES PkgInfo + DESTINATION Contents + ) +endif() diff --git a/src/rssguard/main.cpp b/src/rssguard/main.cpp index 740b58fdc..55cff7c7e 100644 --- a/src/rssguard/main.cpp +++ b/src/rssguard/main.cpp @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) { QApplication::setAttribute(Qt::ApplicationAttribute::AA_EnableHighDpiScaling); #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) QApplication::setDesktopFileName(APP_DESKTOP_ENTRY_FILE); #endif diff --git a/src/rssguard/rssguard.pro b/src/rssguard/rssguard.pro deleted file mode 100644 index 3ccf57e6f..000000000 --- a/src/rssguard/rssguard.pro +++ /dev/null @@ -1,64 +0,0 @@ -TEMPLATE = app -TARGET = rssguard - -MSG_PREFIX = "rssguard" -APP_TYPE = "executable" - -include(../../pri/vars.pri) - -isEmpty(PREFIX) { - message($$MSG_PREFIX: PREFIX variable is not set. This might indicate error.) - - win32|os2|android { - PREFIX = $$OUT_PWD/app - } - - mac { - PREFIX = $$quote($$OUT_PWD/$${APP_NAME}.app) - } - - unix:!mac:!android { - PREFIX = $$OUT_PWD/AppDir/usr - } -} - -include(../../pri/defs.pri) - -message($$MSG_PREFIX: Current directory \"$$PWD\".) -message($$MSG_PREFIX: Shadow copy build directory \"$$OUT_PWD\".) -message($$MSG_PREFIX: $$APP_NAME version is: \"$$APP_VERSION\".) -message($$MSG_PREFIX: Detected Qt version: \"$$QT_VERSION\".) -message($$MSG_PREFIX: Build destination directory: \"$$DESTDIR\".) -message($$MSG_PREFIX: Prefix directory: \"$$PREFIX\".) -message($$MSG_PREFIX: Build revision: \"$$APP_REVISION\".) - -include(../../pri/build_opts.pri) - -DEFINES *= RSSGUARD_DLLSPEC=Q_DECL_IMPORT -SOURCES += main.cpp -INCLUDEPATH += $$PWD/../librssguard \ - $$PWD/../librssguard/gui \ - $$PWD/../librssguard/gui/reusable \ - $$OUT_PWD/../librssguard \ - $$OUT_PWD/../librssguard/ui - -DEPENDPATH += $$PWD/../librssguard - -win32: LIBS += -L$$OUT_PWD/../librssguard/ -llibrssguard -mac: LIBS += -L$$OUT_PWD/../librssguard/ -lrssguard -unix:!mac: LIBS += $$OUT_PWD/../librssguard/librssguard.so -os2: LIBS += -L$$OUT_PWD/../librssguard/ -lrssguard - -win32 { - # Prepare files for NSIS. - SEDREPLACE = "| ForEach-Object { $_ -replace '@APP_VERSION@', '$$APP_VERSION' -replace '@APP_REVISION@', '$$APP_REVISION' -replace '@APP_NAME@', '$$APP_NAME' -replace '@APP_LOW_NAME@', '$$APP_LOW_NAME' -replace '@EXE_NAME@', '$${APP_LOW_NAME}.exe' -replace '@PWD@', '$$replace(PWD, /, \\\\)' -replace '@OUT_PWD@', '$$replace(OUT_PWD, /, \\\\)' }" - message($$MSG_PREFIX: Sed replace string: \"$$SEDREPLACE\") - - FULLSEDCMD = "powershell -Command \"cat $$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.definitions.nsh.in)) $$SEDREPLACE | Out-File $$shell_path($$shell_quote($$OUT_PWD/NSIS.definitions.nsh))\"" - message($$MSG_PREFIX: Full powershell command: $$FULLSEDCMD) - - system(xcopy /Y $$shell_path($$shell_quote($$PWD/../../resources/nsis/NSIS.template.in)) $$shell_path($$shell_quote($$OUT_PWD/))) - system($$FULLSEDCMD) -} - -include(../../pri/install.pri)