Skip to content

Commit

Permalink
Use new appimage packaging for Linux builds
Browse files Browse the repository at this point in the history
Fixed library name and removed unneeded packages

Use azure mirror, skip tests

Because GH Actions docker is flaky

Use png file for icon

Added additional libraries

Correct the distro codename
  • Loading branch information
Nguyen Thai authored and hoangdat committed Oct 10, 2023
1 parent 3edf2c9 commit 72129f2
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
run: |
case "$RUNNER_OS" in
Linux)
cp dist/*/* "twake-$GITHUB_REF_NAME-linux-amd64.AppImage";;
cp dist/* "twake-$GITHUB_REF_NAME-linux-amd64.AppImage";;
macOS)
cp dist/*/* "twake-$GITHUB_REF_NAME-macos-amd64.dmg"
# Notarize the app
Expand Down
65 changes: 65 additions & 0 deletions appimage/AppImageBuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
script:
- rm -rf AppDir | true
- cp -r ./build/linux/x64/{{BUILD_TYPE}}/bundle AppDir
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
- cp ./assets/logo.svg AppDir/usr/share/icons/hicolor/64x64/apps/twake.svg
version: 1
AppDir:
path: ./AppDir
app_info:
id: com.linagora.linux.twake
name: Twake
icon: twake
version: latest
exec: fluffychat
exec_args: $@
apt:
arch:
- amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://azure.archive.ubuntu.com/ubuntu/ {{VERSION_CODENAME}} main restricted universe multiverse
key_url: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C"
- sourceline: deb http://azure.archive.ubuntu.com/ubuntu/ {{VERSION_CODENAME}}-updates main restricted universe multiverse
key_url: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C"
- sourceline: deb http://azure.archive.ubuntu.com/ubuntu/ {{VERSION_CODENAME}}-backports main restricted universe multiverse
key_url: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C"
- sourceline: deb http://azure.archive.ubuntu.com/ubuntu {{VERSION_CODENAME}}-security main restricted universe multiverse
key_url: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C"
include:
- libgtk-3-0
- libwayland-cursor0
- libc6
- libjsoncpp25
- libsecret-1-0
- libmpv1
- libdrm2
- libolm3
files:
include: []
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
test:
fedora-30:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
debian-stable:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
archlinux-latest:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
centos-7:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
ubuntu-bionic:
image: appimagecrafters/tests-env:ubuntu-bionic
command: ./AppRun
AppImage:
arch: x86_64
update-information: guess
8 changes: 4 additions & 4 deletions scripts/build-linux-debug.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh -ve
echo "Setup Linux dependencies"
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libjsoncpp-dev locate libfuse-dev libolm-dev

# Updating database of locate
sudo updatedb
sudo apt-get install -y clang cmake ninja-build \
pkg-config libgtk-3-dev liblzma-dev \
libjsoncpp-dev libfuse-dev \
libolm-dev libmpv-dev libsecret-1-dev

flutter config --enable-linux-desktop
flutter clean
Expand Down
8 changes: 4 additions & 4 deletions scripts/build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh -ve
echo "Setup Linux dependencies"
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libjsoncpp-dev locate libfuse-dev libolm-dev

# Updating database of locate
sudo updatedb
sudo apt-get install -y clang cmake ninja-build \
pkg-config libgtk-3-dev liblzma-dev \
libjsoncpp-dev libfuse-dev \
libolm-dev libmpv-dev libsecret-1-dev

flutter config --enable-linux-desktop
flutter clean
Expand Down
17 changes: 11 additions & 6 deletions scripts/package-linux-debug.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash

# Setup AppImageTool for packaging
echo "Setting up AppImageTool"
curl -o appimagetool -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/
# Setup appimage-builder for packaging
echo "Setting up appimage-builder"
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder

echo "Packaging."
flutter pub global run flutter_distributor:main.dart package --platform linux --targets appimage --skip-clean --flutter-build-args="profile"
export BUILD_TYPE=profile
# This is to set environment variable from a file
# https://stackoverflow.com/a/45971167/8296391
set -a; . /etc/os-release; set +a
appimage-builder --recipe appimage/AppImageBuilder.yml --skip-tests
mkdir dist && cp ./*.AppImage dist/
17 changes: 11 additions & 6 deletions scripts/package-linux.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash

# Setup AppImageTool for packaging
echo "Setting up AppImageTool"
curl -o appimagetool -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/
# Setup appimage-builder for packaging
echo "Setting up appimage-builder"
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder

echo "Packaging."
flutter pub global run flutter_distributor:main.dart package --platform linux --targets appimage --skip-clean --flutter-build-args="release"
export BUILD_TYPE=release
# This is to set environment variable from a file
# https://stackoverflow.com/a/45971167/8296391
set -a; . /etc/os-release; set +a
appimage-builder --recipe appimage/AppImageBuilder.yml --skip-tests
mkdir dist && cp ./*.AppImage dist/

0 comments on commit 72129f2

Please sign in to comment.