mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Improve Windows media detection and selection (#1946)
This commit is contained in:
+5
-17
@@ -1013,23 +1013,7 @@ updateImage() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
local fallback="/run/assets/${DETECTED%%-*}.xml"
|
||||
|
||||
if [[ "$DETECTED" != win20* &&
|
||||
"$asset" == "$fallback" &&
|
||||
"$asset" != "/run/assets/$DETECTED.xml" ]]; then
|
||||
|
||||
if ! sed -i \
|
||||
-e '/<InstallFrom>.*<\/InstallFrom>/d' \
|
||||
-e '/<ProductKey>.*<\/ProductKey>/d' \
|
||||
-e '/<InstallFrom>/,/<\/InstallFrom>/d' \
|
||||
-e '/<ProductKey>/,/<\/ProductKey>/d' \
|
||||
"$answer"; then
|
||||
error "Failed to make answer file edition-neutral: $answer"
|
||||
return 1
|
||||
fi
|
||||
|
||||
fi
|
||||
removeGeneratedXML "$asset" || return 1
|
||||
|
||||
if [ -n "${CUSTOM_XML:-}" ]; then
|
||||
|
||||
@@ -1058,6 +1042,8 @@ updateImage() {
|
||||
|
||||
if enabled "$MANUAL"; then
|
||||
|
||||
removeGeneratedXML "$asset" || return 1
|
||||
|
||||
wimlib-imagex update "$wim" "$idx" --command "delete --force /$xml" > /dev/null || true
|
||||
|
||||
if wimlib-imagex extract "$wim" "$idx" "/$bak" "--dest-dir=$tmp" >/dev/null 2>&1; then
|
||||
@@ -1204,6 +1190,8 @@ bootWindows() {
|
||||
! parseLanguage && exit 56
|
||||
! detectCustom && exit 59
|
||||
|
||||
testImages
|
||||
|
||||
if ! startInstall; then
|
||||
bootWindows && return 0
|
||||
exit 68
|
||||
|
||||
Reference in New Issue
Block a user