To create applications that run outside Oasis montaj, developers use the External API, which consists of a set of 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 be present next to your application files, usually your .exe file. The geosoft.key file must containing 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 HKEY_LOCAL_MACHINE\SOFTWARE\Geosoft.
In addition to these files your application will 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. |
No registry settings are required to be setup, but 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 temporary files and user directories will 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:
HKEY_LOCAL_MACHINE\SOFTWARE\Geosoft\{MyApp}\Environment
GEOTEMP Where all temp files will be placed.
GEOSOFT Where the contents of the GeosoftFiles directory is (which can be omitted if next to the application).
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
The functions available in this API are the same ones available under the GX programming interface for Oasis montaj. All the [_public] methods are provided free and can used by anyone without restriction by Geosoft. However, [_licensed] and [_extended] methods do require that Oasis montaj be installed with an appropriate license. The “app” methods are a special group that may or may not be provided outside Oasis montaj. If they are provided, they may not have the same behaviour as they would if run inside Oasis montaj.