mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 将 cygwin setup.exe 下载到当前目录
This commit is contained in:
parent
823046b6bf
commit
0a3cb891ad
21
README.en.md
21
README.en.md
@ -81,26 +81,17 @@ curl -O https://www.ghproxy.cc/https://raw.githubusercontent.com/bin456789/reins
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary>😢Still unable to download?</summary>
|
<summary>Resolving Script Download Issues on Windows 7</summary>
|
||||||
|
|
||||||
### Try the following methods
|
Due to lack of support for TLS 1.2, SHA-256, or outdated root certificates, Windows Vista, 7, and Server 2008 (R2) may not be able to download scripts automatically. Manual downloading is required, as follows:
|
||||||
|
|
||||||
1. For Windows 7, install this patch to enable TLS 1.2.
|
Use Internet Explorer (enable TLS 1.2 in IE's advanced settings first) to download, or use Remote Desktop to save the following two files into the same directory:
|
||||||
|
|
||||||
<https://aka.ms/easyfix51044>
|
- <https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat>
|
||||||
|
|
||||||
2. Update SSL root certificates.
|
- <https://www.cygwin.com/setup-x86.exe>
|
||||||
|
|
||||||
```batch
|
To use, run the downloaded `reinstall.bat`.
|
||||||
certutil -generateSSTFromWU root.sst
|
|
||||||
certutil -addstore Root root.sst
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Download manually by copying these two files through `Remote Desktop Connection`.
|
|
||||||
|
|
||||||
<https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat>
|
|
||||||
|
|
||||||
<https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh>
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
21
README.md
21
README.md
@ -81,26 +81,17 @@ curl -O https://www.ghproxy.cc/https://raw.githubusercontent.com/bin456789/reins
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary>😢还是无法下载?</summary>
|
<summary>解决 Windows 7 下无法下载脚本</summary>
|
||||||
|
|
||||||
### 可尝试以下几种方法
|
由于不支持 TLS 1.2、SHA-256、根证书没有更新等原因,Vista,7 和 Server 2008 (R2) 可能无法自动下载脚本,因此需要手动下载,具体操作如下:
|
||||||
|
|
||||||
1. Windows 7 安装此补丁启用 TLS 1.2
|
用 IE 下载 (先在 IE 高级设置里启用 TLS 1.2),或者通过远程桌面,将这两个文件保存到同一个目录
|
||||||
|
|
||||||
<https://aka.ms/easyfix51044>
|
- <https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat>
|
||||||
|
|
||||||
2. 更新 SSL 根证书
|
- <https://www.cygwin.com/setup-x86.exe>
|
||||||
|
|
||||||
```batch
|
使用时运行下载的 `reinstall.bat`
|
||||||
certutil -generateSSTFromWU root.sst
|
|
||||||
certutil -addstore Root root.sst
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 手动下载,通过 `远程桌面` 复制这两个文件
|
|
||||||
|
|
||||||
<https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat>
|
|
||||||
|
|
||||||
<https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh>
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
@ -32,12 +32,11 @@ if not exist %tmp% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
rem 检查是否国内
|
rem 检查是否国内
|
||||||
if not exist %tmp%\geoip (
|
if not exist geoip (
|
||||||
rem 部分地区 www.cloudflare.com 被墙
|
rem 部分地区 www.cloudflare.com 被墙
|
||||||
call :download http://dash.cloudflare.com/cdn-cgi/trace %tmp%\geoip
|
call :download http://dash.cloudflare.com/cdn-cgi/trace %~dp0geoip || goto :download_failed
|
||||||
if errorlevel 1 goto :download_failed
|
|
||||||
)
|
)
|
||||||
findstr /c:"loc=CN" %tmp%\geoip >nul
|
findstr /c:"loc=CN" geoip >nul
|
||||||
if not errorlevel 1 (
|
if not errorlevel 1 (
|
||||||
rem mirrors.tuna.tsinghua.edu.cn 会强制跳转 https
|
rem mirrors.tuna.tsinghua.edu.cn 会强制跳转 https
|
||||||
set mirror=http://mirror.nju.edu.cn
|
set mirror=http://mirror.nju.edu.cn
|
||||||
@ -111,19 +110,26 @@ if not exist "%tags%" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
rem 下载 Cygwin
|
rem 下载 Cygwin
|
||||||
call :download http://www.cygwin.com/setup-!CygwinArch!.exe %tmp%\setup-cygwin.exe
|
if not exist setup-!CygwinArch!.exe (
|
||||||
if errorlevel 1 goto :download_failed
|
call :download http://www.cygwin.com/setup-!CygwinArch!.exe %~dp0setup-!CygwinArch!.exe || goto :download_failed
|
||||||
|
)
|
||||||
|
|
||||||
rem 安装 Cygwin
|
rem 安装 Cygwin
|
||||||
set site=!mirror!!dir!
|
set site=!mirror!!dir!
|
||||||
%tmp%\setup-cygwin.exe --allow-unsupported-windows ^
|
start /wait setup-!CygwinArch!.exe ^
|
||||||
--quiet-mode ^
|
--allow-unsupported-windows ^
|
||||||
--only-site ^
|
--quiet-mode ^
|
||||||
--site !site! ^
|
--only-site ^
|
||||||
--root %SystemDrive%\cygwin ^
|
--site !site! ^
|
||||||
--local-package-dir %tmp%\cygwin-local-package-dir ^
|
--root %SystemDrive%\cygwin ^
|
||||||
--packages %pkgs% ^
|
--local-package-dir %tmp%\cygwin-local-package-dir ^
|
||||||
&& type nul >"%tags%"
|
--packages %pkgs% ^
|
||||||
|
&& type nul >"%tags%"
|
||||||
|
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo "Failed to install Cygwin."
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
rem 在c盘根目录下执行 cygpath -ua . 会得到 /cygdrive/c,因此末尾要有 /
|
rem 在c盘根目录下执行 cygpath -ua . 会得到 /cygdrive/c,因此末尾要有 /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user