port build system to cmake (#615)

This commit is contained in:
jan Anja 2022-01-31 13:11:48 +05:00 committed by GitHub
parent 5bd740cc4b
commit d17bdc5223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 946 additions and 1052 deletions

View File

@ -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 }}

171
CMakeLists.txt Normal file
View File

@ -0,0 +1,171 @@
cmake_minimum_required(VERSION 3.9.0)
project(rssguard VERSION 4.1.2 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
option(USE_WEBENGINE "Use QtWebEngine for embedded web browser" ON)
option(UPDATE_TRANSLATIONS "Call lupdate to update translation files from source" OFF)
option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GCC/Clang only)" OFF)
option(REVISION_FROM_GIT "Get revision using `git rev-parse`" OFF)
set(FEEDLY_CLIENT_ID "" CACHE STRING "Feedly client ID")
set(FEEDLY_CLIENT_SECRET "" CACHE STRING "Feedly client secret")
set(GMAIL_CLIENT_ID "" CACHE STRING "GMail client ID")
set(GMAIL_CLIENT_SECRET "" CACHE STRING "GMail client secret")
set(INOREADER_CLIENT_ID "" CACHE STRING "Inoreader client ID")
set(INOREADER_CLIENT_SECRET "" CACHE STRING "Inoreader client secret")
find_package(QT NAMES Qt6 Qt5 REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS
Core
Gui
LinguistTools
Network
Qml
Sql
Widgets
Xml
)
if(QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
endif()
if(USE_WEBENGINE)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WebEngineWidgets REQUIRED)
add_compile_definitions(USE_WEBENGINE)
endif()
if(NOT OS2)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Multimedia REQUIRED)
macro(qt_add_resources)
qt_add_big_resources(${ARGN})
endmacro()
endif()
if(UNIX AND NOT APPLE AND NOT ANDROID)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
endif()
if(NOT FEEDLY_CLIENT_ID STREQUAL "" AND NOT FEEDLY_CLIENT_SECRET STREQUAL "")
add_compile_definitions(
FEEDLY_OFFICIAL_SUPPORT
FEEDLY_CLIENT_ID="${FEEDLY_CLIENT_ID}"
FEEDLY_CLIENT_SECRET="${FEEDLY_CLIENT_SECRET}"
)
else()
message(STATUS "Feedly client ID/secret variables are not set. Disabling official support")
endif()
if(NOT GMAIL_CLIENT_ID STREQUAL "" AND NOT GMAIL_CLIENT_SECRET STREQUAL "")
add_compile_definitions(
GMAIL_OFFICIAL_SUPPORT
GMAIL_CLIENT_ID="${GMAIL_CLIENT_ID}"
GMAIL_CLIENT_SECRET="${GMAIL_CLIENT_SECRET}"
)
else()
message(STATUS "GMail client ID/secret variables are not set. Disabling official support")
endif()
if(NOT INOREADER_CLIENT_ID STREQUAL "" AND NOT INOREADER_CLIENT_SECRET STREQUAL "")
add_compile_definitions(
INOREADER_OFFICIAL_SUPPORT
INOREADER_CLIENT_ID="${INOREADER_CLIENT_ID}"
INOREADER_CLIENT_SECRET="${INOREADER_CLIENT_SECRET}"
)
else()
message(STATUS "Inoreader client ID/secret variables are not set. Disabling official support")
endif()
set(APP_NAME "RSS Guard")
set(APP_AUTHOR "")
set(APP_COPYRIGHT "")
set(APP_REVERSE_NAME "com.github.rssguard")
set(TYPEINFO "????")
if(REVISION_FROM_GIT AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND "git rev-parse --short HEAD"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE APP_REVISION
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
set(APP_REVISION "")
endif()
if(NOT USE_WEBENGINE)
set(APP_REVISION "${APP_REVISION}-nowebengine")
endif()
add_compile_definitions(
APP_AUTHOR="Martin Rotter"
APP_DONATE_URL="https://martinrotter.github.io/donate"
APP_EMAIL="rotter.martinos@gmail.com"
APP_LONG_NAME="${APP_NAME} ${CMAKE_PROJECT_VERSION}"
APP_LOW_H_NAME=".${CMAKE_PROJECT_NAME}"
APP_LOW_NAME="${CMAKE_PROJECT_NAME}"
APP_NAME="${APP_NAME}"
APP_REVISION="${APP_REVISON}"
APP_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}"
APP_SYSTEM_VERSION="${CMAKE_SYSTEM_PROCESSOR}"
APP_URL="https://github.com/martinrotter/rssguard"
APP_URL_DOCUMENTATION="https://github.com/martinrotter/rssguard/blob/master/resources/docs/Documentation.md"
APP_URL_ISSUES="https://github.com/martinrotter/rssguard/issues"
APP_URL_ISSUES_NEW="https://github.com/martinrotter/rssguard/issues/new"
APP_USERAGENT="${APP_NAME}/${CMAKE_PROJECT_VERSION}"
APP_VERSION="${CMAKE_PROJECT_VERSION}"
QT_USE_QSTRINGBUILDER
QT_USE_FAST_CONCATENATION
QT_USE_FAST_OPERATOR_PLUS
UNICODE _UNICODE
)
if(UNIX)
add_compile_options(-fPIC)
endif()
if(APPLE)
add_compile_options(-stdlib=libc++)
add_link_options(-stdlib=libc++)
endif()
if(${FORCE_COLORED_OUTPUT})
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-fcolor-diagnostics)
endif()
endif()
if(WIN32)
configure_file(
resources/rssguard.rc.in
${CMAKE_BINARY_DIR}/rssguard.rc
NEWLINE_STYLE WIN32
)
configure_file(
resources/nsis/NSIS.definitions.nsh.in
${CMAKE_BINARY_DIR}/NSIS.definitions.nsh
)
file(COPY resources/nsis/NSIS.template.in DESTINATION ${CMAKE_BINARY_DIR})
file(COPY resources/graphics/${CMAKE_PROJECT_NAME}.ico DESTINATION ${CMAKE_BINARY_DIR})
elseif(APPLE)
configure_file(
resources/macosx/Info.plist.in
${CMAKE_BINARY_DIR}/Info.plist
)
endif()
add_subdirectory(localization)
add_subdirectory(src/librssguard)
add_subdirectory(src/rssguard)

