1 Introduction
TkScript ("TKS") is a free and open source "glue" script language for C / C++ frameworks.
It is mainly designed for audio / graphics / UI applications and text processing tools.
Features:
- C-like syntax
- classes with multiple-inheritance
- reflection / type introspection
- exception handling
- namespaces
- stream I/O and (de-)serialization
- RAII, no garbage collection
- (true / native) multithreading
- dynamically (un-)loadable script modules and classes
- self contained application and library packages ("pak" files)
- extendable via native C(++) plugin functions / classes / methods
Software written in TkScript includes:
- The Synergy MIDI sequencer and Eureka DAW
- Games
- Text processing tools
- md - a markdown to HTML converter
- org - an org-mode like text processor, mind map converter, and project plan scheduler + report generator
TkScript is accompanied by a set of add-on plugins / libraries that provide bindings for:
- OpenGL
- Window / Event handling (via SDL)
- Math (linear algebra)
- File I/O
- Zip files
- Networking
- Low latency audio (ASIO, PortAudio, OSS, ALSA)
- MIDI
- XML based user interfaces (
tkui
)
TkScript has been tested on the following platforms:
- M68K AmigaOS 3.x (CLI-only)
- x86 / x64 Windows (2000 / XP / 7 / 8 / 10 / 11)
- x86 / x64 / ARM Linux (e.g. Open Pandora, Raspberry Pi)
- arm64 / x86_64 macOS 10 / 13
2 License
TkScript is distributed under the terms of the GNU General Public License (GPLv2).
The add-on plugins and libraries are distributed under the terms of the GNU Lesser (library) General Public License (LGPLv2), or the MIT / BSD licenses (see plugin / library source for details).
|
Software written in TkScript may use any license (FOSS, closed source, ..). |
Component | Windows | Linux | macOS |
tks | Y | Y | Y |
eqxmms | Y | Y | Y |
tkanalogrytm | Y | Y | Y |
tkbluetooth | Y | Y | - |
tkchipmunk | Y | Y | Y |
tkfileutils | Y | Y | Y |
tkfreeglut | Y | Y | Y |
tkfreetype2 | Y | Y | Y |
tkfreeverb | Y | Y | Y |
tkgmp | Y | Y | Y |
tkmath | Y | Y | Y |
tkmidi | Y | - | - |
tkmidi_alsa | - | Y | - |
tkmidi_portmidi | Y | Y | Y |
tkmidipipe | Y | Y | Y |
tkoldmath | Y | Y | Y |
tkopengl | Y | Y | Y |
tkportaudio | Y | Y | Y |
tkportaudio_alsa | - | Y | - |
tkportaudio_oss | - | Y | - |
tkradiastools | Y | Y | Y |
tksamplechain | Y | Y | Y |
tksampleedit | Y | Y | Y |
tksampler | Y | Y | Y |
tksdl | Y | Y | - |
tksdl12-compat | - | Y | Y |
tksdl2 | - | Y | Y |
tksdl_net | Y | Y | Y |
tksidplay2 | Y | Y | Y |
tksmdi | Y | - | - |
tkspeexdsp | Y | Y | Y |
tksqlite | Y | Y | Y |
tktriangulate | Y | Y | Y |
tkui | Y | Y | Y |
tkvst2 | Y | - | - |
tkvst2_stub | - | Y | Y |
tkvst2_nogui | - | Y | Y |
tkvst2_macos | - | - | Y |
tkwii | Y | - | - |
tkzip | Y | Y | Y |
yingtest | Y | Y | Y |
4 Downloads
4.1 Precompiled Binaries
|
on macOS, copy the extracted the files to /usr/local/ (optional) |
4.2 Source
The latest source-code packages are here:
- tks-source
- tks-build
- yac, yingtest
- tkanalogrytm
- tkchipmunk (v7)
- tkfreetype2
- tkfileutils
- tkmath, tkoldmath, tkgmp
- tkopengl
- tksdl (Windows), tksdl12-compat, tksdl2 (Linux, macOS)
- tksdl_net, tkbluetooth
- tkmidi (Windows), tkmidi_alsa (Linux), tkmidi_portmidi (macOS)
- tkmidipipe
- tkportaudio, tkportaudio_alsa
- tkradiastools
- svg_loader, tktriangulate
- tksampler, tksamplechain, tksampleedit
- tksmdi
- tksqlite
- tkui
- tkunit
- tkvst2 (Windows), tkvst2 (stub), tkvst2 (nogui), tkvst2 (macOS),
- tkzip
|
How to build (via install helper): $ wget http://tkscript.org/tks_install_helper.sh
$ chmod +x tks_install_helper.sh
$ ./tks_install_helper.sh
$ sudo -- sh -c 'cd tks_install_helper_tmp/ ; . ./setenv_linux.sh ; m all_install'
- downloads the source packages, builds and installs them
- tested on macOS 13, Debian GNU/Linux 12, Windows 10
How to build (manually):
- The first three packages (source, build, yac) are mandatory for building a command-line version of
tks .
- The remaining packages are optional.
- Edit the toplevel makefile (
makefile.linux , makefile.macos or makefile.msvc ) to choose which additional plugins will be built.
- Edit+Run
. setenv_linux.sh , . ./setenv_macos_arm64.sh , . ./setenv_macos_x86_64.sh or . setenv_msvc.sh to set up cross compiling / target platform / include+lib paths.
- It is recommended to set up a shell function for
make invocation, e.g. m(){ make -j20 -f makefile.msvc $* ; } (done by setenv*)
Requirements / Prerequisites:
- The Windows build environment requires MSYS2 and the Microsoft Visual Studio compiler, e.g. the free-as-in-beer Community Edition.
- The Linux build environment requires GCC / G++, GNU make, and GNU Bash.
- optional (recommended) packages:
$ sudo apt-get install build-essential libsdl2-dev libsdl1.2-dev libsdl-net1.2-dev libpng-dev libfreetype-dev libgtk2.0-dev libzip-dev libgnutls28-dev libasound2-dev
- optional packages:
% apt install portaudio19-dev libportmidi-dev sox rubberband-cli
- The macOS build environment requires Clang (xcode toolchain), make, zsh, and the following brew packages:
sdl12-compat , sdl2 , libpng , freetype (tested with arm64 and x86_64) (and optionally sdl_net , gnutls , libzip , portaudio , portmidi ).
The plugin bindings use the YaC (Yet another Component object model) interface, and the YInG interface generator.
To rebuild the bindings for a specific module, run $ m yac
in the plugin (or tks-source) directory. |
5 Examples
- dog (API documentation generator, from 2009) (docs)
- md (markdown document generator, 2018-2022) (docs)
- org (org-mode-like document processor, 2020) (docs)
7 Games
For your amusement, some of the older stuff can be downloaded here:
- retrovaders2 (a Space Invaders like game, from 2001)
- loadmd2 (a loader / viewer for Quake2 models, from 2002)
- equalize_it (a SID player and collection of C64 tunes, from 2003)
- gkraft (2D cave flyer, from 2004)
- racer (3D racing game, from 2008)
- jumpy (2D jump'n'run, from 2010)
- tequila (a classic Amiga500 demo effect ported to OpenGL, from 2010)
8 Documentation
See
here for language reference guide.
For historical purposes,
here are the old changelogs from 2002 - 2015.
Document created on 18-Aug-2023 16:14:10