]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/ventoy_pack.sh
IA32 ARM64 support
[Ventoy.git] / INSTALL / ventoy_pack.sh
index 6701dc97765f66243035f68bbee210ed4584e629..b88515ab8713ce068bf0f1dd60169f6085fd32c5 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 dos2unix -q ./tool/ventoy_lib.sh
+dos2unix -q ./tool/VentoyWorker.sh
 
 . ./tool/ventoy_lib.sh
 
@@ -15,6 +16,7 @@ fi
 
 cd ../IMG
 sh mkcpio.sh
+sh mkloopex.sh
 cd -
 
 
@@ -30,7 +32,7 @@ while ! grep -q 524288 /sys/block/${LOOP#/dev/}/size 2>/dev/null; do
     sleep 1
 done
 
-format_ventoy_disk $LOOP 
+format_ventoy_disk_mbr 0 $LOOP fdisk
 
 $GRUB_DIR/sbin/grub-bios-setup  --skip-fs-probe  --directory="./grub/i386-pc"  $LOOP
 
@@ -59,9 +61,11 @@ cp -a ./tool/ENROLL_THIS_KEY_IN_MOKMANAGER.cer $tmpmnt/
 
 
 mkdir -p $tmpmnt/tool
-cp -a ./tool/mount*     $tmpmnt/tool/
+cp -a ./tool/i386/mount.exfat-fuse     $tmpmnt/tool/mount.exfat-fuse_i386
+cp -a ./tool/x86_64/mount.exfat-fuse   $tmpmnt/tool/mount.exfat-fuse_x86_64
+cp -a ./tool/aarch64/mount.exfat-fuse  $tmpmnt/tool/mount.exfat-fuse_aarch64
 
-rm -f $tmpmnt/grub/i386-pc/*
+rm -f $tmpmnt/grub/i386-pc/*.img
 
 
 umount $tmpmnt && rm -rf $tmpmnt
@@ -76,9 +80,13 @@ dd if=$LOOP of=$tmpdir/boot/core.img bs=512 count=2047 skip=1 status=none
 xz --check=crc32 $tmpdir/boot/core.img
 
 cp -a ./tool $tmpdir/
+rm -f $tmpdir/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
 cp -a Ventoy2Disk.sh $tmpdir/
-
+cp -a README $tmpdir/
+cp -a plugin $tmpdir/
+cp -a CreatePersistentImg.sh $tmpdir/
 dos2unix -q $tmpdir/Ventoy2Disk.sh
+dos2unix -q $tmpdir/CreatePersistentImg.sh
 
 #32MB disk img
 dd status=none if=$LOOP of=$tmpdir/ventoy/ventoy.disk.img bs=512 count=$VENTOY_SECTOR_NUM skip=$part2_start_sector
@@ -90,28 +98,45 @@ rm -f ventoy-${curver}-linux.tar.gz
 
 
 CurDir=$PWD
-cd $tmpdir/tool
 
-for file in $(ls); do
-    if [ "$file" != "xzcat" ] && [ "$file" != "ventoy_lib.sh" ]; then
-        xz --check=crc32 $file
-    fi
+for d in i386 x86_64 aarch64; do
+    cd $tmpdir/tool/$d
+    for file in $(ls); do
+        if [ "$file" != "xzcat" ]; then
+            xz --check=crc32 $file
+        fi
+    done
+    cd $CurDir
 done
 
-cd $CurDir
+#chmod 
+find $tmpdir/ -type d -exec chmod 755 "{}" +
+find $tmpdir/ -type f -exec chmod 644 "{}" +
+chmod +x $tmpdir/Ventoy2Disk.sh
+chmod +x $tmpdir/CreatePersistentImg.sh
+
 tar -czvf ventoy-${curver}-linux.tar.gz $tmpdir
 
+
+
 rm -f ventoy-${curver}-windows.zip
-cp -a Ventoy2Disk.exe $tmpdir/
+cp -a Ventoy2Disk*.exe $tmpdir/
 cp -a $LANG_DIR/languages.ini $tmpdir/ventoy/
 rm -rf $tmpdir/tool
 rm -f $tmpdir/*.sh
+rm -f $tmpdir/README
 
 
 zip -r ventoy-${curver}-windows.zip $tmpdir/
 
 rm -rf $tmpdir
 
+cd ../LiveCD
+sh livecd.sh
+cd $CurDir
+
+mv ../LiveCD/ventoy*.iso ./
+
 if [ -e ventoy-${curver}-windows.zip ] && [ -e ventoy-${curver}-linux.tar.gz ]; then
     echo -e "\n ============= SUCCESS =================\n"
 else
@@ -119,4 +144,5 @@ else
     exit 1
 fi
 
+rm -f log.txt