View File

@ -1,62 +0,0 @@
#################################################################
#
# For license of this file, see <project-root-folder>/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" "<build-folder\src\rssguard\app\*" command.
#
# Authors and contributors:
# - Martin Rotter (project leader),
# - Elbert Pol (OS/2-related contributions).
#
#################################################################
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = librssguard rssguard
librssguard.subdir = src/librssguard
rssguard.subdir = src/rssguard
rssguard.depends = libtextosaurus

View File

@ -0,0 +1,58 @@
set(TS_FILES
qtbase_cs.ts
qtbase_da.ts
qtbase_de.ts
qtbase_es.ts
qtbase_fi.ts
qtbase_fr.ts
qtbase_he.ts
qtbase_it.ts
qtbase_ja.ts
qtbase_lt.ts
qtbase_pl.ts
qtbase_pt_BR.ts
qtbase_pt_PT.ts
qtbase_ru.ts
qtbase_sv.ts
qtbase_uk.ts
qtbase_zh_CN.ts
qtbase_zh_TW.ts
rssguard_cs.ts
rssguard_da.ts
rssguard_de.ts
rssguard_en_GB.ts
rssguard_en.ts
rssguard_es.ts
rssguard_fi.ts
rssguard_fr.ts
rssguard_gl.ts
rssguard_he.ts
rssguard_id.ts
rssguard_it.ts
rssguard_ja.ts
rssguard_lt.ts
rssguard_nl.ts
rssguard_pl.ts
rssguard_pt_BR.ts
rssguard_pt_PT.ts
rssguard_ru.ts
rssguard_sv.ts
rssguard_uk.ts
rssguard_zh_CN.ts
rssguard_zh_TW.ts
)
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
if(UPDATE_TRANSLATIONS)
qt_create_translation(QM_FILES
"${CMAKE_SOURCE_DIR}/src" ${TS_FILES}
OPTIONS -no-obsolete
)
else()
qt_add_translation(QM_FILES
${TS_FILES}
OPTIONS -compress
)
endif()
add_custom_target(update_qm DEPENDS ${QM_FILES})

