mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
[HotFix] Release 2.0.0-alpha.11
This commit is contained in:
parent
672354fb5c
commit
2c79656b4a
@ -57,6 +57,9 @@
|
|||||||
// Define to enable experimental features
|
// Define to enable experimental features
|
||||||
#cmakedefine ENABLE_EXPERIMENTAL
|
#cmakedefine ENABLE_EXPERIMENTAL
|
||||||
|
|
||||||
|
// Define to enable deploy dependencies to packages
|
||||||
|
#cmakedefine ENABLE_DEPLOY_DEPENDENCIES
|
||||||
|
|
||||||
// the hyperion build id string
|
// the hyperion build id string
|
||||||
#define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}"
|
#define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}"
|
||||||
#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}"
|
#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}"
|
||||||
|
@ -39,8 +39,7 @@ NET_IP=`hostname -I | cut -d " " -f1`
|
|||||||
# search for users in system, returns first entry
|
# search for users in system, returns first entry
|
||||||
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
|
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
|
||||||
|
|
||||||
start_msg=""
|
START_MSG=""
|
||||||
restart_msg=""
|
|
||||||
|
|
||||||
# service registration if no gui is present (only on initial installation and not upgrade)
|
# service registration if no gui is present (only on initial installation and not upgrade)
|
||||||
if [ "$IS_UPGRADE" = false ]; then
|
if [ "$IS_UPGRADE" = false ]; then
|
||||||
@ -53,34 +52,39 @@ if [ "$IS_UPGRADE" = false ]; then
|
|||||||
echo "---> init deamon: systemd"
|
echo "---> init deamon: systemd"
|
||||||
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
|
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
|
||||||
systemctl enable hyperion"@${FOUND_USR}".service
|
systemctl enable hyperion"@${FOUND_USR}".service
|
||||||
start_msg="--> systemctl start hyperion for user ${FOUND_USR}"
|
START_MSG="--> systemctl start hyperion for user ${FOUND_USR}"
|
||||||
systemctl start hyperion"@${FOUND_USR}"
|
systemctl start hyperion"@${FOUND_USR}"
|
||||||
elif [ -e /sbin/initctl ]
|
elif [ -e /sbin/initctl ]
|
||||||
then
|
then
|
||||||
# upstart
|
# upstart
|
||||||
echo "---> init deamon: upstart"
|
echo "---> init deamon: upstart"
|
||||||
install_file /usr/share/hyperion/service/hyperion.initctl /etc/init/hyperion.conf && initctl reload-configuration
|
install_file /usr/share/hyperion/service/hyperion.initctl /etc/init/hyperion.conf && initctl reload-configuration
|
||||||
start_msg="--> initctl start hyperion"
|
START_MSG="--> initctl start hyperion"
|
||||||
initctl start hyperion
|
initctl start hyperion
|
||||||
else
|
else
|
||||||
# sysV
|
# sysV
|
||||||
echo "---> init deamon: sysV"
|
echo "---> init deamon: sysV"
|
||||||
install_file /usr/share/hyperion/service/hyperion.init /etc/init.d/hyperion && chmod +x /etc/init.d/hyperion && update-rc.d hyperion defaults 98 02
|
install_file /usr/share/hyperion/service/hyperion.init /etc/init.d/hyperion && chmod +x /etc/init.d/hyperion && update-rc.d hyperion defaults 98 02
|
||||||
start_msg="---> service hyperion start"
|
START_MSG="---> service hyperion start"
|
||||||
service hyperion start
|
service hyperion start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#after registration cleanup service files
|
||||||
|
rm -r /usr/share/hyperion/service 2>/dev/null
|
||||||
else
|
else
|
||||||
STARTUP_MSG="echo ---> You can start Hyperion from your menu now"
|
STARTUP_MSG="echo ---> You can start Hyperion from your menu now"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [ -z "${DISPLAY}" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||||
|
#cleanup service files also on upgrade (non gui user)
|
||||||
|
rm -r /usr/share/hyperion/service 2>/dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#cleanup
|
|
||||||
rm -r /usr/share/hyperion/service
|
|
||||||
|
|
||||||
#link binarys and set exec bit
|
#link binarys and set exec bit
|
||||||
BINSP=/usr/share/hyperion
|
BINSP=/usr/share/hyperion
|
||||||
BINTP=/usr/bin
|
BINTP=/usr/bin
|
||||||
chmod +x -R $BINSP/bin
|
chmod +x -R $BINSP/bin $BINSP/scripts
|
||||||
ln -fs $BINSP/bin/hyperiond $BINTP/hyperiond
|
ln -fs $BINSP/bin/hyperiond $BINTP/hyperiond
|
||||||
ln -fs $BINSP/bin/hyperion-remote $BINTP/hyperion-remote
|
ln -fs $BINSP/bin/hyperion-remote $BINTP/hyperion-remote
|
||||||
ln -fs $BINSP/bin/hyperion-v4l2 $BINTP/hyperion-v4l2
|
ln -fs $BINSP/bin/hyperion-v4l2 $BINTP/hyperion-v4l2
|
||||||
@ -126,7 +130,7 @@ if [ $CPU_RPI -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${start_msg}
|
echo ${START_MSG}
|
||||||
|
|
||||||
echo "-----------------------------------------------------------------------------"
|
echo "-----------------------------------------------------------------------------"
|
||||||
if [ "$IS_UPGRADE" = true ]; then
|
if [ "$IS_UPGRADE" = true ]; then
|
||||||
|
@ -12,7 +12,7 @@ then
|
|||||||
then
|
then
|
||||||
echo "--> stop init deamon: systemd"
|
echo "--> stop init deamon: systemd"
|
||||||
# systemd
|
# systemd
|
||||||
systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" 2> /dev/null
|
systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
||||||
elif [ -e /sbin/initctl ]
|
elif [ -e /sbin/initctl ]
|
||||||
then
|
then
|
||||||
echo "--> stop init deamon: upstart"
|
echo "--> stop init deamon: upstart"
|
||||||
|
@ -24,11 +24,11 @@ if grep -m1 systemd /proc/1/comm > /dev/null
|
|||||||
then
|
then
|
||||||
echo "---> stop init deamon: systemd"
|
echo "---> stop init deamon: systemd"
|
||||||
# systemd
|
# systemd
|
||||||
$HYPERION_RUNNING && systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" 2> /dev/null
|
$HYPERION_RUNNING && systemctl stop hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" "hyperiond@root" "hyperion@root" 2> /dev/null
|
||||||
# disable user specific symlink
|
# disable user specific symlink
|
||||||
echo "---> Disable service and remove entry"
|
echo "---> Disable service and remove entry"
|
||||||
systemctl -q disable hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" 2> /dev/null
|
systemctl -q disable hyperion hyperiond"@${FOUND_USR}" hyperion"@${FOUND_USR}" 2> /dev/null
|
||||||
rm -v /etc/systemd/system/hyperion.service /etc/systemd/system/hyperiond@.service /etc/systemd/system/hyperion@.service 2>/dev/null
|
rm -v /etc/systemd/system/hyperion.service /etc/systemd/system/hyperiond@.service /etc/systemd/system/hyperion@.service 2> /dev/null
|
||||||
|
|
||||||
elif [ -e /sbin/initctl ]
|
elif [ -e /sbin/initctl ]
|
||||||
then
|
then
|
||||||
@ -43,8 +43,8 @@ then
|
|||||||
else
|
else
|
||||||
echo "---> stop init deamon: sysV"
|
echo "---> stop init deamon: sysV"
|
||||||
# sysV
|
# sysV
|
||||||
$HYPERION_RUNNING && service hyperiond stop 2>/dev/null
|
$HYPERION_RUNNING && service hyperiond stop 2> /dev/null
|
||||||
$HYPERION_RUNNING && service hyperion stop 2>/dev/null
|
$HYPERION_RUNNING && service hyperion stop 2> /dev/null
|
||||||
echo "---> Remove sysV service"
|
echo "---> Remove sysV service"
|
||||||
update-rc.d -f hyperion remove
|
update-rc.d -f hyperion remove
|
||||||
rm /etc/init.d/hyperion* 2>/dev/null
|
rm /etc/init.d/hyperion* 2>/dev/null
|
||||||
@ -56,8 +56,8 @@ killall hyperiond 2> /dev/null
|
|||||||
# delete desktop icons; desktop-file-edit is a workaround to hide the entry and delete it afterwards manual.
|
# delete desktop icons; desktop-file-edit is a workaround to hide the entry and delete it afterwards manual.
|
||||||
# TODO Better way for deletion and keep the desktop in sync without logout/login or desktop dependend cmds?
|
# TODO Better way for deletion and keep the desktop in sync without logout/login or desktop dependend cmds?
|
||||||
echo "---> Delete Hyperion desktop icons"
|
echo "---> Delete Hyperion desktop icons"
|
||||||
desktop-file-edit --set-key=NoDisplay --set-value=true /usr/share/applications/hyperiond.desktop 2>/dev/null
|
desktop-file-edit --set-key=NoDisplay --set-value=true /usr/share/applications/hyperiond.desktop 2> /dev/null
|
||||||
rm -v /usr/share/applications/hyperion* 2>/dev/null
|
rm -v /usr/share/applications/hyperion* 2> /dev/null
|
||||||
rm -rv /usr/share/pixmaps/hyperion 2>/dev/null
|
rm -rv /usr/share/pixmaps/hyperion 2> /dev/null
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -100,9 +100,16 @@ SettingsManager::SettingsManager(quint8 instance, QObject* parent, bool readonly
|
|||||||
QJsonObject newGeneralConfig = dbConfig["general"].toObject();
|
QJsonObject newGeneralConfig = dbConfig["general"].toObject();
|
||||||
|
|
||||||
semver::version BUILD_VERSION(HYPERION_VERSION);
|
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 )
|
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.
|
// TODO: Remove version checking and Settingsmanager from components' constructor to be able to stop hyperion.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
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()
|
else()
|
||||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
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}/..)
|
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()
|
endif()
|
||||||
|
|
||||||
# Define the current source locations
|
# Define the current source locations
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
// modules to init
|
// modules to init
|
||||||
#include <effectengine/EffectModule.h>
|
#include <effectengine/EffectModule.h>
|
||||||
|
|
||||||
|
// Required to determine the cmake options
|
||||||
|
#include <HyperionConfig.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#endif
|
#endif
|
||||||
@ -23,12 +26,13 @@ PythonInit::PythonInit()
|
|||||||
// register modules
|
// register modules
|
||||||
EffectModule::registerHyperionExtensionModule();
|
EffectModule::registerHyperionExtensionModule();
|
||||||
|
|
||||||
|
#if defined(ENABLE_DEPLOY_DEPENDENCIES)
|
||||||
// Set Program name
|
// Set Program name
|
||||||
Py_SetProgramName(L"Hyperion");
|
Py_SetProgramName(L"Hyperion");
|
||||||
|
|
||||||
// set Python module path when exists
|
// set Python module path when exists
|
||||||
QString py_patch = QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR));
|
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_MINOR) + ".zip");
|
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())
|
if (QFile(py_file).exists() || QDir(py_patch).exists())
|
||||||
{
|
{
|
||||||
@ -40,10 +44,11 @@ PythonInit::PythonInit()
|
|||||||
}
|
}
|
||||||
else if (QDir(py_patch).exists())
|
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));
|
Py_SetPath(Py_DecodeLocale(py_patch.toLatin1().data(), nullptr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// init Python
|
// init Python
|
||||||
Debug(Logger::getInstance("DAEMON"), "Initializing Python interpreter");
|
Debug(Logger::getInstance("DAEMON"), "Initializing Python interpreter");
|
||||||
|
Loading…
Reference in New Issue
Block a user