Skip to content

Commit c782bb1

Browse files
committed
Update flatpak scripts
1 parent 8460d2f commit c782bb1

File tree

10 files changed

+747
-316
lines changed

10 files changed

+747
-316
lines changed

flatpak/README

Lines changed: 0 additions & 8 deletions
This file was deleted.

flatpak/flatpak_generator.dart

Lines changed: 0 additions & 300 deletions
This file was deleted.
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
{
22
"appId": "de.wger.flutter",
3-
"releases": [
3+
"lowercaseAppName": "wger",
4+
"githubReleaseOrganization": "wger-project",
5+
"githubReleaseProject": "flutter",
6+
"localReleases": [
47
{
58
"version": "1.5.3",
69
"date": "2023-03-16"
710
}
811
],
9-
"lowercaseAppName": "wger",
10-
"runtimeVersion": "22.08",
11-
"linuxReleaseBundleDirPath": "../build/linux/x64/release/bundle",
12+
"localReleaseAssets": [
13+
{
14+
"arch": "x86_64",
15+
"tarballPath": "./scripts/flatpak_generator exports/wger-linux-x86_64.tar.gz"
16+
}
17+
],
18+
"localLinuxBuildDir": "../build/linux",
1219
"appDataPath": "de.wger.flutter.appdata.xml",
1320
"desktopPath": "de.wger.flutter.desktop",
1421
"icons": {
1522
"64x64": "logo64.png",
1623
"128x126": "logo128.png",
1724
"512x512": "logo512.png"
1825
},
26+
"freedesktopRuntime": "22.08",
1927
"finishArgs": [
2028
"--share=ipc",
2129
"--share=network",
2230
"--socket=fallback-x11",
2331
"--socket=wayland",
2432
"--device=dri"
25-
],
26-
"githubReleaseOrganization": "wger-project",
27-
"githubReleaseProject": "flutter"
33+
]
2834
}

flatpak/scripts/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Prerequisites
2+
## Setting up the flathub_meta.json file
3+
The dart scripts here require a metadata file as input. This file is already prepared for this repository — see ../flatpak_meta.json.
4+
5+
## Publishing on Flathub
6+
If uploading to Flathub for the first time, follow the official contributing guidelines: https://github.com/flathub/flathub/blob/master/CONTRIBUTING.md .
7+
8+
# Local builds
9+
10+
To run a local build:
11+
12+
1. Build the Linux release using Flutter.
13+
2. Add the new release version and date to the start of the "releases" list in the "spec.json" file (and adjust other parameters in the file if needed).
14+
3. Run "dart flatpak_packager.dart --meta ../flatpak_meta.json -n pubspec.yaml" in this folder.
15+
4. Run "dart manifest_generator.dart --meta ../flatpak_meta.json -n pubspec.yaml" in this folder.
16+
5. Test the Flatpak using the guide at https://docs.flatpak.org/en/latest/first-build.html, using the generated json manifest as your Flatpak manifest.
17+
18+
# Builds based on data fetched from Github
19+
20+
To generate and publish a release on Github:
21+
22+
1. Create a new release on Github using the app's version name for the tag (e.g. "1.0.0"), without any assets for now.
23+
2. Build the Linux release using Flutter.
24+
3. Run "dart flatpak_packager.dart --meta ../flatpak_meta.json --github -n pubspec.yaml" in this folder.
25+
4. Upload the generated tar.gz file as a Github release.
26+
5. Run "dart manifest_generator.dart --meta ../flatpak_meta.json --github -n pubspec.yaml" in this folder.
27+
6. Upload your Flathub manifest file to your Flathub Github repo, overwriting any old manifest file you may have there. If you're building for only certain architectures and the "flathub.json" file is not in your Flathub Github repo yet, upload that too.
28+
29+
All of this can be automated via Github Actions.

0 commit comments

Comments
 (0)