Skip to content

Test Tcl package for use with the Tin package manager

Notifications You must be signed in to change notification settings

johnpeck/testin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testin: Testing the Tin Tcl Package Manager

Test package for the Tin Tcl package manager. Tin allows easy installation of Github-based Tcl packages.

Tin can

Image by upklyak on Freepik

Table of Contents

Installing Tin

Follow the instructions at the Tin repository to install Tin.

Installing Tcllib

Tcllib provides many packages needed for Tcl development, including cmdline for handling command-line options. Testin uses cmdline for named function arguments.

Linux

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.

Windows

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.

Installing Testin with Tin

Linux

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

Windows is the same as Linux, except you can skip the sudo.

About

Test Tcl package for use with the Tin package manager

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published