refactor: make hiperiso fully standalone — zero Ventoy dependency
Vendor all previously external dependencies into the hiperiso repo: Vendored: - vendor/grub2-modsrc.tar.xz (364K) — GRUB2 build overlay, with dead compression files (huffman, lzx, xpress, miniz) removed from both the tarball and Makefile.core.def - vendor/grub-i386-pc/ — BIOS boot images (boot.img, core.img, .lst) - vendor/tool-x86_64/ — pre-built utility binaries (ash, hexdump, mkexfatfs, mount.exfat-fuse, xzcat) - assets/ — languages.json, HiperisoGTK.glade, WebUI (renamed) - src/gui/ — full GUI source tree (Qt5, GTK3, Web, Core, Libs) - src/plugson/ — full Plugson web config tool source - src/hisolnk/ — Vlnk tool source (renamed) Dead code removed: - src/grub2/huffman.c, huffman.h, lzx.c, lzx.h, xpress.c, xpress.h, miniz.c, miniz.h, wimboot.h — WIM/injection compression (~3700 lines) - hiperiso_gzip_compress() stubbed (never called in hypervisor path) - lzx_decompress(), xca_decompress() stubbed (WIM decompression) Build scripts updated: - build_grub2_204.sh: uses vendor/grub2-modsrc.tar.xz - package_release.sh: uses vendor/ and assets/ paths - build_gui_all.sh: uses src/gui/, src/plugson/, src/hisolnk/ - fork_ventoy.sh: removed (one-time fork complete) Verified: GRUB2 BOOTX64.EFI builds clean (1.8M, 275 hiperiso symbols) Zero reference/Ventoy/ references remain in any build script.
This commit is contained in:
+10
-17
@@ -3,7 +3,6 @@ set -e
|
||||
|
||||
_SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
HIPERISO_ROOT="$(cd "$_SCRIPT_DIR/.." && pwd)"
|
||||
VENTOY_INSTALL="$HIPERISO_ROOT/reference/Ventoy/INSTALL"
|
||||
GRUB2_INSTALL="$HIPERISO_ROOT/build/grub2-204/INSTALL"
|
||||
PAYLOAD="$HIPERISO_ROOT/build/payload"
|
||||
STAGING="$HIPERISO_ROOT/build/staging"
|
||||
@@ -15,9 +14,6 @@ command -v mkfs.vfat >/dev/null 2>&1 || { echo "ERROR: dosfstools (mkfs.vfat) re
|
||||
GRUB_X64_DIR="$GRUB2_INSTALL/lib/grub/x86_64-efi"
|
||||
[ -d "$GRUB_X64_DIR" ] || GRUB_X64_DIR="$HIPERISO_ROOT/src/grub2/grub/x86_64-efi"
|
||||
|
||||
GRUB_I386_DIR="$GRUB2_INSTALL/lib/grub/i386-pc"
|
||||
[ -d "$GRUB_I386_DIR" ] || GRUB_I386_DIR="$VENTOY_INSTALL/grub/i386-pc"
|
||||
|
||||
KERNEL_SRC="$STAGING/efi/vmlinuz"
|
||||
[ -f "$KERNEL_SRC" ] || KERNEL_SRC="$STAGING/vmlinuz"
|
||||
|
||||
@@ -36,9 +32,9 @@ mkdir -p "$PAYLOAD/EFI/hiperiso/trace"
|
||||
mkdir -p "$PAYLOAD/grub"
|
||||
mkdir -p "$PAYLOAD/tool/x86_64"
|
||||
|
||||
# ── boot/ (BIOS boot images from Ventoy) ────────────────────────────
|
||||
cp "$VENTOY_INSTALL/grub/i386-pc/boot.img" "$PAYLOAD/boot/boot.img"
|
||||
cp "$VENTOY_INSTALL/grub/i386-pc/core.img" "$PAYLOAD/boot/core.img"
|
||||
# ── boot/ (BIOS boot images, vendored) ────────────────────────────
|
||||
cp "$HIPERISO_ROOT/vendor/grub-i386-pc/boot.img" "$PAYLOAD/boot/boot.img"
|
||||
cp "$HIPERISO_ROOT/vendor/grub-i386-pc/core.img" "$PAYLOAD/boot/core.img"
|
||||
xz --check=crc32 "$PAYLOAD/boot/core.img"
|
||||
|
||||
# ── EFI/ (our custom GRUB2 EFI + hypervisor payloads) ───────────────
|
||||
@@ -56,8 +52,8 @@ cp "$HIPERISO_ROOT/src/grub2/grub/grub.cfg" "$PAYLOAD/grub/"
|
||||
cp -a "$GRUB_X64_DIR" "$PAYLOAD/grub/x86_64-efi"
|
||||
|
||||
mkdir -p "$PAYLOAD/grub/i386-pc"
|
||||
cp "$VENTOY_INSTALL/grub/i386-pc/"*.lst "$PAYLOAD/grub/i386-pc/" 2>/dev/null || true
|
||||
cp -a "$GRUB_I386_DIR/." "$PAYLOAD/grub/i386-pc/" 2>/dev/null || true
|
||||
cp "$HIPERISO_ROOT/vendor/grub-i386-pc/"*.lst "$PAYLOAD/grub/i386-pc/" 2>/dev/null || true
|
||||
cp "$HIPERISO_ROOT/vendor/grub-i386-pc/"*.mod "$PAYLOAD/grub/i386-pc/" 2>/dev/null || true
|
||||
|
||||
for cfg in checksum.cfg debug.cfg hwinfo.cfg keyboard.cfg localboot.cfg menulang.cfg power.cfg; do
|
||||
cp "$HIPERISO_ROOT/src/grub2/grub/$cfg" "$PAYLOAD/grub/" 2>/dev/null || true
|
||||
@@ -74,17 +70,15 @@ if [ -d "$PAYLOAD/grub/menu" ]; then
|
||||
tar -C "$PAYLOAD/grub" -czf "$PAYLOAD/grub/menu.tar.gz" menu
|
||||
fi
|
||||
|
||||
# ── tool/ (forked scripts + Ventoy binary tools, renamed) ───────────
|
||||
# ── tool/ (installer scripts + vendored assets + binary tools) ─────
|
||||
cp "$HIPERISO_ROOT/src/installer/tool/hiperiso_lib.sh" "$PAYLOAD/tool/"
|
||||
cp "$HIPERISO_ROOT/src/installer/tool/HiperisoWorker.sh" "$PAYLOAD/tool/"
|
||||
cp "$HIPERISO_ROOT/src/installer/tool/create_hiperiso_iso_part_dm.sh" "$PAYLOAD/tool/"
|
||||
cp "$HIPERISO_ROOT/reference/Ventoy/LANGUAGES/languages.json" "$PAYLOAD/tool/languages.json"
|
||||
cp "$HIPERISO_ROOT/reference/Ventoy/INSTALL/tool/VentoyGTK.glade" "$PAYLOAD/tool/HiperisoGTK.glade"
|
||||
sed -i 's/Ventoy/Hiperiso/g; s/ventoy/hiperiso/g' "$PAYLOAD/tool/languages.json" "$PAYLOAD/tool/HiperisoGTK.glade" 2>/dev/null || true
|
||||
cp "$HIPERISO_ROOT/assets/languages.json" "$PAYLOAD/tool/languages.json"
|
||||
cp "$HIPERISO_ROOT/assets/HiperisoGTK.glade" "$PAYLOAD/tool/HiperisoGTK.glade"
|
||||
|
||||
VENTOY_TOOLS="ash hexdump mkexfatfs mount.exfat-fuse xzcat"
|
||||
for tool in $VENTOY_TOOLS; do
|
||||
cp "$VENTOY_INSTALL/tool/x86_64/$tool" "$PAYLOAD/tool/x86_64/"
|
||||
for tool in ash hexdump mkexfatfs mount.exfat-fuse xzcat; do
|
||||
cp "$HIPERISO_ROOT/vendor/tool-x86_64/$tool" "$PAYLOAD/tool/x86_64/"
|
||||
chmod +x "$PAYLOAD/tool/x86_64/$tool"
|
||||
done
|
||||
|
||||
@@ -108,7 +102,6 @@ echo "1.0.0" > "$PAYLOAD/hiperiso/version"
|
||||
|
||||
rm -f "$PAYLOAD/log.txt"
|
||||
|
||||
# ── Fix stale ventoy references in i386-pc moddep.lst ───────────────
|
||||
sed -i 's/ventoy/hiperiso/g' "$PAYLOAD/grub/i386-pc/moddep.lst" 2>/dev/null || true
|
||||
sed -i 's/ventoy/hiperiso/g' "$PAYLOAD/grub/x86_64-efi/moddep.lst" 2>/dev/null || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user