home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
config_ne.tcl
< prev
next >
Wrap
Text File
|
1997-11-07
|
3KB
|
132 lines
#---------------------------------------------------------------------------
#
# Copyright (c) 1995 by Cayenne Software Inc., Delft, The Netherlands.
#
# 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 : @(#)config_ne.tcl /main/titanic/5
# Original date : 28-02-1995
# Description : Script for NewEra configuration. Currently this means
# copying files from lw4omtne to the user environment
# at configuration level.
#
#---------------------------------------------------------------------------
#
source [m4_path_name tcl cginit.tcl]
require wmt_util.tcl
proc config_newera {} {
set clientContext [ClientContext::global]
set configV [$clientContext currentConfig]
if {[$configV isNil]} {
puts "Open a configuration to configure first"
return
}
set confName [[$configV config] name]
set confVersion [$configV versionName]
set header_line "Configure NewEra class library for configuration\
version '${confName}.${confVersion}'"
#while {"true"} {
# puts "\n\t$header_line"
# puts "\t[print_n [string length $header_line] -]\n"
# puts "\ti.\tInstall library"
# puts "\tr.\tRemove library"
# puts -nonewline "\n\tChoice (q to quit): "
# set answer [gets stdin]
# if {$answer == "q"} {
# return
# }
# if {$answer == "r"} {
# do_rm
# continue
# }
# if {$answer == "i"} {
do_install
# continue
# }
#}
}
proc print_n {count symbol} {
if {$count <= 0} {
return
}
set result ""
incr count -1
while {$count} {
incr count -1
append result $symbol
}
append result $symbol
}
proc do_rm {} {
puts ""
set pdir [fstorage::getFsPath config src]
if [file exists $pdir] {
puts "Removing directory $pdir"
BasicFS::removeDirAll $pdir
}
set pdir [fstorage::getFsPath config include]
if [file exists $pdir] {
puts "Removing directory $pdir"
BasicFS::removeDirAll $pdir
}
}
proc do_install {} {
m4copydir [location src lw4omtne]
}
proc m4copydir {dir} {
set save_dir [pwd]
set loc [location config $dir]
if [catch {set cddir [m4_path_name $loc main.4gl]}] {
return
}
set tempdir [path_name directory $cddir]
cd $tempdir
set files [glob -nocomplain *]
puts "Copying from $tempdir..."
foreach file $files {
set toFile [fstorage::copyFile $file config $dir $file]
if {$toFile != ""} {
puts " $toFile"
} else {
puts " $file *NOT COPIED*"
}
}
set files [glob -nocomplain *.4gh]
foreach file $files {
set toFile [fstorage::copyFile $file config include $file]
if {$toFile != ""} {
puts " $toFile"
} else {
puts " $file *NOT COPIED*"
}
}
puts ""
puts "Now build the library by using the NewEra Application Builder."
cd $save_dir
}
config_newera