Skip to content

install & asset finding logic #4

Description

@OPNA2608

Currently there are no CMake install rules for the binary & assets, I think that would be a good addition.

For that, some more sophisticated logic for finding the assets at runtime would be needed, so Unixoid-style FHS (or Darwin-style bundles ig) can work without cding to some weird directories. For example

  1. Maybe search in a path passed via an envvar or switch first in case the normal mechanism needs to be overridden
  2. Then in $CWD/res so Windows-style packaging (exe in a dir, assets next to it) works as expected
  3. Then in a user-specific path (somewhere under $XDG_DATA_HOME maybe, related to Use XDG basedir specs for storing savedata #3)
  4. Then in a system path - CMake has a CMAKE_INSTALL_DATADIR / CMAKE_INSTALL_FULL_DATADIR for that sort of stuff when using GNUInstallDirs to specify install paths (dunno if it handles bundles on Darwin ottomh though)
    (or some other path configured at build-time)
  5. Also, some graceful error handling would help so missing assets don't lead to a SIGSEGV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions