mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Improvements (#1658)
* Restart Servial Device, if write error occurred. * Fix typos * Fix FOUND_USER command * Use SUDO_USER in postinst * Align install_pr with new package names * Package named arm64 instead of aarch64 * Update Change log * Fix to have the architecture resolved * All tls plugin directory for Qt6 --------- Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
parent
cd1046ac1f
commit
2e0cc9cfa8
16
.github/workflows/qt5_6.yml
vendored
16
.github/workflows/qt5_6.yml
vendored
@ -41,13 +41,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (x86_64), architecture: [ amd64, linux/amd64 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (x86_64), architecture: [ amd64, linux/amd64 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 1/ZERO), architecture: [ armv6, linux/arm/v5 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 2/3/4), architecture: [ armv7, linux/arm/v7 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2/3/4), architecture: [ armv7, linux/arm/v7 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Generic AARCH64), architecture: [ aarch64, linux/arm64 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (Generic AARCH64), architecture: [ aarch64, linux/arm64 ] }
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (x86_64), architecture: [ amd64, linux/amd64 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (x86_64), architecture: [ amd64, linux/amd64 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 1/ZERO), architecture: [ armv6, linux/arm/v5 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Raspberry Pi 2/3/4), architecture: [ armv7, linux/arm/v7 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2/3/4), architecture: [ armv7, linux/arm/v7 ] },
|
||||
{ distribution: debian, codename: buster, description: Debian Buster (Generic AARCH64), architecture: [ arm64, linux/arm64 ] },
|
||||
{ distribution: debian, codename: bullseye, description: Debian Bullseye (Generic AARCH64), architecture: [ arm64, linux/arm64 ] }
|
||||
]
|
||||
isQt5:
|
||||
- ${{ inputs.qt_version == '5' }}
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
platform: rpi
|
||||
- os.architecture[0]: armv7
|
||||
platform: rpi
|
||||
- os.architecture[0]: aarch64
|
||||
- os.architecture[0]: arm64
|
||||
platform: amlogic
|
||||
exclude:
|
||||
- isQt5: true
|
||||
|
@ -33,6 +33,7 @@ Note: The wizard will configure an APIv2 capable bridge always with Entertainmen
|
||||
### Changed
|
||||
|
||||
- Updated misleading error messages in case Hyperion is not able to support the suspend/lock feature (#1622)
|
||||
- Restart Serial Device, if write error occurred
|
||||
- ws281x - Update logic to identify is user is admin and disable device configuration if not (#1621)
|
||||
- Hide Hyperion from the Dock on macOS, as all features can be accessed from the menubar - Thanks @Rastafabisch
|
||||
|
||||
|
@ -1,68 +1,70 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></h3>
|
||||
<div class="introd">
|
||||
<h4 data-i18n="update_label_intro">Overview about all available Hyperion versions. On top you could update or downgrade your version of Hyperion whenever you want. Sorted from newest to oldest</h4>
|
||||
<h4> At the moment the respective install button is disabled. Development is still ongoing here. </h4>
|
||||
<hr />
|
||||
</div>
|
||||
<h4 id="update_currver"></h4>
|
||||
<hr>
|
||||
<div class="col-lg-12" id="versionlist">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></h3>
|
||||
<div class="introd">
|
||||
<h4 data-i18n="update_label_intro">Overview about all available Hyperion versions. On top you could update or downgrade your version of Hyperion whenever you want. Sorted from newest to oldest</h4>
|
||||
<h4> At the moment the respective install button is disabled. Development is still ongoing here. </h4>
|
||||
<hr />
|
||||
</div>
|
||||
<h4 id="update_currver"></h4>
|
||||
<hr>
|
||||
<div class="col-lg-12" id="versionlist">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready( function(error) {
|
||||
performTranslation();
|
||||
getReleases(function (callback){
|
||||
$(document).ready(function (error) {
|
||||
performTranslation();
|
||||
getReleases(function (callback) {
|
||||
|
||||
if(callback)
|
||||
{
|
||||
var matches = 0;
|
||||
for (var key in window.gitHubVersionList)
|
||||
{
|
||||
if (callback) {
|
||||
var matches = 0;
|
||||
for (var key in window.gitHubVersionList) {
|
||||
|
||||
if(window.gitHubVersionList[key].name == null || window.gitHubVersionList[key].tag_name.includes('rc') || (window.serverConfig.general.watchedVersionBranch == "Stable" && (window.gitHubVersionList[key].tag_name.includes('beta') || window.gitHubVersionList[key].tag_name.includes('alpha'))) || (window.serverConfig.general.watchedVersionBranch == "Beta" && window.gitHubVersionList[key].tag_name.includes('alpha')))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var danger;
|
||||
var type;
|
||||
if (window.gitHubVersionList[key].name == null ||
|
||||
window.gitHubVersionList[key].tag_name.includes('rc') ||
|
||||
(window.serverConfig.general.watchedVersionBranch == "Stable" &&
|
||||
(window.gitHubVersionList[key].tag_name.includes('beta') ||
|
||||
window.gitHubVersionList[key].tag_name.includes('alpha')
|
||||
)
|
||||
) ||
|
||||
(window.serverConfig.general.watchedVersionBranch == "Beta"
|
||||
&& window.gitHubVersionList[key].tag_name.includes('Alpha')
|
||||
)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (window.gitHubVersionList[key].tag_name.includes('beta'))
|
||||
{
|
||||
danger = 'warning';
|
||||
type = 'Beta';
|
||||
}
|
||||
else if (window.gitHubVersionList[key].tag_name.includes('alpha'))
|
||||
{
|
||||
danger = 'danger';
|
||||
type = 'Alpha';
|
||||
}
|
||||
else
|
||||
{
|
||||
danger = 'default';
|
||||
type = 'Stable';
|
||||
}
|
||||
var danger;
|
||||
var type;
|
||||
|
||||
matches++;
|
||||
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-'+ danger +'"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V'+window.gitHubVersionList[key].tag_name+'</div><div class="panel-body"><p><span style="font-weight:bold;">'+$.i18n('update_label_type') + '</span> ' + type + '</p><p><span id="desc" style="font-weight:bold;">'+$.i18n('update_label_description')+'</span> '+DOMPurify.sanitize(marked.parse(window.gitHubVersionList[key].body))+'</p><hr><a class="btn btn-primary" href="'+ window.gitHubVersionList[key].html_url +'" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">'+$.i18n('update_button_changelog')+'</span></a><button type="button" class="btn btn-warning pull-right" ' + (window.gitHubVersionList[key].tag_name == window.currentVersion ? "disabled":"disabled") + '><i class="fa fa-download fa-fw"></i>'+$.i18n('update_button_install')+'</button></div></div></div>');
|
||||
}
|
||||
$('#update_currver').append($.i18n('update_versreminder', currentVersion));
|
||||
if (window.gitHubVersionList[key].tag_name.includes('beta')) {
|
||||
danger = 'warning';
|
||||
type = 'Beta';
|
||||
}
|
||||
else if (window.gitHubVersionList[key].tag_name.includes('alpha')) {
|
||||
danger = 'danger';
|
||||
type = 'Alpha';
|
||||
}
|
||||
else {
|
||||
danger = 'default';
|
||||
type = 'Stable';
|
||||
}
|
||||
|
||||
if (matches == 0)
|
||||
$('#versionlist').append($.i18n('update_no_updates_for_branch'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#versionlist').append($.i18n('update_error_getting_versions'));
|
||||
}
|
||||
});
|
||||
removeOverlay();
|
||||
});
|
||||
matches++;
|
||||
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-' + danger + '"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V' + window.gitHubVersionList[key].tag_name + '</div><div class="panel-body"><p><span style="font-weight:bold;">' + $.i18n('update_label_type') + '</span> ' + type + '</p><p><span id="desc" style="font-weight:bold;">' + $.i18n('update_label_description') + '</span> ' + DOMPurify.sanitize(marked.parse(window.gitHubVersionList[key].body)) + '</p><hr><a class="btn btn-primary" href="' + window.gitHubVersionList[key].html_url + '" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">' + $.i18n('update_button_changelog') + '</span></a><button type="button" class="btn btn-warning pull-right" ' + (window.gitHubVersionList[key].tag_name == window.currentVersion ? "disabled" : "disabled") + '><i class="fa fa-download fa-fw"></i>' + $.i18n('update_button_install') + '</button></div></div></div>');
|
||||
}
|
||||
$('#update_currver').append($.i18n('update_versreminder', currentVersion));
|
||||
|
||||
if (matches == 0)
|
||||
$('#versionlist').append($.i18n('update_no_updates_for_branch'));
|
||||
}
|
||||
else {
|
||||
$('#versionlist').append($.i18n('update_error_getting_versions'));
|
||||
}
|
||||
});
|
||||
removeOverlay();
|
||||
});
|
||||
</script>
|
||||
|
@ -126,7 +126,7 @@ do
|
||||
shift
|
||||
BUILD_PLATFORM=$1
|
||||
;;
|
||||
--qt5)
|
||||
--qt5)
|
||||
BUILD_WITH_QT5=true
|
||||
;;
|
||||
-l|--local)
|
||||
@ -214,7 +214,7 @@ if [ $ARCHITECTURE != $CURRENT_ARCHITECTURE ]; then
|
||||
ENTRYPOINT_OPTION=
|
||||
|
||||
if [ $CURRENT_ARCHITECTURE != "amd64" ]; then
|
||||
echo "---> Emulation builds can only be executed on linux/amd64, linux/x86_64 platforms, current architecture is ${CURRENT_ARCHITECTURE}"
|
||||
echo "---> Emulation builds can only be executed on linux/amd64, linux/x86_64 platforms, current architecture is ${CURRENT_ARCHITECTURE}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
@ -12,6 +12,11 @@ hasPython3=$?
|
||||
type python > /dev/null 2> /dev/null
|
||||
hasPython2=$?
|
||||
|
||||
DISTRIBUTION="debian"
|
||||
CODENAME="bullseye"
|
||||
ARCHITECTURE=""
|
||||
WITH_QT5=false
|
||||
|
||||
BASE_PATH='.';
|
||||
|
||||
if [[ "${hasWget}" -ne 0 ]] && [[ "${hasCurl}" -ne 0 ]]; then
|
||||
@ -38,19 +43,20 @@ function request_call() {
|
||||
fi
|
||||
}
|
||||
|
||||
while getopts ":c:t:m:r:" opt; do
|
||||
while getopts ":a:c:r:t:5" opt; do
|
||||
case "$opt" in
|
||||
t) PR_TOKEN=$OPTARG ;;
|
||||
r) run_id=$OPTARG ;;
|
||||
m) ARCHITECTURE=$OPTARG ;;
|
||||
a) ARCHITECTURE=$OPTARG ;;
|
||||
c) CONFIGDIR=$OPTARG ;;
|
||||
r) run_id=$OPTARG ;;
|
||||
t) PR_TOKEN=$OPTARG ;;
|
||||
5) WITH_QT5=true ;;
|
||||
esac
|
||||
done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
# Check for a command line argument (PR number)
|
||||
if [ "$1" == "" ] || [ $# -gt 1 ] || [ -z ${PR_TOKEN} ]; then
|
||||
echo "Usage: $0 -t <git_token> -m <architecture> -r <run_id> -c <hyperion config directory> <PR_NUMBER>" >&2
|
||||
echo "Usage: $0 -t <git_token> -a <architecture> -r <run_id> -c <hyperion config directory> <PR_NUMBER>" >&2
|
||||
exit 1
|
||||
else
|
||||
pr_number="$1"
|
||||
@ -68,30 +74,39 @@ if [[ -z ${ARCHITECTURE} ]]; then
|
||||
fi
|
||||
|
||||
#Test if multiarchitecture setup, i.e. user-space is 32bit
|
||||
if [ ${ARCHITECTURE} == "aarch64" ]; then
|
||||
if [[ "${ARCHITECTURE}" == "aarch64" || "${ARCHITECTURE}" == "arm64" ]]; then
|
||||
ARCHITECTURE="arm64"
|
||||
USER_ARCHITECTURE=$ARCHITECTURE
|
||||
IS_V7L=`cat /proc/$$/maps |grep -m1 -c v7l`
|
||||
if [ $IS_V7L -ne 0 ]; then
|
||||
USER_ARCHITECTURE="armv7l"
|
||||
USER_ARCHITECTURE="armv7"
|
||||
else
|
||||
IS_V6L=`cat /proc/$$/maps |grep -m1 -c v6l`
|
||||
if [ $IS_V6L -ne 0 ]; then
|
||||
USER_ARCHITECTURE="armv6l"
|
||||
USER_ARCHITECTURE="armv6"
|
||||
fi
|
||||
fi
|
||||
if [ $ARCHITECTURE != $USER_ARCHITECTURE ]; then
|
||||
echo "---> Identified kernel target architecture: $ARCHITECTURE"
|
||||
echo "---> Identified user space target architecture: $USER_ARCHITECTURE"
|
||||
ARCHITECTURE=$USER_ARCHITECTURE
|
||||
fi
|
||||
else
|
||||
ARCHITECTURE=${ARCHITECTURE//x86_/amd}
|
||||
fi
|
||||
|
||||
echo 'armv6l armv7l aarch64 x86_64' | grep -qw ${ARCHITECTURE}
|
||||
echo 'armv6l armv7l arm64 amd64' | grep -qw ${ARCHITECTURE}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "---> Critical Error: Target architecture $ARCHITECTURE is unknown -> abort"
|
||||
exit 1
|
||||
else
|
||||
echo "---> Download Pull Request for identified runtime architecture: $ARCHITECTURE"
|
||||
PACKAGE="${ARCHITECTURE}"
|
||||
QTVERSION="5"
|
||||
if [ ${WITH_QT5} == false ]; then
|
||||
QTVERSION="6"
|
||||
PACKAGE="${PACKAGE}_qt6"
|
||||
fi
|
||||
|
||||
echo "---> Download package for identified runtime architecture: $ARCHITECTURE and Qt$QTVERSION"
|
||||
fi
|
||||
|
||||
# Determine if PR number exists
|
||||
@ -153,14 +168,25 @@ fi
|
||||
|
||||
# Get archive_download_url from workflow
|
||||
artifacts=$(request_call "$api_url/actions/runs/$run_id/artifacts")
|
||||
archive_download_url=$(echo "$artifacts" | tr '\r\n' ' ' | ${pythonCmd} -c """
|
||||
import json,sys
|
||||
|
||||
PACKAGE_NAME=$(echo "$artifacts" | tr '\r\n' ' ' | ${pythonCmd} -c """
|
||||
import json,sys, re
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
for i in data['artifacts']:
|
||||
if i['name'] == '"$ARCHITECTURE"':
|
||||
print(i['archive_download_url'])
|
||||
break
|
||||
if re.match('.*{}$'.format(re.escape('$PACKAGE')), i['name']):
|
||||
print(i['name'])
|
||||
break
|
||||
""" 2>/dev/null)
|
||||
|
||||
archive_download_url=$(echo "$artifacts" | tr '\r\n' ' ' | ${pythonCmd} -c """
|
||||
import json,sys, re
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
for i in data['artifacts']:
|
||||
if re.match('.*{}$'.format(re.escape('$PACKAGE')), i['name']):
|
||||
print(i['archive_download_url'])
|
||||
break
|
||||
""" 2>/dev/null)
|
||||
|
||||
if [ -z "$archive_download_url" ]; then
|
||||
@ -171,7 +197,7 @@ if [ -z "$archive_download_url" ]; then
|
||||
fi
|
||||
|
||||
# Download packed PR artifact
|
||||
echo "---> Downloading the Pull Request #$pr_number"
|
||||
echo "---> Downloading Pull Request #$pr_number, package: $PACKAGE_NAME"
|
||||
if [ $hasCurl -eq 0 ]; then
|
||||
curl -skH "Authorization: token ${PR_TOKEN}" -o $BASE_PATH/temp.zip -L --get $archive_download_url
|
||||
elif [ $hasWget -eq 0 ]; then
|
||||
|
@ -46,7 +46,7 @@ macro(DeployMacOS TARGET)
|
||||
MESSAGE("The following unresolved dependencies were discovered: ${unresolved_deps}")
|
||||
endif()
|
||||
|
||||
foreach(PLUGIN "platforms" "sqldrivers" "imageformats")
|
||||
foreach(PLUGIN "platforms" "sqldrivers" "imageformats" "tls")
|
||||
if(EXISTS ${PLUGIN_DIR}/${PLUGIN})
|
||||
file(GLOB files "${PLUGIN_DIR}/${PLUGIN}/*")
|
||||
foreach(file ${files})
|
||||
@ -230,7 +230,7 @@ macro(DeployLinux TARGET)
|
||||
|
||||
# Copy Qt plugins to 'share/hyperion/lib'
|
||||
if (QT_PLUGINS_DIR)
|
||||
foreach(PLUGIN "platforms" "sqldrivers" "imageformats")
|
||||
foreach(PLUGIN "platforms" "sqldrivers" "imageformats" "tls")
|
||||
if (EXISTS ${QT_PLUGINS_DIR}/${PLUGIN})
|
||||
file(GLOB files "${QT_PLUGINS_DIR}/${PLUGIN}/*.so")
|
||||
foreach(file ${files})
|
||||
|
@ -47,7 +47,7 @@ if [ "$IS_UPGRADE" = false ]; then
|
||||
then
|
||||
# systemd
|
||||
echo "---> init deamon: systemd"
|
||||
FOUND_USR=`who | grep -o -m1 '^\w*\b'` || "root"
|
||||
FOUND_USR=${SUDO_USER:-root}
|
||||
install_file /usr/share/hyperion/service/hyperion.systemd /etc/systemd/system/hyperion@.service
|
||||
systemctl enable hyperion"@${FOUND_USR}".service
|
||||
START_MSG="--> systemctl start hyperion for user ${FOUND_USR}"
|
||||
|
@ -360,7 +360,7 @@ int LedDevice::rewriteLEDs()
|
||||
|
||||
int LedDevice::writeBlack(int numberOfWrites)
|
||||
{
|
||||
Debug(_log, "Set LED strip to black to switch of LEDs");
|
||||
Debug(_log, "Set LED strip to black to switch LEDs off");
|
||||
return writeColor(ColorRgb::BLACK, numberOfWrites);
|
||||
}
|
||||
|
||||
|
@ -1301,7 +1301,7 @@ QJsonObject LedDevicePhilipsHueBridge::discover(const QJsonObject& /*params*/)
|
||||
);
|
||||
#else
|
||||
QString discoveryMethod("ssdp");
|
||||
deviceList = discover();
|
||||
deviceList = discoverSsdp();
|
||||
#endif
|
||||
|
||||
devicesDiscovered.insert("discoveryMethod", discoveryMethod);
|
||||
|
@ -185,7 +185,7 @@ bool ProviderRs232::tryOpen(int delayAfterConnect_ms)
|
||||
}
|
||||
else
|
||||
{
|
||||
QString errortext = QString("Invalid serial device name: %1 %2!").arg(_deviceName, _location);
|
||||
QString errortext = QString("Invalid serial device: %1 %2!").arg(_deviceName, _location);
|
||||
this->setInError( errortext );
|
||||
return false;
|
||||
}
|
||||
@ -237,9 +237,9 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
|
||||
{
|
||||
if (!_rs232Port.waitForBytesWritten(WRITE_TIMEOUT.count()))
|
||||
{
|
||||
if ( _rs232Port.error() == QSerialPort::TimeoutError )
|
||||
if (_rs232Port.error() == QSerialPort::TimeoutError)
|
||||
{
|
||||
Debug(_log, "Timeout after %dms: %d frames already dropped", WRITE_TIMEOUT.count(), _frameDropCounter);
|
||||
Debug(_log, "Timeout after %dms: %d frames already dropped, Rs232 SerialPortError [%d]: %s", WRITE_TIMEOUT.count(), _frameDropCounter, _rs232Port.error(), QSTRING_CSTR(_rs232Port.errorString()));
|
||||
|
||||
++_frameDropCounter;
|
||||
|
||||
@ -258,10 +258,16 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setInError( QString ("Rs232 SerialPortError: %1").arg(_rs232Port.errorString()) );
|
||||
this->setInError( QString ("Error writing data to %1, Error: %2").arg(_deviceName).arg(_rs232Port.error()));
|
||||
rc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
Info(_log, "Try restarting the device %s after error occured...", QSTRING_CSTR(_activeDeviceType));
|
||||
emit enable();
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user