|
12 | 12 |
|
13 | 13 | > 命令行同时安装多个包,包名之间使用逗号隔开
|
14 | 14 |
|
| 15 | +## windows 环境下 配置 git 环境 |
| 16 | + |
| 17 | +1. 禁止Git在提交和检出时进行换行符的自动转换 |
| 18 | +2. 使用`lf` 作为换行符 |
| 19 | +3. 区分大小写 |
| 20 | + |
| 21 | +```shell |
| 22 | + |
| 23 | +# 下载git |
| 24 | +curl.exe -fSLo Git-2.47.1-64-bit.exe https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/Git-2.47.1-64-bit.exe |
| 25 | + |
| 26 | +# 命令行静默安装 git |
| 27 | +start /wait .\Git-2.47.1-64-bit.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEONEXIT=1 /DIR="C:\Program Files\Git" |
| 28 | + |
| 29 | + |
| 30 | +git config --global core.autocrlf false |
| 31 | +git config --global core.eol lf |
| 32 | +git config --global core.ignorecase false |
| 33 | + |
| 34 | +``` |
| 35 | + |
15 | 36 | ## 安装cygwin 和 cygwin 依赖项
|
16 | 37 |
|
17 |
| -> 打开 windows 控制台,并找到 setup-x86_64.exe 所在目录, 将 setup-x86_64.exe 复制到 `sapi\quickstart\windows\` 目录 |
18 |
| -> 执行如下命令 |
| 38 | +> 打开windows CMD 终端,进入项目目录 ,执行如下命令 |
19 | 39 |
|
20 | 40 | ```bash
|
21 | 41 |
|
22 | 42 | # 自动安装 cygwin 和 cygwin 依赖项
|
23 |
| -sapi\quickstart\windows\install-cygwin.bat |
| 43 | +.\sapi\quickstart\windows\cygwin-build\download-cygwin.bat |
| 44 | +.\sapi\quickstart\windows\cygwin-build\install-cygwin.bat |
| 45 | + |
24 | 46 |
|
25 | 47 | ```
|
26 | 48 |
|
27 | 49 | 构建步骤 - 执行的命令
|
28 | 50 | ====
|
29 |
| -> 运行如下步骤,需要先 打开 cygwin64 Terminal |
| 51 | +> 运行如下步骤,打开 cygwin64 Terminal, 并进入项目目录,执行如下命令 |
30 | 52 |
|
31 | 53 | ```shell
|
32 | 54 |
|
@@ -122,14 +144,16 @@ libzstd-devel
|
122 | 144 |
|
123 | 145 | ## 安装 cygwin 和 安装 cygwin 依赖项 具体执行的命令
|
124 | 146 |
|
125 |
| -> `sapi\quickstart\windows\install-cygwin.bat` 脚本包含的内容 |
| 147 | +> 多个包之间 使用逗号分隔 |
| 148 | +
|
| 149 | +> 编辑修改此文件即可 `.\sapi\quickstart\windows\cygwin-build\install-cygwin.bat` |
126 | 150 |
|
127 | 151 | ```bash
|
128 | 152 | # 安装 cygwin
|
129 |
| -setup-x86_64.exe --site https://mirrors.ustc.edu.cn/cygwin/ |
| 153 | +setup-x86_64.exe --site https://mirrors.ustc.edu.cn/cygwin/ |
130 | 154 |
|
131 | 155 | # 安装 cygwin 依赖项
|
132 |
| -setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake,openssl,libpcre2-devel,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel,libgmp-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel,libsqlite3-devel,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel,libicu-devel,libonig-devel,libcares-devel,libsodium-devel,libyaml-devel,libMagick-devel,libzstd-devel,libbrotli-devel,libreadline-devel,libintl-devel,libpq-devel,libssh2-devel,libidn2-devel,gettext-devel,coreutils,openssl-devel |
| 156 | +setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake,openssl,libpcre2-devel,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel,libgmp-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel,libsqlite3-devel,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel,libicu-devel,libonig-devel,libcares-devel,libsodium-devel,libyaml-devel,libMagick-devel,libzstd-devel,libbrotli-devel,libreadline-devel,libintl-devel,libpq-devel,libssh2-devel,libidn2-devel,gettext-devel,coreutils |
133 | 157 |
|
134 | 158 | setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages zip unzip icu libicu-devel
|
135 | 159 |
|
|
0 commit comments