1
0
mirror of https://github.com/dockur/windows.git synced 2026-06-10 11:59:33 +08:00

feat: Update version file path (#1749)

This commit is contained in:
Kroese
2026-05-29 16:31:47 +02:00
committed by GitHub
parent 6e45deea2f
commit ba478700de
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+5 -3
View File
@@ -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
+1 -1
View File
@@ -77,7 +77,7 @@ addShare() {
if [[ "$dir" == "$tmp" ]]; then
{ echo "--------------------------------------------------------"
echo " $APP for $ENGINE v$(</run/version)..."
echo " $APP for $ENGINE v$(</etc/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""