From 985746139b5eb23d8b8cc5c795c6a03d1f86e1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Thu, 17 Jun 2021 18:32:22 +0200 Subject: [PATCH] Fixed Makefile && install script for different platforms --- client-py3/full/linux/Makefile | 2 +- client-py3/full/linux/build-packages.sh | 2 +- client-py3/full/linux/installer-appimage-template.sh | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client-py3/full/linux/Makefile b/client-py3/full/linux/Makefile index f23ee94c..853f4955 100644 --- a/client-py3/full/linux/Makefile +++ b/client-py3/full/linux/Makefile @@ -72,6 +72,6 @@ endif # Generate the .desktop fixed for new path cat desktop/UDSClient.desktop | sed -e s/".usr.lib.UDSClient.UDSClient.py"/"\/usr\/bin\/UDSClient-$(VERSION)-$(DISTRO).AppImage"/g > $(DESTDIR)/UDSClient.desktop # And also, generater installer - cat installer-appimage-template.sh | sed -e s/"0.0.0"/"$(VERSION)"/g > $(DESTDIR)/installer.sh + cat installer-appimage-template.sh | sed -e s/"0.0.0"/"$(VERSION)"/g | sed -e s/x86_64/$(DISTRO)/g > $(DESTDIR)/installer.sh chmod 755 $(DESTDIR)/installer.sh tar czvf ../udsclient3-$(DISTRO)-$(VERSION).tar.gz -C $(DESTDIR) . diff --git a/client-py3/full/linux/build-packages.sh b/client-py3/full/linux/build-packages.sh index 08de5d18..375f4170 100755 --- a/client-py3/full/linux/build-packages.sh +++ b/client-py3/full/linux/build-packages.sh @@ -40,8 +40,8 @@ make DESTDIR=targz DISTRO=targz VERSION=${VERSION} install # And make FULL CLIENT .tar.gz for x86 and raspberry make DESTDIR=appimage DISTRO=x86_64 VERSION=${VERSION} build-appimage - make DESTDIR=appimage DISTRO=armhf VERSION=${VERSION} build-appimage +make DESTDIR=appimage DISTRO=i686 VERSION=${VERSION} build-appimage rpm --addsign ../*rpm diff --git a/client-py3/full/linux/installer-appimage-template.sh b/client-py3/full/linux/installer-appimage-template.sh index da0ac643..571ddee8 100644 --- a/client-py3/full/linux/installer-appimage-template.sh +++ b/client-py3/full/linux/installer-appimage-template.sh @@ -1,6 +1,12 @@ #!/bin/sh -echo "Installing UDSClient..." +# Check for root +if ! [ $(id -u) = 0 ]; then + echo "This script must be run as root" + exit 1 +fi + +echo "Installing UDSClient Portable..." cp UDSClient-0.0.0-x86_64.AppImage /usr/bin cp UDSClient.desktop /usr/share/applications