Skip to content

Conversation

@mainrs
Copy link

@mainrs mainrs commented Aug 23, 2019

This PR adds support for flatpak alongside other packaged versions of Boostnote.
The main lifting is done using electron-packager to package the application. electron-installer-flatpak is then used to generate a flatpak image for the linux version of Boostnote.

Before running npm run flatpak, make sure to compile as well as package the application for Linux. Flatpak Sdk and Platform builds have to be installed too. The following shows a workflow:

$ ./dev-scripts/flatpak-deps.sh # Installs flatpak sdk and platform build
$ npm run compile && npm run package:linux
$ npm run flatpak

Generated artifacts are found under packaged. To test the generated flatpak file, run

flatpak install --user ./packaged/installers/io.boostnote.boost_stable_x64.flatpak

followed by

flatpak run io.boostnote.boost

Debug logs can be showed by setting DEBUG environment variable to either * for all packages or package-name for a specific package (e.g. electron-packager or electron-installer-flatpak).

Closes #2115.


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@Flexo013 Flexo013 added the awaiting review ❇️ Pull request is awaiting a review. label Aug 23, 2019
@ZeroX-DG ZeroX-DG requested a review from Rokt33r September 1, 2019 22:55
@Rokt33r
Copy link
Member

Rokt33r commented Sep 2, 2019

@sirwindfield I've never tried flatpak yet although I'm using PopOS Linux a lot. Could you explain how can I test with my Linux PC?

@mainrs
Copy link
Author

mainrs commented Sep 2, 2019

@Rokt33r

https://flatpak.org/setup/Pop!_OS/ Here you can download flatpak for your Linux system.
After that run:

$ ./dev-scripts/flatpak-deps.sh
$ npm run compile && npm run package:linux
$ npm run flatpak
$ flatpak install --user ./packaged/installers/io.boostnote.boost_stable_x64.flatpak
$ flatpak run io.boostnote.boost

First line installs the Flatpak SDK needed to compile Boostnote as a flatpak file.
The second one compiles Boostnote and generated the Linux files.
The third one creates the flatpak archive.
The fourth one installs it to the user directory.
The fifth one starts Boostnote using the flatpak installation.

The whole process can take up to 10 minutes, depending on your PC. My MacBook from 2015 needed around that much time.

@Rokt33r
Copy link
Member

Rokt33r commented Sep 2, 2019

Okay, I'll try it on Wednesday and update the status. (My PC is in my office and I'm off tomorrow because I need to go to clinic.)

@mainrs
Copy link
Author

mainrs commented Sep 2, 2019 via email

@mainrs
Copy link
Author

mainrs commented Sep 5, 2019

@Rokt33r Could you test it? :)

@Rokt33r
Copy link
Member

Rokt33r commented Sep 7, 2019

@sirwindfield I forgot...! I'll do it in this weekend!

@Rokt33r
Copy link
Member

Rokt33r commented Sep 10, 2019

@sirwindfield Sorry for being late. I have two issues.

flatpak-builder is not found

When I run npm run flatpak it throws an error like the below.

Screenshot from 2019-09-10 18-19-13

I followed https://flatpak.org/setup/Pop!_OS/ and ran ./dev-scripts/flatpak-deps.sh. Did I miss something?

package:linux script has been deprecated

It is old script. Now we're making executable file via grunt. So could you change the src directory? After you execute grunt build, it will generate executable files in dist directory.

@mainrs
Copy link
Author

mainrs commented Sep 10, 2019

@Rokt33r Did you run yarn install? It requires some new npm packages.

@Rokt33r
Copy link
Member

Rokt33r commented Sep 10, 2019

I did it..!
Screenshot from 2019-09-10 18-30-29

@mainrs
Copy link
Author

mainrs commented Sep 10, 2019

Oh I think I missed to mention that flatpack-builder is separate. You probably need to run
sudo apt install flatpak-builder as well. If that doesn't work I will boot up a VM at home with Pop_OS and ping you after I get it working again :)

@Rokt33r
Copy link
Member

Rokt33r commented Sep 10, 2019

Awesome! It's working! Could you fix the second issue too? After it is fixed, I think I can merge this.

@mainrs
Copy link
Author

mainrs commented Sep 10, 2019

Awesome! It's working! Could you fix the second issue too? After it is fixed, I think I can merge this.

Ye sure. I need access to my VMs though as I run macOS on the go. I will push some changes and ping you again :)

@mainrs
Copy link
Author

mainrs commented Oct 1, 2019

I totally missed this one. I will fix it on Saturday :)

@ZeroX-DG
Copy link
Member

@sirwindfield ping 😃

@ZeroX-DG
Copy link
Member

@sirwindfield ping2 😄

@ZeroX-DG
Copy link
Member

ZeroX-DG commented Apr 23, 2020

@sirwindfield ping3 😄 this is the last ping. I'll try to solve this myself if u don't interested in this anymore

@ZeroX-DG ZeroX-DG mentioned this pull request Jun 10, 2020
@ZeroX-DG
Copy link
Member

Take over here: #3587

@ZeroX-DG ZeroX-DG closed this Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review ❇️ Pull request is awaiting a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flatpak app

4 participants