feat(installer): 便携中文安装包「年糕历险记-Setup-v0.1.0.zip」——安装.bat 中文交互+桌面快捷方式;修复 ps1 BOM 编码

This commit is contained in:
NianGao Dev
2026-08-15 23:59:24 +08:00
parent 610f234bb4
commit 4755fd88fc
7 changed files with 171 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
@echo off
chcp 65001 >nul
title 年糕历险记 安装程序
echo.
echo ============================================
echo 年糕历险记 安装程序 v0.1.0
echo NianGao Adventure Installer
echo ============================================
echo.
setlocal enabledelayedexpansion
rem 默认安装目录(用户目录下)
set "DEFAULT_DIR=%LOCALAPPDATA%\NianGaoAdventure"
set /p "INSTALL_DIR=请输入安装目录(直接回车使用 %DEFAULT_DIR%):"
if "!INSTALL_DIR!"=="" set "INSTALL_DIR=%DEFAULT_DIR%"
echo.
echo 正在安装到:!INSTALL_DIR!
if not exist "!INSTALL_DIR!" mkdir "!INSTALL_DIR!"
echo 复制游戏文件...
xcopy /e /i /y "%~dp0*" "!INSTALL_DIR!\" >nul 2>&1
echo 创建桌面快捷方式...
powershell -NoProfile -Command "$ws = New-Object -ComObject WScript.Shell; $s = $ws.CreateShortcut([Environment]::GetFolderPath('Desktop') + '\年糕历险记.lnk'); $s.TargetPath = '!INSTALL_DIR!\mc-client.exe'; $s.WorkingDirectory = '!INSTALL_DIR!'; $s.Save()"
echo.
echo ============================================
echo 安装完成!桌面已创建「年糕历险记」快捷方式。
echo 游戏存档保存在安装目录 worlds\ 下。
echo 按任意键退出...
echo ============================================
pause >nul