Allow creating ISO files for installing windows

This commit is contained in:
Manuel Thalmann 2024-07-23 20:10:58 +02:00
parent e6ea44a216
commit 24e557e95c

View file

@ -12,6 +12,7 @@ begin
set -l setupLabel "winiso-valhalla"
set -l buildDir "$(status dirname)/build"
set -l cacheDir ~/.cache/winiso-valhalla
set -l isoFile "$buildDir/winiso-valhalla.iso"
set -l winpe "$cacheDir/winpe.iso"
set -l winPath "/media/win"
set -l winpePath "/media/winpe"
@ -20,6 +21,8 @@ begin
set -l dataPath "/media/data"
set -l winpeOverlay (mktemp -d)
set -l winOverlay (mktemp -d)
set -l upperDir (mktemp -d)
set -l workDir (mktemp -d)
set -l editionField "Edition ID"
set -l wimFile "sources/install.wim"
@ -113,8 +116,22 @@ begin
end
end
sudo mount --mkdir -t overlay overlay -o lowerdir="$winOverlay":"$winPath" "$valhallaPath"
sudo mount --mkdir -t overlay overlay -o lowerdir="$winOverlay":"$winpePath":"$winPath",upperdir="$upperDir",workdir="$workDir" "$valhallaPath"
if [ -z "$_flag_usb" ]
mkisofs \
-V "$setupLabel" \
-no-emul-boot \
-b "efi/microsoft/boot/efisys.bin" \
-iso-level 4 \
-udf \
-joliet \
-disable-deep-relocation \
-omit-version-number \
-relaxed-filenames \
-output "$isoFile" \
"$valhallaPath"
else
if [ ! -b "$WIN_DISK" ]
chooseDisk WIN_DISK
end
@ -176,4 +193,5 @@ begin
sudo rm -rf "$path"
end
end
end
end