home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
config_forte.tcl
< prev
next >
Wrap
Text File
|
1997-10-10
|
2KB
|
66 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)config_forte.tcl /main/titanic/4
# Description: Configure Forte Environment, i.e. import systems
# 'Framework' and 'DisplayProject' into ObjectDesign
# and Implementation
#---------------------------------------------------------------------------
# SccsId = @(#)config_forte.tcl /main/titanic/4 10 Oct 1997 Copyright 1997 Cayenne Software Inc.
proc importBuiltins {} {
set cc [ClientContext::global]
set phaseV [$cc currentPhase]
foreach sys {Framework DisplayProject} {
puts ""
set sysV [$phaseV findSystemVersion $sys "system"]
if {![$sysV isNil]} {
puts "System '$sys' already exists: not configuring it again."
continue
}
set file [m4_path_name config $sys.tcl]
if {![file exist $file]} {
puts "Import of system '$sys' failed: file '$file' not found."
} else {
puts "Importing system '$sys'... (this action will take some time)"
source $file
}
}
}
proc makeCfgSystems {} {
set cc [ClientContext::global]
set configV [$cc currentConfig]
set phaseV [$cc currentPhase]
foreach sys {Framework DisplayProject} {
puts ""
set sysV [$phaseV findSystemVersion $sys "system"]
if {[$sysV isNil]} {
puts "Creating System '$sys'."
set sysV [$phaseV createSystemVersion $sys "cl" "system" $configV]
$sysV freeze "Configure Forte"
} elseif {[$sysV status] == "working"} {
$sysV freeze "Configure Forte"
}
}
}
puts "Configure Forte Environment"
puts "==========================="
set cc [ClientContext::global]
set phaseType [[[$cc currentPhase] phase] type]
if {$phaseType == "ObjectDesign"} {
importBuiltins
puts "\n'Configure Forte Environment' finished."
} elseif {$phaseType == "Implementation"} {
makeCfgSystems
puts "\n'Configure Forte Environment' finished."
} else {
puts "\n'Configure Forte Environment' failed: invalid phase type '$phaseType'."
}