|
6 | 6 | package require Tcl 8.5
|
7 | 7 |
|
8 | 8 | namespace eval ::packer {
|
9 |
| - variable version 0.3 |
| 9 | + variable version 0.5 |
10 | 10 | }
|
11 | 11 |
|
12 | 12 | proc ::packer::init {} {
|
@@ -52,45 +52,8 @@ proc ::packer::init {} {
|
52 | 52 | # Windows. If set and not empty it is run *instead of* simply sourcing
|
53 | 53 | # the file in fileToSource like on other platforms.
|
54 | 54 | windowsScript {{fileToSource argv0 argv} {
|
55 |
| - # This anonymous function sets up the console window, creates a new |
56 |
| - # thread for Tclssg and makes sure Tclssg's output goes in the said |
57 |
| - # console window, asynchronously. |
58 |
| - package require Tk |
59 |
| - wm withdraw . |
60 |
| - console show |
61 |
| - console title Tclssg |
62 |
| - |
63 |
| - # Quit when the console window is closed. |
64 |
| - console eval { |
65 |
| - wm protocol . WM_DELETE_WINDOW { |
66 |
| - consoleinterp eval { |
67 |
| - exit 0 |
68 |
| - } |
69 |
| - } |
70 |
| - set ::tk::console::maxLines 5000 |
71 |
| - } |
72 |
| - |
73 |
| - # Run Tclssg in a separate thread. |
74 |
| - package require Thread |
75 |
| - set tid [::thread::create] |
76 |
| - ::thread::send $tid [list source $fileToSource] |
77 |
| - ::thread::send $tid [list set argv0 $argv0] |
78 |
| - ::thread::send $tid [list set argv $argv] |
79 |
| - ::thread::send $tid [list apply {{consoleThread} { |
80 |
| - rename puts puts-old |
81 |
| - proc puts args [list apply {{consoleThread} { |
82 |
| - upvar 1 args args |
83 |
| - if {[llength $args] == 1} { |
84 |
| - ::thread::send $consoleThread [list puts {*}$args] |
85 |
| - } else { |
86 |
| - puts-old {*}$args |
87 |
| - } |
88 |
| - }} $consoleThread] |
89 |
| - }} [::thread::id]] |
90 |
| - ::thread::send -async $tid { |
91 |
| - ::tclssg::main $argv0 $argv |
92 |
| - } done |
93 |
| - vwait done |
| 55 | + source $fileToSource |
| 56 | + ::tclssg::main $argv0 $argv |
94 | 57 | }}
|
95 | 58 |
|
96 | 59 | # Command line options to run the Starpack with once it has been built.
|
|
0 commit comments