From 08634fba9fd0e28a484f51a0f969bdf270b5f5e5 Mon Sep 17 00:00:00 2001 From: longpanda Date: Sat, 27 Feb 2021 09:27:31 +0800 Subject: [PATCH] update languages.ini and license --- IMG/cpio/sbin/init | 2 +- IMG/cpio/ventoy/hook/daphile/disk_hook.sh | 2 +- IMG/cpio/ventoy/hook/gentoo/disk_hook.sh | 2 +- INSTALL/VentoyWeb.sh | 82 +++------------------- LANGUAGES/languages.ini | Bin 167420 -> 167790 bytes License/license-AdminLTE.txt | 1 + License/license-bootstrap.txt | 1 + License/license-jquery.txt | 1 + License/license-libhttp.txt | 3 + LinuxGUI/Ventoy2Disk/main.c | 2 +- LinuxGUI/WebUI/index.html | 42 ++++++++++- LiveCD/VTOY/ventoy/ventoy.sh | 2 +- README.md | 2 +- 13 files changed, 62 insertions(+), 80 deletions(-) create mode 100644 License/license-AdminLTE.txt create mode 100644 License/license-bootstrap.txt create mode 100644 License/license-jquery.txt create mode 100644 License/license-libhttp.txt diff --git a/IMG/cpio/sbin/init b/IMG/cpio/sbin/init index 1b46128e..b1ed2121 100644 --- a/IMG/cpio/sbin/init +++ b/IMG/cpio/sbin/init @@ -19,7 +19,7 @@ #################################################################### # # -# Step 1 : extract busybox & set busybox enviroment # +# Step 1 : extract busybox & set busybox environment # # # #################################################################### diff --git a/IMG/cpio/ventoy/hook/daphile/disk_hook.sh b/IMG/cpio/ventoy/hook/daphile/disk_hook.sh index 3f515bff..9ae2f6d9 100644 --- a/IMG/cpio/ventoy/hook/daphile/disk_hook.sh +++ b/IMG/cpio/ventoy/hook/daphile/disk_hook.sh @@ -19,7 +19,7 @@ . /ventoy/hook/ventoy-hook-lib.sh -# Just for KVM test enviroment +# Just for KVM test environment $BUSYBOX_PATH/modprobe virtio_blk 2>/dev/null $BUSYBOX_PATH/modprobe virtio_pci 2>/dev/null diff --git a/IMG/cpio/ventoy/hook/gentoo/disk_hook.sh b/IMG/cpio/ventoy/hook/gentoo/disk_hook.sh index 3f515bff..9ae2f6d9 100644 --- a/IMG/cpio/ventoy/hook/gentoo/disk_hook.sh +++ b/IMG/cpio/ventoy/hook/gentoo/disk_hook.sh @@ -19,7 +19,7 @@ . /ventoy/hook/ventoy-hook-lib.sh -# Just for KVM test enviroment +# Just for KVM test environment $BUSYBOX_PATH/modprobe virtio_blk 2>/dev/null $BUSYBOX_PATH/modprobe virtio_pci 2>/dev/null diff --git a/INSTALL/VentoyWeb.sh b/INSTALL/VentoyWeb.sh index 3bc9469e..9baf33b8 100644 --- a/INSTALL/VentoyWeb.sh +++ b/INSTALL/VentoyWeb.sh @@ -5,7 +5,6 @@ print_usage() { echo ' OPTION: (optional)' echo ' -H x.x.x.x http server IP address (default is 127.0.0.1)' echo ' -p PORT http server PORT (default is 24680)' - echo " -n don't start web browser" echo ' -h print this help' echo '' } @@ -16,37 +15,6 @@ print_err() { echo "" } -check_option() { - app="$1" - $app --help 2>&1 | grep -q "$2" -} - -get_user() { - name=$(logname) - if [ -n "$name" -a "$name" != "root" ]; then - echo $name; return - fi - - name=${HOME#/home/} - if [ -n "$name" -a "$name" != "root" ]; then - echo $name; return - fi -} - -chromium_proc() { - app="$1" - - url="http://${HOST}:${PORT}/index.html" - - if check_option "$app" '[-][-]app='; then - su $VUSER -c "$app --app=$url >> $LOGFILE 2>&1" - elif check_option "$app" '[-][-]new[-]window='; then - su $VUSER -c "$app --new-window $url >> $LOGFILE 2>&1" - else - su $VUSER -c "$app $url >> $LOGFILE 2>&1" - fi -} - uid=$(id -u) if [ $uid -ne 0 ]; then print_err "Please use sudo or run the script as root." @@ -87,8 +55,6 @@ while [ -n "$1" ]; do if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then print_usage exit 0 - elif [ "$1" = "-n" ]; then - NOWEB=1 elif [ "$1" = "-H" ]; then shift if echo $1 | grep -q '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'; then @@ -116,63 +82,37 @@ if ps -ef | grep "V2DServer.*$HOST.*$PORT" | grep -q -v grep; then exit 1 fi -VUSER=$(get_user) LOGFILE=log.txt #delete the log.txt if it's more than 8MB if [ -f $LOGFILE ]; then logsize=$(stat -c '%s' $LOGFILE) if [ $logsize -gt 8388608 ]; then rm -f $LOGFILE - su $VUSER -c "touch $LOGFILE" fi -else - su $VUSER -c "touch $LOGFILE" fi - if [ -f ./tool/$TOOLDIR/V2DServer.xz ]; then xz -d ./tool/$TOOLDIR/V2DServer.xz chmod +x ./tool/$TOOLDIR/V2DServer fi -V2DServer "$HOST" "$PORT" & - vtVer=$(cat ventoy/version) echo "" -echo "==================================================================" -echo " Ventoy Server $vtVer is running at http://${HOST}:${PORT} ..." -echo "==================================================================" +echo "===============================================================" +if [ "$LANG" = "zh_CN.UTF-8" ]; then + echo " Ventoy Server $vtVer 已经启动 ..." + echo " 请打开浏览器,访问 http://${HOST}:${PORT}" +else + echo " Ventoy Server $vtVer is running ..." + echo " Please open your browser and visit http://${HOST}:${PORT}" +fi +echo "===============================================================" echo "" -echo "################ Press Ctrl + C to exit ######################" +echo "################## Press Ctrl + C to exit #####################" echo "" -if [ "$NOWEB" = "1" ]; then - echo "Please open your web browser and visit http://${HOST}:${PORT}" -else - if which -a google-chrome-stable >> $LOGFILE 2>&1; then - chromium_proc google-chrome-stable - elif which -a google-chrome >> $LOGFILE 2>&1; then - chromium_proc google-chrome - elif which -a chrome >> $LOGFILE 2>&1; then - chromium_proc chrome - elif which -a browser >> $LOGFILE 2>&1; then - chromium_proc browser - elif which -a firefox >> $LOGFILE 2>&1; then - su $VUSER -c "firefox --no-remote \"http://${HOST}:${PORT}/index.html\"" - else - echo "Please open your web browser and visit http://${HOST}:${PORT}" - fi -fi - -if ps -ef | grep "V2DServer.*$HOST.*$PORT" | grep -q -v grep; then - echo "" -else - print_err "Ventoy Server Error! Please check log.txt." -fi - -wait $! - +V2DServer "$HOST" "$PORT" if [ -n "$OLDDIR" ]; then CURDIR=$(pwd) diff --git a/LANGUAGES/languages.ini b/LANGUAGES/languages.ini index c0e23768509e39f579597086c6527dd1e62f5bb8..091bc27c6ab4be30a1bb52ca74e74aba1c7fb6c2 100644 GIT binary patch delta 1334 zcmbVML2DC16n?X!he}H@_K-rGt+ZGn2P2hgtCUKjDJ@h;%u!vlX|tGY%O+8pi!FkO z9(u@ta}fFm>Y)-ah^K%kh$20B6|IM!EQO+nl7ruywWOey>R~rC^WJ>l_ult5%_nVJ zD{X5Xh3*KM6eEl7kwZ4tSIEPzLP@+`*;ok6PcM(Dw@tJ5wDiNMzB!?u$BYj3cFO2cXGg?veR9%pjoPEi zmXLirfnW*{Hl8AY{C7;Q&v(k3I~RI$An|ZMr+-VJ-K6gj!MPb^7vy>_-XBMfhaC&a z?nNNU-7iy(rNrfnhf1YkfOvo^0JNlmE!l|0lZU^Z#I3xhcYx69R7MMR5iJ0}M4k+z z)Z6iMQ~!dU1qyq%skJ#M)W)ueHqB!F4Y91W-iN9KrhNUlII>HDeKi4uK5WEOs42yo}G=$(H+ z2XSLV^w&-QJKfk-=9Go&tH#F#7eaQt4x1a^*llpEth~mqE zWKTCTuZ5PeD`RhKS#m8s@Zfh!p7cFcJbnk0a%b4OFlsWjJob&nS*SBA3aHJ++5~Y} z@JDUqTg>ekv&vpdsCQ6>xCk$u7ZZ5E>2LvU`=yLc720&S9aeg$RXTi6H=PrxB a%s@k)c}=e5^rAz}$)98$%AmABJ2YnaWVakjbFHU;@P63{F5Y s6D+F0kO5>>F(d+ci42tthKzaJ149{knWslZFiJH4nX>)Q6vm=o0QQG5lK=n! diff --git a/License/license-AdminLTE.txt b/License/license-AdminLTE.txt new file mode 100644 index 00000000..a751318d --- /dev/null +++ b/License/license-AdminLTE.txt @@ -0,0 +1 @@ +AdminLTE follows the MIT License (see MIT.txt) diff --git a/License/license-bootstrap.txt b/License/license-bootstrap.txt new file mode 100644 index 00000000..3dc9e9d0 --- /dev/null +++ b/License/license-bootstrap.txt @@ -0,0 +1 @@ +bootstrap follows the MIT License (see MIT.txt) diff --git a/License/license-jquery.txt b/License/license-jquery.txt new file mode 100644 index 00000000..8b0fac00 --- /dev/null +++ b/License/license-jquery.txt @@ -0,0 +1 @@ +jquery follows the MIT License (see MIT.txt) diff --git a/License/license-libhttp.txt b/License/license-libhttp.txt new file mode 100644 index 00000000..828f85d7 --- /dev/null +++ b/License/license-libhttp.txt @@ -0,0 +1,3 @@ +libhttp follows the MIT License (see MIT.txt) + +Ventoy does not modify its source code, only its header file and lib is used. diff --git a/LinuxGUI/Ventoy2Disk/main.c b/LinuxGUI/Ventoy2Disk/main.c index efdc1707..e12208ef 100644 --- a/LinuxGUI/Ventoy2Disk/main.c +++ b/LinuxGUI/Ventoy2Disk/main.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) rc = ventoy_http_start(ip, port); if (rc) { - printf("failed to start http server\n"); + printf("Ventoy failed to start http server, check log.txt for detail\n"); } else { diff --git a/LinuxGUI/WebUI/index.html b/LinuxGUI/WebUI/index.html index 5c91c977..c77ee448 100644 --- a/LinuxGUI/WebUI/index.html +++ b/LinuxGUI/WebUI/index.html @@ -198,7 +198,7 @@
- +