Skip to content

Make data directory configurable #17

Description

@City-busz

Currently the UI file, the GResource file and the translations are loaded from the same directory where the executable is located:

var path = Path.Combine(System.Environment.ExecutingDirectory, "ui", $"{name}.ui");

var resources = Gio.Resource.Load(Path.Combine(System.Environment.ExecutingDirectory, $"{appInfo.Id}.gresource"));

foreach (var directory in Directory.EnumerateDirectories(System.Environment.ExecutingDirectory))

This is not suitable for distributions, because the DLLs are usually located under /usr/lib, but the data files are under /usr/share. Would it be possible to make this path configurable either by a build parameter or by an environment variable?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions