GeosoftInc / gxpy

Python for Geosoft GX Developer
https://geosoftgxdev.atlassian.net/wiki/spaces/GD/overview
BSD 2-Clause "Simplified" License
34 stars 30 forks source link

Geosoft redistributables ignore gxpy's user_dir and temp_dir; asks for geosoft.redis file instead. #135

Open tom-a-horrocks opened 3 months ago

tom-a-horrocks commented 3 months ago

Context:

Problem: The redistributable libraries don't actually use the user_dir and temp_dir that gxpy creates. This culiminates in the following fatal error when constructing the GXpy object:

"Error initializing Geosoft redistributable subsystem. Missing: 'C:\path\to\GeosoftRedist\geosoft.redist' configuration file. Contents should include the user and temp directories on two separate lines.

Workaround: I get around this by making my own geosoft.redist file with the required directories. I can confirm that the redistributables definitely read the directories in the redist file: if the directories in the redist file don't exist, then I get another (different) error saying so.

Desired Behaviour: The Geosoft redistributables should not require a geosoft.redist file, and instead use the user_dir and temp_dir generated/provided by gxpy.

serban-seeq commented 3 months ago

GXDEV-43

serban-seeq commented 3 months ago

@tom-a-horrocks the paths from geosoft.redist will be scanned but will later be overwritten with whatever paths you define or don't define(temp folders) in the GXpy constructor. This is an artifact of the way redist works for other languages (.NET, C#, GXC) where there is no mechanism for specifying these paths and the system has to rely on the geosoft.redist.

As a workaround until a fix can be done, you can create a geosoft.redist file with valid paths. These are used for initialization but will be overwritten with the constructor parameters.