-
Notifications
You must be signed in to change notification settings - Fork 19
/
genswiss.tcl
executable file
·43 lines (34 loc) · 1.12 KB
/
genswiss.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env tclkit
# Generate swisskit from 8.5/kit-large and 8.5/kit-x11, created via:
#
# sh config.sh 8.5/kit-large aqua univ thread allenc allmsgs tzdata
# sh config.sh 8.5/kit-x11 univ thread dyn
#
# The result is an 8.5-based threaded universal binary for Mac OS X with all
# available encodings, message catalogs, and timezone datafiles included.
#
# This binary will launch Tk under X11 if $env(DISPLAY) is set, else Tk Aqua.
#
# jcw, 2006-11-19
package require vfs::mk4
file copy -force 8.5/kit-large/tclkit-dyn swisskit
vfs::mk4::Mount 8.5/kit-x11/tclkit-dyn x11 -readonly
vfs::mk4::Mount swisskit swisskit
file copy x11/lib/libtk8.5.dylib swisskit/lib/libtk8.5-x11.dylib
set fd [open swisskit/lib/tk8.5/pkgIndex.tcl w]
puts $fd {
package ifneeded Tk 8.5a6 \
[string map [list @A [file join $dir .. libtk8.5[info sharedlibext]] \
@X [file join $dir .. libtk8.5-x11[info sharedlibext]]] {
if {[lsearch -exact [info loaded] {{} Tk}] >= 0} {
load "" Tk
} elseif {[info exists ::env(DISPLAY)]} {
load @X Tk
} else {
load @A Tk
}
}]
}
close $fd
vfs::unmount swisskit
vfs::unmount x11