- Timestamp:
- Jun 8, 2005, 5:37:19 PM (19 years ago)
- Location:
- trunk/tcl
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/tcl/install.tcl
r12 r13 1 #!/bin/sh2 1 # ---------------------------------------------------------------------- 3 # USAGE: tclsh install 2 # USAGE: tclsh install.tcl 4 3 # 5 4 # Use this script to install the Rappture toolkit into an existing … … 9 8 # Copyright (c) 2004 Purdue Research Foundation, West Lafayette, IN 10 9 # ====================================================================== 11 #\12 exec tclsh "$0" "$*"13 # ----------------------------------------------------------------------14 # tclsh executes everything from here on...15 10 16 11 # run this script from directory containing it … … 36 31 } 37 32 33 proc fixperms {target perms} { 34 global tcl_platform 35 if {$tcl_platform(platform) == "unix"} { 36 file attributes $target -permissions $perms 37 } 38 } 39 38 40 39 41 set dir [file dirname [info library]] … … 54 56 puts "making directory $target..." 55 57 catch {file mkdir $target} 56 fi le attributes $target -permissionsugo+rx58 fixperms $target ugo+rx 57 59 } else { 58 60 puts "installing $target..." 59 61 file copy -force $file $target 60 fi le attributes $target -permissionsugo+r62 fixperms $target ugo+r 61 63 } 62 64 } … … 70 72 puts "making directory $target..." 71 73 catch {file mkdir $target} 72 fi le attributes $target -permissionsugo+rx74 fixperms $target ugo+rx 73 75 } else { 74 76 puts "installing $target..." 75 77 file copy -force $file $target 76 fi le attributes $target -permissionsugo+r78 fixperms $target ugo+r 77 79 } 78 80 } … … 84 86 puts $fid "package ifneeded $package $version \"" 85 87 puts $fid " \[list lappend auto_path \[file join \$dir scripts\]\]" 86 puts $fid " namespace eval Rappture \[list variable installdir \$dir\]"88 puts $fid " namespace eval \[list Rappture \[list variable installdir \$dir\]\]" 87 89 puts $fid " package provide $package $version" 88 90 puts $fid "\"" … … 91 93 mkindex [file join $targetdir scripts] 92 94 93 puts "== $package-$version INSTALLED" 95 if {[catch {package require Tk}] == 0} { 96 wm withdraw . 97 tk_messageBox -icon info -message "$package-$version INSTALLED" 98 } else { 99 puts "== $package-$version INSTALLED" 100 } 101 exit 0 -
trunk/tcl/scripts/library.tcl
r11 r13 123 123 foreach cpath [$xmlobj children -as path $path] { 124 124 switch -- [$xmlobj element -as type $cpath] { 125 group {125 group - phase { 126 126 lappend queue $cpath 127 127 } … … 141 141 # if this element has embedded groups, add them to the queue 142 142 foreach ccpath [$xmlobj children -as path $cpath] { 143 if {[$xmlobj element -as type $ccpath] == "group"} { 143 set cctype [$xmlobj element -as type $ccpath] 144 if {$cctype == "group" || $cctype == "phase"} { 144 145 lappend queue $ccpath 145 146 }
Note: See TracChangeset
for help on using the changeset viewer.