forked from shaba/openuds
Created portable udsclient using appimage
This commit is contained in:
parent
71242eba10
commit
594d431af7
4
client-py3/full/linux/.gitignore
vendored
4
client-py3/full/linux/.gitignore
vendored
@ -2,3 +2,7 @@
|
|||||||
/udsclient-[0-9]*.spec
|
/udsclient-[0-9]*.spec
|
||||||
/debian/udsclient
|
/debian/udsclient
|
||||||
/targz
|
/targz
|
||||||
|
/UDSClientDir
|
||||||
|
/UDSClient*.AppImage
|
||||||
|
/appimage*
|
||||||
|
/UDSClient.desktop
|
||||||
|
@ -46,8 +46,22 @@ endif
|
|||||||
ifeq ($(DISTRO),rh)
|
ifeq ($(DISTRO),rh)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# chmod 0755 $(BINDIR)/udsclient
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf $(LIBDIR)
|
rm -rf $(LIBDIR)
|
||||||
# rm -f $(BINDIR)/udsclient
|
# rm -f $(BINDIR)/udsclient
|
||||||
# rm -rf $(CFGDIR)
|
# rm -rf $(CFGDIR)
|
||||||
|
|
||||||
|
build-appimage:
|
||||||
|
cat udsclient-appimage.recipe | sed -e s/"version: 0.0.0"/"version: $(VERSION)"/g > appimage.recipe
|
||||||
|
appimage-builder --recipe appimage.recipe
|
||||||
|
# Now create dist and move appimage
|
||||||
|
rm -rf $(DESTDIR)
|
||||||
|
mkdir -p $(DESTDIR)
|
||||||
|
cp UDSClient-$(VERSION)-x86_64.AppImage $(DESTDIR)
|
||||||
|
# Generate the .desktop fixed for new path
|
||||||
|
cat desktop/UDSClient.desktop | sed -e s/".usr.lib.UDSClient.UDSClient.py"/"\/usr\/bin\/UDSClient-$(VERSION)-x86_64.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
|
||||||
|
chmod 755 $(DESTDIR)/installer.sh
|
||||||
|
tar czvf ../udsclient3-portable-$(VERSION).tar.gz -C $(DESTDIR) .
|
||||||
|
# Now
|
||||||
|
@ -12,6 +12,9 @@ cat udsclient-template.spec |
|
|||||||
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
|
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
|
||||||
sed -e s/"release 1"/"release ${RELEASE}"/g > udsclient-$VERSION.spec
|
sed -e s/"release 1"/"release ${RELEASE}"/g > udsclient-$VERSION.spec
|
||||||
|
|
||||||
|
cat appimage-udsclient.recipe |
|
||||||
|
sed -e s/"version: 0.0.0"/"version: ${VERSION}"/g > appimage.recipe
|
||||||
|
|
||||||
# Now fix dependencies for opensuse
|
# Now fix dependencies for opensuse
|
||||||
# Note: Right now, opensuse & rh seems to have same dependencies, only 1 package needed
|
# Note: Right now, opensuse & rh seems to have same dependencies, only 1 package needed
|
||||||
# cat udsclient-template.spec |
|
# cat udsclient-template.spec |
|
||||||
@ -32,6 +35,10 @@ done
|
|||||||
|
|
||||||
#rm udsclient-$VERSION
|
#rm udsclient-$VERSION
|
||||||
|
|
||||||
|
# Make .tar.gz with source
|
||||||
make DESTDIR=targz DISTRO=targz VERSION=${VERSION} install
|
make DESTDIR=targz DISTRO=targz VERSION=${VERSION} install
|
||||||
|
|
||||||
|
# And make portable .tar.gz
|
||||||
|
make DESTDIR=appimage DISTRO=appimage VERSION=${VERSION} build-appimage
|
||||||
|
|
||||||
rpm --addsign ../*rpm
|
rpm --addsign ../*rpm
|
||||||
|
9
client-py3/full/linux/installer-appimage-template.sh
Normal file
9
client-py3/full/linux/installer-appimage-template.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Installing UDSClient portable..."
|
||||||
|
|
||||||
|
cp UDSClient-0.0.0-x86_64.AppImage /usr/bin
|
||||||
|
cp UDSClient.desktop /usr/share/applications
|
||||||
|
update-desktop-database
|
||||||
|
|
||||||
|
echo "Installation process done."
|
56
client-py3/full/linux/udsclient-appimage.recipe
Normal file
56
client-py3/full/linux/udsclient-appimage.recipe
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
version: 1
|
||||||
|
script:
|
||||||
|
# Remove any previous build
|
||||||
|
- rm -rf UDSClientDir | true
|
||||||
|
# Make usr and icons dirs
|
||||||
|
- mkdir -p UDSClientDir/usr/src
|
||||||
|
# Copy the python application code into the UDSClientDir
|
||||||
|
- cp ../src/UDS*.py UDSClientDir/usr/src
|
||||||
|
- cp -r ../src/uds UDSClientDir/usr/src
|
||||||
|
# Remove __pycache__ and .mypy if exists
|
||||||
|
- rm UDSClientDir/usr/src/.mypy_cache -rf 2>&1 > /dev/null
|
||||||
|
- rm UDSClientDir/usr/src/uds/.mypy_cache -rf 2>&1 > /dev/null
|
||||||
|
- rm UDSClientDir/usr/src/__pycache__ -rf 2>&1 > /dev/null
|
||||||
|
- rm UDSClientDir/usr/src/uds/__pycache__ -rf 2>&1 > /dev/null
|
||||||
|
|
||||||
|
AppDir:
|
||||||
|
path: ./UDSClientDir
|
||||||
|
|
||||||
|
app_info:
|
||||||
|
id: com.udsenterprise.UDSClient3
|
||||||
|
name: UDSClient
|
||||||
|
icon: utilities-terminal
|
||||||
|
version: 0.0.0
|
||||||
|
# Set the python executable as entry point
|
||||||
|
exec: usr/bin/python3
|
||||||
|
# Set the application main script path as argument. Use '$@' to forward CLI parameters
|
||||||
|
exec_args: "$APPDIR/usr/src/UDSClient.py $@"
|
||||||
|
|
||||||
|
apt:
|
||||||
|
arch: amd64
|
||||||
|
sources:
|
||||||
|
- sourceline: 'deb [arch=amd64] http://ftp.de.debian.org/debian/ bullseye main contrib non-free'
|
||||||
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x04EE7237B7D453EC'
|
||||||
|
|
||||||
|
include:
|
||||||
|
- python3
|
||||||
|
- python3-pkg-resources
|
||||||
|
- python3-pyqt5
|
||||||
|
- python3-paramiko
|
||||||
|
- python3-cryptography
|
||||||
|
- freerdp2-x11
|
||||||
|
exclude: []
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
# Set python home
|
||||||
|
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
|
||||||
|
PYTHONHOME: '${APPDIR}/usr'
|
||||||
|
# Path to the site-packages dir or other modules dirs
|
||||||
|
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
|
||||||
|
PYTHONPATH: '${APPDIR}/usr/lib/python3.9/site-packages'
|
||||||
|
|
||||||
|
AppImage:
|
||||||
|
update-information: None
|
||||||
|
sign-key: None
|
||||||
|
arch: x86_64
|
Loading…
Reference in New Issue
Block a user