I have tried a lot with this flutter based app, named snap. But I have still facing several issues with it.
This is the current snapcraft.yaml
file
name: saber # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '0.9.3' # just for humans, typically '1.2+git' or '1.3.2'
summary: A cross-platform libre handwritten notes app # 79 char long summary
description: |
A cross-platform libre handwritten notes app, available for Android, iOS, Linux, Windows, and the web!
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
license: GPL-3.0+
architectures:
- build-on: amd64
layout:
$SNAP/gnome-platform/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0::
symlink: $SNAP/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
slots:
saber-svc:
interface: dbus
bus: session
name: com.adilhanney.saber
parts:
desktop:
source: .
plugin: dump
after:
- flutter-git
- saber
flutter-git:
source: https://github.com/flutter/flutter.git
source-tag: 3.7.0
plugin: nil
override-build: |
set -eux
mkdir -p $CRAFT_PART_INSTALL/usr/bin
mkdir -p $CRAFT_PART_INSTALL/usr/libexec
cp -r $CRAFT_PART_SRC $CRAFT_PART_INSTALL/usr/libexec/flutter
ln -sf $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter
export PATH="$CRAFT_PART_INSTALL/usr/bin:$PATH"
flutter doctor
build-packages:
- clang
- cmake
- curl
- ninja-build
- unzip
override-prime: ''
saber:
# See 'snapcraft plugins'
after:
- flutter-git
plugin: nil
source: https://github.com/adil192/saber.git
source-tag: v${SNAPCRAFT_PROJECT_VERSION}
build-packages:
- libsecret-1-dev
- libjsoncpp-dev
- zenity
stage-packages:
- libjsoncpp25
- libsecret-1-0
- zenity
- libpango-1.0-0
override-build: |
set -eux
flutter pub get || true
flutter build linux --release -v
mkdir -p $CRAFT_PART_INSTALL/bin
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/
mkdir -p $CRAFT_PART_INSTALL/gnome-platform/usr/lib/x86_64-linux-gnu/
ln -sf /snap/saber/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.5000.6 $CRAFT_PART_INSTALL/gnome-platform/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
cleanup:
after: # Make this part run last; list all your other parts here
- saber
- flutter-git
- desktop
plugin: nil
build-snaps: # List all content-snaps and base snaps you're using here
- core22
- gnome-42-2204
- gnome-42-2204-sdk
override-prime: |
set -eux
for snap in "core22" "gnome-42-2204" "gnome-42-2204-sdk"; do # List all content-snaps and base snaps you're using here
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done
apps:
saber:
command: bin/saber
extensions: [gnome]
common-id: com.adilhanney.saber
desktop: snap/local/saber.desktop
environment:
HOME: $SNAP_REAL_HOME
plugs:
- home
- network
slots:
- saber-svc
But whenever I run this, I get
/snap/saber/19/bin/saber: symbol lookup error: /snap/saber/19/gnome-platform/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: hb_ot_layout_get_horizontal_baseline_tag_for_script
If I use the flutter extension
the theming will not work perfectly, there will be cursor icon issues & the maximize and minimize button would have gone. Can anyone please help me?