mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Corrections (#1662)
* Address "SyntaxWarning: invalid escape sequence" * Correcttypo for CEC Blue button * Fix enablement when already open * Icons path corrected * Correct path and simplify command * Have enum class generalised * Address compile warnings * Update tinkerforce led_strip * Address compiler waring * Fix Install/Uninstall desktop- and icon file handling * Address "fatal: detected dubious ownership in repository" * platform fix * Test "fatal: detected dubious ownership in repository" * Update "fatal: detected dubious ownership in repository" * Update to Protobuf 25.1 * Update cmds with sudo * Update SEDU default baud rates * Replace deprecated Py_NoSiteFlag * Correct default config --------- Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
@@ -105,26 +105,28 @@ ln -fs $BINSP/scripts/updateHyperionUser.sh $BINTP/updateHyperionUser 2>/dev/nul
|
||||
if [ "$IS_UPGRADE" = false ]; then
|
||||
if [ ! -z "${DISPLAY}" ] || [ ! -z "${WAYLAND_DISPLAY}" ] || [ ! -z "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
echo "---> Install Hyperion desktop icons"
|
||||
cp -R /usr/share/hyperion/icons /usr/share/icons/hicolor 2>/dev/null
|
||||
cp -R /usr/share/hyperion/icons/* /usr/share/icons/hicolor/ 2>/dev/null
|
||||
cp /usr/share/hyperion/desktop/hyperion.metainfo.xml /usr/share/metainfo 2>/dev/null
|
||||
|
||||
if hash desktop-file-install 2>/dev/null; then
|
||||
if [ -x "$(command -v desktop-file-install )" ]; then
|
||||
desktop-file-install /usr/share/hyperion/desktop/hyperion.desktop 2>/dev/null
|
||||
else
|
||||
# On some systems this directory doesn't exist by default
|
||||
mkdir -p /usr/share/applications
|
||||
cp /usr/share/hyperion/desktop/hyperion.desktop /usr/share/applications
|
||||
# Update application icons
|
||||
if hash update-desktop-database 2>/dev/null; then
|
||||
update-desktop-database -q /usr/share/applications
|
||||
update-desktop-database -q /usr/share/icons/
|
||||
fi
|
||||
fi
|
||||
|
||||
# update desktop-database (if exists)
|
||||
if [ -x "$(command -v update-desktop-database)" ]; then
|
||||
update-desktop-database -q /usr/share/applications
|
||||
update-desktop-database -q /usr/share/icons/hicolor
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# cleanup desktop icons
|
||||
# cleanup desktop and icons
|
||||
rm -r /usr/share/hyperion/desktop 2>/dev/null
|
||||
rm -r /usr/share/hyperion/icons 2>/dev/null
|
||||
|
||||
#Check, if dtparam=spi=on is in place
|
||||
if [ $CPU_RPI -eq 1 ]; then
|
||||
|
@@ -59,29 +59,18 @@ fi
|
||||
# In case we don't use a service kill all instances
|
||||
killall hyperiond 2> /dev/null
|
||||
|
||||
echo "---> Remove Hyperion desktop icons"
|
||||
# remove desktop/appstream file
|
||||
rm -v /usr/share/applications/hyperion* 2> /dev/null
|
||||
rm -v /usr/share/metainfo/hyperion* 2> /dev/null
|
||||
|
||||
# update desktop-database (if exists)
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
update-desktop-database -q /usr/share/applications
|
||||
fi
|
||||
|
||||
# remove Hyperion icons
|
||||
for i in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96 128x128 192x192 256x256 512x512; do
|
||||
rm -v usr/share/icons/hicolor/$i/apps/hyperion.png 2> /dev/null
|
||||
done
|
||||
rm -v /usr/share/icons/hicolor/*/apps/hyperion.png 2> /dev/null
|
||||
|
||||
# update icon-cache
|
||||
if [ -e /usr/share/icons/hicolor/icon-theme.cache ] ; then
|
||||
# touch it, just in case we cannot find the binary...
|
||||
touch --no-create /usr/share/icons/hicolor
|
||||
if hash gtk-update-icon-cache 2>/dev/null; then
|
||||
gtk-update-icon-cache /usr/share/icons/hicolor
|
||||
fi
|
||||
# ignore errors
|
||||
true
|
||||
# update desktop-database (if exists)
|
||||
if [ -x "$(command -v update-desktop-database)" ]; then
|
||||
update-desktop-database -q /usr/share/applications
|
||||
update-desktop-database -q /usr/share/icons/hicolor/
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user