From 226f736828bbdc0cb7732b01326c3527185df36e Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Thu, 5 Mar 2026 13:13:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=98=AF=E7=94=A8=E7=BB=84=E7=BB=87token?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E4=BE=9D=E8=B5=96=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_self_hosted.yml | 2 +- Build.bat | 22 +++++++++++++++++++++- Setup.bat | 25 +++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_self_hosted.yml b/.github/workflows/build_self_hosted.yml index 5c9bffa03..2c6498ce5 100644 --- a/.github/workflows/build_self_hosted.yml +++ b/.github/workflows/build_self_hosted.yml @@ -21,5 +21,5 @@ jobs: - name: build run: | - call Build.bat + call Build.bat --git-code %{{ secrets.GIT_CODE }} shell: cmd diff --git a/Build.bat b/Build.bat index c6542c868..2207ef805 100644 --- a/Build.bat +++ b/Build.bat @@ -3,6 +3,25 @@ setlocal chcp 65001 +rem -- 解析命令行参数 -- + +:parse + if "%1"=="" ( + goto main + ) + if "%1"=="--git-code" ( + set git_code=%2 + ) + shift + goto parse + +rem -- MAIN -- + +:main + + + + :: call setEnv64.bat :: %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" @@ -19,7 +38,8 @@ if exist "%programfiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Bui if not exist "%~dp0\.git\ue4-gitdeps" ( echo Cloning ue4-gitdeps to .git directory... - git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull + echo git_code=%git_code% + git clone echo git clone https://OpenHUTB:%git_code%@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull echo Clone engine dependencies complete. cd ..\.. ) diff --git a/Setup.bat b/Setup.bat index b4f396ac8..dbe2800d8 100644 --- a/Setup.bat +++ b/Setup.bat @@ -10,6 +10,31 @@ set PROMPT_ARGUMENT=--prompt :no_prompt_argument rem 同步依赖... +rem .\Engine\Binaries\DotNET\GitDependencies.exe 使用方法: +rem GitDependencies [选项] +rem +rem 选项: +rem --all 同步所有目录Sync all folders +rem --include= Include binaries in folders called +rem --exclude= Exclude binaries in folders called +rem --prompt Prompt before overwriting modified files +rem --force Always overwrite modified files +rem --root= Set the repository directory to be sync +rem --threads= Use N threads when downloading new files +rem --dry-run Print a list of outdated files and exit +rem --max-retries Override maximum number of retries per file +rem --proxy= Sets the HTTP proxy address and credentials +rem --cache= Specifies a custom path for the download cache +rem --cache-size-multiplier= Cache size as multiplier of current download +rem --cache-days= Number of days to keep entries in the cache +rem --no-cache Disable caching of downloaded files +rem +rem Detected settings: +rem Excluded folders: none +rem Proxy server: none +rem Download cache: D:\hutb\Build\engine\.git\ue4-gitdeps +rem +rem Default arguments can be set through the UE4_GITDEPS_ARGS environment variable. .\Engine\Binaries\DotNET\GitDependencies.exe %PROMPT_ARGUMENT% %* if ERRORLEVEL 1 goto error From 05db388b96a4c5ea93eee0729159205a22e2664a Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Thu, 5 Mar 2026 14:51:04 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E5=AE=8C=E7=A7=BB=E9=99=A4=E6=9E=84=E5=BB=BA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_self_hosted.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build_self_hosted.yml b/.github/workflows/build_self_hosted.yml index 2c6498ce5..67c69ca59 100644 --- a/.github/workflows/build_self_hosted.yml +++ b/.github/workflows/build_self_hosted.yml @@ -23,3 +23,11 @@ jobs: run: | call Build.bat --git-code %{{ secrets.GIT_CODE }} shell: cmd + + - uses: mickem/clean-after-action@v1 + + - name: Delete .git folder + run: | + del /f /s /q .git + rd /s /q .git + shell: cmd From 7f61f31815b0399ba50e048f1693698bc9589cb7 Mon Sep 17 00:00:00 2001 From: Haidong Wang Date: Thu, 5 Mar 2026 20:05:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Afatal:=20Too=20m?= =?UTF-8?q?any=20arguments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_self_hosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_self_hosted.yml b/.github/workflows/build_self_hosted.yml index 67c69ca59..7a0f2ac46 100644 --- a/.github/workflows/build_self_hosted.yml +++ b/.github/workflows/build_self_hosted.yml @@ -21,7 +21,7 @@ jobs: - name: build run: | - call Build.bat --git-code %{{ secrets.GIT_CODE }} + call Build.bat --git-code ${{ secrets.GIT_CODE }} shell: cmd - uses: mickem/clean-after-action@v1 From b55aa6a8022b6f3bfc45197e762998faef3acc08 Mon Sep 17 00:00:00 2001 From: Haidong Wang Date: Thu, 5 Mar 2026 20:08:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Afatal:=20Too=20m?= =?UTF-8?q?any=20arguments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.bat b/Build.bat index 2207ef805..5bbfeabc3 100644 --- a/Build.bat +++ b/Build.bat @@ -39,7 +39,7 @@ if exist "%programfiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Bui if not exist "%~dp0\.git\ue4-gitdeps" ( echo Cloning ue4-gitdeps to .git directory... echo git_code=%git_code% - git clone echo git clone https://OpenHUTB:%git_code%@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull + git clone https://OpenHUTB:%git_code%@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git .git\ue4-gitdeps && cd .git\ue4-gitdeps && git lfs pull echo Clone engine dependencies complete. cd ..\.. )