View File

@ -1,96 +0,0 @@
CONFIG *= c++1z warn_on
!os2 {
CONFIG *= resources_big
}
CONFIG -= debug_and_release
DEFINES *= QT_USE_QSTRINGBUILDER QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_PLUS UNICODE _UNICODE
VERSION = $$APP_VERSION
QT *= core gui widgets sql network xml qml
!os2 {
QT *= multimedia
}
greaterThan(QT_MAJOR_VERSION, 5) {
QT *= core5compat
}
unix:!mac:!android {
QT *= dbus
}
equals(USE_WEBENGINE, true) {
message($$MSG_PREFIX: Application will be compiled WITH QtWebEngine module.)
QT *= webenginewidgets
DEFINES *= USE_WEBENGINE
}
else {
message($$MSG_PREFIX: Application will be compiled without QtWebEngine module. Some features will be disabled.)
}
gcc|g++|clang* {
QMAKE_CXXFLAGS *= -std=c++17
}
msvc {
QMAKE_CXXFLAGS *= /std:c++17
QMAKE_CXXFLAGS *= /wd5240
}
clang* {
DEFINES *= CLANG=1
}
# Setup specific compiler options.
CONFIG(release, debug|release) {
message($$MSG_PREFIX: Building in "release" mode.)
gcc:QMAKE_CXXFLAGS_RELEASE -= -O2
clang:QMAKE_CXXFLAGS_RELEASE -= -O2
gcc:QMAKE_CXXFLAGS_RELEASE *= -O3
clang:QMAKE_CXXFLAGS_RELEASE *= -O3
}
else {
message($$MSG_PREFIX: Building in "debug" mode.)
DEFINES *= DEBUG=1
gcc:QMAKE_CXXFLAGS_DEBUG *= -Wall
clang:QMAKE_CXXFLAGS_DEBUG *= -Wall
msvc:QMAKE_CXXFLAGS_DEBUG *= /W4 /wd4127
msvc:QMAKE_CXXFLAGS_WARN_ON = ""
msvc:QMAKE_CXXFLAGS_DEBUG -= /W3
msvc:QMAKE_CXXFLAGS -= /W3
}
MOC_DIR = $$OUT_PWD/moc
RCC_DIR = $$OUT_PWD/rcc
UI_DIR = $$OUT_PWD/ui
mac:qtHaveModule(macextras) {
QT *= macextras
}
# Make needed tweaks for RC file getting generated on Windows.
win32 {
RC_ICONS = ../../resources/graphics/rssguard.ico
QMAKE_TARGET_COMPANY = $$APP_AUTHOR
QMAKE_TARGET_DESCRIPTION = $$APP_NAME
QMAKE_TARGET_COPYRIGHT = $$APP_COPYRIGHT
QMAKE_TARGET_PRODUCT = $$APP_NAME
# Additionally link against Shell32.
LIBS *= Shell32.lib
static {
LIBS *= -lodbc32
}
}
static {
message($$MSG_PREFIX: Building static version of library.)
}
else {
message($$MSG_PREFIX: Building shared version of library.)
}

View File

