To create applications that run outside Oasis montaj, developers use the External API, which consists of you can choose to depend on an installed "Geosoft Desktop" environment, or you can provide a set of Geosoft redistributable files that must be installed with your application . Redistributing your application and the 3rd party components can usually be achieved fairly easily by making use of the Windows Installer XML (WIX) Toolset or some other install creation utility. The details of how to create an installer are outside the scope of this guide.
Introduction
The recommended way to create an application (which only makes use of unlicensed functionality) that can operate completely independent of an Oasis montaj installation is to install all the files and GeosoftFiles directory in <Program Files>\Geosoft\GX Developer\apps\redist\bin right next to the binaries that would be making use of the API externally.
It is also possible to make use of of an Oasis montaj or Oasis montaj Viewer installation to reduce your application footprint and make use of licensed functionality. To do this the GeosoftFiles directory above can be omitted and a geosoft.key file must distribution. The following provide details for either case.
Applications that depend on a "Geosoft Desktop" installation
If your application targets Geosoft users, which is the most common case, we recommend that your application be dependent on a properly installed version of the Geosoft Desktop, which is available to both subscribed Geosoft users and un-subscribed users who use the Geosoft viewer. In either case, you and your users can obtain the latest version of Geosoft Desktop from the Geosoft download page (https://my.geosoft.com/downloads).
To establish the dependency on Geosoft Desktop a geosoft.key file needs to be present next to your application files, usually your .exe file. The geosoft.key file must containing . The geosoft.key contains a single text line with the text "Core" , (or "Core - Testing" if you have a testing version of Geosoft installed). When your program runs and attempts to load the Geosoft environment, if a geosoft.key file is found, the Geosoft loader will look for this name in the registry under we use the name in the geosoft.key file to identify the installation from the registry section HKEY_LOCAL_MACHINE\SOFTWARE\Geosoft
.In addition to these files your application will
If you or your users experience an error "Geosoft: Error loading Geodist.dll.", this usually means that the geosoft.key file does not identify the correct registry key.
Applications that distribute the Geosoft redistributables
Should you application not require any licenced capabilities from the GX API, you may also distribute your application as a completely independent application. In this case your application must install all the files from <Program Files>\Geosoft\GX Developer\apps\redist\bin next to the binaries that would be making use of the API externally. Your application will also need to install and/or check for the following 3rd party redistributables. Note that this is not necessary when making use of an Oasis montaj installation as described in the paragraph above.
Redistributable | Description |
---|---|
Microsoft Visual Studio 2013 Redistributable Package | DLL’s that provides the C Runtime functions, MFC and STL functionality on which the Geosoft dll’s rely. Available from here. Both the x86 and x64 redistributions are needed to support 64-bit Python development. |
Microsoft .Net 4.5.2 Framework | Found here. |
...
Note that the “app” methods in the GX API are a special group that are normally dependent on running Geosoft Desktop. If your application requires any of these functions you should install dependent on an properly installed Geosoft Desktop application.
Registry for stand-alone installations
If no registry settings are used the folder where the files are installed should be writeable to the Windows user as temporary files and a user folder will be created in this folder.
We can also recommend the Depends.exe utility for debugging any dll dependency problems (see http://www.dependencywalker.com/ ) that might arise.
Registry
Although no registry settings are required to create external applications, we do recommend that you register specific directories for your application if you want to control where You may also use registry settings to register specific directories where you would like temporary files and user directories will to be located. During execution, applications using the external API will create log and temp files in the current working directory. To have the Log and temp files sent to a different directory, it is required that you create a key file for your application. This file, called geosoft.key must be in the same directory as your EXE. It contains the name of your application {MyApp}. With this key file, the Create_GEO method will look in the registry under the following key for settings:With your application you can include a file named geosoft.key, which will contain a single text line that with your application name, say "{MyApp}". In the Windows registry, under HKEY_LOCAL_MACHINE\SOFTWARE\Geosoft\
{MyApp}
...
GEOTEMP Where all temp files will be placed.
...
, create a key "Environment"
. This registry key can be used to identify the location of various files for your application:
GEOSOFT
Where the contents of the GeosoftFiles directory is (which can be omitted if next to the application).
GEOSOFT2 GEOSOFT2
Where all user files will be placed.
This will force all temp and log file to be created in the GEOTEMP directory. Please note that the key names can conflict with Geosoft keys as well as other developer keys so please use descriptive names.
Licensing
...
GEOTEMP
Where all temp files will be placed.
Should you choose to configure the registry for your application, we suggest you install a standard Geosoft Desktop and inspect the registry HKEY_LOCAL_MACHINE\SOFTWARE\Geosoft\
to see how Geosoft configures the registry.
Should you run into DLL dependency challenges we recommend the depends.exe utility for debugging any dll dependency problems (see http://www.dependencywalker.com/ ).