Changeset 13 for trunk/tcl


Ignore:
Timestamp:
Jun 8, 2005, 5:37:19 PM (19 years ago)
Author:
mmc
Message:

Many improvements, including a new energy level viewer
for Huckel-IV. Added support for a new <boolean> type.
Fixed the cloud/field stuff so that when a cloud is 1D,
it reverts to BLT vectors so it will plot correctly.
Fixed the install script to work better on Windows.

Location:
trunk/tcl
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tcl/install.tcl

    r12 r13  
    1 #!/bin/sh
    21# ----------------------------------------------------------------------
    3 #  USAGE: tclsh install
     2#  USAGE: tclsh install.tcl
    43#
    54#  Use this script to install the Rappture toolkit into an existing
     
    98#  Copyright (c) 2004  Purdue Research Foundation, West Lafayette, IN
    109# ======================================================================
    11 #\
    12 exec tclsh "$0" "$*"
    13 # ----------------------------------------------------------------------
    14 # tclsh executes everything from here on...
    1510
    1611# run this script from directory containing it
     
    3631}
    3732
     33proc fixperms {target perms} {
     34    global tcl_platform
     35    if {$tcl_platform(platform) == "unix"} {
     36        file attributes $target -permissions $perms
     37    }
     38}
     39
    3840
    3941set dir [file dirname [info library]]
     
    5456            puts "making directory $target..."
    5557            catch {file mkdir $target}
    56             file attributes $target -permissions ugo+rx
     58            fixperms $target ugo+rx
    5759        } else {
    5860            puts "installing $target..."
    5961            file copy -force $file $target
    60             file attributes $target -permissions ugo+r
     62            fixperms $target ugo+r
    6163        }
    6264    }
     
    7072        puts "making directory $target..."
    7173        catch {file mkdir $target}
    72         file attributes $target -permissions ugo+rx
     74        fixperms $target ugo+rx
    7375    } else {
    7476        puts "installing $target..."
    7577        file copy -force $file $target
    76         file attributes $target -permissions ugo+r
     78        fixperms $target ugo+r
    7779    }
    7880}
     
    8486puts $fid "package ifneeded $package $version \""
    8587puts $fid "  \[list lappend auto_path \[file join \$dir scripts\]\]"
    86 puts $fid "  namespace eval Rappture \[list variable installdir \$dir\]"
     88puts $fid "  namespace eval \[list Rappture \[list variable installdir \$dir\]\]"
    8789puts $fid "  package provide $package $version"
    8890puts $fid "\""
     
    9193mkindex [file join $targetdir scripts]
    9294
    93 puts "== $package-$version INSTALLED"
     95if {[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}
     101exit 0
  • trunk/tcl/scripts/library.tcl

    r11 r13  
    123123        foreach cpath [$xmlobj children -as path $path] {
    124124            switch -- [$xmlobj element -as type $cpath] {
    125                 group {
     125                group - phase {
    126126                    lappend queue $cpath
    127127                }
     
    141141                    # if this element has embedded groups, add them to the queue
    142142                    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"} {
    144145                            lappend queue $ccpath
    145146                        }
Note: See TracChangeset for help on using the changeset viewer.