POSIX: Add $SNAP to search path if available. #795

Merged
merged 1 commit into from Aug 1, 2016

Conversation

Projects
None yet
5 participants
Member

fuzzie commented Jul 29, 2016

This allows ScummVM to find data files while running in a snap (e.g.
from the new Ubuntu store).

Member

fuzzie commented Jul 29, 2016

This should respect the prefix, and the snap path should be higher priority than the data path added by the superclass. I'll fix these shortly.

I think it makes sense to keep the data path in the search path, to avoid breaking things if someone has $SNAP set to something random. That's easy enough to change too, though.

POSIX: Add $SNAP to search path if available.
This allows ScummVM to find data files while running in a snap (e.g.
from the new Ubuntu store).
@@ -141,6 +141,22 @@ Common::String OSystem_POSIX::getDefaultConfigFileName() {
return configFile;
}
+void OSystem_POSIX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
+ const char *snap = getenv("SNAP");
+ if (snap) {
@sev-

sev- Jul 29, 2016

Owner

Why not reverse the condition?

edited

ignore me, you have the fallback.

@wjp

wjp Jul 29, 2016

Owner

It should still call OSystem_SDL::addSysArchivesToSearchSet even when SNAP is not set.

Owner

sev- commented Aug 1, 2016

Nice, merging.

@sev- sev- merged commit 45e82b5 into scummvm:master Aug 1, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Member

rootfather commented Aug 14, 2016

@fuzzie, @spads-spads: Do you consider the snapcraft support to be stable enough to be mentioned in the Linux port section in our NEWS file?

Contributor

spads-spads commented Aug 14, 2016

@rootfather It's stable enough that I've been able to build arbitrary revisions from git and play Beneath A Steel Sky on them. There's work to be done to tighten the access required, so we can snap up self-contained games with scummvm inside so they don't need external filesystem access.
But from a simple packaging formats standpoint I think this is stable enough to announce!

Member

rootfather commented Aug 14, 2016

@spads-spads Thanks for your reply. If you don't have any objections, I'll mark the snapcraft support as "preliminary" or "basic" in the appropriate NEWS item until full functionality is achieved.

Contributor

spads-spads commented Aug 15, 2016

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment