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

Multiple searchpaths for assets and configuration #691

Closed
2 tasks done
TheJJ opened this issue Jan 10, 2017 · 1 comment
Closed
2 tasks done

Multiple searchpaths for assets and configuration #691

TheJJ opened this issue Jan 10, 2017 · 1 comment
Labels
area: assets Involved with assets (images, sounds, ...) area: buildsystem Related to our cmake/python buildsystem improvement Enhancement of an existing component just do it You can start working on this, there should be nothing left to discuss lang: c++ Done in C++ code lang: python Done in Python code
Milestone

Comments

@TheJJ
Copy link
Member

TheJJ commented Jan 10, 2017

Currently, we only focus on the in-devtree-version. But the make install'd version should catch up and also support the appropriate search paths:

Dev-mode detection currently works by the ability to import devmode, because devmode.py is not installed and thereby the import will fail.

Search paths:

  • if in devmode, only(?): $repo/
  • ~/.local/share/openage/ / ~/.config/openage/
  • /usr/share/openage/ / /etc/openage/

And of course the matching parts on windows/macOS/whatever.
Basically, we will adhere to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

The order depends on the data type to be located:

  • config files are loaded global first, then user, ...: values get overidden and specialized then
  • assets are searched local first, so that the most-custom-asset wins

This is also a step towards our modding API.
Assets can either be in .tar.* archives or extracted folders in the search paths. The mounting of archives is done transparently by #630.

As a first step, I'd suggest you install the game with make install, then leave the repo folder and try to run it with python3 -m openage. You should of course package the game to avoid filesystem clutter.

Fixes #610
Depends on #630
Will help #667
Will be used by #632 later
Fixes #709

@TheJJ TheJJ added area: buildsystem Related to our cmake/python buildsystem lang: c++ Done in C++ code improvement Enhancement of an existing component just do it You can start working on this, there should be nothing left to discuss lang: python Done in Python code labels Jan 10, 2017
@TheJJ TheJJ changed the title Traverse searchpaths for installed game Multiple searchpaths for assets and configuration Jan 10, 2017
@TheJJ TheJJ added this to the nyan milestone Jan 10, 2017
@TheJJ TheJJ added area: assets Involved with assets (images, sounds, ...) area: buildsystem Related to our cmake/python buildsystem and removed area: buildsystem Related to our cmake/python buildsystem labels Jan 10, 2017
@zuntrax zuntrax modified the milestones: v0.4.0, nyan Jan 23, 2017
@TheJJ TheJJ mentioned this issue Jan 26, 2017
30 tasks
@TheJJ
Copy link
Member Author

TheJJ commented Mar 21, 2017

Done via #723

@TheJJ TheJJ closed this as completed Mar 21, 2017
@TheJJ TheJJ removed this from issues in buildsystem Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: assets Involved with assets (images, sounds, ...) area: buildsystem Related to our cmake/python buildsystem improvement Enhancement of an existing component just do it You can start working on this, there should be nothing left to discuss lang: c++ Done in C++ code lang: python Done in Python code
Projects
None yet
Development

No branches or pull requests

2 participants