]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - Plugson/pack.sh
1.0.95 release
[Ventoy.git] / Plugson / pack.sh
index f40c6c782fa614e05787084fedc9e6a1ecc7b74d..cc2eb589e7c3fe4abd351e70283100c2f2eb4dcb 100644 (file)
@@ -1,14 +1,5 @@
 #!/bin/sh
 
-output_hex_u32() {
-    hexval=$(printf '%08x' $1)
-    hex_B0=${hexval:0:2}
-    hex_B1=${hexval:2:2}
-    hex_B2=${hexval:4:2}
-    hex_B3=${hexval:6:2}
-    echo -en "\x$hex_B3\x$hex_B2\x$hex_B1\x$hex_B0"
-}
-
 if [ -n "$PKG_DATE" ]; then
     plugson_verion=$PKG_DATE
 else
@@ -22,27 +13,40 @@ if [ ! -f ./vs/VentoyPlugson/Release/VentoyPlugson.exe ]; then
     exit 1
 fi
 
+if [ ! -f ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ]; then
+    echo "NO VentoyPlugson_X64.exe found"
+    exit 1
+fi
+
 if [ -f ./www.tar.xz ]; then
     rm -f ./www.tar.xz
 fi
 
+VV=$(grep -m1 '\?v=' ./www/index.html |   sed  's/.*v=\([0-9][0-9]*\).*/\1/g')
+let VV++
+echo V=$VV
+sed "s/\?v=[0-9][0-9]*/?v=$VV/g" -i ./www/index.html 
+
+
+[ -f ./www/helplist ] && rm -f ./www/helplist
+ls -1 ../INSTALL/grub/help/ | while read line; do 
+    echo -n ${line:0:5} >> ./www/helplist
+done 
+[ -f ./www/menulist ] && rm -f ./www/menulist
+ls -1 ../INSTALL/grub/menu/ | while read line; do 
+    echo -n ${line:0:5} >> ./www/menulist
+done 
 echo -n "$plugson_verion" > ./www/buildtime
 
 tar cf www.tar www
 xz --check=crc32 www.tar
 
-xzdec=$(stat -c '%s' ./www.tar.xz)
-echo xzdec=$xzdec
-
-output_hex_u32 0x54535251    > ex.bin
-output_hex_u32 $xzdec       >> ex.bin
-output_hex_u32 0xa4a3a2a1   >> ex.bin
+rm -f ../INSTALL/VentoyPlugson.exe
+cp -a ./vs/VentoyPlugson/Release/VentoyPlugson.exe ../INSTALL/VentoyPlugson.exe
 
-cat ./vs/VentoyPlugson/Release/VentoyPlugson.exe ./www.tar.xz ex.bin > VentoyPlugson.exe
-rm -f ./ex.bin
+rm -f ../INSTALL/VentoyPlugson_X64.exe
+cp -a ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ../INSTALL/VentoyPlugson_X64.exe
 
-rm -f ../INSTALL/VentoyPlugson.exe
-cp -a ./VentoyPlugson.exe ../INSTALL/VentoyPlugson.exe
 
 rm -f ../INSTALL/tool/plugson.tar.xz
 mv ./www.tar.xz ../INSTALL/tool/plugson.tar.xz