mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-01 02:48:05 +01:00
Better default NODE_PATH values especially for linux and macosx.
This commit is contained in:
parent
158203ce2c
commit
e07c695b95
@ -28,13 +28,7 @@ gcc|g++|clang* {
|
||||
|
||||
msvc {
|
||||
QMAKE_CXXFLAGS *= /std:c++17
|
||||
|
||||
# Link statically to runtime.
|
||||
# QMAKE_CXXFLAGS_RELEASE *= /MT
|
||||
# QMAKE_CXXFLAGS_DEBUG *= /MTd
|
||||
# QMAKE_CXXFLAGS -= /MDd -MDd
|
||||
# QMAKE_CXXFLAGS_RELEASE -= /MDd -MDd
|
||||
# QMAKE_CXXFLAGS_DEBUG -= /MDd -MDd
|
||||
QMAKE_CXXFLAGS *= /wd5240
|
||||
}
|
||||
|
||||
clang* {
|
||||
|
@ -30,7 +30,7 @@
|
||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="3.9.2" date="2021-05-18"/>
|
||||
<release version="3.9.2" date="2021-05-19"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.0">
|
||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||
|
@ -298,21 +298,19 @@ QProcess* AdBlockManager::restartServer(int port) {
|
||||
proc->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
||||
|
||||
auto pe = proc->processEnvironment();
|
||||
QString node_path =
|
||||
QString default_node_path =
|
||||
#if defined(Q_OS_WIN)
|
||||
pe.value(QSL("APPDATA")) +
|
||||
pe.value(QSL("APPDATA")) + QDir::separator() + QSL("npm") + QDir::separator() + QSL("node_modules");
|
||||
#elif defined(Q_OS_LINUX)
|
||||
QSL("/usr/local/lib/node_modules") +
|
||||
QSL("/usr/lib/node_modules");
|
||||
#elif defined(Q_OS_MACOS)
|
||||
QSL("/usr/local/lib/node_modules");
|
||||
#else
|
||||
QDir::toNativeSeparators(IOFactory::getSystemFolder(QStandardPaths::StandardLocation::GenericDataLocation)) +
|
||||
QSL("");
|
||||
#endif
|
||||
QDir::separator() +
|
||||
QSL("npm") +
|
||||
QDir::separator() +
|
||||
QSL("node_modules");
|
||||
|
||||
if (!pe.contains(QSL("NODE_PATH"))) {
|
||||
pe.insert(QSL("NODE_PATH"), node_path);
|
||||
if (!pe.contains(QSL("NODE_PATH")) && !default_node_path.isEmpty()) {
|
||||
pe.insert(QSL("NODE_PATH"), default_node_path);
|
||||
}
|
||||
|
||||
proc->setProcessEnvironment(pe);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "miscellaneous/application.h"
|
||||
#include "services/abstract/label.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <QtPlatformHeaders/QWindowsWindowFunctions>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user