devel
| Line | |
|---|
| 1 | #////////////////////////////////////////////////////////////////////////////// |
|---|
| 2 | # FILE : byswidget.tcl |
|---|
| 3 | # PURPOSE : setup file for package byswidget. When version chabes the correct |
|---|
| 4 | # version numbre must be written in the variable version, then create |
|---|
| 5 | # pkgIndex.tcl invoking the proc byswidget::pkgCreate. |
|---|
| 6 | # |
|---|
| 7 | #////////////////////////////////////////////////////////////////////////////// |
|---|
| 8 | |
|---|
| 9 | namespace eval byswidget { |
|---|
| 10 | variable version 1.0 |
|---|
| 11 | variable dir [file dirname [info script]] |
|---|
| 12 | } |
|---|
| 13 | |
|---|
| 14 | package provide byswidget $byswidget::version |
|---|
| 15 | |
|---|
| 16 | proc byswidget::pkgCreate { } { |
|---|
| 17 | variable version |
|---|
| 18 | variable dir |
|---|
| 19 | |
|---|
| 20 | foreach f [glob -tails -dir $dir *.tcl] { |
|---|
| 21 | if {$f ne "pkgIndex.tcl"} { |
|---|
| 22 | append source "-source $f " |
|---|
| 23 | } |
|---|
| 24 | } |
|---|
| 25 | set fd [open [file join $dir pkgIndex.tcl] w] |
|---|
| 26 | puts $fd "# Tcl package index file, version 1.1\n" |
|---|
| 27 | puts $fd [eval pkg::create -name byswidget -version $version $source] |
|---|
| 28 | close $fd |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | proc crt_pkg { } { |
|---|
| 32 | foreach d [glob -types d *] { |
|---|
| 33 | puts "processing $d" |
|---|
| 34 | if {[llength [glob -nocomplain -dir $d *.tcl]]} { |
|---|
| 35 | cd $d |
|---|
| 36 | pkg_mkIndex -verbose . *.tcl |
|---|
| 37 | cd .. |
|---|
| 38 | } |
|---|
| 39 | } |
|---|
| 40 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.