Skip to content

Commit 98c1f65

Browse files
author
arch
committed
add flatpack ofline install bundle build script
1 parent 3c39665 commit 98c1f65

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ linuxdeploy*.AppImage
1515
build-dir
1616
.flatpak-builder
1717
repo
18+
*.flatpak

build_flatpak.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ sudo sysctl kernel.unprivileged_userns_clone=1
44
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
55
sudo flatpak install -y flathub org.kde.Platform//5.15 org.kde.Sdk//5.15
66

7-
if [ "$@" = "--install" ]; then
7+
8+
option="$1"
9+
[ -z "$option" ] && option="none"
10+
11+
if [ "$option" = "--install" ]; then
812
flatpak-builder --user --install --force-clean build-dir org.flatpak.PythonFunscriptEditor.json
913
else
1014
flatpak-builder --repo=repo --force-clean build-dir org.flatpak.PythonFunscriptEditor.json
15+
flatpak build-bundle repo PythonFunscriptEditor.flatpak org.flatpak.PythonFunscriptEditor
1116
fi
1217

1318
sudo sysctl kernel.unprivileged_userns_clone=0

contrib/flatpak/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ flatpak-builder --user --install --force-clean build-dir org.flatpak.PythonFunsc
2424
flatpak run org.flatpak.PythonFunscriptEditor
2525
flatpak uninstall org.flatpak.PythonFunscriptEditor
2626
```
27+
28+
To install the `*.flatpak` bundle from build script you can use:
29+
30+
```bash
31+
flatpak install --user PythonFunscriptEditor.flatpak
32+
flatpak run org.flatpak.PythonFunscriptEditor
33+
```

0 commit comments

Comments
 (0)