OpendTect-6_4  6.4
Macros | Enumerations | Functions
oddirs.h File Reference
Include dependency graph for oddirs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define mGetApplSetupDataDir()   GetSetupDataFileDir(ODSetupLoc_ApplSetupOnly,0)
 
#define mGetSWDirDataDir()   GetSetupDataFileDir(ODSetupLoc_SWDirOnly,0)
 
#define mGetSetupFileName(x)   GetSetupDataFileName(ODSetupLoc_ApplSetupPref,x,0)
 
#define mGetUserDocDir()   GetDocFileDir("userdoc")
 
#define mGetProgrammerDocDir()   GetDocFileDir("Programmer")
 
#define mGetSysAdmDocDir()   GetDocFileDir("SysAdm")
 
#define mGetExecScript()   GetExecScript(0)
 

Enumerations

enum  ODSetupLocType { ODSetupLoc_ApplSetupOnly, ODSetupLoc_ApplSetupPref, ODSetupLoc_SWDirPref, ODSetupLoc_SWDirOnly }
 

Functions

const char * GetBaseDataDir (void)
 
const char * GetDataDir (void)
 
const char * GetProcFileName (const char *)
 
const char * GetSoftwareDir (bool acceptnone)
 
const char * GetBinSubDir (void)
 
const char * GetApplSetupDir (void)
 
const char * GetSetupDataFileDir (ODSetupLocType, bool acceptnone)
 
const char * GetSetupDataFileName (ODSetupLocType, const char *, bool acceptnone)
 
const char * GetPlfSubDir (void)
 
const char * GetExecPlfDir (void)
 
const char * GetScriptDir (void)
 
const char * GetLibPlfDir (void)
 
const char * GetBinPlfDir (void)
 Old don't use. More...
 
const char * GetDocFileDir (const char *filedir)
 
const char * GetExecScript (int remote)
 
const char * GetODExternalScript ()
 
const char * GetSoftwareUser (void)
 
const char * GetUserNm (void)
 
const char * GetPersonalDir (void)
 
const char * GetSettingsDir (void)
 
const char * GetSettingsFileName (const char *)
 
const char * GetScriptsDir (const char *)
 

Macro Definition Documentation

#define mGetApplSetupDataDir ( )    GetSetupDataFileDir(ODSetupLoc_ApplSetupOnly,0)
#define mGetExecScript ( )    GetExecScript(0)
#define mGetProgrammerDocDir ( )    GetDocFileDir("Programmer")
#define mGetSetupFileName (   x)    GetSetupDataFileName(ODSetupLoc_ApplSetupPref,x,0)

Usual choice: first look in ApplSetup, if not there, look in release

#define mGetSWDirDataDir ( )    GetSetupDataFileDir(ODSetupLoc_SWDirOnly,0)
#define mGetSysAdmDocDir ( )    GetDocFileDir("SysAdm")
#define mGetUserDocDir ( )    GetDocFileDir("userdoc")

Enumeration Type Documentation

Enumerator
ODSetupLoc_ApplSetupOnly 
ODSetupLoc_ApplSetupPref 
ODSetupLoc_SWDirPref 
ODSetupLoc_SWDirOnly 

Function Documentation

const char* GetApplSetupDir ( void  )

Directory with setup files and scripts overruling current software release's default setup files.

Tied to environment DTECT_[WIN]APPL_SETUP. If the environment is not set (see GetEnvVar), this function returns null.

const char* GetBaseDataDir ( void  )

Base data directory: DTECT_[WIN]DATA or from User Settings.

const char* GetBinPlfDir ( void  )
inline

Old don't use.

const char* GetBinSubDir ( void  )

Directory for the release-type, i.e. Debug, Release, ...

const char* GetDataDir ( void  )

Survey directory: GetBaseDataDir()/<current survey>="">

const char* GetDocFileDir ( const char *  filedir)

Location of Documentation

const char* GetExecPlfDir ( void  )

Platform dependent executable directory Returns full path to bin dir: GetSoftwareDir()/bin/GetPlfSubDir()/GetBinSubDir() on Windows and Linux, and GetSoftwareDir()/Contents/MacOS on Mac.

const char* GetExecScript ( int  remote)

Location of launch script for external programs

In GetSiteDataDir() or GetSoftwareDir(): bin/od_exec[_rmt][.bat]

const char* GetLibPlfDir ( void  )

Platform dependent library directory Returns full path to bin dir: GetSoftwareDir()/bin/GetPlfSubDir()/GetBinSubDir() on Windows and Linux, and GetSoftwareDir()/Contents/Frameworks on Mac.

const char* GetODExternalScript ( )
const char* GetPersonalDir ( void  )

Directory for personal settings: 'Home directory'

This gets the user's home directory. Even on Windows, something will be assigned as being the home directory.

Windows: DTECT_WINHOME DTECT_HOME -> converted from unix to windows path (cygpath -w) HOMEDRIVE+HOMEPATH if exists and not equal to "C:\" That should be it. If that still fails, we try HOME, USERPROFILE, APPDATA, DTECT_USERPROFILE_DIR. As a last resort, GetSpecialFolderLocation is used.

UNIX: DTECT_HOME, HOME; in that order.

Before anything else, DTECT_PERSONAL_DIR is checked. If it's set, that is returned. If all else fails, "C:\\" or "/tmp" are returned.

const char* GetPlfSubDir ( void  )

Platform subdirectory for platforms

Tries PLFSUBDIR, if not set: binsubdir, if not set: HDIR Ouput medio 2009 is one of lux32, lux64, sol32, mac, win32 or win64.

const char* GetProcFileName ( const char *  )

Returns file name in GetDataDir()/Proc. Pass null for directory.

const char* GetScriptDir ( void  )

Platform dependent script directory Returns full path to bin dir: GetSoftwareDir()/bin on Windows and Linux, and GetSoftwareDir()/Contents/MacOS on Mac.

const char* GetScriptsDir ( const char *  )
const char* GetSettingsDir ( void  )

Directory with the user settings

Returns GetPersonalDir()/.od, unless DTECT_PERSONAL_DIR is set.

const char* GetSettingsFileName ( const char *  )

Returns GetSettingsDir()/filenm

const char* GetSetupDataFileDir ( ODSetupLocType  ,
bool  acceptnone 
)

Returns the name of the "data" subdir of the release or the site setup directory. If acceptnone is false, program will terminate if none is found.

const char* GetSetupDataFileName ( ODSetupLocType  ,
const char *  ,
bool  acceptnone 
)

Returns the name of a file in the "data" subdir of the release or the appl setup directory.

For the 'Pref' types, it returns the first existing file.

If acceptnone is false, program will terminate if none is found.

const char* GetSoftwareDir ( bool  acceptnone)

Directory of the installed software = $DTECT_[WIN]APPL

GetSoftwareDir returns the full path of the root of the release. If no DTECT_[WIN]APPL set, the location will be determined from argv[0] or the 'bundle' location (Mac only).

If acceptnone is false, program will terminate if none is found.

const char* GetSoftwareUser ( void  )

Sub-user of software: $DTECT_USER

When multiple people want to run under a single account, they need to set DTECT_USER. The output of GetSoftwareUser() will therefore most often be null!

const char* GetUserNm ( void  )

user's name


Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019