wok rev 24144
ventoy: use web interface
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 17 09:45:35 2021 +0000 (2021-11-17) |
parents | 55bd63e6aac6 |
children | 0c04a0ffe6d7 |
files | ventoy/receipt ventoy/stuff/TazVentoy.sh ventoy/stuff/ventoy.desktop |
line diff
1.1 --- a/ventoy/receipt Tue Nov 16 17:16:48 2021 +0000 1.2 +++ b/ventoy/receipt Wed Nov 17 09:45:35 2021 +0000 1.3 @@ -11,8 +11,8 @@ 1.4 WGET_URL="https://github.com/ventoy/Ventoy/archive/refs/tags/v$VERSION.tar.gz" 1.5 EXTRA_SOURCE_FILES="$PACKAGE-bin-$VERSION.tar.gz" 1.6 1.7 -DEPENDS="libglade" 1.8 -BUILD_DEPENDS="libglade-dev gtk+-dev pkg-config" 1.9 +DEPENDS="slitaz-tools" 1.10 +SUGGESTED="tazweb" 1.11 1.12 current_version() 1.13 { 1.14 @@ -23,8 +23,8 @@ 1.15 # Rules to configure and make the package. 1.16 compile_rules() 1.17 { 1.18 - sed -i 's|^build_func |#&|;s|#\(build_func .*i386.*gtk2\)|\1|;s|-l pthread|& -l rt|' LinuxGUI/build_gtk.sh 1.19 - cd LinuxGUI && sh build_gtk.sh 1.20 + sed -i 's|^build_func |#&|;s|#\(build_func .*i386\)|\1|;s|-l pthread|& -l rt|' LinuxGUI/build.sh 1.21 + cd LinuxGUI && sh build.sh 1.22 [ -s $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES ] || 1.23 wget --no-check-certificate -O $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES \ 1.24 "https://github.com/ventoy/Ventoy/releases/download/v$VERSION/ventoy-$VERSION-linux.tar.gz" 1.25 @@ -38,21 +38,14 @@ 1.26 mv $fs/usr/share/ventoy-$VERSION $fs/usr/share/ventoy 1.27 rm -f $fs/usr/share/ventoy/VentoyGUI* $fs/usr/share/ventoy/*.exe 1.28 rm -f $fs/usr/share/ventoy/tool/i386/*.qt5 $fs/usr/share/ventoy/tool/i386/*.gtk? 1.29 + rm -f $fs/usr/share/ventoy/tool/i386/V2DServer* 1.30 + rm -f $fs/usr/share/ventoy/tool/VentoyGTK.glade 1.31 + rm -f $fs/usr/share/ventoy/VentoyWeb.sh 1.32 rm -rf $fs/usr/share/ventoy/tool/aarch64 1.33 rm -rf $fs/usr/share/ventoy/tool/x86_64 1.34 rm -rf $fs/usr/share/ventoy/tool/mips64el 1.35 - cp $src/INSTALL/tool/i386/Ventoy2Disk.gtk2 $fs/usr/share/ventoy/tool/i386/ 1.36 - cat > $fs/usr/share/applications/ventoy.desktop <<EOT 1.37 -[Desktop Entry] 1.38 -Version=1.0 1.39 -Name=Create a bootable USB 1.40 -Name[fr]=Créer une clé USB bootable 1.41 -Comment=A New Bootable USB Solution 1.42 -Comment[fr]=Une nouvelle façon de démarrer par USB 1.43 -Categories=GNOME;System;Filesystem; 1.44 -Exec=tazbox su /usr/share/ventoy/tool/i386/Ventoy2Disk.gtk2 1.45 -Icon=/usr/share/ventoy/WebUI/static/img/VentoyLogo.png 1.46 -Terminal=false 1.47 -Type=Application 1.48 -EOT 1.49 + sed '/= VentoyWeb.sh =/,/just execute/d' -i $fs/usr/share/ventoy/README 1.50 + cp $src/INSTALL/tool/i386/V2DServer $fs/usr/share/ventoy/tool/i386/ 1.51 + chmod +x $fs/usr/share/ventoy/tool/i386/V2DServer 1.52 + cp $stuff/TazVentoy.sh $fs/usr/share/ventoy/ 1.53 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/ventoy/stuff/TazVentoy.sh Wed Nov 17 09:45:35 2021 +0000 2.3 @@ -0,0 +1,20 @@ 2.4 +#!/bin/sh 2.5 + 2.6 +case "$1" in 2.7 +-*) echo "Usage: $0 [ip] [port]" && exit 1 2.8 +esac 2.9 + 2.10 +[ $(id -u) -ne 0 ] && exec tazbox su $0 $@ 2.11 + 2.12 +cd $(dirname $0) 2.13 +HOST="${1:-127.0.0.1}" 2.14 +PORT=${2:-24680} 2.15 +[ $(stat -c %s log.txt) -gt 4096 ] && rm log.txt 2.16 + 2.17 +PATH=./tool/i386:$PATH 2.18 +V2DServer "$HOST" "$PORT" & 2.19 +wID=$! 2.20 +sleep 1 2.21 + 2.22 +tazweb --notoolbar http://$HOST:$PORT/ || browser http://$HOST:$PORT/ 2.23 +kill $wID
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/ventoy/stuff/ventoy.desktop Wed Nov 17 09:45:35 2021 +0000 3.3 @@ -0,0 +1,11 @@ 3.4 +[Desktop Entry] 3.5 +Version=1.0 3.6 +Name=Create a bootable USB 3.7 +Name[fr]=Créer une clé USB bootable 3.8 +Comment=A New Bootable USB Solution 3.9 +Comment[fr]=Une nouvelle façon de démarrer par USB 3.10 +Categories=GNOME;System;Filesystem; 3.11 +Exec=/usr/share/ventoy/TazVentoy.sh 3.12 +Icon=/usr/share/ventoy/WebUI/static/img/VentoyLogo.png 3.13 +Terminal=false 3.14 +Type=Application