-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add support for Snap package format #552
base: develop
Are you sure you want to change the base?
Conversation
* Update readme.md accordingly
snap/snapcraft.yaml
Outdated
command: falltergeist.launcher | ||
desktop: share/applications/falltergeist.desktop | ||
plugs: | ||
- a1sa |
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.
a1sa
? Isn't that some typo?
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... 🤦♂️ That explains the warning at install. I'm not 100% sure its needed but I will fix it.
Does snap automatically figure out the cmake's build type? |
build type is determined by this line Wait, do you mean build architecture? If so, yes. |
Can you please explain what is causing these limitations with data files location? we are going to have rewriten Resource Manager soon. It will support any amount of different locations mounted into the one virtual location. It is based on https://github.com/fgenesis/ttvfs. Can we do something with those restrictions? |
The snap is bundled as a static filesystem image. It's contents are read-only. Snap apps in traditional confinement aren't aware of the rest of the filesystem (except for the ~/snap/[application]/[revision]/ directory and the locations defined in $SNAP_DATA and $SNAP_COMMON). Therefore when a Snap compiled version of falltergeist is looking in /usr/share/falltergeist, it is actually looking in the read-only version of the /usr/ directory that ships with the snap. The user cannot put data there, because, well, its read only. The designers of snap got around this issue by saying that non-static data was to be written to the $SNAP_DATA or $SNAP_COMMON or ~/snap/[application]/ directories. In theory, remounting the $SNAP_COMMON/usr/share/falltergeist/ directory (which IS read-write) as /usr/share/falltergeist should do the trick, but I haven't figured out how to do that yet. I'm currently seeking help on the correct way to do this task. Snap is supposed to be non-invasive, so you shouldn't need to re-write code to accommodate it. The problem is purely a lack of knowledge on my part :( |
More info on snap confinement: On SNAP_COMMON vs SNAP_DATA: |
So, for now snaps don't have the capability I described. but they soon will. For now the only way to have globally accessible data would be to have an override flag available in falltergeist that allows the user to manually set the data path to $SNAP_COMMON (or have an environment variable): |
Something occurred to me, would it be possible to have a GAME_DATA_PATH variable in the main cmake file for now? If so, snap has facilities to override cmake variables. The default should remain $PREFIX/falltergeist, but it would be handy to be able to set it. |
The "Source: Snap" keyword in the falltergeist.launcher part is no longer valid
Hi, I just thought you guys should know that there have been a few changes to the snapcraft.yaml syntax since I first opened this pull request. I fixed the only blocker issue that I know about, so it should build again. There is a deprecation warning I still need to look into, but building should be safe for the moment. |
Changes:
Notes: