package require twapi_wmi
package require twapi_process
namespace path twapi
set wmi [comobj_object winmgmts:root/cimv2]
set wql {SELECT * FROM Win32_BIOS}
set BIOS [$wmi ExecQuery $wql]
$BIOS -iterate bios_info {
puts -nonewline "Description: "
set DescriptionVal [$bios_info -with {Properties_ {Item Description}} Value]
puts $DescriptionVal
puts -nonewline "BIOS Manufacturer: "
set ManufacturerVal [$bios_info -with {Properties_ {Item Manufacturer}} Value]
puts $ManufacturerVal
puts -nonewline "Name: "
set NameVal [$bios_info -with {Properties_ {Item Name}} Value]
puts $NameVal
puts -nonewline "SMBIOSBIOSVersion: "
set SMBIOSBIOSVersionVal [$bios_info -with {Properties_ {Item SMBIOSBIOSVersion}} Value]
puts $SMBIOSBIOSVersionVal
puts -nonewline "Version: "
set VersionVal [$bios_info -with {Properties_ {Item Version}} Value]
puts $VersionVal
$bios_info -destroy
}
$BIOS -destroy
$wmi -destroy
2014-08-23
透過 WMI 取得目前 BIOS 的版本資料 (on WIndows platform)
使用 TWAPI 透過 WMI 取得目前 BIOS 的版本資料,下面是一個測試的 sample code:
2014-08-04
Tclqrencode v0.2
更新了libqrencode 的 code base,所以版本升為 v0.2。
連結網址:
Tclqrencode
我只有使用 Tclqrencode v0.1 這篇文章的範例進行測試,希望不會有什麼問題。
連結網址:
Tclqrencode
我只有使用 Tclqrencode v0.1 這篇文章的範例進行測試,希望不會有什麼問題。
2014-07-14
Remove Itcl and Itk 3.4 if using ActiveTcl 8.6
ActiveTcl 8.6 在 Tcl\lib\teapot\package\win32-x86_64\lib 或者是 Tcl\lib\teapot\package\win32-ix86\lib 下仍然有提供 Itcl/Itk 3.4,而 Tcl/Tk 8.6 所增加的 Itcl 4 為使用 TclOO 改寫的版本。
如果怕使用上可能會造成問題,可以使用 teacup 移除:
teacup remove Itcl 3.4
teacup remove Itk 3.4
將 ITcl 3.4 與 Itk 3.4 移除,避免 ITcl 3.4 在 Tcl/Tk 8.6 環境下執行會 crash 的問題。
如果怕使用上可能會造成問題,可以使用 teacup 移除:
teacup remove Itcl 3.4
teacup remove Itk 3.4
將 ITcl 3.4 與 Itk 3.4 移除,避免 ITcl 3.4 在 Tcl/Tk 8.6 環境下執行會 crash 的問題。
2014-07-01
Tcl on Windows FAQ link
Tcl on Windows FAQ
在網路上搜尋東西的時候發現的,我根據這個 FAQ 的資料,加了幾個我有興趣的 extension 的連結到部落格的右側。
另外就是最近在 Tcler's Wiki 看到的書籍資訊:
BOOK Tcl Programming for Windows
在網路上搜尋東西的時候發現的,我根據這個 FAQ 的資料,加了幾個我有興趣的 extension 的連結到部落格的右側。
另外就是最近在 Tcler's Wiki 看到的書籍資訊:
BOOK Tcl Programming for Windows
2014-06-27
Tcl Modules
Tcl Modules
TIP #189: Tcl Modules
TIP #190: Implementation Choices for Tcl Modules
TIP #191: Managing Tcl Packages and Modules in a Multi-Version Environment
A Tcl module is a package in a single file that can be sourced. (DLLs may still be embedded in that). There is no pkgIndex.tcl file, the package name and version are expressed in the module filename itself, so that version 3.14 of package foo must be named foo-3.14.tm.
"Tcl Modules" on the other hand is designed with less flexibility in mind and to allow implementations to glean as much information as possible without having to perform lots of accesses to the filesystem.
Additional benefits of the proposed design are a simplified deployment of packages, akin to the way starkits made application deployment simple, and from that an easier implementation and management of repositories.
Tcl Modules (.tm) 檔案的文件。
TIP #189: Tcl Modules
TIP #190: Implementation Choices for Tcl Modules
TIP #191: Managing Tcl Packages and Modules in a Multi-Version Environment
A Tcl module is a package in a single file that can be sourced. (DLLs may still be embedded in that). There is no pkgIndex.tcl file, the package name and version are expressed in the module filename itself, so that version 3.14 of package foo must be named foo-3.14.tm.
"Tcl Modules" on the other hand is designed with less flexibility in mind and to allow implementations to glean as much information as possible without having to perform lots of accesses to the filesystem.
Additional benefits of the proposed design are a simplified deployment of packages, akin to the way starkits made application deployment simple, and from that an easier implementation and management of repositories.
Tcl Modules (.tm) 檔案的文件。
2014-06-18
Catenation and Operand Specialization for Tcl Virtual Machine Performand
Catenation and Operand Specialization for Tcl Virtual Machine Performand
A Masters thesis by Benjamin Vitale, 2004, from Parsing, Bytecodes and Execution
A Masters thesis by Benjamin Vitale, 2004, from Parsing, Bytecodes and Execution
2014-05-17
Img extension
在 Windows 平台下,使用 ActiveTcl,可以用 teacup 來安裝:
teacup install Img
在 openSUSE,則是安裝 tkimg 這個套件就可以了。可以使用下列的指令安裝:
sudo zypper in tkimg
套件說明 @ openSUSE RPM:
This package contains a collection of image format handlers for the Tk photo image type, and a new image type, pixmaps. The provided format handlers include bmp, gif, ico, jpeg, pcx, png, ppm, ps, sgi, sun, tga, tiff, xbm, and xpm.
teacup install Img
在 openSUSE,則是安裝 tkimg 這個套件就可以了。可以使用下列的指令安裝:
sudo zypper in tkimg
套件說明 @ openSUSE RPM:
This package contains a collection of image format handlers for the Tk photo image type, and a new image type, pixmaps. The provided format handlers include bmp, gif, ico, jpeg, pcx, png, ppm, ps, sgi, sun, tga, tiff, xbm, and xpm.
2014-05-14
Get Wub snapshot code
Wub snapshot tarball at https://code.google.com/p/wub/ link is "Oops, you've found a dead link." now.
所以後來只好使用 SVN 下載目前的 code base:
svn checkout http://wub.googlecode.com/svn/trunk/ wub
不知道 Wub 什麼時候會釋出新版本,不過如果要使用比 0.5 版更新的 code 來測試,之前是下載 snapshot tarball 就可以了,現在則需要使用 SVN 才行。
所以後來只好使用 SVN 下載目前的 code base:
svn checkout http://wub.googlecode.com/svn/trunk/ wub
不知道 Wub 什麼時候會釋出新版本,不過如果要使用比 0.5 版更新的 code 來測試,之前是下載 snapshot tarball 就可以了,現在則需要使用 SVN 才行。
2014-04-22
Tcl Extension Archive (teapot)
Tcl Extension Archive
From Tcler's Wiki 的解釋:
The Tcl Extension Archive is a repository of Tcl extensions hosted by ActiveState. Both pure-Tcl and compiled extensions are included, for Windows, Unix and MacOS X platforms. The URL of the archive is http://teapot.activestate.com/
如果使用 ActiveTcl,可以使用 Tcl Extension Archive (teapot) client - Teacup 來查詢與安裝 package,比較常用的應該都可以找到。
Teapot Repos
根據 Tcler's Wiki 的資料,有下列的 Repos 可以使用:
From Tcler's Wiki 的解釋:
The Tcl Extension Archive is a repository of Tcl extensions hosted by ActiveState. Both pure-Tcl and compiled extensions are included, for Windows, Unix and MacOS X platforms. The URL of the archive is http://teapot.activestate.com/
如果使用 ActiveTcl,可以使用 Tcl Extension Archive (teapot) client - Teacup 來查詢與安裝 package,比較常用的應該都可以找到。
Teapot Repos
根據 Tcler's Wiki 的資料,有下列的 Repos 可以使用:
- http://teapot.activestate.com/
- http://teapot.rkeene.org/
- 而網頁的列表,就是目前有收集的 packages。
2014-04-20
freeWrap 6.63
ANNOUNCE: freeWrap 6.63 released
Changes implemented in version 6.63
-----------------------------------
Tcl/Tk 的版本一樣是 8.6.1。
Changes implemented in version 6.63
-----------------------------------
- Wrapping across operating systems has been corrected: a) between 32-bit and 64-bit Linux
- Temporary file names used by freeWrap during the wrapping process have been modified to prevent possible collision with existing file names. This will prevent the possibility of overwriting of an existing file during wrapping.
- The ::freewrap::makeZIP command can now be used more than once. Previously, the first usage of the command worked while subsequent use failed with an error.
- Options have been added to the freeWrap command line that allow the user to control the amount of compression performed on the wrapped files. See the freeWrap documentation for details.
- The tcllib package included in freeWrap has been updated to version 1.16 and is located at the virtual directory of /tcllib1.16.
- The -i option can now be used to change the program icon when performing a cross-wrap with the -w option.
b) from Windows to Linux
Tcl/Tk 的版本一樣是 8.6.1。
訂閱:
文章 (Atom)