mirror of
https://github.com/dockur/windows.git
synced 2026-01-23 11:23:05 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c9586fb4 | ||
|
|
81e9fff270 | ||
|
|
90df2d88e3 |
@@ -1,7 +1,7 @@
|
|||||||
ARG VERSION_ARG="latest"
|
ARG VERSION_ARG="latest"
|
||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu:7.06 / /
|
COPY --from=qemux/qemu:7.07 / /
|
||||||
|
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
##### Via Github Codespaces:
|
##### Via Github Codespaces:
|
||||||
|
|
||||||
[](https://github.com/codespaces/new?repo=743140652&machine=basicLinux32gb)
|
[](https://codespaces.new/dockur/windows)
|
||||||
|
|
||||||
## FAQ 💬
|
## FAQ 💬
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ EFISYS="efi/microsoft/boot/efisys_noprompt.bin"
|
|||||||
skipInstall() {
|
skipInstall() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
|
local method=""
|
||||||
local magic byte
|
local magic byte
|
||||||
local boot="$STORAGE/windows.boot"
|
local boot="$STORAGE/windows.boot"
|
||||||
local previous="$STORAGE/windows.base"
|
local previous="$STORAGE/windows.base"
|
||||||
@@ -18,14 +19,22 @@ skipInstall() {
|
|||||||
previous=$(<"$previous")
|
previous=$(<"$previous")
|
||||||
previous="${previous//[![:print:]]/}"
|
previous="${previous//[![:print:]]/}"
|
||||||
if [ -n "$previous" ]; then
|
if [ -n "$previous" ]; then
|
||||||
previous="$STORAGE/$previous"
|
if [[ "${STORAGE,,}/${previous,,}" != "${iso,,}" ]]; then
|
||||||
if [[ "${previous,,}" != "${iso,,}" ]]; then
|
|
||||||
if [ -f "$boot" ] && hasDisk; then
|
if [ -f "$boot" ] && hasDisk; then
|
||||||
info "Detected that the version was changed, but ignoring this because Windows is already installed."
|
if [[ "${iso,,}" == "${STORAGE,,}/windows."* ]]; then
|
||||||
info "Please start with an empty /storage folder, if you want to install a different version of Windows."
|
method="your custom .iso file"
|
||||||
|
else
|
||||||
|
if [[ "${previous,,}" != "windows."* ]]; then
|
||||||
|
method="the VERSION variable"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "$method" ]; then
|
||||||
|
info "Detected that $method was changed, but ignoring this because Windows is already installed."
|
||||||
|
info "Please start with an empty /storage folder, if you want to install a different version of Windows."
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
[ -f "$previous" ] && rm -f "$previous"
|
rm -f "$STORAGE/$previous"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -200,13 +209,19 @@ abortInstall() {
|
|||||||
|
|
||||||
detectCustom() {
|
detectCustom() {
|
||||||
|
|
||||||
local file base
|
local dir file base
|
||||||
local fname="custom.iso"
|
local fname="custom.iso"
|
||||||
|
local boot="$STORAGE/windows.boot"
|
||||||
|
|
||||||
CUSTOM=""
|
CUSTOM=""
|
||||||
|
|
||||||
if [ -d "/$fname" ]; then
|
dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1)
|
||||||
error "The file /$fname does not exist, please make sure that you mapped it to a valid path!" && return 1
|
[ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1)
|
||||||
|
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
if ! hasDisk || [ ! -f "$boot" ]; then
|
||||||
|
error "The bind $dir maps to a file that does not exist!" && return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
||||||
@@ -495,7 +510,7 @@ setXML() {
|
|||||||
local file="/custom.xml"
|
local file="/custom.xml"
|
||||||
|
|
||||||
if [ -d "$file" ]; then
|
if [ -d "$file" ]; then
|
||||||
warn "The file $file does not exist, please make sure that you mapped it to a valid path!"
|
error "The bind $file maps to a file that does not exist!" && exit 67
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
||||||
|
|||||||
Reference in New Issue
Block a user