Files
PackagingMallShipper/build_installer.bat
Administrator e7b9d3851c docs: 更新文档中的 .NET Framework 版本为 4.6.2
- 更新 README.md 中的技术栈、系统要求和编译输出路径
- 更新 BUILD_INSTALLER.md 中的兼容性说明和下载链接
- 更新轻量级订单发货客户端方案.md 中的所有版本引用
- 更新 build_installer.bat 自动编译和复制流程
- 修复 App.config 中的 supportedRuntime 版本

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 11:41:46 +08:00

77 lines
2.0 KiB
Batchfile

@echo off
chcp 936 >nul
echo ========================================
echo PackagingMallShipper - Build Installer
echo ========================================
echo.
set "ISCC="
if exist "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" (
set "ISCC=C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
)
if exist "C:\Program Files\Inno Setup 6\ISCC.exe" (
set "ISCC=C:\Program Files\Inno Setup 6\ISCC.exe"
)
if "%ISCC%"=="" (
echo [Error] Inno Setup 6 not found
echo.
echo Please download and install Inno Setup 6:
echo https://jrsoftware.org/isdl.php
echo.
pause
exit /b 1
)
echo [Info] Found Inno Setup: %ISCC%
echo.
echo [Step 1] Building Release version...
dotnet build -c Release
if %ERRORLEVEL% NEQ 0 (
echo [Error] Build failed!
pause
exit /b 1
)
echo.
echo [Step 2] Copying files to publish folder...
if not exist "publish" mkdir publish
if not exist "publish\x64" mkdir publish\x64
if not exist "publish\x86" mkdir publish\x86
copy /Y "PackagingMallShipper\bin\Release\net462\PackagingMallShipper.exe" "publish\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\PackagingMallShipper.exe.config" "publish\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\x64\SQLite.Interop.dll" "publish\x64\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\x86\SQLite.Interop.dll" "publish\x86\" >nul
if not exist "publish\PackagingMallShipper.exe" (
echo [Error] publish\PackagingMallShipper.exe not found
echo.
pause
exit /b 1
)
echo [Info] Files copied to publish folder
echo.
echo [Step 3] Compiling installer...
echo.
"%ISCC%" setup.iss
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================
echo [Success] Installer created!
echo.
echo Location: installer\PackagingMallShipper_Setup_v1.0.0.exe
echo ========================================
echo.
if exist "installer" explorer "installer"
) else (
echo.
echo [Error] Build failed, error code: %ERRORLEVEL%
)
pause