home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
config_java.tcl
< prev
next >
Wrap
Text File
|
1996-12-04
|
2KB
|
90 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)config_java.tcl /main/hindenburg/3
# Author:
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)config_java.tcl /main/hindenburg/3 4 Dec 1996 Copyright 1996 Cayenne Software Inc.
source [m4_path_name tcl cginit.tcl]
require wmt_util.tcl
require machdep.tcl
proc m4copyfile {dir custName {fsName ""}} {
if {$fsName == ""} {
set fsName $custName
}
if [file exists $fsName] {
set sourcefile $fsName
} else {
set sourcefile [m4_path_name $dir $fsName]
}
set customFileV [findCustomizationFile $custName 1]
$customFileV lockForWrite "Configure Java Environment"
$customFileV upLoad $sourcefile
$customFileV unlock
}
proc m4basedir {} {
set clientContext [ClientContext::global]
set configV [$clientContext currentConfig]
if {[$configV isNil]} {
return [m4_var get M4_home]
}
return [$configV path]
}
proc findCustomizationFile {fullName {create 0}} {
set name [lindex [split $fullName .] 0]
set type [lindex [split $fullName .] 1]
set clientContext [ClientContext::global]
set configV [$clientContext currentConfig]
set customFileV [$configV findCustomFileVersion $name $type]
if {$create && [$customFileV isNil]} {
puts "Creating customization file '$fullName' at configuration level"
set customFileV [$configV createCustomFileVersion $name $type]
}
return $customFileV
}
proc m4copydir {dir} {
set save_dir [pwd]
set subdir [location config $dir]
if [catch {set cddir [m4_path_name $subdir Queue.java]}] {
return
}
set sysV [[ClientContext::global] currentSystem]
cd [path_name directory $cddir]
set base [m4basedir]
set files [glob -nocomplain *]
set dest [$sysV path]
if {! [file exist $dest]} {
mkdir -path [list $dest]
}
foreach file $files {
puts "copying $file to $dest"
copy_text_file $file [location $dest $file]
}
cd $save_dir
}
m4copydir [location src JDK10]