Undroidwish – 一个包含所有必要组件的、适用于多平台的单文件 Tcl/Tk 二进制文件。
Undroidwish – a single-file, batteries-included Tcl/Tk binary for many platforms

原始链接: https://androwish.org/home/wiki?name=undroidwish

## undroidwish:一个可移植的Tcl/Tk实现 undroidwish是一个实验性的、单文件Tcl/Tk二进制文件,旨在实现跨平台的可移植性,包括Windows、Linux、FreeBSD、OpenBSD、MacOS、Haiku,甚至通过Termux在Android上。它基于AndroWish的组件构建,使用ZIP虚拟文件系统和SDL/AGG/freetype进行渲染,提供抗锯齿图形和缩放功能。 它通过特定于平台的脚本构建,并为常见系统提供预构建的二进制文件。Raspberry Pi提供开发版本,并支持通过SDL2使用Wayland。一个独特的功能是jsmpeg视频驱动程序,允许在网页浏览器中显示。 undroidwish包含许多Tcl/Tk扩展,如tkpath、tktreectrl和tksqlite,并提供快捷方式,可以直接从命令行启动捆绑的演示和应用程序。虽然在某些平台上未经充分测试,但它旨在提供一个多功能的Tcl/Tk环境,重点是可移植性和现代渲染技术。建议用户自行承担风险运行Windows可执行文件。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Undroidwish – 一个单文件、自带电池的 Tcl/Tk 二进制文件,适用于许多平台 (androwish.org) 5 分,由 smartmic 1小时前发布 | 隐藏 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Experimental. This is a single-file Tcl/Tk binary for Windows (32 bit, optional 64 bit) and Linux using parts of the AndroWish source tree, in particular the ZIP virtual file system and the SDL/AGG/freetype based X11 emulation for rendering. So far it is a proof of concept which eventually can be extended to run on another fruity smartphone platform. It is built by executing platform dependent shell scripts which are available for Windows, Linux, and other platforms. Ready-made binaries for 32 and 64 bit Windows and Intel Linux are listed on the Downloads page. It is possible to build undroidwish on Debian platforms with ARM processors like the Raspberry Pi or the Beaglebone.

Warning! undroidwish.exe is a Windows 32 bit binary which like other nicely playing portable apps does not write to the registry or otherwise modifies the system. But running it on your Windows PC is at your own risk. It is believed to be a CAREFUL (Click And Run Executable For Unplanned Leisure) thing. Although in the first place it might look like Tk in an X11 server, it provides all the benefits of the underlying AGG/SDL2/freetype based X11 emulation, i.e. anti-aliased rendering of lines, circles, and fonts. It even allows to smoothly zoom the Tk root window by using the mouse wheel combined with the control key.

Wayland. Another build script is provided which allows building undroidwish with the SDL2 Wayland video driver. This is partially tested on the GNOME based Fedora 26-29 Workstation, Debian 9 "Stretch", and CentOS 7.5. As of 2018-02-16 this variant is built with the KMSDRM SDL2 video driver enabled, which allows to run from a console without requiring any display manager infrastructure, provided that the Linux system has decent graphics hardware allowing for kernel mode setting and direct render mode.

FreeBSD and OpenBSD. These are very similar to the Linux version (including almost all extensions) but only partially tested on FreeBSD-11 on x86 processors and OpenBSD-6.2 on amd64 processors.

OpenIndiana Hipster (based on illumos, based on SunOS 5.11). As for FreeBSD with many extensions but only partially tested in a 32 bit enviroment.

MacOS. Alpha versions are available since 2017-09-01, but are only partially tested on MacOS 10.11 (El Capitan) and 10.13 (High Sierra).

Haiku. Partial support for the Haiku operating system is now available thanks to SDL2's video driver architecture. This is still highly experimental.


    There are Tk ports
    one of them is undroidwish
    which runs on Haiku

Termux. Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. It even has a decent X11 server. Thus, most infrastructure is available to run Tcl and undroidwish on decent smartphones or tablets.

Raspberry Pi. A Raspberry specific video driver called RPI is available in SDL2 which provides a similar feature set as the KMSDRM driver, i.e. allows to run undroidwish in frame buffer mode. When built for/on the Raspberry this driver is turned on by default, provided a recent Debian 9 (Raspbian) is used as build environment.

jsmpeg Video Driver. This is a special video driver which is described further in jsmpeg SDL Video Driver. It allows to direct the undroidwish display to a page in a modern web browswer, e.g. Firefox, Safari, or Chrome. The feature is available starting with the "Eppur si muove (2019-06-22)" release in most Linux, Windows, and MacOSX variants of undroidwish.

All undroidwish variants have many of the advanced Tcl/Tk extensions from Batteries Included built in: tkpath, tktreectrl, tkimg, and Canvas3D (which requires the display driver to support OpenGL 2.x or better). Tcl-only extensions (without machine specific libraries) like tcllib, tksqlite, and bwidgets are included, too.

