home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)config_forte.tcl /main/hindenburg/1
- # Description: Configure Forte Environment, i.e. import systems
- # 'Framework' and 'DisplayProject' into ObjectDesign
- #---------------------------------------------------------------------------
- # SccsId = @(#)config_forte.tcl /main/hindenburg/1 11 Apr 1997 Copyright 1997 Cayenne Software Inc.
-
- proc importBuiltins {} {
- set cc [ClientContext::global]
- set phaseV [$cc currentPhase]
- foreach sys {Framework DisplayProject} {
- set sysV [$phaseV findSystemVersion $sys "system"]
- if {![$sysV isNil]} {
- puts -nonewline "System '$sys' already exists. Configure again? \[no]: "
- set answer [gets stdin]
- switch -glob -- [string tolower $answer] {
- y* {puts ""}
- default {continue}
- }
- }
-
- set srcDir [location [m4_var get M4_home] config src forte]
- set file [path_name concat $srcDir $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
- }
- puts ""
- }
- }
-
-
- puts "Configure Forte Environment"
- puts "===========================\n"
-
- set cc [ClientContext::global]
- set phaseType [[[$cc currentPhase] phase] type]
- if {$phaseType == "ObjectDesign"} {
- importBuiltins
- puts "\n'Configure Forte Environment' finished."
- } else {
- puts "'Configure Forte Environment' failed: invalid phase type '$phaseType'."
- }
-
-