From 297970e1efff77455648cfaefd1d377a84e953da Mon Sep 17 00:00:00 2001 From: "Ian Cleary (he/him/his)" Date: Sat, 11 Sep 2021 13:52:57 -0700 Subject: [PATCH 1/3] Added directions to install Flatpak SDK per #126 Implements https://github.com/elementary/docs/issues/126#issuecomment-903159414 --- writing-apps/our-first-app/packaging.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/writing-apps/our-first-app/packaging.md b/writing-apps/our-first-app/packaging.md index 474f5d5..ea72f70 100644 --- a/writing-apps/our-first-app/packaging.md +++ b/writing-apps/our-first-app/packaging.md @@ -52,6 +52,12 @@ modules: path: . ``` +Before we run a test build, we need to install the `io.elementary` Flatpak SDK as a user: + +```bash +flatpak install --user io.elementary.Sdk//6 +``` + To run a test build and install your app, we can use `flatpak-builder` with a few arguments: ```bash From 6db9228361092ac6097f0509051faba19f821ca3 Mon Sep 17 00:00:00 2001 From: "Ian Cleary (he/him/his)" Date: Sat, 11 Sep 2021 14:01:32 -0700 Subject: [PATCH 2/3] Added .flatpak-builder to .gitignore --- writing-apps/our-first-app/packaging.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/writing-apps/our-first-app/packaging.md b/writing-apps/our-first-app/packaging.md index ea72f70..8077ad9 100644 --- a/writing-apps/our-first-app/packaging.md +++ b/writing-apps/our-first-app/packaging.md @@ -66,5 +66,14 @@ flatpak-builder build com.github.yourusername.yourrepositoryname.yml --user --i This tells Flatpak Builder to build the manifest we just wrote into a clean `build` folder the same as we did for Meson. Plus, we install the built Flatpak package locally for our user. If all goes well, congrats! You've just built and installed your app as a Flatpak. + +Don't forget to add `.flatpak-builder` to your `.gitignore` file: + +```bash +git add .gitignore +git commit -am "Ran a test build with flatpak-builder" +git push +``` + That wasn't too bad, right? We'll set up more complicated packaging in the future, but this is all that is required to submit your app to AppCenter Dashboard for it to be built, packaged, and distributed. If you'd like you can always read [more about Flatpak](https://docs.flatpak.org/en/latest/introduction.html). From 6da8ee3e3141fb34df9ece02a70c800638832ad5 Mon Sep 17 00:00:00 2001 From: "Ian Cleary (he/him/his)" Date: Sat, 11 Sep 2021 14:05:00 -0700 Subject: [PATCH 3/3] Added echo command to facilitate change --- writing-apps/our-first-app/packaging.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/writing-apps/our-first-app/packaging.md b/writing-apps/our-first-app/packaging.md index 8077ad9..dbe6d32 100644 --- a/writing-apps/our-first-app/packaging.md +++ b/writing-apps/our-first-app/packaging.md @@ -70,8 +70,9 @@ This tells Flatpak Builder to build the manifest we just wrote into a clean `bui Don't forget to add `.flatpak-builder` to your `.gitignore` file: ```bash +echo '.flatpak-builder' >> .gitignore git add .gitignore -git commit -am "Ran a test build with flatpak-builder" +git commit -am "Added .flatpak-builder to .gitignore" git push ```