mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
feat: Display progress via web
This commit is contained in:
parent
307d468460
commit
5da9a24b2c
1 changed files with 14 additions and 9 deletions
|
|
@ -46,7 +46,7 @@ else
|
||||||
EXTERNAL="N"
|
EXTERNAL="N"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MSG="Please wait while Windows is being started..."
|
MSG="Windows is being started, please wait..."
|
||||||
|
|
||||||
BASE="custom.iso"
|
BASE="custom.iso"
|
||||||
if [ ! -f "$STORAGE/$BASE" ]; then
|
if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
|
|
@ -55,7 +55,7 @@ if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
|
|
||||||
BASE="$VERSION.iso"
|
BASE="$VERSION.iso"
|
||||||
if [ ! -f "$STORAGE/$BASE" ]; then
|
if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
MSG="Please wait while Windows is being downloaded..."
|
MSG="Windows is being downloaded, please wait..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -65,14 +65,13 @@ if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||||
|
|
||||||
if [ ! -f "$STORAGE/$BASE" ]; then
|
if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
MSG="Please wait while '$BASE' is being downloaded..."
|
MSG="Image '$BASE' is being downloaded, please wait..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display wait message
|
html "$MSG"
|
||||||
/run/server.sh "Windows" "$MSG" &
|
|
||||||
|
|
||||||
[ -f "$STORAGE/$BASE" ] && return 0
|
[ -f "$STORAGE/$BASE" ] && return 0
|
||||||
|
|
||||||
|
|
@ -120,7 +119,8 @@ if ((SIZE<10000000)); then
|
||||||
echo && error "Invalid ISO file: Size is smaller than 10 MB" && exit 62
|
echo && error "Invalid ISO file: Size is smaller than 10 MB" && exit 62
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo && info "Extracting downloaded ISO image..."
|
MSG="Extracting downloaded ISO image..."
|
||||||
|
echo && info "$MSG" && html "$MSG"
|
||||||
|
|
||||||
DIR="$TMP/unpack"
|
DIR="$TMP/unpack"
|
||||||
rm -rf "$DIR"
|
rm -rf "$DIR"
|
||||||
|
|
@ -162,7 +162,8 @@ if [[ "$MANUAL" != [Yy1]* ]]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
info "Detecting Windows version from ISO image..."
|
MSG="Detecting Windows version from ISO image..."
|
||||||
|
info "$MSG" && html "$MSG"
|
||||||
|
|
||||||
LOC="$DIR/sources/install.wim"
|
LOC="$DIR/sources/install.wim"
|
||||||
[ ! -f "$LOC" ] && LOC="$DIR/sources/install.esd"
|
[ ! -f "$LOC" ] && LOC="$DIR/sources/install.esd"
|
||||||
|
|
@ -218,7 +219,8 @@ if [ -f "$ASSET" ]; then
|
||||||
|
|
||||||
if [ -f "$LOC" ]; then
|
if [ -f "$LOC" ]; then
|
||||||
|
|
||||||
info "Adding XML file for automatic installation..."
|
MSG="Adding XML file for automatic installation..."
|
||||||
|
info "$MSG" && html "$MSG"
|
||||||
|
|
||||||
RESULT=$(wimlib-imagex info -xml "$LOC" | tr -d '\000')
|
RESULT=$(wimlib-imagex info -xml "$LOC" | tr -d '\000')
|
||||||
|
|
||||||
|
|
@ -265,7 +267,8 @@ LABEL="${LABEL::30}"
|
||||||
ISO="$TMP/$LABEL.tmp"
|
ISO="$TMP/$LABEL.tmp"
|
||||||
rm -f "$ISO"
|
rm -f "$ISO"
|
||||||
|
|
||||||
info "Generating new ISO image for installation..."
|
MSG="Generating new ISO image for installation..."
|
||||||
|
info "$MSG" && html "$MSG"
|
||||||
|
|
||||||
genisoimage -b "$ETFS" -no-emul-boot -c "$CAT" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -quiet -V "$LABEL" -udf \
|
genisoimage -b "$ETFS" -no-emul-boot -c "$CAT" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -quiet -V "$LABEL" -udf \
|
||||||
-boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -o "$ISO" -allow-limited-size "$DIR"
|
-boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -o "$ISO" -allow-limited-size "$DIR"
|
||||||
|
|
@ -273,5 +276,7 @@ genisoimage -b "$ETFS" -no-emul-boot -c "$CAT" -iso-level 4 -J -l -D -N -joliet-
|
||||||
mv "$ISO" "$STORAGE/$BASE"
|
mv "$ISO" "$STORAGE/$BASE"
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
|
|
||||||
|
html "Successfully prepared image for installation..."
|
||||||
|
|
||||||
echo
|
echo
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue