DS9

CXC Science Data Systems

Building and Linking the DS9 executable

Downloading and building from source

The DS9 code is available on github. The source code assumes standard system libraries.

Source tree

The root of the source tree is a directory SAOImageDS9/. Underneath this are a series of directories that include both OTS and DS9 source, and some directories that handle operating system portability.

DS9 is built from a collection of 17 packages developed and/or now solely maintained by SAO. The DS9 project has taken over development of some projects such as 'funtools', 'xpa', and 'tkblt' since (a) they have been abandoned by their creators, (b) they provide essential functionality and (c) actively developed replacement packages do not exist. DS9 also relies on an additional 16 third-party packages which are still being actively maintained by the author/community.

The following table summarizes the different top level components of the DS9 code base as of DS9 v8.6.

We assign each component to one of three categories: SAO (the code was written at SAO); OTS (the code is off-the-shelf software, externally maintained, and external updates may require maintenance work on our end); and AOTS ('adopted OTS', the code used to be OTS but is no longer maintained and we now treat it as internal even though we didn't write it originally). Most AOTS code has undergone only minor maintenance since we took it over, but the BLT code has been signficantly updated. LOC for Makefiles and build macros are not called out in the table.


Major components of the DS9 code
Component C/C++ Tcl/Tk Parser Other Category Description
LOC LOC
Core code
ds9 689 97986 14929 0 SAO Core DS9 GUI definition code, see next section
tksao 76880 0 9765 0 SAO Defines the DS9 Frame, Colorbar, etc
Astronomy standards
fitsy 14794 0 1526 0 SAO FITS format I/O routines
tclfitsy 1044 0 0 0 SAO TCL interface to fitsy
funtools 142772 25 0 0 SAO FITS table filtering
ast 584510 0 0 0 OTS Coordinate systems
Image, Data I/O
tkimg 294027 8204 0 0 OTS Image formats support
tkblt 30222 2762 0 0 SAO Line graphics plots
tkmpeg 1341 0 0 0 AOTS/SAO Write MPEG movies
tkagif 833 0 0 0 SAO Write animated gifs
tktable 12809 1655 0 0 OTS Table display
tksvg 5535 0 0 0 OTS SVG graphics
Portability (mostly configure/make)
unix 0 0 0 0 AOTS Unix support
macos 0 0 0 0 AOTS Mac support
tkmacosx 122 0 0 0 AOTS? Macs support
win 0 0 0 0 AOTS Windows support
tkwin 1285 0 0 0 SAO Windows support
Look and feel
awthemes 0 0 0 6852 OTS Themes in TK
scidthemes 0 0 0 342 OTS Themes in TK
ttkthemes 0 0 0 8234 OTS Themes in TK
Communications
xpa 24434 272 0 0 SAO Interprocess control
tclxmlrpc 400 0 398 0 SAO RPC support in TCL
openssl 440935 0 0 0 OTS Access to remote data
tls 4422 746 0 0 OTS TCL interface to openssl
Parser support
fickle 0 1007 0 0 AOTS TCL lexer
taccle 0 1726 0 0 AOTS TCL parser
Infrastructure
vector 1943 0 0 0 SAO 2D/3D vector library
tclzipfs 5181 0 0 0 AOTS In-memory file system
tclsignal 635 0 0 0 AOTS Tcl/Tk signal handler
tclxml 18121 12277 0 0 OTS XML I/O for Tcl
tkhtml1 22324 433 0 0 OTS HTML rendering
TCL/TK base
tcl8.6 729908 45778 0 0 OTS TCL language
tk8.6 306535 33079 0 0 OTS TK language
tcllib 27083 375471 0 0 OTS TCL utilities
tklib 1134 130316 0 0 OTS TK utilities
tkcon 0 9910 0 0 OTS TK console tool
tclconfig 0 0 0 0 OTS Autoconf macros


DS9 major software components



[Fig5x]Distribution of languages used in the total code base. This includes the C/C++ code that makes up Tcl/Tk itself as well as supporting third party packages and the SAO developed code. TeX and HTML are text markup languages. Roff is the language used to define man pages. M4 is the language used for the configure (autoconf) file.


Structure of the DS9 core components

Here we unpack the DS9 and tksao components in a little more detail.

Major sub-components of the DS9 core components
Component C/C++ Tcl/Tk Parser Other Description
LOC LOC LOC LOC
Core code
ds9/library 0 93594 0 0 DS9 functions, including regions
ds9/parsers 0 3997 0 0 DS9 parsers - fcl source
ds9/parsers 0 221366 0 0 DS9 parsers - autogenerated tcl
tksao/saotk.C 105 0 0 0 Initialization code
tksao/colorbar 18098 0 0 0 Color bars
tksao/frame 101440 0 0 0 Image frames
tksao/magnifier 3809 0 0 0 Magnifier
tksao/panner 4651 0 0 0 Panner
Data
ds9/cmaps 0 0 0 13153 Colormap tables
ds9/icons 0 0 0 (100 files) Icons (png)
ds9/template 0 0 0 703 Instrument outlines
Portability
ds9/macos 223 0 0 0 Portability
ds9/win 223 0 0 134 Portability
ds9/unix 320 0 0 0 Portability
ds9/msgs 0 0 0 8464 Localization
Infrastructure
ds9/util 0 68 0 0 Message support
ds9/tclconfig 0 0 0 4071 Build wrappers
tksao/list 450 0 0 0 List class
tksao/tclconfig 0 0 0 4072 Build wrappers
tksao/tkutil 3582 0 0 0 Utilities (convolve etc)
tksao/widget 1730 0 0 0 Graphics widget classes
tksao/iis 1152 0 0 0 IRAF IIS RPC


Building and Linking the executable

Building and Linking the executable - Unix

Then the following simple procedure will build DS9:

git clone https://github.com/SAOImageDS9/SAOImageDS9
cd SAOImageDS9
unix/configure
make

At the final stage of the Make process the makefile links the DS9 executable.

Building and Linking the executable - MacOS/X11

Instead of concatenating the binary and zip file, they are left as two separate files.

Building and Linking the executable - MacOS/Aqua

A DMG installation package is created with both executable and support files included.

Building and Linking the executable - Windows

Cygwin is used to create a self-extracting zip executable that unpacks into a Windows application directory.