Compare commits

...

26 Commits
v3.22 ... v4.02

Author SHA1 Message Date
Kroese
7120584548 feat: Additional download mirrors (#870) 2024-11-11 18:05:59 +01:00
Kroese
e292d18d32 docs: KVM troubleshooting (#865) 2024-11-11 14:13:47 +01:00
Kroese
d92ac18210 docs: Fix typo (#862) 2024-11-10 11:31:54 +01:00
renovate[bot]
243b3bb5d6 chore(deps): update dockurr/windows-arm docker tag to v2.21 (#861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-10 02:45:01 +01:00
Kroese
2cdb57a679 feat: Update download links (#860) 2024-11-10 00:17:00 +01:00
Kroese
f1f6c640b9 docs: Version alias (#859) 2024-11-10 00:01:12 +01:00
Kroese
86a766381e feat: Support 32-bit Windows versions (#834) 2024-10-24 17:49:02 +02:00
Kroese
b39507c5a4 feat: Additional aliasses (#833) 2024-10-24 12:17:09 +02:00
Kroese
80dead1446 fix: Enable USB for legacy machines (#824) 2024-10-20 16:39:42 +02:00
Kroese
bc614fd233 feat: Use q35 machine type for Windows XP (#823) 2024-10-20 16:20:12 +02:00
Kroese
80c5ba2231 build: Docker lint exception (#813) 2024-10-15 00:49:05 +02:00
Kroese
760fe9a31f feat: Include ARM64 version in image (#812) 2024-10-15 00:45:28 +02:00
Kroese
01c61dd32d build: Remove ARM64 platform (#811) 2024-10-14 18:56:43 +02:00
Kroese
815a3f3c66 feat: Support multiple shared folders (#810) 2024-10-14 16:40:15 +02:00
Kroese
69b450299c fix: Continue without drivers (#809) 2024-10-14 15:23:59 +02:00
Kroese
b347232ac8 feat: Check returnvalues for drivers (#807) 2024-10-14 03:26:19 +02:00
Kroese
955f8a08a0 fix: Dereference symbolic links (#806) 2024-10-14 01:03:52 +02:00
Kroese
a659c1c9da feat: Use bsdtar to extract driver archive (#805) 2024-10-13 21:14:38 +02:00
Kroese
16c3a047c2 fix: Shared folder mount (#804) 2024-10-13 12:00:31 +02:00
Kroese
3cab3d1c7b feat: Extract drivers to temporary folder (#803) 2024-10-13 11:28:21 +02:00
Kroese
ff55f843bd feat: Additional download mirrors (#801) 2024-10-12 19:02:03 +02:00
Kroese
edb300dfec feat: Additional download mirrors (#799) 2024-10-12 18:09:13 +02:00
Kroese
9db3651654 feat: Select LTSC edition based on key (#798) 2024-10-12 16:54:35 +02:00
Kroese
0dabce04a6 docs: Features (#797) 2024-10-12 15:52:51 +02:00
Kroese
5f4c0938ac feat: Extract temporary files to RAM (#796) 2024-10-12 14:26:04 +02:00
Kroese
94a84b0c2d feat: Remove empty Windows.old folder (#793) 2024-10-11 11:33:50 +02:00
17 changed files with 826 additions and 420 deletions

View File

@@ -21,5 +21,5 @@ jobs:
uses: hadolint/hadolint-action@v3.1.0 uses: hadolint/hadolint-action@v3.1.0
with: with:
dockerfile: Dockerfile dockerfile: Dockerfile
ignore: DL3008 ignore: DL3006,DL3008
failure-threshold: warning failure-threshold: warning

View File

@@ -1,5 +1,5 @@
FROM scratch FROM scratch AS build-amd64
COPY --from=qemux/qemu-docker:6.05 / / COPY --from=qemux/qemu-docker:6.06 / /
ARG VERSION_ARG="0.0" ARG VERSION_ARG="0.0"
ARG DEBCONF_NOWARNINGS="yes" ARG DEBCONF_NOWARNINGS="yes"
@@ -19,7 +19,8 @@ RUN set -eu && \
dos2unix \ dos2unix \
cabextract \ cabextract \
genisoimage \ genisoimage \
libxml2-utils && \ libxml2-utils \
libarchive-tools && \
apt-get clean && \ apt-get clean && \
echo "$VERSION_ARG" > /run/version && \ echo "$VERSION_ARG" > /run/version && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -30,12 +31,15 @@ COPY --chmod=755 ./assets /run/assets
ADD --chmod=755 https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd ADD --chmod=755 https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
FROM dockurr/windows-arm:2.22 AS build-arm64
FROM build-${TARGETARCH}
EXPOSE 8006 3389 EXPOSE 8006 3389
VOLUME /storage VOLUME /storage
ENV VERSION="11"
ENV RAM_SIZE="4G" ENV RAM_SIZE="4G"
ENV CPU_CORES="2" ENV CPU_CORES="2"
ENV DISK_SIZE="64G" ENV DISK_SIZE="64G"
ENV VERSION="win11"
ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"] ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]

View File

@@ -448,7 +448,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>23</Order> <Order>23</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -451,7 +451,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>23</Order> <Order>23</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -61,12 +61,6 @@
</DiskConfiguration> </DiskConfiguration>
<ImageInstall> <ImageInstall>
<OSImage> <OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/image/index</Key>
<Value>2</Value>
</MetaData>
</InstallFrom>
<InstallTo> <InstallTo>
<DiskID>0</DiskID> <DiskID>0</DiskID>
<PartitionID>3</PartitionID> <PartitionID>3</PartitionID>
@@ -87,7 +81,7 @@
<FullName>Docker</FullName> <FullName>Docker</FullName>
<Organization>Windows for Docker</Organization> <Organization>Windows for Docker</Organization>
<ProductKey> <ProductKey>
<Key /> <Key>CGK42-GYN6Y-VD22B-BX98W-J8JXD</Key>
</ProductKey> </ProductKey>
</UserData> </UserData>
<EnableFirewall>false</EnableFirewall> <EnableFirewall>false</EnableFirewall>
@@ -457,7 +451,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>23</Order> <Order>23</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -61,12 +61,6 @@
</DiskConfiguration> </DiskConfiguration>
<ImageInstall> <ImageInstall>
<OSImage> <OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/image/index</Key>
<Value>1</Value>
</MetaData>
</InstallFrom>
<InstallTo> <InstallTo>
<DiskID>0</DiskID> <DiskID>0</DiskID>
<PartitionID>3</PartitionID> <PartitionID>3</PartitionID>
@@ -87,7 +81,7 @@
<FullName>Docker</FullName> <FullName>Docker</FullName>
<Organization>Windows for Docker</Organization> <Organization>Windows for Docker</Organization>
<ProductKey> <ProductKey>
<Key /> <Key>M7XTQ-FN8P6-TTKYV-9D4CC-J462D</Key>
</ProductKey> </ProductKey>
</UserData> </UserData>
<EnableFirewall>false</EnableFirewall> <EnableFirewall>false</EnableFirewall>
@@ -457,7 +451,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>23</Order> <Order>23</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -451,7 +451,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>23</Order> <Order>23</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -342,7 +342,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>22</Order> <Order>22</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -345,7 +345,7 @@
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>22</Order> <Order>22</Order>
<CommandLine>rd /q c:\Windows.old 2>nul</CommandLine> <CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
<Description>Remove empty Windows.old folder</Description> <Description>Remove empty Windows.old folder</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">

View File

@@ -3,7 +3,7 @@ services:
image: dockurr/windows image: dockurr/windows
container_name: windows container_name: windows
environment: environment:
VERSION: "win11" VERSION: "11"
devices: devices:
- /dev/kvm - /dev/kvm
cap_add: cap_add:

View File

@@ -30,8 +30,10 @@ spec:
securityContext: securityContext:
privileged: true privileged: true
env: env:
- name: VERSION
value: "11"
- name: RAM_SIZE - name: RAM_SIZE
value: 4G value: "4G"
- name: CPU_CORES - name: CPU_CORES
value: "2" value: "2"
- name: DISK_SIZE - name: DISK_SIZE

View File

@@ -16,7 +16,6 @@ Windows inside a Docker container.
## Features ✨ ## Features ✨
- Multi-language
- ISO downloader - ISO downloader
- KVM acceleration - KVM acceleration
- Web-based viewer - Web-based viewer
@@ -35,7 +34,7 @@ services:
image: dockurr/windows image: dockurr/windows
container_name: windows container_name: windows
environment: environment:
VERSION: "win11" VERSION: "11"
devices: devices:
- /dev/kvm - /dev/kvm
cap_add: cap_add:
@@ -79,34 +78,34 @@ kubectl apply -f kubernetes.yml
```yaml ```yaml
environment: environment:
VERSION: "win11" VERSION: "11"
``` ```
Select from the values below: Select from the values below:
| **Value** | **Version** | **Size** | | **Value** | **Version** | **Size** |
|---|---|---| |---|---|---|
| `win11` | Windows 11 Pro | 5.4 GB | | `11` | Windows 11 Pro | 5.4 GB |
| `ltsc11` | Windows 11 LTSC | 4.2 GB | | `11l` | Windows 11 LTSC | 4.2 GB |
| `win11e` | Windows 11 Enterprise | 5.8 GB | | `11e` | Windows 11 Enterprise | 5.8 GB |
|||| ||||
| `win10` | Windows 10 Pro | 5.7 GB | | `10` | Windows 10 Pro | 5.7 GB |
| `ltsc10` | Windows 10 LTSC | 4.6 GB | | `10l` | Windows 10 LTSC | 4.6 GB |
| `win10e` | Windows 10 Enterprise | 5.2 GB | | `10e` | Windows 10 Enterprise | 5.2 GB |
|||| ||||
| `win8` | Windows 8.1 Pro | 4.0 GB | | `8` | Windows 8.1 Pro | 4.0 GB |
| `win8e` | Windows 8.1 Enterprise | 3.7 GB | | `8e` | Windows 8.1 Enterprise | 3.7 GB |
| `win7` | Windows 7 Enterprise | 3.0 GB | | `7e` | Windows 7 Enterprise | 3.0 GB |
| `vista` | Windows Vista Enterprise | 3.0 GB | | `ve` | Windows Vista Enterprise | 3.0 GB |
| `winxp` | Windows XP Professional | 0.6 GB | | `xp` | Windows XP Professional | 0.6 GB |
|||| ||||
| `2025` | Windows Server 2025 | 5.0 GB | | `2025` | Windows Server 2025 | 5.0 GB |
| `2022` | Windows Server 2022 | 4.7 GB | | `2022` | Windows Server 2022 | 4.7 GB |
| `2019` | Windows Server 2019 | 5.3 GB | | `2019` | Windows Server 2019 | 5.3 GB |
| `2016` | Windows Server 2016 | 6.5 GB | | `2016` | Windows Server 2016 | 6.5 GB |
| `2012` | Windows Server 2012 | 4.3 GB | | `2012` | Windows Server 2012 | 4.3 GB |
| `2008` | Windows Server 2008 | 3.0 GB | | `2008` | Windows Server 2008 | 3.0 GB |
| `2003` | Windows Server 2003 | 0.6 GB | | `2003` | Windows Server 2003 | 0.6 GB |
> [!TIP] > [!TIP]
> To install ARM64 versions of Windows use [dockur/windows-arm](https://github.com/dockur/windows-arm/). > To install ARM64 versions of Windows use [dockur/windows-arm](https://github.com/dockur/windows-arm/).
@@ -136,11 +135,11 @@ kubectl apply -f kubernetes.yml
### How do I share files with the host? ### How do I share files with the host?
Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`. Double-click it and it will show a folder called `Data`, which can be binded to any folder on your host via the compose file: Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`. Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file:
```yaml ```yaml
volumes: volumes:
- /home/user/example:/shared - /home/user/example:/data
``` ```
The example folder `/home/user/example` will be available as ` \\host.lan\Data`. The example folder `/home/user/example` will be available as ` \\host.lan\Data`.
@@ -221,7 +220,7 @@ kubectl apply -f kubernetes.yml
LANGUAGE: "French" LANGUAGE: "French"
``` ```
You can choose between: 🇦🇪 Arabic, 🇧🇬 Bulgarian, 🇨🇳 Chinese, 🇭🇷 Croatian, 🇨🇿 Czech, 🇩🇰 Danish, 🇳🇱 Dutch, 🇬🇧 English, 🇪🇪 Estionian, 🇫🇮 Finnish, 🇫🇷 French, 🇩🇪 German, 🇬🇷 Greek, 🇮🇱 Hebrew, 🇭🇺 Hungarian, 🇮🇹 Italian, 🇯🇵 Japanese, 🇰🇷 Korean, 🇱🇻 Latvian, 🇱🇹 Lithuanian, 🇳🇴 Norwegian, 🇵🇱 Polish, 🇵🇹 Portuguese, 🇷🇴 Romanian, 🇷🇺 Russian, 🇷🇸 Serbian, 🇸🇰 Slovak, 🇸🇮 Slovenian, 🇪🇸 Spanish, 🇸🇪 Swedish, 🇹🇭 Thai, 🇹🇷 Turkish and 🇺🇦 Ukrainian. You can choose between: 🇦🇪 Arabic, 🇧🇬 Bulgarian, 🇨🇳 Chinese, 🇭🇷 Croatian, 🇨🇿 Czech, 🇩🇰 Danish, 🇳🇱 Dutch, 🇬🇧 English, 🇪🇪 Estonian, 🇫🇮 Finnish, 🇫🇷 French, 🇩🇪 German, 🇬🇷 Greek, 🇮🇱 Hebrew, 🇭🇺 Hungarian, 🇮🇹 Italian, 🇯🇵 Japanese, 🇰🇷 Korean, 🇱🇻 Latvian, 🇱🇹 Lithuanian, 🇳🇴 Norwegian, 🇵🇱 Polish, 🇵🇹 Portuguese, 🇷🇴 Romanian, 🇷🇺 Russian, 🇷🇸 Serbian, 🇸🇰 Slovak, 🇸🇮 Slovenian, 🇪🇸 Spanish, 🇸🇪 Swedish, 🇹🇭 Thai, 🇹🇷 Turkish and 🇺🇦 Ukrainian.
### How do I select the keyboard layout? ### How do I select the keyboard layout?
@@ -341,24 +340,28 @@ kubectl apply -f kubernetes.yml
### How do I verify if my system supports KVM? ### How do I verify if my system supports KVM?
To verify that your system supports KVM, run the following commands: Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.
You can run the following commands in Linux to check your system:
```bash ```bash
sudo apt install cpu-checker sudo apt install cpu-checker
sudo kvm-ok sudo kvm-ok
``` ```
If you receive an error from `kvm-ok` indicating that KVM acceleration can't be used, please check whether: If you receive an error from `kvm-ok` indicating that KVM cannot be used, please check whether:
- the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your BIOS. - the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your BIOS.
- you are running an operating system that supports them, like Linux or Windows 11 (macOS and Windows 10 do not unfortunately).
- you enabled "nested virtualization" if you are running the container inside a virtual machine. - you enabled "nested virtualization" if you are running the container inside a virtual machine.
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's. - you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
If you didn't receive any error from `kvm-ok` at all, but the container still complains that `/dev/kvm` is missing, it might help to add `privileged: true` to your compose file (or `--privileged` to your `run` command), to rule out any permission issue. If you do not receive any error from `kvm-ok` but the container still complains about KVM, please check whether:
- you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.
- it could help to add `privileged: true` to your compose file (or `sudo` to your `run` command), to rule out any permission issue.
### How do I run macOS in a container? ### How do I run macOS in a container?

View File

@@ -26,19 +26,35 @@ parseVersion() {
[ -z "$VERSION" ] && VERSION="win11" [ -z "$VERSION" ] && VERSION="win11"
case "${VERSION,,}" in case "${VERSION,,}" in
"11" | "11p" | "win11" | "win11p" | "windows11" | "windows 11" ) "11" | "11p" | "win11" | "pro11" | "win11p" | "windows11" | "windows 11" )
VERSION="win11x64" VERSION="win11x64"
;; ;;
"11e" | "win11e" | "windows11e" | "windows 11e" ) "11e" | "win11e" | "windows11e" | "windows 11e" )
VERSION="win11x64-enterprise-eval" VERSION="win11x64-enterprise-eval"
;; ;;
"10" | "10p" | "win10" | "win10p" | "windows10" | "windows 10" ) "11i" | "11iot" | "iot11" | "win11i" | "win11-iot" | "win11x64-iot" | "win11x64-enterprise-iot-eval" )
VERSION="win11x64-enterprise-iot-eval"
[ -z "$DETECTED" ] && DETECTED="win11x64-iot"
;;
"11l" | "11ltsc" | "ltsc11" | "win11l" | "win11-ltsc" | "win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
VERSION="win11x64-enterprise-ltsc-eval"
[ -z "$DETECTED" ] && DETECTED="win11x64-ltsc"
;;
"10" | "10p" | "win10" | "pro10" | "win10p" | "windows10" | "windows 10" )
VERSION="win10x64" VERSION="win10x64"
;; ;;
"10e" | "win10e" | "windows10e" | "windows 10e" ) "10e" | "win10e" | "windows10e" | "windows 10e" )
VERSION="win10x64-enterprise-eval" VERSION="win10x64-enterprise-eval"
;; ;;
"8" | "8p" | "81" | "81p" | "8.1" | "win8" | "win8p" | "win81" | "win81p" | "windows 8" ) "10i" | "10iot" | "iot10" | "win10i" | "win10-iot" | "win10x64-iot" | "win10x64-enterprise-iot-eval" )
VERSION="win10x64-enterprise-iot-eval"
[ -z "$DETECTED" ] && DETECTED="win10x64-iot"
;;
"10l" | "10ltsc" | "ltsc10" | "win10l" | "win10-ltsc" | "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
VERSION="win10x64-enterprise-ltsc-eval"
[ -z "$DETECTED" ] && DETECTED="win10x64-ltsc"
;;
"8" | "8p" | "81" | "81p" | "pro8" | "8.1" | "win8" | "win8p" | "win81" | "win81p" | "windows 8" )
VERSION="win81x64" VERSION="win81x64"
;; ;;
"8e" | "81e" | "8.1e" | "win8e" | "win81e" | "windows 8e" ) "8e" | "81e" | "8.1e" | "win8e" | "win81e" | "windows 8e" )
@@ -55,21 +71,21 @@ parseVersion() {
VERSION="win7x86" VERSION="win7x86"
[ -z "$DETECTED" ] && DETECTED="win7x86-enterprise" [ -z "$DETECTED" ] && DETECTED="win7x86-enterprise"
;; ;;
"vista" | "winvista" | "windowsvista" | "windows vista" ) "vista" | "ve" | "6" | "winvista" | "windowsvista" | "windows vista" )
VERSION="winvistax64" VERSION="winvistax64"
[ -z "$DETECTED" ] && DETECTED="winvistax64-enterprise" [ -z "$DETECTED" ] && DETECTED="winvistax64-enterprise"
;; ;;
"vistu" | "winvistu" | "windowsvistu" | "windows vistu" ) "vistu" | "vu" | "6u" | "winvistu" | "windowsvistu" | "windows vistu" )
VERSION="winvistax64-ultimate" VERSION="winvistax64-ultimate"
;; ;;
"vistax86" | "winvistax86" | "windowsvistax86" | "winvistax86-enterprise" ) "vistax86" | "vex86" | "6x86" | "winvistax86" | "windowsvistax86" | "winvistax86-enterprise" )
VERSION="winvistax86" VERSION="winvistax86"
[ -z "$DETECTED" ] && DETECTED="winvistax86-enterprise" [ -z "$DETECTED" ] && DETECTED="winvistax86-enterprise"
;; ;;
"xp" | "xp32" | "xpx86" | "winxp" | "winxp86" | "windowsxp" | "windows xp" ) "xp" | "xp32" | "xpx86" | "5" | "5x86" | "winxp" | "winxp86" | "windowsxp" | "windows xp" )
VERSION="winxpx86" VERSION="winxpx86"
;; ;;
"xp64" | "xpx64" | "winxp64" | "winxpx64" | "windowsxp64" | "windowsxpx64" ) "xp64" | "xpx64" | "5x64" | "winxp64" | "winxpx64" | "windowsxp64" | "windowsxpx64" )
VERSION="winxpx64" VERSION="winxpx64"
;; ;;
"25" | "2025" | "win25" | "win2025" | "windows2025" | "windows 2025" ) "25" | "2025" | "win25" | "win2025" | "windows2025" | "windows 2025" )
@@ -105,22 +121,6 @@ parseVersion() {
VERSION="tiny10" VERSION="tiny10"
[ -z "$DETECTED" ] && DETECTED="win10x64-ltsc" [ -z "$DETECTED" ] && DETECTED="win10x64-ltsc"
;; ;;
"iot11" | "11iot" | "win11-iot" | "win11x64-iot" | "win11x64-enterprise-iot-eval" )
VERSION="win11x64-enterprise-iot-eval"
[ -z "$DETECTED" ] && DETECTED="win11x64-iot"
;;
"iot10" | "10iot" | "win10-iot" | "win10x64-iot" | "win10x64-enterprise-iot-eval" )
VERSION="win10x64-enterprise-iot-eval"
[ -z "$DETECTED" ] && DETECTED="win10x64-iot"
;;
"ltsc11" | "11ltsc" | "win11-ltsc" | "win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
VERSION="win11x64-enterprise-ltsc-eval"
[ -z "$DETECTED" ] && DETECTED="win11x64-ltsc"
;;
"ltsc10" | "10ltsc" | "win10-ltsc" | "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
VERSION="win10x64-enterprise-ltsc-eval"
[ -z "$DETECTED" ] && DETECTED="win10x64-ltsc"
;;
esac esac
return 0 return 0
@@ -473,6 +473,9 @@ fromFile() {
;; ;;
esac esac
local add=""
[[ "$arch" != "x64" ]] && add="$arch"
case "${file// /_}" in case "${file// /_}" in
"win7"* | "win_7"* | *"windows7"* | *"windows_7"* ) "win7"* | "win_7"* | *"windows7"* | *"windows_7"* )
id="win7${arch}" id="win7${arch}"
@@ -502,25 +505,25 @@ fromFile() {
id="tiny10" id="tiny10"
;; ;;
*"server2025"* | *"server_2025"* ) *"server2025"* | *"server_2025"* )
id="win2025" id="win2025${add}"
;; ;;
*"server2022"* | *"server_2022"* ) *"server2022"* | *"server_2022"* )
id="win2022" id="win2022${add}"
;; ;;
*"server2019"* | *"server_2019"* ) *"server2019"* | *"server_2019"* )
id="win2019" id="win2019${add}"
;; ;;
*"server2016"* | *"server_2016"* ) *"server2016"* | *"server_2016"* )
id="win2016" id="win2016${add}"
;; ;;
*"server2012"* | *"server_2012"* ) *"server2012"* | *"server_2012"* )
id="win2012r2" id="win2012r2${add}"
;; ;;
*"server2008"* | *"server_2008"* ) *"server2008"* | *"server_2008"* )
id="win2008r2" id="win2008r2${add}"
;; ;;
*"server2003"* | *"server_2003"* ) *"server2003"* | *"server_2003"* )
id="win2003r2" id="win2003r2${add}"
;; ;;
esac esac
@@ -538,18 +541,22 @@ fromName() {
local name="$1" local name="$1"
local arch="$2" local arch="$2"
local add=""
[[ "$arch" != "x64" ]] && add="$arch"
case "${name,,}" in case "${name,,}" in
*"server 2025"* ) id="win2025" ;;
*"server 2022"* ) id="win2022" ;;
*"server 2019"* ) id="win2019" ;;
*"server 2016"* ) id="win2016" ;;
*"server 2012"* ) id="win2012r2" ;;
*"server 2008"* ) id="win2008r2" ;;
*"windows 7"* ) id="win7${arch}" ;; *"windows 7"* ) id="win7${arch}" ;;
*"windows 8"* ) id="win81${arch}" ;; *"windows 8"* ) id="win81${arch}" ;;
*"windows 10"* ) id="win10${arch}" ;; *"windows 10"* ) id="win10${arch}" ;;
*"windows 11"* ) id="win11${arch}" ;; *"windows 11"* ) id="win11${arch}" ;;
*"windows vista"* ) id="winvista${arch}" ;; *"windows vista"* ) id="winvista${arch}" ;;
*"server 2025"* ) id="win2025${add}" ;;
*"server 2022"* ) id="win2022${add}" ;;
*"server 2019"* ) id="win2019${add}" ;;
*"server 2016"* ) id="win2016${add}" ;;
*"server 2012"* ) id="win2012r2${add}" ;;
*"server 2008"* ) id="win2008r2${add}" ;;
*"server 2003"* ) id="win2003r2${add}" ;;
esac esac
echo "$id" echo "$id"
@@ -589,7 +596,7 @@ getVersion() {
*" enterprise"* ) id="$id-enterprise" ;; *" enterprise"* ) id="$id-enterprise" ;;
esac esac
;; ;;
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* ) "win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* | "win2003"* )
case "${name,,}" in case "${name,,}" in
*" evaluation"* ) id="$id-eval" ;; *" evaluation"* ) id="$id-eval" ;;
esac esac
@@ -950,65 +957,297 @@ getLink3() {
local sum="" local sum=""
local size="" local size=""
local host="https://drive.massgrave.dev" local host="https://drive.massgrave.dev"
local w19="windows_server_2019_x64_dvd"
local w25="windows_server_2025_x64_dvd"
local w16="windows_server_2016_vl_x64_dvd"
local w12="windows_server_2012_r2_vl_with_update_x64_dvd"
local w08="windows_server_2008_r2_with_sp1_vl_build_x64_dvd"
local w81="windows_8.1_enterprise_with_update_x64_dvd"
local l11="windows_11_enterprise_ltsc_2024_x64_dvd"
local l10="windows_10_enterprise_ltsc_2021_x64_dvd"
local c11="windows_11_consumer_editions_version_24h2_x64_dvd"
local b11="windows_11_business_editions_version_24h2_x64_dvd"
local w22="windows_server_2022_updated_oct_2024_x64_dvd_d1a47ecc"
local b10="windows_10_business_editions_version_22h2_updated_oct_2024_x64_dvd"
local c10="windows_10_consumer_editions_version_22h2_updated_oct_2024_x64_dvd_d0cfb2e9"
culture=$(getLanguage "$lang" "culture") culture=$(getLanguage "$lang" "culture")
case "${id,,}" in case "${id,,}" in
"win11x64" )
case "${culture,,}" in
"ar" | "ar-"* ) url="ar-sa_${c11}_3c9a7ef3.iso" ;;
"bg" | "bg-"* ) url="bg-bg_${c11}_f8623745.iso" ;;
"cs" | "cs-"* ) url="cs-cz_${c11}_ae72ca80.iso" ;;
"da" | "da-"* ) url="da-dk_${c11}_4f25c452.iso" ;;
"de" | "de-"* ) url="de-de_${c11}_bc4adebe.iso" ;;
"el" | "el-"* ) url="el-gr_${c11}_9e6ef9a0.iso" ;;
"gb" | "en-gb" ) url="en-gb_${c11}_4b3a8183.iso" ;;
"en" | "en-"* )
size=5819484160
sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
url="en-us_${c11}_1d5fcad3.iso" ;;
"mx" | "es-mx" ) url="es-es_${c11}_3bc0e5c3.iso" ;;
"es" | "es-"* ) url="es-mx_${c11}_a28d9dab.iso" ;;
"et" | "et-"* ) url="et-ee_${c11}_48306c65.iso" ;;
"fi" | "fi-"* ) url="fi-fi_${c11}_21618747.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_${c11}_42755257.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${c11}_033875c5.iso" ;;
"he" | "he-"* ) url="he-il_${c11}_533bc3ac.iso" ;;
"hr" | "hr-"* ) url="hr-hr_${c11}_40c769ed.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${c11}_7d2259d6.iso" ;;
"it" | "it-"* ) url="it-it_${c11}_33e81ff0.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${c11}_fc6538fd.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${c11}_f09a396b.iso" ;;
"lt" | "lt-"* ) url="lt-lt_${c11}_22d54265.iso" ;;
"lv" | "lv-"* ) url="lv-lv_${c11}_5ff65441.iso" ;;
"nb" | "nb-"* ) url="nb-no_${c11}_5a5d625b.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${c11}_7959020a.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${c11}_c0dcd21b.iso" ;;
"br" | "pt-br" ) url="pt-br_${c11}_751fe150.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${c11}_e0df188a.iso" ;;
"ro" | "ro-"* ) url="ro-ro_${c11}_0821b265.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${c11}_784471d8.iso" ;;
"sk" | "sk-"* ) url="sk-sk_${c11}_fd13020e.iso" ;;
"sl" | "sl-"* ) url="sl-si_${c11}_9aa9f408.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_${c11}_febab1a9.iso" ;;
"sv" | "sv-"* ) url="sv-se_${c11}_fe34647f.iso" ;;
"th" | "th-"* ) url="th-th_${c11}_fc3e523e.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${c11}_443fefaf.iso" ;;
"uk" | "uk-"* ) url="uk-ua_${c11}_32966915.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${c11}_d0825b63.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${c11}_bfc0d79b.iso" ;;
esac
;;
"win11x64-enterprise" | "win11x64-enterprise-eval" )
case "${culture,,}" in
"ar" | "ar-"* ) url="ar-sa_${b11}_47dae48e.iso" ;;
"bg" | "bg-"* ) url="bg-bg_${b11}_4231caca.iso" ;;
"cs" | "cs-"* ) url="cs-cz_${b11}_ca1661fd.iso" ;;
"da" | "da-"* ) url="da-dk_${b11}_ac0db9fc.iso" ;;
"de" | "de-"* ) url="de-de_${b11}_87a70226.iso" ;;
"el" | "el-"* ) url="el-gr_${b11}_946ba34d.iso" ;;
"gb" | "en-gb" ) url="en-gb_${b11}_27d8c2f1.iso" ;;
"en" | "en-"* )
size=5722114048
sum="d0dca325314322518ae967d58c3061bcae57ee9743a8a1cf374aad8637e5e8ac"
url="en-us_${b11}_59a1851e.iso" ;;
"mx" | "es-mx" ) url="es-es_${b11}_86632f8d.iso" ;;
"es" | "es-"* ) url="es-mx_${b11}_6ee25ce4.iso" ;;
"et" | "et-"* ) url="et-ee_${b11}_c26c1e3a.iso" ;;
"fi" | "fi-"* ) url="fi-fi_${b11}_59dd0bb5.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_${b11}_a02f0c99.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${b11}_c0a4510e.iso" ;;
"he" | "he-"* ) url="he-il_${b11}_c844d280.iso" ;;
"hr" | "hr-"* ) url="hr-hr_${b11}_6e4839cc.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${b11}_aed71101.iso" ;;
"it" | "it-"* ) url="it-it_${b11}_5552c3a1.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${b11}_7fdb7541.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${b11}_646bb9fc.iso" ;;
"lt" | "lt-"* ) url="lt-lt_${b11}_54d6d7e2.iso" ;;
"lv" | "lv-"* ) url="lv-lv_${b11}_acee0541.iso" ;;
"nb" | "nb-"* ) url="nb-no_${b11}_78f22960.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${b11}_0719b251.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${b11}_1a183794.iso" ;;
"br" | "pt-br" ) url="pt-br_${b11}_ecc90645.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${b11}_e7bf77a1.iso" ;;
"ro" | "ro-"* ) url="ro-ro_${b11}_9adc8d7b.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${b11}_f9b9b5d6.iso" ;;
"sk" | "sk-"* ) url="sk-sk_${b11}_1a91433b.iso" ;;
"sl" | "sl-"* ) url="sl-si_${b11}_0b79bd14.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_${b11}_8a4b35b5.iso" ;;
"sv" | "sv-"* ) url="sv-se_${b11}_55ad9818.iso" ;;
"th" | "th-"* ) url="th-th_${b11}_a2a350c3.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${b11}_f35a9f1b.iso" ;;
"uk" | "uk-"* ) url="uk-ua_${b11}_38ff1d1d.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${b11}_a9b30de5.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${b11}_5f9e5858.iso" ;;
esac
;;
"win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" )
case "${culture,,}" in
"ar" | "ar-"* ) url="ar-sa_${l11}_8012f159.iso" ;;
"bg" | "bg-"* ) url="bg-bg_${l11}_2778f4e8.iso" ;;
"cs" | "cs-"* ) url="cs-cz_${l11}_d4ef05f2.iso" ;;
"da" | "da-"* ) url="da-dk_${l11}_c231c267.iso" ;;
"de" | "de-"* ) url="de-de_${l11}_4f136f69.iso" ;;
"el" | "el-"* ) url="el-gr_${l11}_54eaabb2.iso" ;;
"gb" | "en-gb" ) url="en-gb_${l11}_e2137661.iso" ;;
"en" | "en-"* )
size=5125844992
sum="157d8365a517c40afeb3106fdd74d0836e1025debbc343f2080e1a8687607f51"
url="en-us_${l11}_965cfb00.iso" ;;
"mx" | "es-mx" ) url="es-mx_${l11}_3310c094.iso" ;;
"es" | "es-"* ) url="es-es_${l11}_77392d61.iso" ;;
"et" | "et-"* ) url="et-ee_${l11}_2dbd4bfe.iso" ;;
"fi" | "fi-"* ) url="fi-fi_${l11}_998f5df6.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_${l11}_78732953.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${l11}_d66e386e.iso" ;;
"he" | "he-"* ) url="he-il_${l11}_fae050ec.iso" ;;
"hr" | "hr-"* ) url="hr-hr_${l11}_e3594411.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${l11}_8fea6034.iso" ;;
"it" | "it-"* ) url="it-it_${l11}_1e8cabb6.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${l11}_e59ad418.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${l11}_b6b6eb18.iso" ;;
"lt" | "lt-"* ) url="lt-lt_${l11}_145479e9.iso" ;;
"lv" | "lv-"* ) url="lv-lv_${l11}_e0ebc53d.iso" ;;
"nb" | "nb-"* ) url="nb-no_${l11}_d41eeb48.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${l11}_e3063aab.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${l11}_e00807a1.iso" ;;
"br" | "pt-br" ) url="pt-br_${l11}_2bb6b75b.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${l11}_2f34bd6b.iso" ;;
"ro" | "ro-"* ) url="ro-ro_${l11}_2eadb4df.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${l11}_f9af5773.iso" ;;
"sk" | "sk-"* ) url="sk-sk_${l11}_03b916e7.iso" ;;
"sl" | "sl-"* ) url="sl-si_${l11}_310b3a76.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_${l11}_3dfa5da5.iso" ;;
"sv" | "sv-"* ) url="sv-se_${l11}_191cf991.iso" ;;
"th" | "th-"* ) url="th-th_${l11}_47ce2c8a.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${l11}_27bdab81.iso" ;;
"uk" | "uk-"* ) url="uk-ua_${l11}_b3f00872.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${l11}_6287d84d.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${l11}_cff9cd2d.iso" ;;
esac
;;
"win11x64-iot" | "win11x64-enterprise-iot-eval" ) "win11x64-iot" | "win11x64-enterprise-iot-eval" )
[[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0
size=5144817664 size=5144817664
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a" sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a"
url="X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso" url="en-us_windows_11_iot_enterprise_ltsc_2024_x64_dvd_f6b14814.iso"
;; ;;
"win11x64-ltsc" | "win11x64-enterprise-ltsc-eval" ) "win10x64" )
[[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-us" ]] && return 0 case "${culture,,}" in
size=5144817664 "ar" | "ar-"* ) url="ar-sa_${c10}.iso" ;;
sum="4f59662a96fc1da48c1b415d6c369d08af55ddd64e8f1c84e0166d9e50405d7a" "bg" | "bg-"* ) url="bg-bg_${c10}.iso" ;;
url="X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso" "cs" | "cs-"* ) url="cs-cz_${c10}.iso" ;;
"da" | "da-"* ) url="da-dk_${c10}.iso" ;;
"de" | "de-"* ) url="de-de_${c10}.iso" ;;
"el" | "el-"* ) url="el-gr_${c10}.iso" ;;
"gb" | "en-gb" ) url="en-gb_${c10}.iso" ;;
"en" | "en-"* )
size=7176140800
sum="dda45d271061937657689b30944c792be97405fd5ca2110094049dc01a9201ec"
url="en-us_${c10}.iso" ;;
"mx" | "es-mx" ) url="es-mx_${c10}.iso" ;;
"es" | "es-"* ) url="es-es_${c10}.iso" ;;
"et" | "et-"* ) url="et-ee_${c10}.iso" ;;
"fi" | "fi-"* ) url="fi-fi_${c10}.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_${c10}.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${c10}.iso" ;;
"he" | "he-"* ) url="he-il_${c10}.iso" ;;
"hr" | "hr-"* ) url="hr-hr_${c10}.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${c10}.iso" ;;
"it" | "it-"* ) url="it-it_${c10}.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${c10}.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${c10}.iso" ;;
"lt" | "lt-"* ) url="lt-lt_${c10}.iso" ;;
"lv" | "lv-"* ) url="lv-lv_${c10}.iso" ;;
"nb" | "nb-"* ) url="nb-no_${c10}.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${c10}.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${c10}.iso" ;;
"br" | "pt-br" ) url="pt-br_${c10}.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${c10}.iso" ;;
"ro" | "ro-"* ) url="ro-ro_${c10}.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${c10}.iso" ;;
"sk" | "sk-"* ) url="sk-sk_${c10}.iso" ;;
"sl" | "sl-"* ) url="sl-si_${c10}.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_${c10}.iso" ;;
"sv" | "sv-"* ) url="sv-se_${c10}.iso" ;;
"th" | "th-"* ) url="th-th_${c10}.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${c10}.iso" ;;
"uk" | "uk-"* ) url="uk-ua_${c10}.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${c10}.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${c10}.iso" ;;
esac
;;
"win10x64-enterprise" | "win10x64-enterprise-eval" )
case "${culture,,}" in
"ar" | "ar-"* ) url="ar-sa_${b10}_72d26609.iso" ;;
"bg" | "bg-"* ) url="bg-bg_${b10}_916cba75.iso" ;;
"cs" | "cs-"* ) url="cs-cz_${b10}_737b3dce.iso" ;;
"da" | "da-"* ) url="da-dk_${b10}_beb2874a.iso" ;;
"de" | "de-"* ) url="de-de_${b10}_e5656293.iso" ;;
"el" | "el-"* ) url="el-gr_${b10}_3dcced88.iso" ;;
"gb" | "en-gb" ) url="en-gb_${b10}_4b87ccc8.iso" ;;
"en" | "en-"* )
size=6985318400
sum="cd224fff371bbce4ab2120a3ace8ed30dc5c48c87f766ff699eed3327d0db83e"
url="en-us_${b10}_66a185c7.iso" ;;
"mx" | "es-mx" ) url="es-mx_${b10}_c71c3a9b.iso" ;;
"es" | "es-"* ) url="es-es_${b10}_6a893bdb.iso" ;;
"et" | "et-"* ) url="et-ee_${b10}_e73ca294.iso" ;;
"fi" | "fi-"* ) url="fi-fi_${b10}_b4138a1f.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_${b10}_fa1fcfd1.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${b10}_2582115c.iso" ;;
"he" | "he-"* ) url="he-il_${b10}_070da6e1.iso" ;;
"hr" | "hr-"* ) url="hr-hr_${b10}_7ab0b83d.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${b10}_9ae1341c.iso" ;;
"it" | "it-"* ) url="it-it_${b10}_ed9771c1.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${b10}_41fb6974.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${b10}_8ee84458.iso" ;;
"lt" | "lt-"* ) url="lt-lt_${b10}_dde00c8b.iso" ;;
"lv" | "lv-"* ) url="lv-lv_${b10}_3c6ec670.iso" ;;
"nb" | "nb-"* ) url="nb-no_${b10}_5c0830a7.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${b10}_98c1911c.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${b10}_21470c6f.iso" ;;
"br" | "pt-br" ) url="pt-br_${b10}_a8287ba4.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${b10}_927e183d.iso" ;;
"ro" | "ro-"* ) url="ro-ro_${b10}_05768a51.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${b10}_e0d31c6c.iso" ;;
"sk" | "sk-"* ) url="sk-sk_${b10}_a09d6210.iso" ;;
"sl" | "sl-"* ) url="sl-si_${b10}_b6e9be37.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_${b10}_d3114222.iso" ;;
"sv" | "sv-"* ) url="sv-se_${b10}_4fbbd5fa.iso" ;;
"th" | "th-"* ) url="th-th_${b10}_c820f914.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${b10}_62d51ca5.iso" ;;
"uk" | "uk-"* ) url="uk-ua_${b10}_3d50cf88.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${b10}_2fab2287.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${b10}_52bd0537.iso" ;;
esac
;; ;;
"win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" ) "win10x64-ltsc" | "win10x64-enterprise-ltsc-eval" )
case "${culture,,}" in case "${culture,,}" in
"ar" | "ar-"* ) url="ar-sa_windows_10_enterprise_ltsc_2021_x64_dvd_60bc2a7a.iso" ;; "ar" | "ar-"* ) url="ar-sa_${l10}_60bc2a7a.iso" ;;
"bg" | "bg-"* ) url="bg-bg_windows_10_enterprise_ltsc_2021_x64_dvd_b0887275.iso" ;; "bg" | "bg-"* ) url="bg-bg_${l10}_b0887275.iso" ;;
"cs" | "cs-"* ) url="cs-cz_windows_10_enterprise_ltsc_2021_x64_dvd_d624c653.iso" ;; "cs" | "cs-"* ) url="cs-cz_${l10}_d624c653.iso" ;;
"da" | "da-"* ) url="da-dk_windows_10_enterprise_ltsc_2021_x64_dvd_6ec511bb.iso" ;; "da" | "da-"* ) url="da-dk_${l10}_6ec511bb.iso" ;;
"de" | "de-"* ) url="de-de_windows_10_enterprise_ltsc_2021_x64_dvd_71796d33.iso" ;; "de" | "de-"* ) url="de-de_${l10}_71796d33.iso" ;;
"el" | "el-"* ) url="el-gr_windows_10_enterprise_ltsc_2021_x64_dvd_c83eab34.iso" ;; "el" | "el-"* ) url="el-gr_${l10}_c83eab34.iso" ;;
"gb" | "en-gb" ) url="en-gb_windows_10_enterprise_ltsc_2021_x64_dvd_7fe51fe8.iso" ;; "gb" | "en-gb" ) url="en-gb_${l10}_7fe51fe8.iso" ;;
"en" | "en-"* ) "en" | "en-"* )
size=4899461120 size=4899461120
sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d" sum="c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
url="en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso" ;; url="en-us_${l10}_d289cf96.iso" ;;
"mx" | "es-mx" ) url="es-mx_windows_10_enterprise_ltsc_2021_x64_dvd_f6aaf384.iso" ;; "mx" | "es-mx" ) url="es-mx_${l10}_f6aaf384.iso" ;;
"es" | "es-"* ) url="es-es_windows_10_enterprise_ltsc_2021_x64_dvd_51d721ea.iso" ;; "es" | "es-"* ) url="es-es_${l10}_51d721ea.iso" ;;
"et" | "et-"* ) url="et-ee_windows_10_enterprise_ltsc_2021_x64_dvd_012a5c50.iso" ;; "et" | "et-"* ) url="et-ee_${l10}_012a5c50.iso" ;;
"fi" | "fi-"* ) url="fi-fi_windows_10_enterprise_ltsc_2021_x64_dvd_551582d9.iso" ;; "fi" | "fi-"* ) url="fi-fi_${l10}_551582d9.iso" ;;
"ca" | "fr-ca" ) url="fr-ca_windows_10_enterprise_ltsc_2021_x64_dvd_2770e649.iso" ;; "ca" | "fr-ca" ) url="fr-ca_${l10}_2770e649.iso" ;;
"fr" | "fr-"* ) url="fr-fr_windows_10_enterprise_ltsc_2021_x64_dvd_bda01eb0.iso" ;; "fr" | "fr-"* ) url="fr-fr_${l10}_bda01eb0.iso" ;;
"he" | "he-"* ) url="he-il_windows_10_enterprise_ltsc_2021_x64_dvd_3a55ecd6.iso" ;; "he" | "he-"* ) url="he-il_${l10}_3a55ecd6.iso" ;;
"hr" | "hr-"* ) url="hr-hr_windows_10_enterprise_ltsc_2021_x64_dvd_f5085b75.iso" ;; "hr" | "hr-"* ) url="hr-hr_${l10}_f5085b75.iso" ;;
"hu" | "hu-"* ) url="hu-hu_windows_10_enterprise_ltsc_2021_x64_dvd_d541ddb3.iso" ;; "hu" | "hu-"* ) url="hu-hu_${l10}_d541ddb3.iso" ;;
"it" | "it-"* ) url="it-it_windows_10_enterprise_ltsc_2021_x64_dvd_0c1aa034.iso" ;; "it" | "it-"* ) url="it-it_${l10}_0c1aa034.iso" ;;
"ja" | "ja-"* ) url="ja-jp_windows_10_enterprise_ltsc_2021_x64_dvd_ef58c6a1.iso" ;; "ja" | "ja-"* ) url="ja-jp_${l10}_ef58c6a1.iso" ;;
"ko" | "ko-"* ) url="ko-kr_windows_10_enterprise_ltsc_2021_x64_dvd_6d26f398.iso" ;; "ko" | "ko-"* ) url="ko-kr_${l10}_6d26f398.iso" ;;
"lt" | "lt-"* ) url="lt-lt_windows_10_enterprise_ltsc_2021_x64_dvd_9ffbbd5b.iso" ;; "lt" | "lt-"* ) url="lt-lt_${l10}_9ffbbd5b.iso" ;;
"lv" | "lv-"* ) url="lv-lv_windows_10_enterprise_ltsc_2021_x64_dvd_6c89d2e0.iso" ;; "lv" | "lv-"* ) url="lv-lv_${l10}_6c89d2e0.iso" ;;
"nb" | "nb-"* ) url="nb-no_windows_10_enterprise_ltsc_2021_x64_dvd_c65c51a5.iso" ;; "nb" | "nb-"* ) url="nb-no_${l10}_c65c51a5.iso" ;;
"nl" | "nl-"* ) url="nl-nl_windows_10_enterprise_ltsc_2021_x64_dvd_88f53466.iso" ;; "nl" | "nl-"* ) url="nl-nl_${l10}_88f53466.iso" ;;
"pl" | "pl-"* ) url="pl-pl_windows_10_enterprise_ltsc_2021_x64_dvd_eff40776.iso" ;; "pl" | "pl-"* ) url="pl-pl_${l10}_eff40776.iso" ;;
"br" | "pt-br" ) url="pt-br_windows_10_enterprise_ltsc_2021_x64_dvd_f318268e.iso" ;; "br" | "pt-br" ) url="pt-br_${l10}_f318268e.iso" ;;
"pt" | "pt-"* ) url="pt-pt_windows_10_enterprise_ltsc_2021_x64_dvd_f2e9b6a0.iso" ;; "pt" | "pt-"* ) url="pt-pt_${l10}_f2e9b6a0.iso" ;;
"ro" | "ro-"* ) url="ro-ro_windows_10_enterprise_ltsc_2021_x64_dvd_ae2284d6.iso" ;; "ro" | "ro-"* ) url="ro-ro_${l10}_ae2284d6.iso" ;;
"ru" | "ru-"* ) url="ru-ru_windows_10_enterprise_ltsc_2021_x64_dvd_5044a1e7.iso" ;; "ru" | "ru-"* ) url="ru-ru_${l10}_5044a1e7.iso" ;;
"sk" | "sk-"* ) url="sk-sk_windows_10_enterprise_ltsc_2021_x64_dvd_d6c64c5f.iso" ;; "sk" | "sk-"* ) url="sk-sk_${l10}_d6c64c5f.iso" ;;
"sl" | "sl-"* ) url="sl-si_windows_10_enterprise_ltsc_2021_x64_dvd_ec090386.iso" ;; "sl" | "sl-"* ) url="sl-si_${l10}_ec090386.iso" ;;
"sr" | "sr-"* ) url="sr-latn-rs_windows_10_enterprise_ltsc_2021_x64_dvd_2d2f8815.iso" ;; "sr" | "sr-"* ) url="sr-latn-rs_${l10}_2d2f8815.iso" ;;
"sv" | "sv-"* ) url="sv-se_windows_10_enterprise_ltsc_2021_x64_dvd_9a28bb6b.iso" ;; "sv" | "sv-"* ) url="sv-se_${l10}_9a28bb6b.iso" ;;
"th" | "th-"* ) url="th-th_windows_10_enterprise_ltsc_2021_x64_dvd_b7ed34d6.iso" ;; "th" | "th-"* ) url="th-th_${l10}_b7ed34d6.iso" ;;
"tr" | "tr-"* ) url="tr-tr_windows_10_enterprise_ltsc_2021_x64_dvd_e55b1896.iso" ;; "tr" | "tr-"* ) url="tr-tr_${l10}_e55b1896.iso" ;;
"uk" | "uk-"* ) url="uk-ua_windows_10_enterprise_ltsc_2021_x64_dvd_816da3c3.iso" ;; "uk" | "uk-"* ) url="uk-ua_${l10}_816da3c3.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_windows_10_enterprise_ltsc_2021_x64_dvd_80dba877.iso" ;; "zh-hk" | "zh-tw" ) url="zh-tw_${l10}_80dba877.iso" ;;
"zh" | "zh-"* ) url="zh-cn_windows_10_enterprise_ltsc_2021_x64_dvd_033b7312.iso" ;; "zh" | "zh-"* ) url="zh-cn_${l10}_033b7312.iso" ;;
esac esac
;; ;;
"win10x64-iot" | "win10x64-enterprise-iot-eval" ) "win10x64-iot" | "win10x64-enterprise-iot-eval" )
@@ -1019,96 +1258,198 @@ getLink3() {
;; ;;
"win81x64-enterprise" | "win81x64-enterprise-eval" ) "win81x64-enterprise" | "win81x64-enterprise-eval" )
case "${culture,,}" in case "${culture,,}" in
"ar" | "ar-"* ) url="ar_windows_8.1_enterprise_with_update_x64_dvd_6050360.iso" ;; "ar" | "ar-"* ) url="ar_${w81}_6050360.iso" ;;
"bg" | "bg-"* ) url="bg_windows_8.1_enterprise_with_update_x64_dvd_6050367.iso" ;; "bg" | "bg-"* ) url="bg_${w81}_6050367.iso" ;;
"cs" | "cs-"* ) url="cs_windows_8.1_enterprise_with_update_x64_dvd_6050393.iso" ;; "cs" | "cs-"* ) url="cs_${w81}_6050393.iso" ;;
"da" | "da-"* ) url="da_windows_8.1_enterprise_with_update_x64_dvd_6050394.iso" ;; "da" | "da-"* ) url="da_${w81}_6050394.iso" ;;
"de" | "de-"* ) url="de_windows_8.1_enterprise_with_update_x64_dvd_6050501.iso" ;; "de" | "de-"* ) url="de_${w81}_6050501.iso" ;;
"el" | "el-"* ) url="el_windows_8.1_enterprise_with_update_x64_dvd_6050503.iso" ;; "el" | "el-"* ) url="el_${w81}_6050503.iso" ;;
"gb" | "en-gb" ) url="en-gb_windows_8.1_enterprise_with_update_x64_dvd_6054383.iso" ;; "gb" | "en-gb" ) url="en-gb_${w81}_6054383.iso" ;;
"en" | "en-"* ) "en" | "en-"* )
size=4139163648 size=4139163648
sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1" sum="c3c604c03677504e8905090a8ce5bb1dde76b6fd58e10f32e3a25bef21b2abe1"
url="en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso" ;; url="en_${w81}_6054382.iso" ;;
"es" | "es-"* ) url="es_windows_8.1_enterprise_with_update_x64_dvd_6050578.iso" ;; "es" | "es-"* ) url="es_${w81}_6050578.iso" ;;
"et" | "et-"* ) url="et_windows_8.1_enterprise_with_update_x64_dvd_6054384.iso" ;; "et" | "et-"* ) url="et_${w81}_6054384.iso" ;;
"fi" | "fi-"* ) url="fi_windows_8.1_enterprise_with_update_x64_dvd_6050497.iso" ;; "fi" | "fi-"* ) url="fi_${w81}_6050497.iso" ;;
"fr" | "fr-"* ) url="fr_windows_8.1_enterprise_with_update_x64_dvd_6050499.iso" ;; "fr" | "fr-"* ) url="fr_${w81}_6050499.iso" ;;
"he" | "he-"* ) url="he_windows_8.1_enterprise_with_update_x64_dvd_6050504.iso" ;; "he" | "he-"* ) url="he_${w81}_6050504.iso" ;;
"hr" | "hr-"* ) url="hr_windows_8.1_enterprise_with_update_x64_dvd_6050391.iso" ;; "hr" | "hr-"* ) url="hr_${w81}_6050391.iso" ;;
"hu" | "hu-"* ) url="hu_windows_8.1_enterprise_with_update_x64_dvd_6050505.iso" ;; "hu" | "hu-"* ) url="hu_${w81}_6050505.iso" ;;
"it" | "it-"* ) url="it_windows_8.1_enterprise_with_update_x64_dvd_6050507.iso" ;; "it" | "it-"* ) url="it_${w81}_6050507.iso" ;;
"ja" | "ja-"* ) url="ja_windows_8.1_enterprise_with_update_x64_dvd_6050508.iso" ;; "ja" | "ja-"* ) url="ja_${w81}_6050508.iso" ;;
"ko" | "ko-"* ) url="ko_windows_8.1_enterprise_with_update_x64_dvd_6050509.iso" ;; "ko" | "ko-"* ) url="ko_${w81}_6050509.iso" ;;
"lt" | "lt-"* ) url="lt_windows_8.1_enterprise_with_update_x64_dvd_6050511.iso" ;; "lt" | "lt-"* ) url="lt_${w81}_6050511.iso" ;;
"lv" | "lv-"* ) url="lv_windows_8.1_enterprise_with_update_x64_dvd_6050510.iso" ;; "lv" | "lv-"* ) url="lv_${w81}_6050510.iso" ;;
"nb" | "nb-"* ) url="nb_windows_8.1_enterprise_with_update_x64_dvd_6050512.iso" ;; "nb" | "nb-"* ) url="nb_${w81}_6050512.iso" ;;
"nl" | "nl-"* ) url="nl_windows_8.1_enterprise_with_update_x64_dvd_6054381.iso" ;; "nl" | "nl-"* ) url="nl_${w81}_6054381.iso" ;;
"pl" | "pl-"* ) url="pl_windows_8.1_enterprise_with_update_x64_dvd_6050515.iso" ;; "pl" | "pl-"* ) url="pl_${w81}_6050515.iso" ;;
"br" | "pt-br" ) url="pt_windows_8.1_enterprise_with_update_x64_dvd_6050521.iso" ;; "br" | "pt-br" ) url="pt_${w81}_6050521.iso" ;;
"pt" | "pt-"* ) url="pp_windows_8.1_enterprise_with_update_x64_dvd_6050526.iso" ;; "pt" | "pt-"* ) url="pp_${w81}_6050526.iso" ;;
"ro" | "ro-"* ) url="ro_windows_8.1_enterprise_with_update_x64_dvd_6050534.iso" ;; "ro" | "ro-"* ) url="ro_${w81}_6050534.iso" ;;
"ru" | "ru-"* ) url="ru_windows_8.1_enterprise_with_update_x64_dvd_6050542.iso" ;; "ru" | "ru-"* ) url="ru_${w81}_6050542.iso" ;;
"sk" | "sk-"* ) url="sk_windows_8.1_enterprise_with_update_x64_dvd_6050562.iso" ;; "sk" | "sk-"* ) url="sk_${w81}_6050562.iso" ;;
"sl" | "sl-"* ) url="sl_windows_8.1_enterprise_with_update_x64_dvd_6050570.iso" ;; "sl" | "sl-"* ) url="sl_${w81}_6050570.iso" ;;
"sr" | "sr-"* ) url="sr-latn_windows_8.1_enterprise_with_update_x64_dvd_6050553.iso" ;; "sr" | "sr-"* ) url="sr-latn_${w81}_6050553.iso" ;;
"sv" | "sv-"* ) url="sv_windows_8.1_enterprise_with_update_x64_dvd_6050590.iso" ;; "sv" | "sv-"* ) url="sv_${w81}_6050590.iso" ;;
"th" | "th-"* ) url="th_windows_8.1_enterprise_with_update_x64_dvd_6050602.iso" ;; "th" | "th-"* ) url="th_${w81}_6050602.iso" ;;
"tr" | "tr-"* ) url="tr_windows_8.1_enterprise_with_update_x64_dvd_6050609.iso" ;; "tr" | "tr-"* ) url="tr_${w81}_6050609.iso" ;;
"uk" | "uk-"* ) url="uk_windows_8.1_enterprise_with_update_x64_dvd_6050618.iso" ;; "uk" | "uk-"* ) url="uk_${w81}_6050618.iso" ;;
"zh-hk" ) url="hk_windows_8.1_enterprise_with_update_x64_dvd_6050380.iso" ;; "zh-hk" ) url="hk_${w81}_6050380.iso" ;;
"zh-tw" ) url="tw_windows_8.1_enterprise_with_update_x64_dvd_6050387.iso" ;; "zh-tw" ) url="tw_${w81}_6050387.iso" ;;
"zh" | "zh-"* ) url="cn_windows_8.1_enterprise_with_update_x64_dvd_6050374.iso" ;; "zh" | "zh-"* ) url="cn_${w81}_6050374.iso" ;;
esac esac
;; ;;
"win2025" | "win2025-eval" ) "win2025" | "win2025-eval" )
case "${culture,,}" in case "${culture,,}" in
"cs" | "cs-"* ) url="cs-cz_windows_server_2025_preview_x64_dvd_8b1f5b49.iso" ;; "cs" | "cs-"* ) url="cs-cz_${w25}_4f54e1b0.iso" ;;
"de" | "de-"* ) url="de-de_windows_server_2025_preview_x64_dvd_1c3dfe1c.iso" ;; "de" | "de-"* ) url="de-de_${w25}_5282a882.iso" ;;
"en" | "en-"* ) "en" | "en-"* )
size=5307176960 size=6013794304
sum="2293897341febdcea599f5412300b470b5288c6fd2b89666a7b27d283e8d3cf3" sum="854109e1f215a29fc3541188297a6ca97c8a8f0f8c4dd6236b78dfdf845bf75e"
url="en-us_windows_server_2025_preview_x64_dvd_ce9eb1a5.iso" ;; url="en-us_${w25}_b7ec10f3.iso" ;;
"es" | "es-"* ) url="es-es_windows_server_2025_preview_x64_dvd_b07cc858.iso" ;; "es" | "es-"* ) url="es-es_${w25}_c15f0ce2.iso" ;;
"fr" | "fr-"* ) url="fr-fr_windows_server_2025_preview_x64_dvd_036e8a78.iso" ;; "fr" | "fr-"* ) url="fr-fr_${w25}_bd6be507.iso" ;;
"hu" | "hu-"* ) url="hu-hu_windows_server_2025_preview_x64_dvd_2d5d77e5.iso" ;; "hu" | "hu-"* ) url="hu-hu_${w25}_e13eb8bf.iso" ;;
"it" | "it-"* ) url="it-it_windows_server_2025_preview_x64_dvd_eaccac73.iso" ;; "it" | "it-"* ) url="it-it_${w25}_98437899.iso" ;;
"ja" | "ja-"* ) url="ja-jp_windows_server_2025_preview_x64_dvd_62f802be.iso" ;; "ja" | "ja-"* ) url="ja-jp_${w25}_7a2e979b.iso" ;;
"ko" | "ko-"* ) url="ko-kr_windows_server_2025_preview_x64_dvd_e2c3e8f0.iso" ;; "ko" | "ko-"* ) url="ko-kr_${w25}_85109737.iso" ;;
"nl" | "nl-"* ) url="nl-nl_windows_server_2025_preview_x64_dvd_314b4ed1.iso" ;; "nl" | "nl-"* ) url="nl-nl_${w25}_5c3218f3.iso" ;;
"pl" | "pl-"* ) url="pl-pl_windows_server_2025_preview_x64_dvd_be4b099e.iso" ;; "pl" | "pl-"* ) url="pl-pl_${w25}_aa368cf8.iso" ;;
"br" | "pt-br" ) url="pt-br_windows_server_2025_preview_x64_dvd_993c803a.iso" ;; "br" | "pt-br" ) url="pt-br_${w25}_66107129.iso" ;;
"pt" | "pt-"* ) url="pt-pt_windows_server_2025_preview_x64_dvd_869aa534.iso" ;; "pt" | "pt-"* ) url="pt-pt_${w25}_62bb3c31.iso" ;;
"ru" | "ru-"* ) url="ru-ru_windows_server_2025_preview_x64_dvd_5ada1817.iso" ;; "ru" | "ru-"* ) url="ru-ru_${w25}_2dfe1679.iso" ;;
"sv" | "sv-"* ) url="sv-se_windows_server_2025_preview_x64_dvd_5fafd4f7.iso" ;; "sv" | "sv-"* ) url="sv-se_${w25}_512bf117.iso" ;;
"tr" | "tr-"* ) url="tr-tr_windows_server_2025_preview_x64_dvd_3aab7fda.iso" ;; "tr" | "tr-"* ) url="tr-tr_${w25}_a03fe256.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_windows_server_2025_preview_x64_dvd_9b147dcd.iso" ;; "zh-hk" | "zh-tw" ) url="zh-tw_${w25}_6d2c01e3.iso" ;;
"zh" | "zh-"* ) url="zh-cn_windows_server_2025_preview_x64_dvd_a12bb0bf.iso" ;; "zh" | "zh-"* ) url="zh-cn_${w25}_1d93dd12.iso" ;;
esac
;;
"win2022" | "win2022-eval" )
case "${culture,,}" in
"cs" | "cs-"* ) url="cs-cz_${w22}.iso" ;;
"de" | "de-"* ) url="de-de_${w22}.iso" ;;
"en" | "en-"* )
size=5973856256
sum="61fa400b6e8f54e644529d024b18a578547147cdf815ea66c4b7961798717291"
url="en-us_${w22}.iso" ;;
"es" | "es-"* ) url="es-es_${w22}.iso" ;;
"fr" | "fr-"* ) url="fr-fr_${w22}.iso" ;;
"hu" | "hu-"* ) url="hu-hu_${w22}.iso" ;;
"it" | "it-"* ) url="it-it_${w22}.iso" ;;
"ja" | "ja-"* ) url="ja-jp_${w22}.iso" ;;
"ko" | "ko-"* ) url="ko-kr_${w22}.iso" ;;
"nl" | "nl-"* ) url="nl-nl_${w22}.iso" ;;
"pl" | "pl-"* ) url="pl-pl_${w22}.iso" ;;
"br" | "pt-br" ) url="pt-br_${w22}.iso" ;;
"pt" | "pt-"* ) url="pt-pt_${w22}.iso" ;;
"ru" | "ru-"* ) url="ru-ru_${w22}.iso" ;;
"sv" | "sv-"* ) url="sv-se_${w22}.iso" ;;
"tr" | "tr-"* ) url="tr-tr_${w22}.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_${w22}.iso" ;;
"zh" | "zh-"* ) url="zh-cn_${w22}.iso" ;;
esac esac
;; ;;
"win2019" | "win2019-eval" ) "win2019" | "win2019-eval" )
case "${culture,,}" in case "${culture,,}" in
"cs" | "cs-"* ) url="cs-cz_windows_server_2019_x64_dvd_3781c31c.iso" ;; "cs" | "cs-"* ) url="cs-cz_${w19}_3781c31c.iso" ;;
"de" | "de-"* ) url="de-de_windows_server_2019_x64_dvd_132f7aa4.iso" ;; "de" | "de-"* ) url="de-de_${w19}_132f7aa4.iso" ;;
"en" | "en-"* ) "en" | "en-"* )
size=5651695616 size=5651695616
sum="ea247e5cf4df3e5829bfaaf45d899933a2a67b1c700a02ee8141287a8520261c" sum="ea247e5cf4df3e5829bfaaf45d899933a2a67b1c700a02ee8141287a8520261c"
url="en-us_windows_server_2019_x64_dvd_f9475476.iso" ;; url="en-us_${w19}_f9475476.iso" ;;
"es" | "es-"* ) url="es-es_windows_server_2019_x64_dvd_3ce0fd9e.iso" ;; "es" | "es-"* ) url="es-es_${w19}_3ce0fd9e.iso" ;;
"fr" | "fr-"* ) url="fr-fr_windows_server_2019_x64_dvd_f6f6acf6.iso" ;; "fr" | "fr-"* ) url="fr-fr_${w19}_f6f6acf6.iso" ;;
"hu" | "hu-"* ) url="hu-hu_windows_server_2019_x64_dvd_1d834c46.iso" ;; "hu" | "hu-"* ) url="hu-hu_${w19}_1d834c46.iso" ;;
"it" | "it-"* ) url="it-it_windows_server_2019_x64_dvd_454267de.iso" ;; "it" | "it-"* ) url="it-it_${w19}_454267de.iso" ;;
"ja" | "ja-"* ) url="ja-jp_windows_server_2019_x64_dvd_3899c3a3.iso" ;; "ja" | "ja-"* ) url="ja-jp_${w19}_3899c3a3.iso" ;;
"ko" | "ko-"* ) url="ko-kr_windows_server_2019_x64_dvd_84101c0a.iso" ;; "ko" | "ko-"* ) url="ko-kr_${w19}_84101c0a.iso" ;;
"nl" | "nl-"* ) url="nl-nl_windows_server_2019_x64_dvd_f69d914e.iso" ;; "nl" | "nl-"* ) url="nl-nl_${w19}_f69d914e.iso" ;;
"pl" | "pl-"* ) url="pl-pl_windows_server_2019_x64_dvd_a50263e1.iso" ;; "pl" | "pl-"* ) url="pl-pl_${w19}_a50263e1.iso" ;;
"br" | "pt-br" ) url="pt-br_windows_server_2019_x64_dvd_aee8c1c2.iso" ;; "br" | "pt-br" ) url="pt-br_${w19}_aee8c1c2.iso" ;;
"pt" | "pt-"* ) url="pt-pt_windows_server_2019_x64_dvd_464373e8.iso" ;; "pt" | "pt-"* ) url="pt-pt_${w19}_464373e8.iso" ;;
"ru" | "ru-"* ) url="ru-ru_windows_server_2019_x64_dvd_e02b76ba.iso" ;; "ru" | "ru-"* ) url="ru-ru_${w19}_e02b76ba.iso" ;;
"sv" | "sv-"* ) url="sv-se_windows_server_2019_x64_dvd_48c1aeff.iso" ;; "sv" | "sv-"* ) url="sv-se_${w19}_48c1aeff.iso" ;;
"tr" | "tr-"* ) url="tr-tr_windows_server_2019_x64_dvd_b51af600.iso" ;; "tr" | "tr-"* ) url="tr-tr_${w19}_b51af600.iso" ;;
"zh-hk" | "zh-tw" ) url="zh-tw_windows_server_2019_x64_dvd_a4c80409.iso" ;; "zh-hk" | "zh-tw" ) url="zh-tw_${w19}_a4c80409.iso" ;;
"zh" | "zh-"* ) url="zh-cn_windows_server_2019_x64_dvd_19d65722.iso" ;; "zh" | "zh-"* ) url="zh-cn_${w19}_19d65722.iso" ;;
esac
;;
"win2016" | "win2016-eval" )
case "${culture,,}" in
"cs" | "cs-"* ) url="cs_${w16}_11636699.iso" ;;
"de" | "de-"* ) url="de_${w16}_11636696.iso" ;;
"en" | "en-"* )
size=6003804160
sum="47919ce8b4993f531ca1fa3f85941f4a72b47ebaa4d3a321fecf83ca9d17e6b8"
url="en_${w16}_11636701.iso" ;;
"es" | "es-"* ) url="es_${w16}_11636712.iso" ;;
"fr" | "fr-"* ) url="fr_${w16}_11636729.iso" ;;
"hu" | "hu-"* ) url="hu_${w16}_11636720.iso" ;;
"it" | "it-"* ) url="it_${w16}_11636710.iso" ;;
"ja" | "ja-"* ) url="ja_${w16}_11645964.iso" ;;
"ko" | "ko-"* ) url="ko_${w16}_11636709.iso" ;;
"nl" | "nl-"* ) url="nl_${w16}_11636731.iso" ;;
"pl" | "pl-"* ) url="pl_${w16}_11636719.iso" ;;
"br" | "pt-br" ) url="pt_${w16}_11636697.iso" ;;
"pt" | "pt-"* ) url="pp_${w16}_11637454.iso" ;;
"ru" | "ru-"* ) url="ru_${w16}_11636694.iso" ;;
"sv" | "sv-"* ) url="sv_${w16}_11636706.iso" ;;
"tr" | "tr-"* ) url="tr_${w16}_11636725.iso" ;;
"zh-hk" | "zh-tw" ) url="ct_${w16}_11636717.iso" ;;
"zh" | "zh-"* ) url="cn_${w16}_11636695.iso" ;;
esac
;;
"win2012r2" | "win2012r2-eval" )
case "${culture,,}" in
"cs" | "cs-"* ) url="cs_${w12}_6052752.iso" ;;
"de" | "de-"* ) url="de_${w12}_6052780.iso" ;;
"en" | "en-"* )
size=5400115200
sum="0e883ce28eb5c6f58a3a3007be978d43edb1035a4585506c1c4504c9e143408d"
url="en_${w12}_6052766.iso" ;;
"es" | "es-"* ) url="es_${w12}_6052831.iso" ;;
"fr" | "fr-"* ) url="fr_${w12}_6052772.iso" ;;
"hu" | "hu-"* ) url="hu_${w12}_6052786.iso" ;;
"it" | "it-"* ) url="it_${w12}_6052792.iso" ;;
"ja" | "ja-"* ) url="ja_${w12}_6052800.iso" ;;
"ko" | "ko-"* ) url="ko_${w12}_6052806.iso" ;;
"nl" | "nl-"* ) url="nl_${w12}_6052760.iso" ;;
"pl" | "pl-"* ) url="pl_${w12}_6052815.iso" ;;
"br" | "pt-br" ) url="pt_${w12}_6052819.iso" ;;
"pt" | "pt-"* ) url="pp_${w12}_6052823.iso" ;;
"ru" | "ru-"* ) url="ru_${w12}_6052827.iso" ;;
"sv" | "sv-"* ) url="sv_${w12}_6052835.iso" ;;
"tr" | "tr-"* ) url="tr_${w12}_6052838.iso" ;;
"zh-hk" ) url="hk_${w12}_6052739.iso" ;;
"zh-tw" ) url="tw_${w12}_6052746.iso" ;;
"zh" | "zh-"* ) url="cn_${w12}_6052729.iso" ;;
esac
;;
"win2008r2" | "win2008r2-eval" )
case "${culture,,}" in
"cs" | "cs-"* ) url="cs_${w08}_617402.iso" ;;
"de" | "de-"* ) url="de_${w08}_617404.iso" ;;
"en" | "en-"* )
size=3166720000
sum="9b0cd5b11cc2e92badb74450f0cac03006d3c63a2ada36cb1eb95c1bf4b2608f"
url="en_${w08}_617403.iso" ;;
"es" | "es-"* ) url="es_${w08}_617410.iso" ;;
"fr" | "fr-"* ) url="fr_${w08}_617392.iso" ;;
"hu" | "hu-"* ) url="hu_${w08}_617415.iso" ;;
"it" | "it-"* ) url="it_${w08}_619596.iso" ;;
"ja" | "ja-"* ) url="ja_${w08}_631466.iso" ;;
"ko" | "ko-"* ) url="ko_${w08}_617409.iso" ;;
"nl" | "nl-"* ) url="nl_${w08}_617395.iso" ;;
"pl" | "pl-"* ) url="pl_${w08}_617397.iso" ;;
"br" | "pt-br" ) url="pt_${w08}_617394.iso" ;;
"pt" | "pt-"* ) url="pp_${w08}_617411.iso" ;;
"ru" | "ru-"* ) url="ru_${w08}_617421.iso" ;;
"sv" | "sv-"* ) url="sv_${w08}_617400.iso" ;;
"tr" | "tr-"* ) url="tr_${w08}_617416.iso" ;;
"zh-hk" ) url="hk_${w08}_617386.iso" ;;
"zh-tw" ) url="tw_${w08}_617405.iso" ;;
"zh" | "zh-"* ) url="cn_${w08}_617396.iso" ;;
esac esac
;; ;;
"win7x64" | "win7x64-enterprise" ) "win7x64" | "win7x64-enterprise" )
@@ -1637,6 +1978,30 @@ validVersion() {
return 1 return 1
} }
addFolder() {
local src="$1"
local folder="/oem"
[ ! -d "$folder" ] && folder="/OEM"
[ ! -d "$folder" ] && folder="$STORAGE/oem"
[ ! -d "$folder" ] && folder="$STORAGE/OEM"
[ ! -d "$folder" ] && return 0
local msg="Adding OEM folder to image..."
info "$msg" && html "$msg"
local dest="$src/\$OEM\$/\$1/OEM"
mkdir -p "$dest" || return 1
cp -Lr "$folder/." "$dest" || return 1
local file
file=$(find "$dest" -maxdepth 1 -type f -iname install.bat | head -n 1)
[ -f "$file" ] && unix2dos -q "$file"
return 0
}
migrateFiles() { migrateFiles() {
local base="$1" local base="$1"
@@ -1653,7 +2018,7 @@ migrateFiles() {
[[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" [[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
[ ! -f "$STORAGE/$file" ] && return 0 [ ! -f "$STORAGE/$file" ] && return 0
! mv -f "$STORAGE/$file" "$base" && return 1 mv -f "$STORAGE/$file" "$base" || return 1
return 0 return 0
} }
@@ -1665,7 +2030,10 @@ prepareInstall() {
local arch="$4" local arch="$4"
local key="$5" local key="$5"
local driver="$6" local driver="$6"
local drivers="$TMP/drivers" local drivers="/tmp/drivers"
rm -rf "$drivers"
mkdir -p "$drivers"
ETFS="[BOOT]/Boot-NoEmul.img" ETFS="[BOOT]/Boot-NoEmul.img"
@@ -1676,9 +2044,7 @@ prepareInstall() {
local msg="Adding drivers to image..." local msg="Adding drivers to image..."
info "$msg" && html "$msg" info "$msg" && html "$msg"
mkdir -p "$drivers" if ! bsdtar -xf /drivers.txz -C "$drivers"; then
if ! tar -xf /drivers.txz -C "$drivers" --warning=no-timestamp; then
error "Failed to extract drivers!" && return 1 error "Failed to extract drivers!" && return 1
fi fi
@@ -1689,21 +2055,21 @@ prepareInstall() {
error "Failed to locate required storage drivers!" && return 1 error "Failed to locate required storage drivers!" && return 1
fi fi
cp "$drivers/viostor/$driver/$arch/viostor.sys" "$target" cp -L "$drivers/viostor/$driver/$arch/viostor.sys" "$target" || return 1
mkdir -p "$dir/\$OEM\$/\$1/Drivers/viostor" mkdir -p "$dir/\$OEM\$/\$1/Drivers/viostor" || return 1
cp "$drivers/viostor/$driver/$arch/viostor.cat" "$dir/\$OEM\$/\$1/Drivers/viostor" cp -L "$drivers/viostor/$driver/$arch/viostor.cat" "$dir/\$OEM\$/\$1/Drivers/viostor" || return 1
cp "$drivers/viostor/$driver/$arch/viostor.inf" "$dir/\$OEM\$/\$1/Drivers/viostor" cp -L "$drivers/viostor/$driver/$arch/viostor.inf" "$dir/\$OEM\$/\$1/Drivers/viostor" || return 1
cp "$drivers/viostor/$driver/$arch/viostor.sys" "$dir/\$OEM\$/\$1/Drivers/viostor" cp -L "$drivers/viostor/$driver/$arch/viostor.sys" "$dir/\$OEM\$/\$1/Drivers/viostor" || return 1
if [ ! -f "$drivers/NetKVM/$driver/$arch/netkvm.sys" ]; then if [ ! -f "$drivers/NetKVM/$driver/$arch/netkvm.sys" ]; then
error "Failed to locate required network drivers!" && return 1 error "Failed to locate required network drivers!" && return 1
fi fi
mkdir -p "$dir/\$OEM\$/\$1/Drivers/NetKVM" mkdir -p "$dir/\$OEM\$/\$1/Drivers/NetKVM" || return 1
cp "$drivers/NetKVM/$driver/$arch/netkvm.cat" "$dir/\$OEM\$/\$1/Drivers/NetKVM" cp -L "$drivers/NetKVM/$driver/$arch/netkvm.cat" "$dir/\$OEM\$/\$1/Drivers/NetKVM" || return 1
cp "$drivers/NetKVM/$driver/$arch/netkvm.inf" "$dir/\$OEM\$/\$1/Drivers/NetKVM" cp -L "$drivers/NetKVM/$driver/$arch/netkvm.inf" "$dir/\$OEM\$/\$1/Drivers/NetKVM" || return 1
cp "$drivers/NetKVM/$driver/$arch/netkvm.sys" "$dir/\$OEM\$/\$1/Drivers/NetKVM" cp -L "$drivers/NetKVM/$driver/$arch/netkvm.sys" "$dir/\$OEM\$/\$1/Drivers/NetKVM" || return 1
if [ ! -f "$target/TXTSETUP.SIF" ]; then if [ ! -f "$target/TXTSETUP.SIF" ]; then
error "The file TXTSETUP.SIF could not be found!" && return 1 error "The file TXTSETUP.SIF could not be found!" && return 1
@@ -1721,9 +2087,9 @@ prepareInstall() {
error "Failed to locate required SATA drivers!" && return 1 error "Failed to locate required SATA drivers!" && return 1
fi fi
mkdir -p "$dir/\$OEM\$/\$1/Drivers/sata" mkdir -p "$dir/\$OEM\$/\$1/Drivers/sata" || return 1
cp -a "$drivers/sata/xp/$arch/." "$dir/\$OEM\$/\$1/Drivers/sata" cp -Lr "$drivers/sata/xp/$arch/." "$dir/\$OEM\$/\$1/Drivers/sata" || return 1
cp -a "$drivers/sata/xp/$arch/." "$target" cp -Lr "$drivers/sata/xp/$arch/." "$target" || return 1
sed -i '/^\[SCSI.Load\]/s/$/\niaStor=iaStor.sys,4/' "$target/TXTSETUP.SIF" sed -i '/^\[SCSI.Load\]/s/$/\niaStor=iaStor.sys,4/' "$target/TXTSETUP.SIF"
sed -i '/^\[FileFlags\]/s/$/\niaStor.sys = 16/' "$target/TXTSETUP.SIF" sed -i '/^\[FileFlags\]/s/$/\niaStor.sys = 16/' "$target/TXTSETUP.SIF"
@@ -1748,23 +2114,14 @@ prepareInstall() {
warn "this version of $desc requires a volume license key (VLK), it will ask for one during installation." warn "this version of $desc requires a volume license key (VLK), it will ask for one during installation."
fi fi
local oem="" if ! addFolder "$dir"; then
local folder="/oem" error "Failed to add OEM folder to image!" && return 1
[ ! -d "$folder" ] && folder="/OEM"
[ ! -d "$folder" ] && folder="$STORAGE/oem"
[ ! -d "$folder" ] && folder="$STORAGE/OEM"
if [ -d "$folder" ]; then
file=$(find "$folder" -maxdepth 1 -type f -iname install.bat | head -n 1)
if [ -f "$file" ]; then
unix2dos -q "$file"
oem="\"Script\"=\"cmd /C start \\\"Install\\\" \\\"cmd /C C:\\\\OEM\\\\install.bat\\\"\""
fi
fi fi
local oem=""
local install="$dir/\$OEM\$/\$1/OEM/install.bat"
[ -f "$install" ] && oem="\"Script\"=\"cmd /C start \\\"Install\\\" \\\"cmd /C C:\\\\OEM\\\\install.bat\\\"\""
[ -z "$YRES" ] && YRES="720" [ -z "$YRES" ] && YRES="720"
[ -z "$XRES" ] && XRES="1280" [ -z "$XRES" ] && XRES="1280"
@@ -1957,18 +2314,6 @@ prepareInstall() {
echo "" echo ""
} | unix2dos > "$dir/\$OEM\$/cmdlines.txt" } | unix2dos > "$dir/\$OEM\$/cmdlines.txt"
[ ! -d "$folder" ] && return 0
msg="Adding OEM folder to image..."
info "$msg" && html "$msg"
local dest="$dir/\$OEM\$/\$1/"
mkdir -p "$dest"
if ! cp -r "$folder" "$dest"; then
error "Failed to copy OEM folder!" && return 1
fi
return 0 return 0
} }
@@ -1992,7 +2337,7 @@ prepare2k3() {
key="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY" key="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
fi fi
! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1 prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
return 0 return 0
} }
@@ -2017,7 +2362,7 @@ prepareXP() {
key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G" key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
fi fi
! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1 prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
return 0 return 0
} }
@@ -2103,36 +2448,36 @@ setMachine() {
local desc="$4" local desc="$4"
case "${id,,}" in case "${id,,}" in
"win9"* | "win2k"* ) "win9"* )
MACHINE="pc-i440fx-2.4" ;; ETFS="[BOOT]/Boot-1.44M.img" ;;
"winxp"* | "win2003"* | "winvistax86"* | "win7x86"* ) "win2k"* )
MACHINE="pc-q35-2.10" ;; ETFS="[BOOT]/Boot-NoEmul.img" ;;
"winxp"* )
if ! prepareXP "$iso" "$dir" "$desc"; then
error "Failed to prepare $desc ISO!" && return 1
fi ;;
"win2003"* )
if ! prepare2k3 "$iso" "$dir" "$desc"; then
error "Failed to prepare $desc ISO!" && return 1
fi ;;
esac esac
case "${id,,}" in case "${id,,}" in
"win9"* | "win2k"* | "winxp"* | "win2003"* ) "win9"* | "win2k"* )
DISK_TYPE="auto"
MACHINE="pc-i440fx-2.4"
BOOT_MODE="windows_legacy" ;;
"winxp"* | "win2003"* )
DISK_TYPE="blk"
BOOT_MODE="windows_legacy" ;; BOOT_MODE="windows_legacy" ;;
"winvista"* | "win7"* | "win2008"* ) "winvista"* | "win7"* | "win2008"* )
BOOT_MODE="windows_legacy" ;; BOOT_MODE="windows_legacy" ;;
esac esac
case "${id,,}" in case "${id,,}" in
"win9"* ) "winxp"* | "win2003"* | "winvistax86"* | "win7x86"* | "win2008r2x86"* )
DISK_TYPE="auto" # Prevent bluescreen if 64 bit PCI hole size is >2G.
ETFS="[BOOT]/Boot-1.44M.img" ;; ARGS="-global q35-pcihost.x-pci-hole64-fix=false" ;;
"win2k"* )
DISK_TYPE="auto"
ETFS="[BOOT]/Boot-NoEmul.img" ;;
"winxp"* )
DISK_TYPE="blk"
if ! prepareXP "$iso" "$dir" "$desc"; then
error "Failed to prepare $desc ISO!" && return 1
fi ;;
"win2003"* )
DISK_TYPE="blk"
if ! prepare2k3 "$iso" "$dir" "$desc"; then
error "Failed to prepare $desc ISO!" && return 1
fi ;;
esac esac
return 0 return 0

View File

@@ -120,6 +120,7 @@ finishInstall() {
rm -f "$STORAGE/windows.old" rm -f "$STORAGE/windows.old"
rm -f "$STORAGE/windows.vga" rm -f "$STORAGE/windows.vga"
rm -f "$STORAGE/windows.args"
rm -f "$STORAGE/windows.base" rm -f "$STORAGE/windows.base"
rm -f "$STORAGE/windows.boot" rm -f "$STORAGE/windows.boot"
rm -f "$STORAGE/windows.mode" rm -f "$STORAGE/windows.mode"
@@ -156,6 +157,11 @@ finishInstall() {
fi fi
fi fi
if [ -n "${ARGS:-}" ]; then
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
echo "$ARGS" > "$STORAGE/windows.args"
fi
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
echo "$DISK_TYPE" > "$STORAGE/windows.type" echo "$DISK_TYPE" > "$STORAGE/windows.type"
fi fi
@@ -541,7 +547,7 @@ detectImage() {
fi fi
info=$(wimlib-imagex info -xml "$wim" | tr -d '\000') info=$(wimlib-imagex info -xml "$wim" | tr -d '\000')
! checkPlatform "$info" && exit 67 checkPlatform "$info" || exit 67
DETECTED=$(detectVersion "$info") DETECTED=$(detectVersion "$info")
@@ -561,7 +567,7 @@ detectImage() {
if [[ "${LANGUAGE,,}" != "en" ]] && [[ "${LANGUAGE,,}" != "en-"* ]]; then if [[ "${LANGUAGE,,}" != "en" ]] && [[ "${LANGUAGE,,}" != "en-"* ]]; then
language=$(getLanguage "$LANGUAGE" "desc") language=$(getLanguage "$LANGUAGE" "desc")
desc=+" ($language)" desc+=" ($language)"
fi fi
info "Detected: $desc" info "Detected: $desc"
@@ -588,7 +594,7 @@ prepareImage() {
desc=$(printVersion "$DETECTED" "$DETECTED") desc=$(printVersion "$DETECTED" "$DETECTED")
! setMachine "$DETECTED" "$iso" "$dir" "$desc" && return 1 setMachine "$DETECTED" "$iso" "$dir" "$desc" || return 1
skipVersion "$DETECTED" && return 0 skipVersion "$DETECTED" && return 0
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
@@ -704,7 +710,8 @@ addDriver() {
esac esac
local dest="$path/$target/$driver" local dest="$path/$target/$driver"
mv "$path/$driver/$folder" "$dest" mkdir -p "$dest" || return 1
cp -Lr "$path/$driver/$folder/." "$dest" || return 1
return 0 return 0
} }
@@ -712,49 +719,51 @@ addDriver() {
addDrivers() { addDrivers() {
local src="$1" local src="$1"
local file="$2" local tmp="$2"
local index="$3" local file="$3"
local version="$4" local index="$4"
local version="$5"
local drivers="$tmp/drivers"
rm -rf "$drivers"
mkdir -p "$drivers"
local msg="Adding drivers to image..." local msg="Adding drivers to image..."
info "$msg" && html "$msg" info "$msg" && html "$msg"
local drivers="$TMP/drivers" if ! bsdtar -xf /drivers.txz -C "$drivers"; then
mkdir -p "$drivers" error "Failed to extract drivers from archive!" && return 1
if ! tar -xf /drivers.txz -C "$drivers" --warning=no-timestamp; then
error "Failed to extract driver!" && return 1
fi fi
local target="\$WinPEDriver\$" local target="\$WinPEDriver\$"
local dest="$drivers/$target" local dest="$drivers/$target"
mkdir -p "$dest" mkdir -p "$dest" || return 1
wimlib-imagex update "$file" "$index" --command "delete --force --recursive /$target" >/dev/null || true wimlib-imagex update "$file" "$index" --command "delete --force --recursive /$target" >/dev/null || true
addDriver "$version" "$drivers" "$target" "qxl" addDriver "$version" "$drivers" "$target" "qxl" || return 1
addDriver "$version" "$drivers" "$target" "viofs" addDriver "$version" "$drivers" "$target" "viofs" || return 1
addDriver "$version" "$drivers" "$target" "sriov" addDriver "$version" "$drivers" "$target" "sriov" || return 1
addDriver "$version" "$drivers" "$target" "smbus" addDriver "$version" "$drivers" "$target" "smbus" || return 1
addDriver "$version" "$drivers" "$target" "qxldod" addDriver "$version" "$drivers" "$target" "qxldod" || return 1
addDriver "$version" "$drivers" "$target" "viorng" addDriver "$version" "$drivers" "$target" "viorng" || return 1
addDriver "$version" "$drivers" "$target" "viomem" addDriver "$version" "$drivers" "$target" "viostor" || return 1
addDriver "$version" "$drivers" "$target" "viostor" addDriver "$version" "$drivers" "$target" "viomem" || return 1
addDriver "$version" "$drivers" "$target" "NetKVM" addDriver "$version" "$drivers" "$target" "NetKVM" || return 1
addDriver "$version" "$drivers" "$target" "Balloon" addDriver "$version" "$drivers" "$target" "Balloon" || return 1
addDriver "$version" "$drivers" "$target" "vioscsi" addDriver "$version" "$drivers" "$target" "vioscsi" || return 1
addDriver "$version" "$drivers" "$target" "pvpanic" addDriver "$version" "$drivers" "$target" "pvpanic" || return 1
addDriver "$version" "$drivers" "$target" "vioinput" addDriver "$version" "$drivers" "$target" "vioinput" || return 1
addDriver "$version" "$drivers" "$target" "viogpudo" addDriver "$version" "$drivers" "$target" "viogpudo" || return 1
addDriver "$version" "$drivers" "$target" "vioserial" addDriver "$version" "$drivers" "$target" "vioserial" || return 1
addDriver "$version" "$drivers" "$target" "qemupciserial" addDriver "$version" "$drivers" "$target" "qemupciserial" || return 1
case "${version,,}" in case "${version,,}" in
"win11x64"* | "win2025"* ) "win11x64"* | "win2025"* )
# Workaround Virtio GPU driver bug # Workaround Virtio GPU driver bug
local dst="$src/\$OEM\$/\$\$/Drivers" local dst="$src/\$OEM\$/\$\$/Drivers"
mkdir -p "$dst" mkdir -p "$dst" || return 1
! cp -a "$dest/." "$dst" && return 1 cp -Lr "$dest/." "$dst" || return 1
rm -rf "$dest/viogpudo" rm -rf "$dest/viogpudo"
;; ;;
esac esac
@@ -767,36 +776,12 @@ addDrivers() {
return 0 return 0
} }
addFolder() {
local src="$1"
local folder="/oem"
[ ! -d "$folder" ] && folder="/OEM"
[ ! -d "$folder" ] && folder="$STORAGE/oem"
[ ! -d "$folder" ] && folder="$STORAGE/OEM"
[ ! -d "$folder" ] && return 0
local msg="Adding OEM folder to image..."
info "$msg" && html "$msg"
local dest="$src/\$OEM\$/\$1/OEM"
mkdir -p "$dest"
! cp -a "$folder/." "$dest" && return 1
local file
file=$(find "$dest" -maxdepth 1 -type f -iname install.bat | head -n 1)
[ -f "$file" ] && unix2dos -q "$file"
return 0
}
updateImage() { updateImage() {
local dir="$1" local dir="$1"
local asset="$2" local asset="$2"
local language="$3" local language="$3"
local tmp="/tmp/install"
local file="autounattend.xml" local file="autounattend.xml"
local org="${file//.xml/.org}" local org="${file//.xml/.org}"
local dat="${file//.xml/.dat}" local dat="${file//.xml/.dat}"
@@ -812,6 +797,9 @@ updateImage() {
fi fi
fi fi
rm -rf "$tmp"
mkdir -p "$tmp"
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1) src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
if [ ! -d "$src" ]; then if [ ! -d "$src" ]; then
@@ -832,25 +820,22 @@ updateImage() {
index="2" index="2"
fi fi
if ! addDrivers "$src" "$wim" "$index" "$DETECTED"; then if ! addDrivers "$src" "$tmp" "$wim" "$index" "$DETECTED"; then
error "Failed to add drivers to image!" && return 1 error "Failed to add drivers to image!"
fi fi
if ! addFolder "$src"; then if ! addFolder "$src"; then
error "Failed to add OEM folder to image!" && return 1 error "Failed to add OEM folder to image!"
fi fi
if wimlib-imagex extract "$wim" "$index" "/$file" "--dest-dir=$TMP" >/dev/null 2>&1; then if wimlib-imagex extract "$wim" "$index" "/$file" "--dest-dir=$tmp" >/dev/null 2>&1; then
if ! wimlib-imagex extract "$wim" "$index" "/$dat" "--dest-dir=$TMP" >/dev/null 2>&1; then if ! wimlib-imagex extract "$wim" "$index" "/$dat" "--dest-dir=$tmp" >/dev/null 2>&1; then
if ! wimlib-imagex extract "$wim" "$index" "/$org" "--dest-dir=$TMP" >/dev/null 2>&1; then if ! wimlib-imagex extract "$wim" "$index" "/$org" "--dest-dir=$tmp" >/dev/null 2>&1; then
if ! wimlib-imagex update "$wim" "$index" --command "rename /$file /$org" > /dev/null; then if ! wimlib-imagex update "$wim" "$index" --command "rename /$file /$org" > /dev/null; then
warn "failed to backup original answer file ($file)." warn "failed to backup original answer file ($file)."
fi fi
fi fi
fi fi
rm -f "$TMP/$dat"
rm -f "$TMP/$org"
rm -f "$TMP/$file"
fi fi
if [[ "$MANUAL" != [Yy1]* ]]; then if [[ "$MANUAL" != [Yy1]* ]]; then
@@ -858,7 +843,7 @@ updateImage() {
xml=$(basename "$asset") xml=$(basename "$asset")
info "Adding $xml for automatic installation..." info "Adding $xml for automatic installation..."
local answer="$TMP/$xml" local answer="$tmp/$xml"
cp "$asset" "$answer" cp "$asset" "$answer"
updateXML "$answer" "$language" updateXML "$answer" "$language"
@@ -869,22 +854,18 @@ updateImage() {
wimlib-imagex update "$wim" "$index" --command "add $answer /$dat" > /dev/null || true wimlib-imagex update "$wim" "$index" --command "add $answer /$dat" > /dev/null || true
fi fi
rm -f "$answer"
fi fi
if [[ "$MANUAL" == [Yy1]* ]]; then if [[ "$MANUAL" == [Yy1]* ]]; then
wimlib-imagex update "$wim" "$index" --command "delete --force /$file" > /dev/null || true wimlib-imagex update "$wim" "$index" --command "delete --force /$file" > /dev/null || true
if wimlib-imagex extract "$wim" "$index" "/$org" "--dest-dir=$TMP" >/dev/null 2>&1; then if wimlib-imagex extract "$wim" "$index" "/$org" "--dest-dir=$tmp" >/dev/null 2>&1; then
if ! wimlib-imagex update "$wim" "$index" --command "add $TMP/$org /$file" > /dev/null; then if ! wimlib-imagex update "$wim" "$index" --command "add $tmp/$org /$file" > /dev/null; then
warn "failed to restore original answer file ($org)." warn "failed to restore original answer file ($org)."
fi fi
fi fi
rm -f "$TMP/$org"
fi fi
local find="$file" local find="$file"
@@ -899,6 +880,7 @@ updateImage() {
fi fi
fi fi
rm -rf "$tmp"
return 0 return 0
} }
@@ -908,7 +890,8 @@ removeImage() {
[ ! -f "$iso" ] && return 0 [ ! -f "$iso" ] && return 0
[ -n "$CUSTOM" ] && return 0 [ -n "$CUSTOM" ] && return 0
! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !"
rm -f "$iso" 2> /dev/null || warn "failed to remove $iso !"
return 0 return 0
} }
@@ -951,20 +934,20 @@ buildImage() {
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
-udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" && failed="y" -udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" || failed="y"
else else
case "${DETECTED,,}" in case "${DETECTED,,}" in
"win2k"* | "winxp"* | "win2003"* ) "win2k"* | "winxp"* | "win2003"* )
! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -c "$cat" -iso-level 2 -J -l -D -N -joliet-long \ genisoimage -o "$out" -b "$ETFS" -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -c "$cat" -iso-level 2 -J -l -D -N -joliet-long \
-relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;; -relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;;
"win9"* ) "win9"* )
! genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;; genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;;
* ) * )
! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
-udf -allow-limited-size -quiet "$dir" 2> "$log" && failed="y" ;; -udf -allow-limited-size -quiet "$dir" 2> "$log" || failed="y" ;;
esac esac
fi fi
@@ -980,7 +963,7 @@ buildImage() {
[ -s "$log" ] && error="$(<"$log")" [ -s "$log" ] && error="$(<"$log")"
[[ "$error" != "$hide" ]] && echo "$error" [[ "$error" != "$hide" ]] && echo "$error"
! mv -f "$out" "$BOOT" && return 1 mv -f "$out" "$BOOT" || return 1
return 0 return 0
} }
@@ -988,6 +971,11 @@ bootWindows() {
rm -rf "$TMP" rm -rf "$TMP"
if [ -f "$STORAGE/windows.args" ]; then
ARGS=$(<"$STORAGE/windows.args")
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
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") [ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type")
fi fi

View File

@@ -305,11 +305,11 @@ getWindows() {
language=$(getLanguage "$lang" "desc") language=$(getLanguage "$lang" "desc")
edition=$(printEdition "$version" "$desc") edition=$(printEdition "$version" "$desc")
local msg="Requesting $desc from Microsoft server..." local msg="Requesting $desc from the Microsoft servers..."
info "$msg" && html "$msg" info "$msg" && html "$msg"
case "${version,,}" in case "${version,,}" in
"win2008r2" | "win81${PLATFORM,,}-enterprise-eval" | "win11${PLATFORM,,}-enterprise-iot-eval" ) "win2008r2" | "win81${PLATFORM,,}-enterprise"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
error "No download in the $language language available for $edition!" error "No download in the $language language available for $edition!"
MIDO_URL="" && return 1 MIDO_URL="" && return 1
@@ -317,8 +317,8 @@ getWindows() {
esac esac
case "${version,,}" in case "${version,,}" in
"win11${PLATFORM,,}-enterprise-iot-eval" ) ;; "win11${PLATFORM,,}-enterprise-iot"* ) ;;
"win11${PLATFORM,,}-enterprise-ltsc-eval" ) ;; "win11${PLATFORM,,}-enterprise-ltsc"* ) ;;
* ) * )
if [[ "${PLATFORM,,}" != "x64" ]]; then if [[ "${PLATFORM,,}" != "x64" ]]; then
error "No download for the ${PLATFORM^^} platform available for $edition!" error "No download for the ${PLATFORM^^} platform available for $edition!"
@@ -336,15 +336,56 @@ getWindows() {
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2016-eval" | "win2012r2-eval" ) "win2025-eval" | "win2022-eval" | "win2019-eval" | "win2016-eval" | "win2012r2-eval" )
download_windows_eval "$version" "$lang" "$edition" && return 0 download_windows_eval "$version" "$lang" "$edition" && return 0
;; ;;
"win81${PLATFORM,,}-enterprise-eval" ) "win81${PLATFORM,,}-enterprise"* | "win2008r2" )
MIDO_URL="https://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO" && return 0
;;
"win2008r2" )
MIDO_URL="https://download.microsoft.com/download/4/1/D/41DEA7E0-B30D-4012-A1E3-F24DC03BA1BB/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso" && return 0
;; ;;
* ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;; * ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;;
esac esac
if [[ "${PLATFORM,,}" != "x64" ]]; then
MIDO_URL=""
return 1
fi
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
MIDO_URL=""
return 1
fi
case "${version,,}" in
"win81${PLATFORM,,}-enterprise"* )
MIDO_URL="https://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO"
return 0
;;
"win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso"
return 0
;;
"win2025-eval" )
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_SERVER_EVAL_x64FRE_en-us.iso"
return 0
;;
"win2022-eval" )
MIDO_URL="https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso"
return 0
;;
"win2019-eval" )
MIDO_URL="https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
return 0
;;
"win2016-eval" )
MIDO_URL="https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
return 0
;;
"win2012r2-eval" )
MIDO_URL="https://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
return 0
;;
"win2008r2" )
MIDO_URL="https://download.microsoft.com/download/4/1/D/41DEA7E0-B30D-4012-A1E3-F24DC03BA1BB/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"
return 0
;;
esac
MIDO_URL="" MIDO_URL=""
return 1 return 1
} }
@@ -551,7 +592,7 @@ downloadFile() {
if [ "$total" -lt 100000000 ]; then if [ "$total" -lt 100000000 ]; then
error "Invalid download link: $url (is only $total bytes?). Please report this at $SUPPORT/issues." && return 1 error "Invalid download link: $url (is only $total bytes?). Please report this at $SUPPORT/issues." && return 1
fi fi
! verifyFile "$iso" "$size" "$total" "$sum" && return 1 verifyFile "$iso" "$size" "$total" "$sum" || return 1
html "Download finished successfully..." && return 0 html "Download finished successfully..." && return 0
fi fi
@@ -569,13 +610,18 @@ downloadImage() {
local iso="$1" local iso="$1"
local version="$2" local version="$2"
local lang="$3" local lang="$3"
local delay=5
local tried="n" local tried="n"
local success="n"
local url sum size base desc language local url sum size base desc language
local msg="Will retry after $delay seconds..."
if [[ "${version,,}" == "http"* ]]; then if [[ "${version,,}" == "http"* ]]; then
base=$(basename "$iso") base=$(basename "$iso")
desc=$(fromFile "$base") desc=$(fromFile "$base")
downloadFile "$iso" "$version" "" "" "" "$desc" && return 0 downloadFile "$iso" "$version" "" "" "" "$desc" && return 0
info "$msg" && html "$msg" && sleep "$delay"
downloadFile "$iso" "$version" "" "" "" "$desc" && return 0
rm -f "$iso" rm -f "$iso"
return 1 return 1
fi fi
@@ -596,11 +642,23 @@ downloadImage() {
fi fi
if isMido "$version" "$lang"; then if isMido "$version" "$lang"; then
tried="y" tried="y"
success="n"
if getWindows "$version" "$lang" "$desc"; then if getWindows "$version" "$lang" "$desc"; then
success="y"
else
info "$msg" && html "$msg" && sleep "$delay"
getWindows "$version" "$lang" "$desc" && success="y"
fi
if [[ "$success" == "y" ]]; then
size=$(getMido "$version" "$lang" "size" ) size=$(getMido "$version" "$lang" "size" )
sum=$(getMido "$version" "$lang" "sum") sum=$(getMido "$version" "$lang" "sum")
downloadFile "$iso" "$MIDO_URL" "$sum" "$size" "$lang" "$desc" && return 0 downloadFile "$iso" "$MIDO_URL" "$sum" "$size" "$lang" "$desc" && return 0
info "$msg" && html "$msg" && sleep "$delay"
downloadFile "$iso" "$MIDO_URL" "$sum" "$size" "$lang" "$desc" && return 0
rm -f "$iso" rm -f "$iso"
fi fi
fi fi
@@ -614,10 +672,20 @@ downloadImage() {
fi fi
tried="y" tried="y"
success="n"
if getESD "$TMP/esd" "$version" "$lang" "$desc"; then if getESD "$TMP/esd" "$version" "$lang" "$desc"; then
success="y"
else
info "$msg" && html "$msg" && sleep "$delay"
getESD "$TMP/esd" "$version" "$lang" "$desc" && success="y"
fi
if [[ "$success" == "y" ]]; then
ISO="${ISO%.*}.esd" ISO="${ISO%.*}.esd"
downloadFile "$ISO" "$ESD" "$ESD_SUM" "$ESD_SIZE" "$lang" "$desc" && return 0 downloadFile "$ISO" "$ESD" "$ESD_SUM" "$ESD_SIZE" "$lang" "$desc" && return 0
info "$msg" && html "$msg" && sleep "$delay"
downloadFile "$ISO" "$ESD" "$ESD_SUM" "$ESD_SIZE" "$lang" "$desc" && return 0
rm -f "$ISO" rm -f "$ISO"
ISO="$iso" ISO="$iso"
fi fi
@@ -636,6 +704,8 @@ downloadImage() {
size=$(getSize "$i" "$version" "$lang") size=$(getSize "$i" "$version" "$lang")
sum=$(getHash "$i" "$version" "$lang") sum=$(getHash "$i" "$version" "$lang")
downloadFile "$iso" "$url" "$sum" "$size" "$lang" "$desc" && return 0 downloadFile "$iso" "$url" "$sum" "$size" "$lang" "$desc" && return 0
info "$msg" && html "$msg" && sleep "$delay"
downloadFile "$iso" "$url" "$sum" "$size" "$lang" "$desc" && return 0
rm -f "$iso" rm -f "$iso"
fi fi

View File

@@ -14,39 +14,52 @@ if [[ "$DHCP" == [Yy1]* ]]; then
interface="$VM_NET_DEV" interface="$VM_NET_DEV"
fi fi
share="/shared" addShare() {
local dir="$1"
local name="$2"
local comment="$3"
if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then mkdir -p "$dir" || return 1
share="$STORAGE/shared"
fi
mkdir -p "$share" if [ -z "$(ls -A "$dir")" ]; then
if [ -z "$(ls -A "$share")" ]; then chmod 777 "$dir"
chmod 777 "$share" { echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/example:/${name,,}\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/example:/${name,,}\""
echo ""
echo "Replace the example path /home/example with the desired shared folder."
echo ""
} | unix2dos > "$dir/readme.txt"
{ echo "--------------------------------------------------------" fi
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/user/example:/shared\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/user/example:/shared\""
echo ""
echo "Replace the example path /home/user/example with the desired shared folder."
echo ""
} | unix2dos > "$share/readme.txt"
fi { echo ""
echo "[$name]"
echo " path = $dir"
echo " comment = $comment"
echo " writable = yes"
echo " guest ok = yes"
echo " guest only = yes"
echo " force user = root"
echo " force group = root"
} >> "/etc/samba/smb.conf"
return 0
}
{ echo "[global]" { echo "[global]"
echo " server string = Dockur" echo " server string = Dockur"
@@ -64,32 +77,25 @@ fi
echo " printing = bsd" echo " printing = bsd"
echo " printcap name = /dev/null" echo " printcap name = /dev/null"
echo " disable spoolss = yes" echo " disable spoolss = yes"
echo ""
echo "[Data]"
echo " path = $share"
echo " comment = Shared"
echo " writable = yes"
echo " guest ok = yes"
echo " guest only = yes"
echo " force user = root"
echo " force group = root"
} > "/etc/samba/smb.conf" } > "/etc/samba/smb.conf"
share="/data"
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
[ ! -d "$share" ] && [ -d "/shared" ] && share="/shared"
[ ! -d "$share" ] && [ -d "$STORAGE/shared" ] && share="$STORAGE/shared"
addShare "$share" "Data" "Shared" || error "Failed to create shared folder!"
[ -d "/data2" ] && addShare "/data2" "Data2" "Shared"
[ -d "/data3" ] && addShare "/data3" "Data3" "Shared"
if ! smbd; then if ! smbd; then
error "Samba daemon failed to start!" error "Samba daemon failed to start!"
smbd -i --debug-stdout || true smbd -i --debug-stdout || true
fi fi
legacy="" if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
# Enable NetBIOS on Windows 7 and lower
if [ -f "$STORAGE/windows.old" ]; then
MT=$(<"$STORAGE/windows.old")
[[ "${MT,,}" == "pc-q35-2"* ]] && legacy="y"
[[ "${MT,,}" == "pc-i440fx-2"* ]] && legacy="y"
fi
if [ -n "$legacy" ]; then
# Enable NetBIOS on Windows XP and lower
if ! nmbd; then if ! nmbd; then
error "NetBIOS daemon failed to start!" error "NetBIOS daemon failed to start!"
nmbd -i --debug-stdout || true nmbd -i --debug-stdout || true