From ba478700de017a58893e50cf5a2c22f8d24ba525 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 29 May 2026 16:31:47 +0200 Subject: [PATCH] feat: Update version file path (#1749) --- Dockerfile | 2 +- src/install.sh | 2 +- src/mido.sh | 8 +++++--- src/samba.sh | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index aad25aa..625ede6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64 FROM build-${TARGETARCH} ARG VERSION_ARG="0.00" -RUN echo "$VERSION_ARG" > /run/version +RUN echo "$VERSION_ARG" > /etc/version VOLUME /storage EXPOSE 3389 8006 diff --git a/src/install.sh b/src/install.sh index 93627a2..05094f2 100644 --- a/src/install.sh +++ b/src/install.sh @@ -222,7 +222,7 @@ finishInstall() { fi local file="$STORAGE/windows.ver" - cp -f /run/version "$file" + cp -f /etc/version "$file" ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" if [[ "$iso" == "$STORAGE/"* ]]; then diff --git a/src/mido.sh b/src/mido.sh index 45d7768..2bd276c 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -63,7 +63,7 @@ download_windows() { local id="$1" local lang="$2" local desc="$3" - local ovw="" rtick="" sku_id="" sku_url="" + local ovw="" rtick="" mdt="" sku_id="" sku_url="" local iso_url="" iso_json="" language="" org_id="" local instance_id="" vls_url="" ov_url="" ov_data="" local session_id="" user_agent="" download_type="" @@ -82,7 +82,6 @@ download_windows() { esac local url="https://www.microsoft.com/en-us/software-download/windows$windows_version" - [[ "${id,,}" == "win10"* ]] && url+="ISO" # 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) @@ -188,7 +187,10 @@ download_windows() { # If any request is going to be blocked by Microsoft it's always this last one (the previous requests always seem to succeed) iso_url="https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=$profile&ProductEditionId=undefined&SKU=$sku_id&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id" - iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url") + iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url") || { + handle_curl_error "$?" "Microsoft" + return $? + } if ! [ "$iso_json" ]; then # This should only happen if there's been some change to how this API works diff --git a/src/samba.sh b/src/samba.sh index d0fe060..4eb62dc 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -77,7 +77,7 @@ addShare() { if [[ "$dir" == "$tmp" ]]; then { echo "--------------------------------------------------------" - echo " $APP for $ENGINE v$(