Some SDL specific command line options described in Beyond AndroWish can be used to control the size of the Tk root window or its resizability. Other SDL specific things can be controlled at runtime using the sdltk command.

In order to start built in scripts directly (which were baked into the ZIP file system), the script to be executed must be specified on the command line with its path within the embedded ZIP file system. Here are some examples.

The widget demo


    undroidwish.exe builtin:sdl2tk8.6/demos/widget

TkSQLite, a graphical frontend to SQLite databases


    undroidwish.exe builtin:tksqlite0.5.13/tksqlite.tcl

The PostScript tiger, a tkpath demo


    undroidwish.exe builtin:tkpath0.3.3/demos/tiger.tcl

Canvas3D demo, multiple threads


    undroidwish.exe builtin:Canvas3d1.2.4/demo/threads.tcl

Canvas3D demo of VR rendering


    undroidwish.exe builtin:Canvas3d1.2.4/demo/vr_chick.tcl

Some shortcuts are provided as shown in the table below. On POSIX platforms these can be further abbreviated to form a single shell command when a symbolic link to e.g. vanillawish is created with the name after builtin:. If the name part contains a forward slash use a dash instead in the symbolic link, e.g. TDK-xref for builtin:TDK/xref.


Script URL Description
builtin:widget The widget demo
builtin:tksqlite Graphical frontend to SQLite databases
builtin:imgdemo Supported image formats
builtin:tkpdemo TkPath demo
builtin:3ddemo Canvas3D demo
builtin:tkcon Tk console
builtin:treectrl Tree control widget demo
builtin:tktable Table widget demo
builtin:bugz See Tk_Bugz in Tcl'ers Wiki, playable with a game pad
builtin:tkchat TkChat instant messaging application
builtin:zint Demo for ZINT barcode generator
builtin:sdx SDX utility
builtin:dungfork Read-only /etc browser demo using tcl-augeas
builtin:vncviewer Simple VNC viewer using tkvnc
builtin:notebook Will Duquette's Notebook App
builtin:tkmc Simple clone of Midnight Commander from Tcl'ers wiki
builtin:zinc-widget Tkzinc demo
builtin:tkinspect Tool to inspect other running Tk applications
builtin:stardom Small XML browser/editor
builtin:helpviewer tkhtml based help file viewer
builtin:mpksc mpexpr based calculator
builtin:tixtour Demo of tix widgets
builtin:tixwidgets Another demo of tix widgets
builtin:TDK/checker vanillawish only: Tcl Dev Kit checker
builtin:TDK/compiler vanillawish only: Tcl Dev Kit compiler
builtin:TDK/debugger vanillawish only: Tcl Dev Kit debugger
builtin:TDK/inspector vanillawish only: Tcl Dev Kit inspector
builtin:TDK/tape vanillawish only: Tcl Dev Kit tape
builtin:TDK/tclapp vanillawish only: Tcl Dev Kit tclapp
builtin:TDK/tclsvc vanillawish only: Tcl Dev Kit tclsvc
builtin:TDK/vfse vanillawish only: Tcl Dev Kit vfse
builtin:TDK/xref vanillawish only: Tcl Dev Kit xref
builtin:tclline vanillawish only: pure Tcl readline
builtin:ased vanillawish only (linux/windows): ASED Tcl/Tk IDE
builtin:vtcl vanillawish only (linux/windows): Visual Tcl
builtin:cwsh vanillatclsh only: Curses like Tk wish
builtin:mktclsh vanillawish only (windows): extract a vanillatclsh
builtin:critcl vanillawish (linux): stripped down version of critcl
builtin:ckua vanillatclsh only: text mode OPC/UA server/browser
builtin:tdbcsh vanillatclsh only: text mode TDBC frontend
builtin:LUCK vanillawish: LUCK build system
builtin:lucktui vanillatclsh only: text mode LUCK build system/frontend
builtin:tcled vanillatclsh only: text mode editor
builtin:TSB vanillawish: Taygete Scrap Book, see Tcl'ers wiki
builtin:fuse Export the ZIP content of the binary per FUSE mount
builtin:nagelfar vanillawish only: static syntax checker
builtin:dtplite vanillatclsh only: document processor
builtin:odbcsh vanillatclsh only: similar to tdbcsh but using tclodbc
builtin:calc Andy Goth's calculator
builtin:sockspy vanillawish only: socket spy
builtin:TclDebugger vanillawish only: debugger component from TclPro
builtin:sqawk vanillawish only: D.Bohdan's awk-like program using SQLite
builtin:scotty vanillawish (linux): network management with SNMP support
builtin:tkined vanillawish (linux): Tk frontend to scotty
builtin:dbg vanillawish (linux): GDB frontend
builtin:tkpsql PostgreSQL frontend

联系我们 contact @ memedata.com