@ -1,36 +0,0 @@
# Custom definitions.
DEFINES *= APP_VERSION='"\\\"$$APP_VERSION\\\""'
DEFINES *= APP_NAME='"\\\"$$APP_NAME\\\""'
DEFINES *= APP_LOW_NAME='"\\\"$$APP_LOW_NAME\\\""'
DEFINES *= APP_LOW_H_NAME='"\\\"$$APP_LOW_H_NAME\\\""'
DEFINES *= APP_LONG_NAME='"\\\"$$APP_LONG_NAME\\\""'
DEFINES *= APP_AUTHOR='"\\\"$$APP_AUTHOR\\\""'
DEFINES *= APP_EMAIL='"\\\"$$APP_EMAIL\\\""'
DEFINES *= APP_URL='"\\\"$$APP_URL\\\""'
DEFINES *= APP_URL_ISSUES='"\\\"$$APP_URL_ISSUES\\\""'
DEFINES *= APP_URL_ISSUES_NEW='"\\\"$$APP_URL_ISSUES_NEW\\\""'
DEFINES *= APP_URL_DOCUMENTATION='"\\\"$$APP_URL_DOCUMENTATION\\\""'
DEFINES *= APP_USERAGENT='"\\\"$$APP_USERAGENT\\\""'
DEFINES *= APP_DONATE_URL='"\\\"$$APP_DONATE_URL\\\""'
DEFINES *= APP_SYSTEM_NAME='"\\\"$$QMAKE_HOST.os\\\""'
DEFINES *= APP_SYSTEM_VERSION='"\\\"$$QMAKE_HOST.arch\\\""'
DISTFILES += ../../resources/scripts/uncrustify/uncrustify.cfg
CODECFORTR = UTF-8
CODECFORSRC = UTF-8
exists($PWD/../../.git) {
APP_REVISION = $$system(git rev-parse --short HEAD)
}
isEmpty(APP_REVISION) {
APP_REVISION = ""
}
equals(USE_WEBENGINE, false) {
# Add extra revision naming when building without webengine.
APP_REVISION = $$sprintf('%1-%2', $$APP_REVISION, nowebengine)
}
DEFINES *= APP_REVISION='"\\\"$$APP_REVISION\\\""'

View File

