Add Tooloop Package and deploy script, fixes #1

This commit is contained in:
2024-06-04 17:21:13 +02:00
parent 6f7254c211
commit 3c38667e3c
9 changed files with 76 additions and 5 deletions
+1
View File
@@ -1,2 +1,3 @@
*.png filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text
*.icns filter=lfs diff=lfs merge=lfs -text *.icns filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
+6 -1
View File
@@ -86,7 +86,6 @@ web_modules/
# Next.js build output # Next.js build output
.next .next
out
# Nuxt.js build / generate output # Nuxt.js build / generate output
.nuxt .nuxt
@@ -132,3 +131,9 @@ dist
# Tooloop # Tooloop
config.json config.json
out/*
!out/Tooloop\ OS\ Package
out/Tooloop\ OS\ Package/package/assets/presentation/*
!out/Tooloop\ OS\ Package/package/assets/presentation/start-presentation.sh
!out/Tooloop\ OS\ Package/package/assets/presentation/stop-presentation.sh
!out/Tooloop\ OS\ Package/package/assets/presentation/config.example.json
+8 -2
View File
@@ -20,7 +20,7 @@ brew install dpkg
brew install fakeroot brew install fakeroot
``` ```
# Building # Build
```bash ```bash
# one of # one of
@@ -29,7 +29,7 @@ npm run make-linux
npm run make-all npm run make-all
``` ```
# Running # Run
```bash ```bash
# Mac # Mac
@@ -38,3 +38,9 @@ npm run start
# Linux # Linux
./out/Tooloop\ Kiosk\ Browser-linux-arm64/Tooloop\ Kiosk\ Browser --no-sandbox ./out/Tooloop\ Kiosk\ Browser-linux-arm64/Tooloop\ Kiosk\ Browser --no-sandbox
``` ```
# Deploy
```bash
npm run deploy
```
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# set -e
# Remove old builds excluding scripts and config example
find ./out/Tooloop\ OS\ Package/package/assets/presentation/ -type f -not -name '*sh' -not -name 'config*' -print0 | xargs -0 rm -f --
# unzip zip
unzip -o ./out/make/zip/linux/x64/Tooloop\ Kiosk\ Browser-linux-x64-1.0.0.zip -d ./out/Tooloop\ OS\ Package/package/assets/presentation
# move contents to Tooloop package directory
mv -f ./out/Tooloop\ OS\ Package/package/assets/presentation/Tooloop\ Kiosk\ Browser-linux-x64/* ./out/Tooloop\ OS\ Package/package/assets/presentation/
# remove empty directory
rm -fr ./out/Tooloop\ OS\ Package/package/assets/presentation/Tooloop\ Kiosk\ Browser-linux-x64/
# copy package to package project
cp -fr ./out/Tooloop\ OS\ Package/ /home/tooloop/Tooloop-Packages/kiosk-browser
# re-build and deploy all packages and update control center
cd /home/tooloop/Tooloop-Packages/
/bin/bash /home/tooloop/Tooloop-Packages/build.sh
/bin/bash /home/tooloop/Tooloop-Packages/deploy.sh
exit 0
Binary file not shown.
@@ -0,0 +1,15 @@
Package: tooloop-kiosk-browser
Version: 1.0.0
Maintainer: Tooloop Multimedia
Homepage: https://www.tooloop.de
Bugs: https://github.com/Tooloop/Tooloop-Packages
Section: tooloop/presentation
Architecture: all
Recommends: tooloop-transparent-cursor
Suggests: tooloop-nginx
Name: Kiosk Browser
Description: A feature-rich fullscreen browser for touch kiosks
A simple full-screen kiosk browser based on chromium.
You can define its homepage in the settings.
Thumbnail: thumbnail-kiosk-browser.png
@@ -0,0 +1,9 @@
#!/bin/bash
if [ $(whoami) = 'root' ]; then
su tooloop -c '/assets/presentation/Tooloop\ Kiosk\ Browser --no-sandbox' &
else
/assets/presentation/Tooloop\ Kiosk\ Browser --no-sandbox &
fi
exit 0
@@ -0,0 +1,6 @@
#!/bin/bash
killall su &
killall "Tooloop Kiosk Browser" &
exit 0
+2 -1
View File
@@ -14,7 +14,8 @@
"package": "electron-forge package", "package": "electron-forge package",
"make": "electron-forge make", "make": "electron-forge make",
"make-linux": "electron-forge make --platform linux", "make-linux": "electron-forge make --platform linux",
"make-all": "electron-forge make --platform darwin && electron-forge make --platform linux" "make-all": "electron-forge make --platform darwin && electron-forge make --platform linux",
"deploy": "electron-forge make && /bin/bash deploy-tooloop-package.sh"
}, },
"repository": { "repository": {
"type": "git", "type": "git",