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
[FIX-Linux] Snaps Issues Part 1 #3128
Conversation
Hey, these changes probably are not needed. And as said before in the forum, please don't use electron-builder. It'll be worse to maintain later. Please. |
It is actually worse for us to maintain a separate thing, if we can do it using electron-builder would be easier since we don't need to change our workflows. Because otherwise we will need a specific workflow just for snaps and find a way to automate the update and release of it on every release as well. So unless it is impossible to solve with it then we would try a different way. |
Bringing up my latest manifest here again to compare. Heroic is a game launcher, a very sensitive app, that needs to be fast and efficient. Now, here with this manifest,
Another alternative way, not using github workflow to build the snap After 2: EDIT: if the team agrees, I can completely maintain the snap thing, on my own. |
@soumyaDghosh yes I think electron-builder might now allow those options and we will need to go with our own snapcraft file then. The way that you described could work, but then we trigger the workflow on About maintaining the Snap, I am fine with it, no problem. But even that might not be needed if we can automate it. |
Forgot to mention, Electron Builder uses |
Updated electron-builder to the latest version and using core22 now works fine. |
My snap manifest isn't complete yet. I most probably hae one with most of the things working. I will share it soon |
question about the curl access, do we need curl? what I mean is... we have node, it should be able to do anything we are using curl for without curl maybe it's easier to remove the curl dependency than to fix the access to curl? |
Kindly give me the snap link. Would like to test the snap. |
@flavioislima Is there a reason you are not staging |
I tried but it didn't work. I will try again but on Ubuntu. |
For sure. We can use EasyDL lib to download all packages, would be a medium size pr to refactor everything but it's possible. But we still need to figure it out the rest of the plug-ins like mangohud, etc. |
I will modify this PR so it will generate a snap to download so we can test it. |
|
||
// if not on a SNAP environment, set the XDG_CONFIG_HOME to the same location as the config file | ||
if (!process.env.SNAP) { | ||
options.env.XDG_CONFIG_HOME = dirname(legendaryConfigPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does changing XDG_CONFIG_HOME under snap cause issues? if it does does it still cause issues if a different variable is used (like LEGENDARY_CONFIG_PATH)?
it might be better to update legendary and use LEGENDARY_CONFIG_PATH once my PR gets merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it breaks the SNAPs because then legendary was trying to write its configs to a place that it is not possible so it was giving permission issues.
Don't we have axios that's capable of that already? |
All these uncertainties are the reason, I am still on the side of a custom manifest. |
Yes but Axios was not intended to download files, it is possible but it is not stable. EasyDL is a pretty good library that does that and supports progress, split files into chunks and continuing to download in case something fails, different from axios that does not have any of these features. |
Tried here on Ubuntu and on Arch (with multipass). The curl package is successfully installed but Heroic still cannot access it. This leads me to two choices:
For 1, I still need approval from the Snap Store to be able to access those home folders we need. I just tried to publish the package on Edge channel and they denied it because of these new accesses. |
I still would be on the side of a custom snapcraft yaml, as I think you'd have trouble getting GameMode and MangoHUD to work only by adding their packages via electron-builder. Maybe in the meantime, a message to users about functionality wouldn't be a bad idea, though. We include GameMode and MangoHUD as separate parts in the Steam Snap if you're looking for inspiration there (https://github.com/canonical/steam-snap/blob/main/snap/snapcraft.yaml#L250-L310). Steam is a finicky case since we force the client to run in 32-bit, so functionality isn't very consistent. I'd be curious to see how well something similar would work for Heroic. |
Ok, so for now I will remove the need of curl from the code and fix these other issues and in the future we try to bring these other tools to the snap package. |
I am removing the |
@flavioislima So, should I share a PR on the snap workflow? |
sure |
Problem, I want to test this pr, but where can I get the deb file from? |
Sorry, missed your reply. I will change this PR so it will generate a .deb during build |
This reverts commit 6ae314b.
…uncher into fix/snaps
@flavioislima sorry to inform you that heroic being a big project needs a lot of attention and problem is my sem exam is coming soon. So, I'm halting on this thing now. I think if you don't mind, we can restart again after December! |
No problem. This is also getting more complicated. The app cannot even extract a tar.xz file since the core app is so limited on Snap. So I also need to change the extraction methods to use a npm package instead of native |
Those are possible, and can be done. What I suggest now is to hold any code changes just for the sake of snap. It'll later make a hell for the package. |
Yeah, but at the same time having the extraction, download, etc. Done from Heroic itself will be better since we won't rely on external dependencies and packages. So in the end these are necessary refactors. |
Merging this one. Should at least fix part of the issues. |
Fixes:
curl
dependency ([Tech] Refactor Download Methods #3129)tar
dependency ([Tech] Refactor Extraction methods #3181) since Snaps does not extract tar.xz files by default.rm ~/.cache/fontconfig/* ~/snap/heroic/common/.cache/fontconfig/*
Current Discussions:
https://forum.snapcraft.io/t/help-fixing-heroic-games-launcher-snap/37248/5
#3127
For Part 2
Use the following Checklist if you have changed something on the Backend or Frontend: