From 5baf3d2d597a0fe13d6100fa1ccc251deae2080b Mon Sep 17 00:00:00 2001 From: argszero Date: Wed, 5 Aug 2026 00:54:18 +0800 Subject: [PATCH] =?UTF-8?q?emrg:=20build-release=20=E5=85=AB=E6=AC=A1?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E2=80=94=20Windows=20=E8=BD=AF=E9=93=BE?= =?UTF-8?q?=E6=94=B9=E5=A4=8D=E5=88=B6=EF=BC=88Git=20Bash=20ln=20-s=20?= =?UTF-8?q?=E9=9C=80=E7=AE=A1=E7=90=86=E5=91=98=E6=9D=83=E9=99=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packaging/build-runtime.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/build-runtime.sh b/packaging/build-runtime.sh index 34d5334e..fd229fa7 100755 --- a/packaging/build-runtime.sh +++ b/packaging/build-runtime.sh @@ -38,8 +38,16 @@ cp -R "$PY_ROOT/." "$DIST/bin/python-dist/" # ── 2. bin/python 软链(R82:相对软链;python-dist 与软链同在 bin/ 下)── ( cd "$DIST/bin" - ln -sfn python-dist/bin/python3.13 python - ln -sfn python-dist/bin/python3.13 python3 + if [ "$(uname -s | tr '[:upper:]' '[:lower:]')" = "windows" ] || [ -f python-dist/bin/python3.13.exe ]; then + # Windows:Git Bash 的 ln -s 需管理员权限(软链创建失败)→ 用复制替代 + # (python3.13.exe 在 python-dist 根或 bin/,跨版本差异兜底) + PYEXE="$(ls python-dist/bin/python3.13.exe python-dist/python3.13.exe 2>/dev/null | head -1)" + cp "$PYEXE" python.exe + cp "$PYEXE" python3.exe + else + ln -sfn python-dist/bin/python3.13 python + ln -sfn python-dist/bin/python3.13 python3 + fi cp "$ROOT/bin/emrg" emrg cp "$ROOT/bin/emrgd" emrgd cp "$ROOT/bin/emrg.cmd" emrg.cmd 2>/dev/null || true