fix: Remove non-printable characters (#299)
This commit is contained in:
parent
e19f278c38
commit
ba37a4c352
4 changed files with 24 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=qemux/qemu-arm:7.04 / /
|
COPY --from=qemux/qemu-arm:7.05 / /
|
||||||
|
|
||||||
ARG VERSION_ARG="0.00"
|
ARG VERSION_ARG="0.00"
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
: "${APP:="Windows"}"
|
: "${APP:="Windows"}"
|
||||||
: "${PLATFORM:="x64"}"
|
: "${MACHINE:="virt"}"
|
||||||
|
: "${PLATFORM:="arm64"}"
|
||||||
: "${BOOT_MODE:="windows"}"
|
: "${BOOT_MODE:="windows"}"
|
||||||
: "${SUPPORT:="https://github.com/dockur/windows-arm"}"
|
: "${SUPPORT:="https://github.com/dockur/windows-arm"}"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ skipInstall() {
|
||||||
|
|
||||||
if [ -f "$previous" ]; then
|
if [ -f "$previous" ]; then
|
||||||
previous=$(<"$previous")
|
previous=$(<"$previous")
|
||||||
|
previous="${previous//[![:print:]]/}"
|
||||||
if [ -n "$previous" ]; then
|
if [ -n "$previous" ]; then
|
||||||
previous="$STORAGE/$previous"
|
previous="$STORAGE/$previous"
|
||||||
if [[ "${previous,,}" != "${iso,,}" ]]; then
|
if [[ "${previous,,}" != "${iso,,}" ]]; then
|
||||||
|
@ -581,6 +582,10 @@ detectImage() {
|
||||||
info "Detected: $desc"
|
info "Detected: $desc"
|
||||||
setXML "" && return 0
|
setXML "" && return 0
|
||||||
|
|
||||||
|
if [[ "$DETECTED" == "win81x86"* ]] || [[ "$DETECTED" == "win10x86"* ]]; then
|
||||||
|
error "The 32-bit version of $desc is not supported!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
msg="the answer file for $desc was not found ($DETECTED.xml)"
|
msg="the answer file for $desc was not found ($DETECTED.xml)"
|
||||||
local fallback="/run/assets/${DETECTED%%-*}.xml"
|
local fallback="/run/assets/${DETECTED%%-*}.xml"
|
||||||
|
|
||||||
|
@ -726,7 +731,11 @@ addDriver() {
|
||||||
|
|
||||||
if [ -z "$folder" ]; then
|
if [ -z "$folder" ]; then
|
||||||
desc=$(printVersion "$id" "$id")
|
desc=$(printVersion "$id" "$id")
|
||||||
warn "no \"$driver\" driver available for \"$desc\" !" && return 0
|
if [[ "${id,,}" != *"x86"* ]]; then
|
||||||
|
warn "no \"$driver\" driver available for \"$desc\" !" && return 0
|
||||||
|
else
|
||||||
|
warn "no \"$driver\" driver available for the 32-bit version of \"$desc\" !" && return 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -d "$path/$driver/$folder" ] && return 0
|
[ ! -d "$path/$driver/$folder" ] && return 0
|
||||||
|
@ -1006,19 +1015,27 @@ bootWindows() {
|
||||||
|
|
||||||
if [ -f "$STORAGE/windows.args" ]; then
|
if [ -f "$STORAGE/windows.args" ]; then
|
||||||
ARGS=$(<"$STORAGE/windows.args")
|
ARGS=$(<"$STORAGE/windows.args")
|
||||||
|
ARGS="${ARGS//[![:print:]]/}"
|
||||||
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
|
if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then
|
||||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type")
|
if [ -z "${DISK_TYPE:-}" ]; then
|
||||||
|
DISK_TYPE=$(<"$STORAGE/windows.type")
|
||||||
|
DISK_TYPE="${DISK_TYPE//[![:print:]]/}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
|
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
|
||||||
BOOT_MODE=$(<"$STORAGE/windows.mode")
|
BOOT_MODE=$(<"$STORAGE/windows.mode")
|
||||||
|
BOOT_MODE="${BOOT_MODE//[![:print:]]/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
||||||
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
|
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
||||||
|
MACHINE=$(<"$STORAGE/windows.old")
|
||||||
|
MACHINE="${MACHINE//[![:print:]]/}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -93,6 +93,7 @@ download_windows() {
|
||||||
|
|
||||||
# uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs
|
# uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs
|
||||||
session_id=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)
|
session_id=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)
|
||||||
|
session_id="${session_id//[![:print:]]/}"
|
||||||
|
|
||||||
# Get product edition ID for latest release of given Windows version
|
# Get product edition ID for latest release of given Windows version
|
||||||
# Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number
|
# Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number
|
||||||
|
|
Loading…
Reference in a new issue