mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
[HotFix] Release 2.0.0-alpha.11
This commit is contained in:
@@ -100,9 +100,16 @@ SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonly
|
||||
QJsonObject newGeneralConfig = dbConfig["general"].toObject();
|
||||
|
||||
semver::version BUILD_VERSION(HYPERION_VERSION);
|
||||
|
||||
if (!BUILD_VERSION.isValid())
|
||||
{
|
||||
Error(_log, "Current Hyperion version [%s] is invalid. Exiting...", BUILD_VERSION.getVersion().c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( _configVersion > BUILD_VERSION )
|
||||
{
|
||||
Error(_log, "Database version [%s] is greater that current Hyperion version [%s]", _configVersion.getVersion().c_str(), BUILD_VERSION.getVersion().c_str());
|
||||
Error(_log, "Database version [%s] is greater than current Hyperion version [%s]", _configVersion.getVersion().c_str(), BUILD_VERSION.getVersion().c_str());
|
||||
// TODO: Remove version checking and Settingsmanager from components' constructor to be able to stop hyperion.
|
||||
}
|
||||
else
|
||||
|
@@ -3,11 +3,13 @@
|
||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
||||
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||
add_compile_definitions(PYTHON_VERSION_MAJOR=${Python3_VERSION_MAJOR})
|
||||
add_compile_definitions(PYTHON_VERSION_MINOR=${Python3_VERSION_MINOR})
|
||||
else()
|
||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
||||
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
||||
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||
add_definitions(-DPYTHON_VERSION_MAJOR=${PYTHON_VERSION_MAJOR})
|
||||
add_definitions(-DPYTHON_VERSION_MINOR=${PYTHON_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
# Define the current source locations
|
||||
|
@@ -11,6 +11,9 @@
|
||||
// modules to init
|
||||
#include <effectengine/EffectModule.h>
|
||||
|
||||
// Required to determine the cmake options
|
||||
#include <HyperionConfig.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <stdexcept>
|
||||
#endif
|
||||
@@ -23,12 +26,13 @@ PythonInit::PythonInit()
|
||||
// register modules
|
||||
EffectModule::registerHyperionExtensionModule();
|
||||
|
||||
#if defined(ENABLE_DEPLOY_DEPENDENCIES)
|
||||
// Set Program name
|
||||
Py_SetProgramName(L"Hyperion");
|
||||
|
||||
// set Python module path when exists
|
||||
QString py_patch = QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR));
|
||||
QString py_file = QDir::cleanPath(qApp->applicationDirPath() + "/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR) + ".zip");
|
||||
QString py_patch = QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python" + STRINGIFY(PYTHON_VERSION_MAJOR) + "." + STRINGIFY(PYTHON_VERSION_MINOR));
|
||||
QString py_file = QDir::cleanPath(qApp->applicationDirPath() + "/python" + STRINGIFY(PYTHON_VERSION_MAJOR) + STRINGIFY(PYTHON_VERSION_MINOR) + ".zip");
|
||||
|
||||
if (QFile(py_file).exists() || QDir(py_patch).exists())
|
||||
{
|
||||
@@ -40,10 +44,11 @@ PythonInit::PythonInit()
|
||||
}
|
||||
else if (QDir(py_patch).exists())
|
||||
{
|
||||
Py_SetPythonHome(Py_DecodeLocale(py_file.toLatin1().data(), nullptr));
|
||||
Py_SetPythonHome(Py_DecodeLocale(py_patch.toLatin1().data(), nullptr));
|
||||
Py_SetPath(Py_DecodeLocale(py_patch.toLatin1().data(), nullptr));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// init Python
|
||||
Debug(Logger::getInstance("DAEMON"), "Initializing Python interpreter");
|
||||
|
Reference in New Issue
Block a user