home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # Copyright (c) 1993-1997 by Cayenne Software, Inc.
- #
- # This software is furnished under a license and may be used only in
- # accordance with the terms of such license and with the inclusion of
- # the above copyright notice. This software or any other copies thereof
- # may not be provided or otherwise made available to any other person.
- # No title to and ownership of the software is hereby transferred.
- #
- # The information in this software is subject to change without notice
- # and should not be construed as a commitment by Cayenne Software, Inc.
- #
- #---------------------------------------------------------------------------
- #
- # File : @(#)cpplibutl.tcl /main/titanic/2 11 Jun 1997
- # Author : revr
- # Description : Several utility procedures
- #
- #---------------------------------------------------------------------------
- #
-
- proc moduleBaseDir {name} {
- set modHdlr [ModuleHandler new]
- $modHdlr setCurrentContext
- set spec [$modHdlr getModuleSpec $name]
- if {$spec != ""} {
- return [$spec path]
- }
- return ""
- }
-
- proc findCustomizationFile {fullName {create 0}} {
- set name [lindex [split $fullName .] 0]
- set type [lindex [split $fullName .] 1]
- set clientContext [ClientContext::global]
-
- if {$projcf} {
- set configV [$clientContext currentConfig]
-
- set customFileV [$configV findCustomFileVersion $name $type]
-
- if {$create && [$customFileV isNil]} {
- set customFileV [$configV createCustomFileVersion $name $type]
- }
-
- return $customFileV
- } else {
- set corporate [$clientContext currentCorporate]
-
- set customFileV [$corporate findCustomFileVersion $name $type]
-
- if {$create && [$customFileV isNil]} {
- set customFileV [$corporate createCustomFileVersion $name $type] }
-
- return $customFileV
- }
- }
-