2011-11-07

使用 7-zip 壓縮目錄與檔案 (on Windows)

#!/usr/bin/tclsh
#
# This file is used to backup my homepage
#

set backupfile $env(HOME)
append backupfile "\\My Documents"
append backupfile "\\Homepage-"
append backupfile [clock format [clock seconds] -format %Y%m%d]
append backupfile ".7z"

set backupdir $env(HOME)
append backupdir "\\My Documents"
append backupdir "\\public_html"

set fileExist [file exists $backupfile]
if {$fileExist > 0} {
    puts "Now try to remove old backup file."
    file delete $backupfile
}

set var [list 7z a $backupfile $backupdir]
exec {*}$var

puts "Done."

exit

因為在 Windows XP 上也有需要網頁的備份,所以把之前在 Linux 上用的稍微改寫以後就搬過來了。要注意的是,我已經把 7-ZIP 加進去 PATH 環境變數裡了,所以就不用寫絕對路徑,只要寫 7z 就可以了。

2011-08-18

ActiveTcl 8.6.0.0b6 released

comp.lang.tcl 的消息:
ActiveTcl 8.6.0.0b6 released


Code base 為最近釋出的 Tcl 8.6 b2。

== New in ActiveTcl 8.6.0.0b6 ==

A beta update release with updates, including:

* Updated Tcl/Tk 8.6 core
* Updated packages
** BWidget 1.9.5
** Thread 2.6.7
** platform 1.0.10
** msgcat 1.4.4
** tcltest 2.3.3
** sqlite 3.7.7.1
** Tktable 2.11
** Treectrl 2.3.2
** Tablelist 5.3.1
** cmdline 1.3.3
** ftp 2.4.10
** style::as 1.4.1

2011-07-24

ActiveTcl 8.5.10.1 released

ActiveTcl 8.5.10.1 已經在 2011/07/21 釋出,我把目前的使用環境更新為這個版本。

可以看一下 comp.lang.tcl 的消息

== New in ActiveTcl 8.5.10.1 ==

A patchlevel release with updates, including:
  • Updated Tcl/Tk 8.5.10 core
  • Updated teacup package management application
  • Updated packages
    • Sqlite 3.7.7.1
    • Tablelist 5.3.1

2011-07-20

使用 7-zip 壓縮目錄與檔案

#!/usr/bin/tclsh
#
# This file is used to backup my homepage
#

set backupfile $env(HOME)
append backupfile "/Homepage-"
append backupfile [clock format [clock seconds] -format %Y%m%d]
append backupfile ".7z"

set backupdir $env(HOME)
append backupdir "/public_html"

set fileExist [file exists $backupfile]
if {$fileExist > 0} {
    puts "Now try to remove old backup file."
    file delete $backupfile
}

set var [list 7z a $backupfile $backupdir]
exec {*}$var

puts "Done."

使用 7-zip 建立網頁的備份檔案 (on Linux)。

2011-06-26

Tcl/Tk 8.5.10 RELEASED

Tcl/Tk 8.5.10 RELEASED

Summary of Changes since Tcl/Tk 8.5.9:
--------------------------------------

The following were the main changes in Tcl/Tk 8.5.10. A complete list
can be found in the changes file at the root of the source tree. The
more complete ChangeLog is also included with each source release. This
is a patch release, so it primarily includes bug fixes and corrections
to erratic behavior. Below are only the most notable changes.

* TIP 378: reduced [info frame] accuracy to gain performance.
- use [interp debug] to restore accuracy and lose performance gain.

* Unicode codepoint definitions updated to Unicode 6.0 (BMP only)

* New subcommand [ttk::entry validate].

* Improved performance formatting numbers for string output.

* dlopen() in Unix/Mac OS X [load] now uses RTLD_NOW|RTLD_LOCAL.
*** POTENTIAL INCOMPATIBILITY ***

* Forbid [labelframe $w -container true].
*** POTENTIAL INCOMPATIBILITY ***

* Fixed crash in [$treeview tag add/remove].

* Fixed crash in [tk_getSaveFile] on Windows.

* Repaired server [socket] race condition on Win that stopped new
accepts.

* Fixed memory corruption when [$canvas dchars] removes all polygon
coords.

* Corrected failure of [$canvas insert $line] to completely refresh
display.

* Restored [spinbox $w -from $lo -to $hi] display of "08" and "09".

* Fixed command name resolution caching involving [namespace path].

* Fixed crash when append trace unsets traced variable.

* Fixed Win crash in [wm manage] using Tkhtml3.

* Fixed crash in Ttk unset traces.

* Fixed failure of Tcl_ResetResult() to clear Tcl_ObjType information.

* New version 2.3.3 of tcltest package.
- Improved reporting from tests in slave interps

* New version 2.7.6 of http package.
- Stop surplus \n in POST requests.

* New version 1.0.10 of platform package.
- DEB_HOST_MULTIARCH support

* New version 1.4.4 of msgcat package.

* Restored tearoff submenus in XP.

* Modal dialogs on Windows now use MB_TASKMODAL | MB_SETFOREGROUND.

* Corrected [wm forget $w] losing $w.

* Corrected loss of -in value by [grid remove].

* Make [$treeview see] schedule a redisplay.

* Corrected [console] treatment of '\0'.

* Fixed crash in nested, traced, compiled [catch].

* Fixed crash when list parsing overflows int limits.

* Revised interface of internal routine TclFindElement().
*** POTENTIAL INCOMPATIBILITY ***

* Imported fixes from libtommath 0.42.0.

2011-04-10

file command with ActiveTcl 8.6b5

Safe interp and file command with ActiveTcl 8.6b5

我也遇到 ::tcl::mathfunc::maxunknown hidden command "file" 這個錯誤訊息(在使用 ActiveTcl 8.6b5 執行 TclHttpd 的時候),只是在 Windows XP 上遇到,目前看起來應該是 ActiveTcl 8.6b5 的問題。

2011-02-19

ActiveTcl 8.6.0.0b5

這版和 beta-3, beta-4 一樣都是基於 Tcl 8.6 beta1.2 的 code base,如果要下載可以到 ActiveState ActiveTcl 8.6 的網頁

2011-01-26

tcllib 1.13 is out

2011.01.24,tcllib 釋出了新版 v1.13。

Overview
========
44 new packages in 10 modules
29 changed packages in 24 modules
62 internally changed packages in 11 modules
207 unchanged packages in 79 modules
348 packages, total in 103 modules, total

相關連結:http://sourceforge.net/projects/tcllib/files/tcllib/1.13/