Permalink
Browse files

base-tcl replaced to 32-bit version, tktray testing

  • Loading branch information...
hypatia2 committed Aug 23, 2015
1 parent db85000 commit ac3063e79bd9b8cf78fb99bad1417ef5991048ec
Showing with 29 additions and 21 deletions.
  1. +0 −1 .gitignore
  2. BIN base-tcl
  3. +1 −1 bootstrap.tcl
  4. +7 −3 build.tcl
  5. +8 −0 fruho/main.tcl
  6. +13 −16 sklib/csp.tcl
@@ -5,6 +5,5 @@
/fruhod/buildver.txt
/fruho/builddate.txt
/fruho/buildver.txt
/fruho/images/flag
/sklib/*.html
BIN -39.8 KB (98%) base-tcl
Binary file not shown.
@@ -258,7 +258,7 @@ proc teacup-fetch {os arch pkgname ver} {
set tmpfile /tmp/teacup_fetch_[rand-big]
set url http://teapot.activestate.com$tcpath/file
puts stderr "Fetching url: $url"
set tok [http::geturl $url -channel [open $tmpfile w]]
set tok [http::geturl $url -channel [open $tmpfile w] -timeout 20000]
upvar #0 $tok state
if {[http::ncode $tok] == 200} {
array set meta [http::meta $tok]
@@ -43,9 +43,9 @@ proc copy-flags {countries {sizes {16 24 64}}} {
proc build-fruho {os arch} {
spit fruho/builddate.txt $::builddate
spit fruho/buildver.txt $::FRUHO_VERSION
copy-flags {PL GB UK DE FR US EMPTY}
#copy-flags {PL GB UK DE FR US EMPTY}
#build $os $arch fruho base-tk-8.6.3.1.298687 {sklib-0.0.0 Tkhtml-3.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 snit-2.3.2 doctools-1.4.19 textutil::expander-1.3.1}
build $os $arch fruho base-tk-8.6.3.1.298687 {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2}
build $os $arch fruho base-tk-8.6.3.1.298687 {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
# this is necessary to prevent "cp: cannot create regular file ‘/usr/local/sbin/fruho.bin’: Text file busy"
if {[file exists /usr/local/bin/fruho.bin]} {
@@ -125,7 +125,11 @@ prepare-lib sklib 0.0.0
#i18n code2msg ./fruho/main.tcl {es pl} ./fruho/messages.txt
build-fruho linux x86_64
#build linux ix86 fruho base-tk-8.6.3.1.298685 {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
build linux ix86 fruho base-tcl-8.6.3.1.298685 {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
#build-fruho linux x86_64
#build-fruhod linux x86_64
#build-deb-rpm x86_64
@@ -346,6 +346,14 @@ proc main-gui {} {
grid rowconfigure .c .c.tabsetenvelope -weight 1
bind . <Configure> [list MovedResized %W %x %y %w %h]
package require tktray
tktray::icon .systray -image [img load 16/logo]
go get-welcome
go faas-config-monitor
go connstatus-loop
@@ -140,14 +140,15 @@ proc ::csp::CReceiveReady {ch} {
# remove the channel completely
proc ::csp::CPurge {ch} {
variable Channel
variable ChannelCap
variable ChannelReadOnly
CheckName $ch
catch {
unset Channel($ch)
unset ChannelCap($ch)
unset ChannelReadOnly($ch)
rename $ch ""
SetResume
}
catch {unset Channel($ch)}
catch {unset ChannelCap($ch)}
catch {unset ChannelReadOnly($ch)}
catch {rename $ch ""}
catch {SetResume}
}
@@ -198,7 +199,6 @@ proc ::csp::CClosed {ch} {
proc ::csp::CAppend {ch val} {
variable Channel
lappend Channel($ch) $val
#puts "Channel($ch) after CAppend: $Channel($ch)"
return
}
@@ -248,7 +248,6 @@ proc ::csp::NewChannel {} {
# args should be proc name and arguments
proc ::csp::go {args} {
variable Routine
# args contain the routine name with arguments
set rname [::csp::NewRoutine]
coroutine $rname {*}$args
set Routine($rname) 1
@@ -273,8 +272,6 @@ proc ::csp::Resume {} {
# cannot run the already running coroutine - catch error when it happens
# this may regularly throw 'coroutine "::csp::Routine#N" is already running'
catch $r
#if {[catch {$r} out err]}
#puts stderr "OUT: $out, ERR: $err"
}
}
@@ -328,9 +325,8 @@ proc ::csp::<- {ch} {
# Receive from channel, wait if channel not ready, throw error if channel is drained
# Can be used from non-coroutine
# Uses vwait for wait => nested event loops
# It means that not ready channel in nested vwait
# may block an upstream channel that become ready
# Uses vwait for wait. It means it creates nested event loops
# Not ready channel in nested vwait may block an upstream channel that became ready
# Use with care. Avoid if you can.
proc ::csp::<-! {ch} {
return [ReceiveWith $ch <-!]
@@ -509,19 +505,20 @@ proc ::csp::TickerRoutine {ch interval closeafter} {
}
}
# Return ticker channel. First tick in $interval ms
proc ::csp::ticker {chVar interval {closeafter 0}} {
return [ticker_generic $chVar $interval $interval $closeafter]
}
# Return ticker channel. First tick immediately.
proc ::csp::tickernow {chVar interval {closeafter 0}} {
return [ticker_generic $chVar 0 $interval $closeafter]
}
# Generic internal ticker function
proc ::csp::ticker_generic {chVar initial_interval interval closeafter} {
upvar 2 $chVar ch
csp::channel ch
# puts stderr "CSP: chVar: $chVar"
# puts stderr "CSP: ch: $ch"
if {$closeafter != 0 && [string is integer -strict $closeafter]} {
after $closeafter $ch close
}

0 comments on commit ac3063e

Please sign in to comment.