Files
flutterApp/build_patch.bat

53 lines
1.1 KiB
Batchfile
Raw Permalink Normal View History

2026-09-11 15:37:37 +08:00
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
echo ============================================
echo Re Build Patch
echo ============================================
echo.
set PATCH_VERSION=1.0.2
set TARGET_VERSION_CODE=1
echo [1/3] Building Release APK ...
echo.
call flutter build apk --release
if %errorlevel% neq 0 (
echo.
echo APK build failed!
pause
exit /b 1
)
echo.
echo APK build done
echo.
echo [2/3] Generating patch ...
echo.
call dart run flutter_patcher:pack ^
--apk build/app/outputs/flutter-apk/app-release.apk ^
--version %PATCH_VERSION% ^
--target-version-code %TARGET_VERSION_CODE%
if %errorlevel% neq 0 (
echo.
echo Patch generation failed!
pause
exit /b 1
)
echo.
echo Patch generation done
echo.
echo [3/3] Output:
echo.
echo APK: build\app\outputs\flutter-apk\app-release.apk
echo Patch: dist\libapp.so
echo Manifest: dist\manifest.json
echo.
echo ============================================
echo Next: Upload dist\libapp.so to server
echo ============================================
echo.
pause