init appimage building
This commit is contained in:
1 parent
bfaa00bb38
commit
b60e18fe6b
14 files changed
+625
-3
No files matched your search
@@ -150,6 +150,49 @@ The matrix describes implemented functionality, not a guarantee that every featu
|
||||
flutter run
|
||||
```
|
||||
|
||||
### Linux AppImage
|
||||
|
||||
`flutter build linux --release` produces both the regular Flutter bundle and
|
||||
`build/linux/x64/release/meshcore-open-x86_64.AppImage`. Packaging runs after
|
||||
Flutter installs its assets and native libraries. Debug and Profile builds do
|
||||
not produce an AppImage. The initial AppImage target is x86_64, with Ubuntu
|
||||
24.04 as the packaging baseline; older distributions are not guaranteed.
|
||||
|
||||
For a bundle-only build, including other architectures:
|
||||
|
||||
```bash
|
||||
MESHCORE_BUILD_APPIMAGE=0 flutter build linux --release
|
||||
```
|
||||
|
||||
On Ubuntu 24.04, install the packaging prerequisites alongside Flutter's build
|
||||
dependencies:
|
||||
|
||||
```bash
|
||||
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev \
|
||||
librsvg2-dev libgirepository1.0-dev libgtk-3-bin libgdk-pixbuf2.0-bin \
|
||||
libgdk-pixbuf2.0-dev patchelf binutils curl jq file desktop-file-utils xdg-user-dirs
|
||||
```
|
||||
|
||||
The build automatically downloads checksum-verified linuxdeploy, its GTK
|
||||
plugin, appimagetool, and an AppImage runtime. Pins are in
|
||||
`scripts/appimage-tools.json`; the cache is under
|
||||
`${XDG_CACHE_HOME:-$HOME/.cache}/meshcore-open/appimage/`. Packaging can reuse
|
||||
valid cached tools offline, but Flutter dependencies and native-library
|
||||
downloads must also be available. A packaging failure fails the enabled build,
|
||||
without publishing a stale image as a new artifact.
|
||||
|
||||
The image includes Flutter assets, native plugins, ONNX Runtime and
|
||||
redistributable GTK dependencies. It does not include graphics drivers, BlueZ
|
||||
services, USB permissions, downloaded inference models or user data. The GTK
|
||||
packaging plugin uses X11, so Wayland sessions need XWayland. The host still
|
||||
needs compatible glibc and graphics libraries (`libgl1`, `libegl1`, and
|
||||
`libgles2` on Ubuntu). Launch normally, or without
|
||||
FUSE by extracting:
|
||||
|
||||
```bash
|
||||
./build/linux/x64/release/meshcore-open-x86_64.AppImage --appimage-extract-and-run
|
||||
```
|
||||
|
||||
### Linux with Nix
|
||||
|
||||
Enter the development shell from the repository root:
|
||||
@@ -168,6 +211,19 @@ app requires Flutter 3.41.2 or newer. The Linux shell provides wrapped Clang
|
||||
compilers, native headers and libraries, and Sysprof capture development files.
|
||||
Android SDK warnings do not prevent Linux builds.
|
||||
|
||||
Release AppImage builds inside `nix develop` require a usable Podman or Docker
|
||||
engine on the host. The install hook automatically rebuilds in a pinned Ubuntu
|
||||
container to avoid shipping Nix store dependencies, while keeping the native
|
||||
Nix bundle intact. The first build downloads a container image and Flutter SDK;
|
||||
later builds reuse the image and dependency caches. No privileged package
|
||||
installation is performed on the host. The container uses the SDK pin in
|
||||
`scripts/appimage-tools.json` and the current source tree, including local
|
||||
changes and the resolved `pubspec.lock`. Custom Dart defines and build
|
||||
name/number are forwarded; custom targets, obfuscation and split-debug-info
|
||||
require a bundle-only build. Use `MESHCORE_BUILD_APPIMAGE=0` to opt out when no
|
||||
container engine is available. On NixOS, use the distribution's `appimage-run`
|
||||
support when needed to launch downloaded AppImages.
|
||||
|
||||
If an SDK or toolchain update leaves CMake using an old compiler or install
|
||||
prefix, remove the affected generated cache, for example
|
||||
`rm -f build/linux/x64/profile/CMakeCache.txt`, and rebuild. If widget tests
|
||||
|
||||
Reference in new issue
Block a user