@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