Skip to content

Commit bfdee22

Browse files
committed
feat: Build appimage
1 parent a403894 commit bfdee22

File tree

3 files changed

+55
-2
lines changed

3 files changed

+55
-2
lines changed

.github/workflows/build-apps.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,22 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
sudo apt-get update -y
22-
sudo apt-get install -y ninja-build libgtk-3-dev libcurl4-openssl-dev libmpv-dev mpv
22+
sudo apt-get install -y ninja-build libgtk-3-dev libcurl4-openssl-dev libmpv-dev mpv locate
23+
# appimagetool
24+
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
25+
chmod +x appimagetool
26+
sudo mv appimagetool /usr/local/bin/
27+
- run: dart pub global activate flutter_distributor
2328
- run: flutter build linux --dart-define-from-file=${ENV_FILE}
29+
- name: Build appimage
30+
run: |
31+
sed -i "s/ENV_FILE/$ENV_FILE/g" distribute_options.yaml
32+
flutter_distributor release --name appimage
2433
- name: Prepare artifacts
2534
run: |
2635
mkdir ~/artifacts
2736
7z a ~/artifacts/release.zip ./build/linux/x64/release/bundle/*
37+
mv dist/**/*.AppImage ~/artifacts/pikatorrent.AppImage
2838
- uses: actions/upload-artifact@v4
2939
with:
3040
name: pikatorrent-linux
@@ -47,11 +57,22 @@ jobs:
4757
run: |
4858
sudo apt-get update -y
4959
sudo apt-get install -y ninja-build libgtk-3-dev libcurl4-openssl-dev libmpv-dev mpv
60+
sudo apt-get install -y ninja-build libgtk-3-dev libcurl4-openssl-dev libmpv-dev mpv locate
61+
# appimagetool
62+
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage"
63+
chmod +x appimagetool
64+
sudo mv appimagetool /usr/local/bin/
65+
- run: dart pub global activate flutter_distributor
5066
- run: flutter build linux --dart-define-from-file=${ENV_FILE}
67+
- name: Build appimage
68+
run: |
69+
sed -i "s/ENV_FILE/$ENV_FILE/g" distribute_options.yaml
70+
flutter_distributor release --name appimage
5171
- name: Prepare artifacts
5272
run: |
5373
mkdir ~/artifacts
5474
7z a ~/artifacts/release.zip ./build/linux/arm64/release/bundle/*
75+
mv dist/**/*.AppImage ~/artifacts/pikatorrent.AppImage
5576
- uses: actions/upload-artifact@v4
5677
with:
5778
name: pikatorrent-linux-arm64
@@ -229,6 +250,8 @@ jobs:
229250
run: |
230251
mv pikatorrent-linux/release.zip PikaTorrent-${{ github.ref_name }}-linux-x64.zip
231252
mv pikatorrent-linux-arm64/release.zip PikaTorrent-${{ github.ref_name }}-linux-arm64.zip
253+
mv pikatorrent-linux/pikatorrent.AppImage PikaTorrent-${{ github.ref_name }}-linux-x64.AppImage
254+
mv pikatorrent-linux-arm64/pikatorrent.AppImage PikaTorrent-${{ github.ref_name }}-linux-arm64.AppImage
232255
mv pikatorrent-windows/release.zip PikaTorrent-${{ github.ref_name }}-windows-x64.zip
233256
mv pikatorrent-macos/release.app.zip ${{ github.workspace }}/PikaTorrent-${{ github.ref_name }}-macos-universal-experimental.app.zip
234257
- name: Mobile

app/distribute_options.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
output: dist/
1+
output: dist/
2+
releases:
3+
- name: appimage
4+
jobs:
5+
- name: appimage
6+
package:
7+
platform: linux
8+
target: appimage
9+
build_args:
10+
dart-define-from-file: ENV_FILE
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
display_name: PikaTorrent
2+
3+
icon: linux/packaging/icon.png
4+
5+
keywords:
6+
- torrent
7+
- bittorrent
8+
9+
generic_name: BitTorrent Client
10+
11+
categories:
12+
- Network
13+
- FileTransfer
14+
15+
startup_notify: true
16+
17+
supported_mime_type:
18+
- x-scheme-handler/magnet
19+
- application/x-bittorrent
20+
21+
metainfo: linux/packaging/com.pikatorrent.PikaTorrent.metainfo.xml

0 commit comments

Comments
 (0)