# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

#msvcr120.dll can be loaded only if it is in current directory. 
#Or user needs to have MS VS 2013 redistributable installed on their machine.
set cd_init [pwd]

cd $dir
if { $::edm::license::licenseMode == "EMA" } {
    set emaLicense "eltk_util.dll"
    set tclVersion [info tclversion]
    if {$tclVersion == "8.7"} {
        set emaLicense "tcl87/eltk_util.dll"
    }
    load $emaLicense EMA_LicenseTclTk_30
    package ifneeded EDM_EMALic 1.0 [list source [file join $dir license.tcl]]
} elseif { $::edm::license::licenseMode == "Cadence" } {
    set cdnVersion [::edm::getCadenceVersion]    
    set cdnLicense [file join $::edm::license::licensePath $cdnVersion cltk_util.dll]
    set tclVersion [info tclversion]
    if {$tclVersion == "8.7"} {
    	set cdnLicense [file join $::edm::license::licensePath $cdnVersion tcl87 cltk_util.dll]
    }
    load $cdnLicense Cadence_LicenseTclTk_40
    package ifneeded EDM_CadenceLic 1.0 [list source [file join $dir license.tcl]]
}
cd $cd_init
