Compare commits

...

4 Commits

2 changed files with 49 additions and 12 deletions

View File

@@ -992,7 +992,12 @@ get_windows_iso_link() {
label_vlsc=$(get_label_vlsc)
page=$(get_page)
page_url=https://massgrave.dev/windows_${page}_links
if [ "$page" = server ]; then
delimiter=-
else
delimiter=_
fi
page_url=https://massgrave.dev/windows${delimiter}${page}${delimiter}links
info "Find windows iso"
echo "Version: $version"
@@ -1741,7 +1746,12 @@ Continue with DD?
if is_use_cloud_image; then
# ci
if [ "$releasever" -eq 9 ]; then
dir=$releasever/images/qcow2/$basearch
else
dir=$releasever/images/$basearch
fi
file=$(curl -L $mirror/$dir/ | grep -oP 'OpenCloudOS.*?\.qcow2' |
sort -uV | tail -1 | grep .)
eval ${step}_img=$mirror/$dir/$file

View File

@@ -5858,9 +5858,13 @@ install_windows() {
# 25.0 比 24.5 只更新了 ProSet 软件,驱动相同
echo 18713/eng/prowin${arch_intel}legacy.exe || # 25.0 有部分文件是 sha256 签名
echo 29323/eng/prowin${arch_intel}legacy.exe ;; # 24.3 sha1 签名
'8') echo 21642/eng/prowin${arch_intel}.exe ;;
'8.1') echo 764813/Wired_driver_27.8_${arch_intel}.zip ;;
'2012' | '2012 r2') echo 785805/Wired_driver_28.2_${arch_intel}.zip ;;
# 之前有 Intel® Network Adapter Driver for Windows 8* - Final Release ,版本 22.7.1
# 但已被删除,原因不明
# https://web.archive.org/web/20250501043104/https://www.intel.com/content/www/us/en/download/16765/intel-network-adapter-driver-for-windows-8-final-release.html
# 27.8 有 NDIS63 文件夹,意味着支持 Windows 8
# 27.8 相比 22.7.1,可能有些老设备不支持了,但我们不管了
'8' | '8.1') echo 764813/Wired_driver_27.8_${arch_intel}.zip ;;
'2012' | '2012 r2') echo 772074/Wired_driver_28.0_${arch_intel}.zip ;;
*) case "${arch_intel}" in
32) echo 849483/Wired_driver_30.0.1_${arch_intel}.zip ;;
x64) echo 861427/Wired_driver_30.3_${arch_intel}.zip ;;
@@ -5868,23 +5872,46 @@ install_windows() {
esac
)
web_archive=$(
case "$product_ver" in
'8') echo https://web.archive.org/web/20250501043104/ ;;
esac
)
# 注意 intel 禁止了 aria2 下载
download ${web_archive}https://downloadmirror.intel.com/$file $drv/intel.zip
download https://downloadmirror.intel.com/$file $drv/intel.zip
# inf 可能是 UTF-16 LE因此用 rg 搜索
# 用 busybox unzip 解压 win10 驱动时,路径和文件名会粘在一起
# 但解压 28.0 驱动时,依然会出现这个问题
# 因此需要 convert_backslashes
apk add unzip ripgrep
# https://superuser.com/questions/1382839/zip-files-expand-with-backslashes-on-linux-no-subdirectories
convert_backslashes() {
for file in "$1"/*\\*; do
if [ -f "$file" ]; then
target="${file//\\//}"
mkdir -p "${target%/*}"
mv -v "$file" "$target"
fi
done
}
# win7 驱动是 .exe 解压不会报错
# win10 驱动是 .zip 解压反而会报错,目测 zip 文件有问题
# 在 windows 下解压 win8 的驱动会提示 checksum 错误
unzip -o -d $drv/intel/ $drv/intel.zip || true
convert_backslashes $drv/intel
is_have_inf_in_intel_dir() {
find $drv/intel -ipath "*/*.inf" | grep . >/dev/null
}
# Wired_driver_28.0_x64.zip 需要二次解压
if ! is_have_inf_in_intel_dir; then
unzip -o -d $drv/intel/ $drv/intel/Wired_driver_*.exe || true
convert_backslashes $drv/intel
fi
# 由于上面使用了 || true因此确认下解压后是否有 inf 文件
if ! is_have_inf_in_intel_dir; then
error_and_exit "No .inf file found in intel driver package"
fi
# Vista RTM 版本号是 6000 NDIS 6.0
# 2008 RTM 版本号是 6001 NDIS 6.1