Change Q_OS_LINUX to Q_OS_UNIX (#616)
* change Q_OS_LINUX to Q_OS_UNIX
This is needed for BSD operating systems:
https://cgit.freebsd.org/ports/tree/net/rssguard/Makefile?id=865fc1ddb58052d38fc0f353ce70da4c7d643b79
8767b251da/net/rssguard/Makefile
* Update CMakeLists.txt
* Update Documentation.md
Co-authored-by: martinrotter <martinrotter@users.noreply.github.com>
This commit is contained in:
parent
efebb0199d
commit
a82a9eb5cf
@ -27,7 +27,7 @@
|
||||
# {FEEDLY,GMAIL,INOREADER}_CLIENT_SECRET - preconfigured OAuth cliend SECRET.
|
||||
#
|
||||
# Other information:
|
||||
# - supports Windows, Linux, macOS, OS/2, Android,
|
||||
# - 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,
|
||||
@ -38,13 +38,13 @@
|
||||
# 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
|
||||
# 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" "<build-folder\src\rssguard\app\*" command.
|
||||
#
|
||||
# Authors and contributors:
|
||||
# - Martin Rotter (project leader),
|
||||
# - Elbert Pol (OS/2-related contributions),
|
||||
# - CyberTailor (cmake-related contributions.
|
||||
# - Anna Vyalkova (cmake-related contributions).
|
||||
#
|
||||
#################################################################
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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 (*.*)"));
|
||||
|
@ -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);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <QSslSocket>
|
||||
#include <QTimer>
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
#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"));
|
||||
|
@ -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.";
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user