Path to data files

Issue #14 new
James Howe created an issue

How does the shared library (dll/so) find the data files?

Can the path be passed in somehow, or is it hard-coded to either the working directory or the location of the library file?

Comments (3)

  1. Paul Michell repo owner

    The data files are assumed to be in the same folder as the library binary. There isn’t a mechanism to customise this.

  2. James Howe reporter

    Thanks Paul, that’s what I guessed. For Windows that’s not too much of a burden, but it makes a nice linux package a bit annoying to construct.

    How hard would it be to add a feature so the path could be provided e.g. via environment variable?

  3. Paul Michell repo owner

    Line 121 of OSGeoid.pas defines a global variable with the path to the data folder. The code in the Pascal Initialization section (lines 393-424) assigns this during library load and this code would need modifying to the desired behaviour. How hard this would be would depend on the complexity of the additions?

  4. Log in to comment