mirror of
https://github.com/dockur/windows.git
synced 2025-04-22 00:22:53 +00:00
Update define.sh
This commit is contained in:
parent
7fc3048e77
commit
83cd40379a
@ -89,6 +89,9 @@ parseVersion() {
|
|||||||
"xp64" | "xpx64" | "5x64" | "winxp64" | "winxpx64" | "windowsxp64" | "windowsxpx64" )
|
"xp64" | "xpx64" | "5x64" | "winxp64" | "winxpx64" | "windowsxp64" | "windowsxpx64" )
|
||||||
VERSION="winxpx64"
|
VERSION="winxpx64"
|
||||||
;;
|
;;
|
||||||
|
"2k" | "2000" | "win2k" | "win2000" | "windows2k" | "windows2000" )
|
||||||
|
VERSION="win2kx86"
|
||||||
|
;;
|
||||||
"25" | "2025" | "win25" | "win2025" | "windows2025" | "windows 2025" )
|
"25" | "2025" | "win25" | "win2025" | "windows2025" | "windows 2025" )
|
||||||
VERSION="win2025-eval"
|
VERSION="win2025-eval"
|
||||||
;;
|
;;
|
||||||
@ -912,6 +915,11 @@ getLink1() {
|
|||||||
sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6"
|
sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6"
|
||||||
url="xp/professional/en_win_xp_pro_x64_vl.iso"
|
url="xp/professional/en_win_xp_pro_x64_vl.iso"
|
||||||
;;
|
;;
|
||||||
|
"win2kx86" )
|
||||||
|
size=331701982
|
||||||
|
sum="a93251b31f92316411bb48458a695d9051b13cdeba714c46f105012fdda45bf3"
|
||||||
|
url="2000/5.00.2195.6717_x86fre_client-professional_retail_en-us.7z"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${ret,,}" in
|
case "${ret,,}" in
|
||||||
@ -1080,6 +1088,10 @@ getLink3() {
|
|||||||
sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6"
|
sum="8fac68e1e56c64ad9a2aa0ad464560282e67fa4f4dd51d09a66f4e548eb0f2d6"
|
||||||
url="windows-xp-all-sp-msdn-iso-files-en-de-ru-tr-x86-x64/en_win_xp_sp1_pro_x64_vl.iso"
|
url="windows-xp-all-sp-msdn-iso-files-en-de-ru-tr-x86-x64/en_win_xp_sp1_pro_x64_vl.iso"
|
||||||
;;
|
;;
|
||||||
|
"win2kx86" )
|
||||||
|
size=386859008
|
||||||
|
sum="e3816f6e80b66ff686ead03eeafffe9daf020a5e4717b8bd4736b7c51733ba22"
|
||||||
|
url="MicrosoftWindows2000BuildCollection/5.00.2195.6717_x86fre_client-professional_retail_en-us-ZRMPFPP_EN.iso"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${ret,,}" in
|
case "${ret,,}" in
|
||||||
@ -1216,26 +1228,32 @@ prepareInstall() {
|
|||||||
local driver="$4"
|
local driver="$4"
|
||||||
local drivers="/tmp/drivers"
|
local drivers="/tmp/drivers"
|
||||||
|
|
||||||
rm -rf "$drivers"
|
|
||||||
mkdir -p "$drivers"
|
|
||||||
|
|
||||||
ETFS="[BOOT]/Boot-NoEmul.img"
|
ETFS="[BOOT]/Boot-NoEmul.img"
|
||||||
|
|
||||||
if [ ! -f "$dir/$ETFS" ] || [ ! -s "$dir/$ETFS" ]; then
|
if [ ! -f "$dir/$ETFS" ] || [ ! -s "$dir/$ETFS" ]; then
|
||||||
error "Failed to locate file \"$ETFS\" in $desc ISO image!" && return 1
|
error "Failed to locate file \"$ETFS\" in $desc ISO image!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local arch target
|
||||||
|
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
||||||
|
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
|
||||||
|
|
||||||
|
if [ ! -d "$target" ]; then
|
||||||
|
error "Failed to locate directory \"$target\" in $desc ISO image!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${driver,,}" == "xp" ]] || [[ "${driver,,}" == "2k3" ]]; then
|
||||||
|
|
||||||
local msg="Adding drivers to image..."
|
local msg="Adding drivers to image..."
|
||||||
info "$msg" && html "$msg"
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
rm -rf "$drivers"
|
||||||
|
mkdir -p "$drivers"
|
||||||
|
|
||||||
if ! bsdtar -xf /drivers.txz -C "$drivers"; then
|
if ! bsdtar -xf /drivers.txz -C "$drivers"; then
|
||||||
error "Failed to extract drivers!" && return 1
|
error "Failed to extract drivers!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local arch target
|
|
||||||
[ -d "$dir/AMD64" ] && arch="amd64" || arch="x86"
|
|
||||||
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
|
|
||||||
|
|
||||||
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
|
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
|
||||||
error "Failed to locate required storage drivers!" && return 1
|
error "Failed to locate required storage drivers!" && return 1
|
||||||
fi
|
fi
|
||||||
@ -1289,8 +1307,13 @@ prepareInstall() {
|
|||||||
|
|
||||||
rm -rf "$drivers"
|
rm -rf "$drivers"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
local pid file setup
|
local pid file setup
|
||||||
setup=$(find "$target" -maxdepth 1 -type f -iname setupp.ini | head -n 1)
|
setup=$(find "$target" -maxdepth 1 -type f -iname setupp.ini | head -n 1)
|
||||||
|
|
||||||
|
if [ -n "$setup" ]; then
|
||||||
|
|
||||||
pid=$(<"$setup")
|
pid=$(<"$setup")
|
||||||
pid="${pid:(-4)}"
|
pid="${pid:(-4)}"
|
||||||
pid="${pid:0:3}"
|
pid="${pid:0:3}"
|
||||||
@ -1299,6 +1322,10 @@ 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
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$dir/\$OEM\$"
|
||||||
|
|
||||||
if ! addFolder "$dir"; then
|
if ! addFolder "$dir"; then
|
||||||
error "Failed to add OEM folder to image!" && return 1
|
error "Failed to add OEM folder to image!" && return 1
|
||||||
fi
|
fi
|
||||||
@ -1323,23 +1350,33 @@ prepareInstall() {
|
|||||||
[ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1"
|
[ -n "${VM_NET_IP:-}" ] && ip="${VM_NET_IP%.*}.1"
|
||||||
|
|
||||||
# These are not pirated keys, they come from the official MS documentation.
|
# These are not pirated keys, they come from the official MS documentation.
|
||||||
if [[ "${driver,,}" == "xp" ]]; then
|
case "${driver,,}" in
|
||||||
|
"xp" )
|
||||||
|
|
||||||
if [[ "${arch,,}" == "x86" ]]; then
|
if [[ "${arch,,}" == "x86" ]]; then
|
||||||
# Windows XP Professional x86 generic key (no activation, trial-only)
|
# Windows XP Professional x86 generic key (no activation, trial-only)
|
||||||
[ -z "$KEY" ] && KEY="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
[ -z "$KEY" ] && KEY="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
||||||
else
|
else
|
||||||
# Windows XP Professional x64 generic key (no activation, trial-only)
|
# Windows XP Professional x64 generic key (no activation, trial-only)
|
||||||
[ -z "$KEY" ] && KEY="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
[ -z "$KEY" ] && KEY="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
||||||
fi
|
fi ;;
|
||||||
else
|
|
||||||
|
"2k3" )
|
||||||
|
|
||||||
if [[ "${arch,,}" == "x86" ]]; then
|
if [[ "${arch,,}" == "x86" ]]; then
|
||||||
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
|
# Windows Server 2003 Standard x86 generic key (no activation, trial-only)
|
||||||
[ -z "$KEY" ] && KEY="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
|
[ -z "$KEY" ] && KEY="QKDCQ-TP2JM-G4MDG-VR6F2-P9C48"
|
||||||
else
|
else
|
||||||
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
|
# Windows Server 2003 Standard x64 generic key (no activation, trial-only)
|
||||||
[ -z "$KEY" ] && KEY="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
|
[ -z "$KEY" ] && KEY="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
|
||||||
fi
|
fi ;;
|
||||||
fi
|
|
||||||
|
"2k" )
|
||||||
|
|
||||||
|
# Windows 2000 Professional x86 generic key
|
||||||
|
KEY="G74HG-XXQTJ-RTX64-QKP3F-HKHXP" ;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
|
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
|
||||||
|
|
||||||
@ -1378,7 +1415,7 @@ prepareInstall() {
|
|||||||
echo " FullName=\"$username\""
|
echo " FullName=\"$username\""
|
||||||
echo " ComputerName=\"*\""
|
echo " ComputerName=\"*\""
|
||||||
echo " OrgName=\"Windows for Docker\""
|
echo " OrgName=\"Windows for Docker\""
|
||||||
echo " ProductKey=$KEY"
|
echo " ProductID=$KEY"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[Identification]"
|
echo "[Identification]"
|
||||||
echo " JoinWorkgroup = WORKGROUP"
|
echo " JoinWorkgroup = WORKGROUP"
|
||||||
@ -1437,6 +1474,9 @@ prepareInstall() {
|
|||||||
echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]"
|
echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]"
|
||||||
echo "\"HideFileExt\"=dword:00000000"
|
echo "\"HideFileExt\"=dword:00000000"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]"
|
||||||
|
echo "\"NoWelcomeScreen\"=\"1\""
|
||||||
|
echo ""
|
||||||
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
|
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
|
||||||
echo "\"DefaultUserName\"=\"$username\""
|
echo "\"DefaultUserName\"=\"$username\""
|
||||||
echo "\"DefaultDomainName\"=\"Dockur\""
|
echo "\"DefaultDomainName\"=\"Dockur\""
|
||||||
@ -1513,11 +1553,13 @@ prepareInstall() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")"
|
echo "Call Domain.MoveHere(LocalAdminADsPath, \"$username\")"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Set oFSO = CreateObject(\"Scripting.FileSystemObject\")"
|
echo "With (CreateObject(\"Scripting.FileSystemObject\"))"
|
||||||
echo "Set oHosts = oFSO.GetFile(\"C:\Windows\System32\drivers\etc\hosts\")"
|
echo " SysRoot = WshShell.ExpandEnvironmentStrings(\"%SystemRoot%\")"
|
||||||
echo "Set fileAPPEND = oFSO.OpenTextFile(\"C:\Windows\System32\drivers\etc\hosts\", 8, true)"
|
echo " Set oFile = .OpenTextFile(SysRoot & \"\system32\drivers\etc\hosts\", 8, true)"
|
||||||
echo "fileAPPEND.Write(\"$ip host.lan\")"
|
echo " oFile.Write(\"$ip host.lan\")"
|
||||||
echo "fileAPPEND.Close()"
|
echo " oFile.Close()"
|
||||||
|
echo " Set oFile = Nothing"
|
||||||
|
echo "End With"
|
||||||
echo ""
|
echo ""
|
||||||
} | unix2dos > "$dir/\$OEM\$/admin.vbs"
|
} | unix2dos > "$dir/\$OEM\$/admin.vbs"
|
||||||
|
|
||||||
@ -1614,7 +1656,9 @@ setMachine() {
|
|||||||
"win9"* )
|
"win9"* )
|
||||||
ETFS="[BOOT]/Boot-1.44M.img" ;;
|
ETFS="[BOOT]/Boot-1.44M.img" ;;
|
||||||
"win2k"* )
|
"win2k"* )
|
||||||
ETFS="[BOOT]/Boot-NoEmul.img" ;;
|
if ! prepareInstall "$iso" "$dir" "$desc" "2k"; then
|
||||||
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
|
fi ;;
|
||||||
"winxp"* )
|
"winxp"* )
|
||||||
if ! prepareInstall "$iso" "$dir" "$desc" "xp"; then
|
if ! prepareInstall "$iso" "$dir" "$desc" "xp"; then
|
||||||
error "Failed to prepare $desc ISO!" && return 1
|
error "Failed to prepare $desc ISO!" && return 1
|
||||||
@ -1626,10 +1670,18 @@ setMachine() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"win9"* | "win2k"* )
|
"win9"* )
|
||||||
|
USB="no"
|
||||||
DISK_TYPE="auto"
|
DISK_TYPE="auto"
|
||||||
|
ADAPTER="rtl8139"
|
||||||
MACHINE="pc-i440fx-2.4"
|
MACHINE="pc-i440fx-2.4"
|
||||||
BOOT_MODE="windows_legacy" ;;
|
BOOT_MODE="windows_legacy" ;;
|
||||||
|
"win2k"* )
|
||||||
|
MACHINE="pc"
|
||||||
|
USB="pci-ohci"
|
||||||
|
DISK_TYPE="auto"
|
||||||
|
ADAPTER="rtl8139"
|
||||||
|
BOOT_MODE="windows_legacy" ;;
|
||||||
"winxp"* | "win2003"* )
|
"winxp"* | "win2003"* )
|
||||||
DISK_TYPE="blk"
|
DISK_TYPE="blk"
|
||||||
BOOT_MODE="windows_legacy" ;;
|
BOOT_MODE="windows_legacy" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user