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 {
|
msvc {
|
||||||
QMAKE_CXXFLAGS *= /std:c++17
|
QMAKE_CXXFLAGS *= /std:c++17
|
||||||
|
QMAKE_CXXFLAGS *= /wd5240
|
||||||
# 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clang* {
|
clang* {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="3.9.2" date="2021-05-18"/>
|
<release version="3.9.2" date="2021-05-19"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
@ -298,21 +298,19 @@ QProcess* AdBlockManager::restartServer(int port) {
|
|||||||
proc->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
proc->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
||||||
|
|
||||||
auto pe = proc->processEnvironment();
|
auto pe = proc->processEnvironment();
|
||||||
QString node_path =
|
QString default_node_path =
|
||||||
#if defined(Q_OS_WIN)
|
#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)
|
#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
|
#else
|
||||||
QDir::toNativeSeparators(IOFactory::getSystemFolder(QStandardPaths::StandardLocation::GenericDataLocation)) +
|
QSL("");
|
||||||
#endif
|
#endif
|
||||||
QDir::separator() +
|
|
||||||
QSL("npm") +
|
|
||||||
QDir::separator() +
|
|
||||||
QSL("node_modules");
|
|
||||||
|
|
||||||
if (!pe.contains(QSL("NODE_PATH"))) {
|
if (!pe.contains(QSL("NODE_PATH")) && !default_node_path.isEmpty()) {
|
||||||
pe.insert(QSL("NODE_PATH"), node_path);
|
pe.insert(QSL("NODE_PATH"), default_node_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
proc->setProcessEnvironment(pe);
|
proc->setProcessEnvironment(pe);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "miscellaneous/application.h"
|
#include "miscellaneous/application.h"
|
||||||
#include "services/abstract/label.h"
|
#include "services/abstract/label.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined(Q_OS_WIN)
|
||||||
#include <QtPlatformHeaders/QWindowsWindowFunctions>
|
#include <QtPlatformHeaders/QWindowsWindowFunctions>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user