Test package for the Tin Tcl package manager. Tin allows easy installation of Github-based Tcl packages.
Table of Contents
Follow the instructions at the Tin repository to install Tin.
Tcllib provides many packages needed for Tcl development, including cmdline for handling command-line options. Testin uses cmdline for named function arguments.
If you have apt for Linux, installing is as easy as
apt install tcllib
...and Tcllib is installed in usr/share/tcltk/tcllib1.20
on my system. Make sure the TCLLIBPATH environment variable (list, actually) contains your installation path. I set this in my .emacs
file with
;; Ubuntu installs tcllib and tklib packages in /usr/share/tcltk
;;
;; sudo apt install tcllib
(setenv "TCLLIBPATH"
(string-join '("/usr/share/tcltk/tcllib1.20"
"/usr/share/tcltk/tklib0.7"
"/usr/lib/tcltk/sqlite3"
"/usr/local/share/tcltk")
" "))
...so that I can M-x run-tcl
inside Emacs.
I usually just manually copy Tcllib into the lib
directory of my Tcl installation on Windows. I then have a similar command in my .emacs
file:
(setenv "TCLLIBPATH"
(string-join '("c:/Program Files/Tcl86/lib/tcllib1.20"
"c:/Program Files/Tcl86/lib/"
" "))
...so I can run Tcl the same way on both platforms.
Linux is different from Windows because of permissions. I need sudo to install Tcl packages to /usr/share/tcltk
.
$ sudo tclsh
% package require tin
1.1
%
% tin add -auto testin https://github.com/johnpeck/testin install.tcl
% tin install testin 1.1
searching in the Tin for testin 1.1 ...
installing testin 1.1 from https://github.com/johnpeck/testin v1.1 ...
testin version 1.1 installed successfully
1.1
Windows is the same as Linux, except you can skip the sudo.