* This routine ensures that tcslib, techlib and userlog are specific for the version of the data. * Returns whether or not the required version is supported. Can be either an existing * version or a missing. * If the new version is not supported, it will retain the previous settings. FUNCTION switchMPSLibs( tcToPath ) local lcToPath, llOK, lcMPSAppPath lcToPath = m.tcToPath if vartype( m.glLoggingEnabled ) = 'L' and m.glLoggingEnabled * if vartype( m.goUserlog ) = 'O' goUserlog = NULL endif endif lcMPSAppPath = m.gcMPSAppsDir + m.lcToPath llOK = file( m.lcMPSAppPath + '\techlib.app' ) if m.llOK if not ( m.gcCurrentMPSVersion == m.lcToPath ) gcCurrentMPSVersion = m.lcToPath * if atc( 'techlib.app', set( 'proc' ) ) > 0 release procedure techlib.app endif if atc( 'tcslib.app', set( 'proc' ) ) > 0 release procedure tcslib.app endif if atc( 'versionlib.app', set( 'proc' ) ) > 0 release procedure versionlib.app endif if atc( 'mps.exe', set( 'proc' ) ) > 0 release procedure mps.exe endif removePaths( m.gcMPSAppsDir ) && removes e.g. 'mpsapps\23' clear program P_APPDIR = addbs( m.lcMPSAppPath ) && might be used in tcslib, etc. set path to ( m.lcMPSAppPath ) additive set procedure to mps.exe additive set procedure to tcslib.app additive set procedure to techlib.app additive set procedure to versionlib.app additive && however, will be the one in the main folder InitVersionLib() && will further set up the lib endif glLoggingEnabled = file( 'userlog.app' ) * if not m.glLoggingEnabled goUserLog = NULL endif endif RETURN m.llOK