Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Providing A Flatpak Image #21

Closed
CuriousTommy opened this issue Apr 22, 2019 · 15 comments
Closed

Consider Providing A Flatpak Image #21

CuriousTommy opened this issue Apr 22, 2019 · 15 comments

Comments

@CuriousTommy
Copy link

It would be nice to have a flatpak image, so that it is easy to install on any Linux distro.

@thomas-alrek
Copy link
Contributor

Maybe this could be achieved through electron-installer-flatpak?

@CuriousTommy
Copy link
Author

CuriousTommy commented Apr 25, 2019

@thomas-alrek That could work, but we also need to make sure that the required libraries for those binary files are also included.

@chrismaltby
Copy link
Owner

I was looking at electron-installer-flatpak while working out how I should distribute, the app is using Electron Forge so adding flatpak is actually just a one line add to the package.json.

The problem I found though is I can't find a way to build that version from my Mac, for Windows builds I've got that working with Wine / Mono, for deb and rpm builds you can install all the dependencies to build cross platform from a Mac. So with the current setup I can just run npm make:all and come back a little later and they're all ready to distribute. If possible I don't want to have to run a different build process running a Linux VM for doing a prod build.

I've heard another possibility would be using a CI server to make the builds instead, just preferably one I don't need to pay for :-)

@thomas-alrek
Copy link
Contributor

CircleCI offers free containers for open source projects. So you could test it locally through Docker, and then port that config over to CircleCI.

I use CircleCI through my job daily, and can help you set it up

@chrismaltby
Copy link
Owner

Ah I use CircleCI at work too, it's great! Not used it to do electron builds though but looks like there's quite a bit of info out there for it

https://dev.to/kontrollanten/super-fast-electron-builds-with-circleci--5ghn
https://github.com/protonmail-desktop/application/blob/7289770d44f8f8acdda69f878643d354928e406e/.circleci/config.yml

@thomas-alrek
Copy link
Contributor

#111

@barthalion
Copy link

Submitted a draft pull request at flathub/flathub#1553

One of Flathub's technical requirements is offline build and unfortunately electron-forge makes it virtually impossible, ignoring environment variables to re-use predownloaded yarn cache, so it repackages deb package instead. Additionally at least metainfo file should be maintained here instead of Flathub repo.

Please have a look when you have some time, @chrismaltby.

@soredake
Copy link

No progress on this?

chrismaltby added a commit that referenced this issue Aug 21, 2020
Add extra scripts to normalizedFindSceneEvent
@lunarcloud
Copy link

FWIW: an AppImage would be far simpler than a flatpak for users, is portable, and works with the itch app

@hadess
Copy link

hadess commented Sep 9, 2021

FWIW: an AppImage would be far simpler than a flatpak for users, is portable, and works with the itch app

Maybe you should create a separate issue if that's something you want to discuss.

@merwok
Copy link

merwok commented Sep 9, 2021

The comment is not off-topic on this issue though. The topic is distributing applications for many operating systems based on linux, which is always a discussion of relative merits of snap vs flatpak vs appimage. A personal preference for flatpak (which I share!) shouldn’t mean rude dismissal of other people’s comments.

@hadess
Copy link

hadess commented Sep 9, 2021

The topic is distributing applications for many operating systems based on linux

Is it though? The whole discussion is about how to use Electron Forge to create said Flatpak.

A personal preference for flatpak (which I share!) shouldn’t mean rude dismissal of other people’s comments.

I don't think it was rude, but I certainly intended it to cut short any discussion of the merits of other packaging systems, especially when it's not one of the "makers" Electron Forge supports: https://www.electronforge.io/config/makers

@lunarcloud
Copy link

Totally sorry. I just meant if this issue became something that wouldn't move forward, an alternative solution. It's been a while, but I've written scripts to create appimages before and had good luck with them ( I had bad luck making flatpaks ).
Can totally ignore my comment if it derails proper work/progress though.

@hadess
Copy link

hadess commented Sep 9, 2021

The main problem with making Flatpaks is one that's shared by many distributions' builders, for security and reproducibility reasons: no network access. Fixing that would help with building in any other packaging system/build system with similar characteristics.

Electron Forge uses https://www.npmjs.com/package/electron-installer-flatpak to do the "Flatpak'ing", but it actually just creates an installed tree with the binaries, same as for creating DEB or RPM, and bundles that up. Not much to do there other than file a bug against electron-forge and explain the exact details of the problems encountered.

In the meanwhile, and rather than tilting at windmills, @chrismaltby can use @barthalion's work and use the Debian package as a starting point for the offline packaging. If the Flatpak distribution of gb-studio is hosted on Flathub, then the package gets built and distributed there. That would avoid having to invest in CIs.

@JakobDev
Copy link

I had opened a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants