-
-
Notifications
You must be signed in to change notification settings - Fork 82
Dev꞉ Build From Source
Make sure your flutter version same as .flutter, You can use fvm to keep
multiple versions on your local machine, or simply use this submodule to build it!
- In the project folder, run
flutter pub get - Launch an emulator or connect a device for Android, iOS, Windows, macOS, or Linux
Generally, you can build the app with flutter build (default: --release),
or run it directly using flutter run (default: --debug).
Following Android flavors are allowed:
-
f_dev-
# For development
-
appId:
io.github.friesi23.mhabit.dev -
command:
flutter run --flavor f_dev <other optional args> flutter build --flavor f_dev <other optional args>
-
-
f_generic-
default
-
# For Publish
-
appId:
io.github.friesi23.mhabit -
command:
flutter run <other optional args> flutter run --flavor f_generic <other optional args> flutter build <other optional args> flutter build --flavor f_generic <other optional args>
-
Build outputs located at build/app/outputs.
iOS requires a scheme. Supported schemes are as follows:
-
f_dev-
# For development
-
appId:
io.github.friesi23.mhabit.dev -
command:
flutter run --flavor f_dev <other optional args> flutter build --flavor f_dev <other optional args>
-
-
f_generic-
# For Publish
-
appId:
io.github.friesi23.mhabit -
command:
flutter run --flavor f_generic <other optional args> flutter build --flavor f_generic <other optional args>
-
-
f_store-
# For Publish to Apple Store
-
appId:
io.github.friesi23.mhabit.store -
command:
flutter run --flavor f_store <other optional args> flutter build --flavor f_store <other optional args>
-
Build outputs located at:
- iOS:
build/ios/(e.g.build/ios/ipa) - macOS:
uild/macos/Build/Products(e.g.build/macos/Build/Products/Release)
To build
dmgpackage, refer toscripts/build_dmg.shand.github\workflows\app-release.yml#jobs.build-macos-dmg.
-
Installing the following packages for SQFlite database and
flutter_secure_storage:sudo apt-get -y install \ lld-14 libsqlite3-0 libsqlite3-dev \ libsecret-1-dev libjsoncpp-dev
-
Please follow this official guide to initialize your Flutter development environment.
-
Once you've got the following result with the command
flutter doctoryou are good to go:Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, X.X.X, on Your Linux Platform) (...) [✓] Linux toolchain - develop for Linux desktop (...) -
In project folder, run
flutter pub get -
Then run
flutter build linux, once finished you should see:Building Linux application... ✓ Built build/linux/<arch>/release/bundle/mhabit
-
Enjoy by running the output binary:
- x86_64:
build/linux/x64/release/bundle/mhabit - aarch64:
build/linux/arm64/release/bundle/mhabit
- x86_64:
To build
flatpakpackage, refer toscripts/build_flatpak_pre.sh,scripts/build_flatpak.shand.github/workflows/app-release.yml#jobs.build-linux||build-linux-flatpak.
Please follow this official guide to initialize your Flutter development environment first.
Then run commands below:
flutter pub get
flutter build windowsDefault build outputs are located at build\windows\x64\runner (e.g. build\windows\x64\runner\Release)
To build
msixpackage, refer toscripts\build_msix.cmdand.github\workflows\app-release.yml#jobs.build-windows-msix.
This project implement a variable-based approach to simulate Windows flavors. Following flavors are allowed:
-
f_dev-
# For development
-
productName:
mhabit-dev -
UserData:
%AppData%\Roaming\io.github.friesi23\mhabit-dev -
command:
$env:APP_FLAVOR_WIN='f_dev' flutter build windows <other optional args> Remove-Item Env:\APP_FLAVOR_WIN
-
-
f_generic-
default
-
# For Publish
-
productName:
mhabit -
UserData:
%AppData%\Roaming\io.github.friesi23\mhabit -
command:
# without flavor flutter build windows <other optional args>
$env:APP_FLAVOR_WIN='f_generic' flutter build windows <other optional args> Remove-Item Env:\APP_FLAVOR_WIN
-
- [2025-07-29] Migrated from:
FriesI23/mhabit/README.md. - [2025-08-31] Add guidance of variable-based flavor support for Windows platform.
Github | F-Droid | LzzLzzyOnDroid | Flathub