@ -1,119 +0,0 @@
# Setup all public headers, this needs to be kept in
# sync with truly used headers.
INSTALL_HEADERS = \
../librssguard/services/abstract/accountcheckmodel.h \
../librssguard/services/abstract/cacheforserviceroot.h \
../librssguard/services/abstract/category.h \
../librssguard/services/abstract/feed.h \
../librssguard/services/abstract/gui/authenticationdetails.h \
../librssguard/services/abstract/gui/formfeeddetails.h \
../librssguard/services/abstract/importantnode.h \
../librssguard/services/abstract/label.h \
../librssguard/services/abstract/labelsnode.h \
../librssguard/services/abstract/recyclebin.h \
../librssguard/services/abstract/rootitem.h \
../librssguard/services/abstract/serviceentrypoint.h \
../librssguard/services/abstract/serviceroot.h
# Install all files on Windows.
win32 {
target.path = $$PREFIX
lib.files = $$OUT_PWD/../librssguard/librssguard.dll $$OUT_PWD/../librssguard/librssguard.lib
lib.path = $$PREFIX
lib.CONFIG = no_check_exist
redist10.files = ../../resources/scripts/redist/*
redist10.path = $$PREFIX
clng.files = ../../resources/scripts/clang-format
clng.path = $$PREFIX
INSTALLS += target lib clng redist10
INSTALL_HEADERS_PREFIX = $$quote($$PREFIX/include/librssguard)
}
# Install all files on OS/2.
os2 {
target.path = $$PREFIX
lib.files = $$OUT_PWD/../librssguard/rssguard.dll $$OUT_PWD/../librssguard/rssguard.lib
lib.path = $$PREFIX
lib.CONFIG = no_check_exist
INSTALLS += target lib
INSTALL_HEADERS_PREFIX = $$quote($$PREFIX/include/librssguard)
}
# Install all files on Linux.
unix:!mac:!android {
target.path = $$PREFIX/bin
desktop_file.files = ../../resources/desktop/$${APP_REVERSE_NAME}.desktop
desktop_file.path = $$quote($$PREFIX/share/applications/)
appdata.files = ../../resources/desktop/$${APP_REVERSE_NAME}.appdata.xml
appdata.path = $$quote($$PREFIX/share/metainfo/)
lib.files = $$OUT_PWD/../librssguard/librssguard.so
lib.path = $$quote($$PREFIX/lib/)
lib.CONFIG = no_check_exist
desktop_icon.files = ../../resources/graphics/$${TARGET}.png
desktop_icon.path = $$quote($$PREFIX/share/icons/hicolor/512x512/apps/)
INSTALLS += target lib desktop_file desktop_icon appdata
INSTALL_HEADERS_PREFIX = $$quote($$PREFIX/include/librssguard)
}
mac {
IDENTIFIER = $$APP_REVERSE_NAME
CONFIG -= app_bundle
ICON = ../../resources/macosx/$${TARGET}.icns
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10
LIBS += -framework AppKit
target.path = $$quote($$PREFIX/Contents/MacOS/)
lib.files = $$OUT_PWD/../librssguard/librssguard.dylib
lib.path = $$quote($$PREFIX/Contents/MacOS/)
lib.CONFIG = no_check_exist
# Install app icon.
icns_icon.files = ../../resources/macosx/$${TARGET}.icns
icns_icon.path = $$quote($$PREFIX/Contents/Resources/)
# Install Info.plist.
info_plist.files = ../../resources/macosx/Info.plist.in
info_plist.path = $$quote($$PREFIX/Contents/)
# Process the just installed Info.plist.
info_plist2.extra = @sed -e "s,@EXECUTABLE@,$$TARGET,g" -e "s,@SHORT_VERSION@,$$APP_VERSION,g" -e "s,@APP_NAME@,\"$$APP_NAME\",g" -e "s,@ICON@,$$basename(ICON),g" -e "s,@TYPEINFO@,"????",g" $$shell_quote($$PREFIX/Contents/Info.plist.in) > $$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)})
}

View File

@ -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.)
}

View File

@ -9,11 +9,11 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<string>@CMAKE_PROJECT_NAME@</string>
<key>CFBundleGetInfoString</key>
<string>@EXECUTABLE@ (C) 2011-2016 Martin Rotter</string>
<string>@CMAKE_PROJECT_NAME@ (C) 2011-2016 Martin Rotter</string>
<key>CFBundleIconFile</key>
<string>@ICON@</string>
<string>@CMAKE_PROJECT_NAME@.icns</string>
<key>CFBundleIdentifier</key>
<string>org.martinrotter.rssguard</string>
<key>CFBundleInfoDictionaryVersion</key>
@ -23,7 +23,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@SHORT_VERSION@</string>
<string>@CMAKE_PROJECT_VERSION@</string>
<key>CFBundleSignature</key>
<string>@TYPEINFO@</string>
<key>CFBundleVersion</key>

View File

@ -1,11 +1,11 @@
; For license of this file, see <project-root-folder>/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"
!define BINARY_TREE "@CMAKE_BINARY_DIR@\app"

32
resources/rssguard.rc.in Normal file
View File

@ -0,0 +1,32 @@
TYPELIB "versioninfo.rc"
IDI_APPLICATION 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 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
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
END

View File

@ -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

View File

@ -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
ls

View File

@ -0,0 +1,548 @@
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
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
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()
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()

View File

@ -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
}

View File

@ -1,7 +1,7 @@
// For license of this file, see <project-root-folder>/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

View File

@ -0,0 +1,91 @@
# TODO: fix RC file
#if(WIN32)
#enable_language("RC")
#add_executable(app main.cpp ${CMAKE_BINARY_DIR}/rssguard.rc)
#else()
#add_executable(app main.cpp)
#endif()
add_executable(app main.cpp)
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()

View File

@ -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)