3.5 KiB
3.5 KiB
rmtPocketWatcher - Windows Build Instructions
This document explains how to build rmtPocketWatcher for Windows distribution.
Prerequisites
- Flutter SDK 3.22.3 or later
- Windows 10/11 with Visual Studio Build Tools
- PowerShell (for advanced build script)
Quick Build (Batch Script)
For a simple build process, use the batch script:
build_windows.bat
This will create:
build\windows\standalone\rmtpocketwatcher.exe- Standalone executable with all dependenciesbuild\rmtPocketWatcher-Windows-Standalone.zip- Distribution archive
Advanced Build (PowerShell Script)
For more control and MSIX installer creation:
# Release build (recommended for distribution)
.\build_windows.ps1 -Release
# Debug build (for development)
.\build_windows.ps1 -Debug
This creates:
- Standalone Package: Complete folder with all dependencies
- Portable Executable: Single-file distribution (if possible)
- MSIX Installer: Windows Store-style installer
- Distribution Archive: ZIP file ready for sharing
Output Files
After building, you'll find:
Standalone Distribution
build\windows\standalone\- Complete application folderbuild\windows\standalone\rmtpocketwatcher.exe- Main executablebuild\windows\standalone\data\- Flutter engine and assetsbuild\windows\standalone\VERSION.txt- Version information
Distribution Archives
build\rmtPocketWatcher-Windows-v{version}.zip- Full standalone packagebuild\rmtPocketWatcher-Windows-Portable-v{version}.zip- Portable version (exe only)
Installer (if created)
build\windows\x64\runner\Release\*.msix- Windows installer package
Distribution Options
Option 1: Standalone ZIP (Recommended)
- Share the
rmtPocketWatcher-Windows-v{version}.zipfile - Users extract and run
rmtpocketwatcher.exe - No installation required
- All dependencies included
Option 2: Portable Executable
- Share the
rmtPocketWatcher-Windows-Portable-v{version}.zipfile - Contains only the executable
- Smallest download size
- May require Visual C++ Redistributable on target machine
Option 3: MSIX Installer
- Share the
.msixfile - Windows Store-style installation
- Automatic updates support
- Requires Windows 10 version 1809 or later
Testing
To test the standalone build:
cd build\windows\standalone
rmtpocketwatcher.exe
Troubleshooting
Build Fails
- Ensure Flutter is properly installed:
flutter doctor - Check Windows development setup:
flutter doctor -v - Clean and retry:
flutter clean && flutter pub get
MSIX Creation Fails
- MSIX creation is optional and may fail on some systems
- The standalone executable will still be created
- Install Windows SDK if you need MSIX support
Runtime Issues
- Ensure the
.envfile is present in the build directory - Check that all assets are included in the
datafolder - Verify Visual C++ Redistributable is installed on target machine
CI/CD Integration
The build scripts are designed to work with the GitHub Actions workflow in .gitea/workflows/release.yml. The workflow automatically:
- Builds both standalone and portable versions
- Creates MSIX installer (if possible)
- Packages everything for release
- Uploads artifacts to the release
Manual Flutter Commands
If you prefer manual control:
# Basic build
flutter build windows --release
# Create MSIX (requires msix package)
flutter pub get
flutter pub run msix:create
Note: Manual builds won't include the packaging and organization provided by the build scripts.