summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--doc/tclvars.n6
-rw-r--r--generic/tclBasic.c6
-rw-r--r--library/platform/pkgIndex.tcl3
-rw-r--r--library/platform/platform.tcl268
-rw-r--r--library/platform/shell.tcl222
-rw-r--r--tests/platform.test2
-rw-r--r--tests/safe.test4
-rw-r--r--unix/Makefile.in10
-rw-r--r--win/Makefile.in8
-rw-r--r--win/makefile.bc5
-rw-r--r--win/makefile.vc10
12 files changed, 551 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e588d6..60a11ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2006-11-28 Andreas Kupries <andreask@activestate.com>
+
+ * generic/tclBasic.c: TIP #291. Define tcl_platform element for
+ * doc/tclvars.n: pointerSize.
+
+ * win/Makefile.in: Added installation instructions for the platform
+ * win/makefile.vc: package. Added the platform package.
+ * win/makefile.bc:
+ * unix/Makefile.in:
+
+ * tests/platform.test:
+ * tests/safe.test:
+
+ * library/platform/platform.tcl:
+ * library/platform/shell.tcl:
+ * library/platform/pkgIndex.tcl:
+
2006-12-05 Don Porter <dgp@users.sourceforge.net>
* generic/tclPkg.c: When no requirements are supplied to a
diff --git a/doc/tclvars.n b/doc/tclvars.n
index eaa0dc1..b16ceb9 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: tclvars.n,v 1.25 2006/08/09 10:06:28 dkf Exp $
+'\" RCS: @(#) $Id: tclvars.n,v 1.26 2006/12/05 18:45:50 andreas_kupries Exp $
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -237,6 +237,10 @@ and the value from GetUserName on Windows.
\fBwordSize\fR
This gives the size of the native-machine word in bytes (strictly, it
is same as the result of evaluating \fIsizeof(long)\fR in C.)
+.TP
+\fBpointerSize\fR
+This gives the size of the native-machine pointer in bytes (strictly, it
+is same as the result of evaluating \fIsizeof(void*)\fR in C.)
.RE
.TP
\fBtcl_precision\fR
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 1226323..6ec48fe 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.224 2006/12/01 19:59:59 kennykb Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.225 2006/12/05 18:45:50 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -668,6 +668,10 @@ Tcl_CreateInterp(void)
Tcl_SetVar2Ex(interp, "tcl_platform", "wordSize",
Tcl_NewLongObj((long) sizeof(long)), TCL_GLOBAL_ONLY);
+ /* TIP #291 */
+ Tcl_SetVar2Ex(interp, "tcl_platform", "pointerSize",
+ Tcl_NewLongObj((long) sizeof(void*)), TCL_GLOBAL_ONLY);
+
/*
* Set up other variables such as tcl_version and tcl_library
*/
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl
new file mode 100644
index 0000000..25f24d9
--- /dev/null
+++ b/library/platform/pkgIndex.tcl
@@ -0,0 +1,3 @@
+package ifneeded platform 1.0.2 [list source [file join $dir platform.tcl]]
+package ifneeded platform::shell 1.1.1 [list source [file join $dir shell.tcl]]
+
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
new file mode 100644
index 0000000..27b565a
--- /dev/null
+++ b/library/platform/platform.tcl
@@ -0,0 +1,268 @@
+# -*- tcl -*-
+# ### ### ### ######### ######### #########
+## Overview
+
+# Heuristics to assemble a platform identifier from publicly available
+# information. The identifier describes the platform of the currently
+# running tcl shell. This is a mixture of the runtime environment and
+# of build-time properties of the executable itself.
+#
+# Examples:
+# <1> A tcl shell executing on a x86_64 processor, but having a
+# wordsize of 4 was compiled for the x86 environment, i.e. 32
+# bit, and loaded packages have to match that, and not the
+# actual cpu.
+#
+# <2> The hp/solaris 32/64 bit builds of the core cannot be
+# distinguished by looking at tcl_platform. As packages have to
+# match the 32/64 information we have to look in more places. In
+# this case we inspect the executable itself (magic numbers,
+# i.e. fileutil::magic::filetype).
+#
+# The basic information used comes out of the 'os' and 'machine'
+# entries of the 'tcl_platform' array. A number of general and
+# os/machine specific transformation are applied to get a canonical
+# result.
+#
+# General
+# Only the first element of 'os' is used - we don't care whether we
+# are on "Windows NT" or "Windows XP" or whatever.
+#
+# Machine specific
+# % arm* -> arm
+# % sun4* -> sparc
+# % intel -> ix86
+# % i*86* -> ix86
+# % Power* -> powerpc
+# % x86_64 + wordSize 4 => x86 code
+#
+# OS specific
+# % AIX are always powerpc machines
+# % HP-UX 9000/800 etc means parisc
+# % linux has to take glibc version into account
+# % sunos -> solaris, and keep version number
+#
+# NOTE: A platform like linux glibc 2.3, which can use glibc 2.2 stuff
+# has to provide all possible allowed platform identifiers when
+# searching search. Ditto a solaris 2.8 platform can use solaris 2.6
+# packages. Etc. This is handled by the other procedure, see below.
+
+# ### ### ### ######### ######### #########
+## Requirements
+
+namespace eval ::platform {}
+
+# ### ### ### ######### ######### #########
+## Implementation
+
+# -- platform::generic
+#
+# Assembles an identifier for the generic platform. It leaves out
+# details like kernel version, libc version, etc.
+
+proc ::platform::generic {} {
+ global tcl_platform
+
+ set plat [string tolower [lindex $tcl_platform(os) 0]]
+ set cpu $tcl_platform(machine)
+
+ switch -glob -- $cpu {
+ sun4* {
+ set cpu sparc
+ }
+ intel -
+ i*86* {
+ set cpu ix86
+ }
+ x86_64 {
+ if {$tcl_platform(wordSize) == 4} {
+ # See Example <1> at the top of this file.
+ set cpu ix86
+ }
+ }
+ "Power*" {
+ set cpu powerpc
+ }
+ "arm*" {
+ set cpu arm
+ }
+ ia64 {
+ if {$tcl_platform(wordSize) == 4} {
+ append cpu _32
+ }
+ }
+ }
+
+ switch -- $plat {
+ windows {
+ set plat win32
+ if {$cpu eq "amd64"} {
+ # Do not check wordSize, win32-x64 is an IL32P64 platform.
+ set cpu x86_64
+ }
+ }
+ sunos {
+ set plat solaris
+ if {$cpu ne "ia64"} {
+ if {$tcl_platform(wordSize) == 8} {
+ append cpu 64
+ }
+ }
+ }
+ darwin {
+ set plat macosx
+ }
+ aix {
+ set cpu powerpc
+ if {$tcl_platform(wordSize) == 8} {
+ append cpu 64
+ }
+ }
+ hp-ux {
+ set plat hpux
+ if {$cpu ne "ia64"} {
+ set cpu parisc
+ if {$tcl_platform(wordSize) == 8} {
+ append cpu 64
+ }
+ }
+ }
+ osf1 {
+ set plat tru64
+ }
+ }
+
+ return "${plat}-${cpu}"
+}
+
+# -- platform::identify
+#
+# Assembles an identifier for the exact platform, by extending the
+# generic identifier. I.e. it adds in details like kernel version,
+# libc version, etc., if they are relevant for the loading of
+# packages on the platform.
+
+proc ::platform::identify {} {
+ global tcl_platform
+
+ set id [generic]
+ regexp {^([^-]+)-([^-]+)$} $id -> plat cpu
+
+ switch -- $plat {
+ solaris {
+ regsub {^5} $tcl_platform(osVersion) 2 text
+ append plat $text
+ return "${plat}-${cpu}"
+ }
+ linux {
+ # Look for the libc*.so and determine its version
+ # (libc5/6, libc6 further glibc 2.X)
+
+ set v unknown
+
+ if {[file exists /lib64] && [file isdirectory /lib64]} {
+ set base /lib64
+ } else {
+ set base /lib
+ }
+
+ set libclist [lsort [glob -nocomplain -directory $base libc*]]
+ if {[llength $libclist]} {
+ set libc [lindex $libclist 0]
+
+ # Try executing the library first. This should suceed
+ # for a glibc library, and return the version
+ # information.
+
+ if {![catch {
+ set vdata [lindex [split [exec $libc] \n] 0]
+ }]} {
+ regexp {([0-9]+(\.[0-9]+)*)} $vdata -> v
+ foreach {major minor} [split $v .] break
+ set v glibc${major}.${minor}
+ } else {
+ # We had trouble executing the library. We are now
+ # inspecting its name to determine the version
+ # number. This code by Larry McVoy.
+
+ if {[regexp -- {libc-([0-9]+)\.([0-9]+)} $libc -> major minor]} {
+ set v glibc${major}.${minor}
+ }
+ }
+ }
+ append plat -$v
+ return "${plat}-${cpu}"
+ }
+ }
+
+ return $id
+}
+
+# -- platform::patterns
+#
+# Given an exact platform identifier, i.e. _not_ the generic
+# identifier it assembles a list of exact platform identifier
+# describing platform which should be compatible with the
+# input.
+#
+# I.e. packages for all platforms in the result list should be
+# loadable on the specified platform.
+
+# << Should we add the generic identifier to the list as well ? In
+# general it is not compatible I believe. So better not. In many
+# cases the exact identifier is identical to the generic one
+# anyway.
+# >>
+
+proc ::platform::patterns {id} {
+ set res [list $id]
+ if {$id eq "tcl"} {return $res}
+
+ switch -glob -- $id {
+ solaris*-* {
+ if {![regexp {solaris([^-]*)-(.*)} $id -> v cpu]} {return $id}
+ if {$v eq ""} {return $id}
+ foreach {major minor} [split $v .] break
+ incr minor -1
+ for {set j $minor} {$j >= 6} {incr j -1} {
+ lappend res solaris${major}.${j}-${cpu}
+ }
+ }
+ linux*-* {
+ if {![regexp {linux-glibc([^-]*)-(.*)} $id -> v cpu]} {return $id}
+ foreach {major minor} [split $v .] break
+ incr minor -1
+ for {set j $minor} {$j >= 0} {incr j -1} {
+ lappend res linux-glibc${major}.${j}-${cpu}
+ }
+ }
+ macosx-powerpc -
+ macosx-ix86 {
+ lappend res macosx-universal
+ }
+ }
+ lappend res tcl ; # Pure tcl packages are always compatible.
+ return $res
+}
+
+
+# ### ### ### ######### ######### #########
+## Ready
+
+package provide platform 1.0.2
+
+# ### ### ### ######### ######### #########
+## Demo application
+
+if {[info exists argv0] && ($argv0 eq [info script])} {
+ puts ====================================
+ parray tcl_platform
+ puts ====================================
+ puts Generic\ identification:\ [::platform::generic]
+ puts Exact\ identification:\ \ \ [::platform::identify]
+ puts ====================================
+ puts Search\ patterns:
+ puts *\ [join [::platform::patterns [::platform::identify]] \n*\ ]
+ puts ====================================
+ exit 0
+}
diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl
new file mode 100644
index 0000000..3c2981c
--- /dev/null
+++ b/library/platform/shell.tcl
@@ -0,0 +1,222 @@
+# -*- tcl -*-
+# ### ### ### ######### ######### #########
+## Overview
+
+# Higher-level commands which invoke the functionality of this package
+# for an arbitrary tcl shell (tclsh, wish, ...). This is required by a
+# repository as while the tcl shell executing packages uses the same
+# platform in general as a repository application there can be
+# differences in detail (i.e. 32/64 bit builds).
+
+# ### ### ### ######### ######### #########
+## Requirements
+
+package require platform
+namespace eval ::platform::shell {}
+
+# ### ### ### ######### ######### #########
+## Implementation
+
+# -- platform::shell::generic
+
+proc ::platform::shell::generic {shell} {
+ # Argument is the path to a tcl shell.
+
+ CHECK $shell
+ LOCATE base out
+
+ set code {}
+ lappend code [list source $base]
+ lappend code {puts [platform::generic]}
+ lappend code {exit 0}
+
+ set arch [RUN $shell [join $code \n]]
+
+ if {$out} {file delete -force $base}
+ return $arch
+}
+
+# -- platform::shell::identify
+
+proc ::platform::shell::identify {shell} {
+ # Argument is the path to a tcl shell.
+
+ CHECK $shell
+ LOCATE base out
+
+ set code {}
+ lappend code [list source $base]
+ lappend code {puts [platform::identify]}
+ lappend code {exit 0}
+
+ set arch [RUN $shell [join $code \n]]
+
+ if {$out} {file delete -force $base}
+ return $arch
+}
+
+# -- platform::shell::platform
+
+proc ::platform::shell::platform {shell} {
+ # Argument is the path to a tcl shell.
+
+ CHECK $shell
+
+ set code {}
+ lappend code {puts $tcl_platform(platform)}
+ lappend code {exit 0}
+
+ return [RUN $shell [join $code \n]]
+}
+
+# ### ### ### ######### ######### #########
+## Internal helper commands.
+
+proc ::platform::shell::CHECK {shell} {
+ if {![file exists $shell]} {
+ return -code error "Shell \"$shell\" does not exist"
+ }
+ if {![file executable $shell]} {
+ return -code error "Shell \"$shell\" is not executable"
+ }
+ return
+}
+
+proc ::platform::shell::LOCATE {bv ov} {
+ upvar 1 $bv base $ov out
+
+ # Locate the platform package for injection into the specified
+ # shell. We are using package management to find it, whereever it
+ # is, instead of using hardwired relative paths. This allows us to
+ # install the two packages as TMs without breaking the code
+ # here. If the found package is wrapped we copy the code somewhere
+ # where the spawned shell will be able to read it.
+
+ set pl [package ifneeded platform [package require platform]]
+ foreach {cmd base} $pl break
+
+ set out 0
+ if {[lindex [file system $base]] ne "native"} {
+ set temp [TEMP]
+ file copy -force $base $temp
+ set base $temp
+ set out 1
+ }
+ return
+}
+
+proc ::platform::shell::RUN {shell code} {
+ set c [TEMP]
+ set cc [open $c w]
+ puts $cc $code
+ close $cc
+
+ set e [TEMP]
+
+ set code [catch {
+ exec $shell $c 2> $e
+ } res]
+
+ file delete $c
+ file delete $e
+
+ if {$code} {
+ return -code error "Shell \"$shell\" is not executable"
+ }
+
+ return $res
+}
+
+proc ::platform::shell::TEMP {} {
+ set prefix platform
+
+ # This code is copied out of Tcllib's fileutil package.
+ # (TempFile/tempfile)
+
+ set tmpdir [DIR]
+
+ set chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+ set nrand_chars 10
+ set maxtries 10
+ set access [list RDWR CREAT EXCL TRUNC]
+ set permission 0600
+ set channel ""
+ set checked_dir_writable 0
+ set mypid [pid]
+ for {set i 0} {$i < $maxtries} {incr i} {
+ set newname $prefix
+ for {set j 0} {$j < $nrand_chars} {incr j} {
+ append newname [string index $chars \
+ [expr {int(rand()*62)}]]
+ }
+ set newname [file join $tmpdir $newname]
+ if {[file exists $newname]} {
+ after 1
+ } else {
+ if {[catch {open $newname $access $permission} channel]} {
+ if {!$checked_dir_writable} {
+ set dirname [file dirname $newname]
+ if {![file writable $dirname]} {
+ return -code error "Directory $dirname is not writable"
+ }
+ set checked_dir_writable 1
+ }
+ } else {
+ # Success
+ close $channel
+ return [file normalize $newname]
+ }
+ }
+ }
+ if {[string compare $channel ""]} {
+ return -code error "Failed to open a temporary file: $channel"
+ } else {
+ return -code error "Failed to find an unused temporary file name"
+ }
+}
+
+proc ::platform::shell::DIR {} {
+ # This code is copied out of Tcllib's fileutil package.
+ # (TempDir/tempdir)
+
+ global tcl_platform env
+
+ set attempdirs [list]
+
+ foreach tmp {TMPDIR TEMP TMP} {
+ if { [info exists env($tmp)] } {
+ lappend attempdirs $env($tmp)
+ }
+ }
+
+ switch $tcl_platform(platform) {
+ windows {
+ lappend attempdirs "C:\\TEMP" "C:\\TMP" "\\TEMP" "\\TMP"
+ }
+ macintosh {
+ set tmpdir $env(TRASH_FOLDER) ;# a better place?
+ }
+ default {
+ lappend attempdirs \
+ [file join / tmp] \
+ [file join / var tmp] \
+ [file join / usr tmp]
+ }
+ }
+
+ lappend attempdirs [pwd]
+
+ foreach tmp $attempdirs {
+ if { [file isdirectory $tmp] && [file writable $tmp] } {
+ return [file normalize $tmp]
+ }
+ }
+
+ # Fail if nothing worked.
+ return -code error "Unable to determine a proper directory for temporary files"
+}
+
+# ### ### ### ######### ######### #########
+## Ready
+
+package provide platform::shell 1.1.1
diff --git a/tests/platform.test b/tests/platform.test
index 2236311..7eda53c 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -25,7 +25,7 @@ test platform-1.1 {TclpSetVariables: tcl_platform} {
set result [i eval {lsort [array names tcl_platform]}]
interp delete i
set result
-} {byteOrder machine os osVersion platform user wordSize}
+} {byteOrder machine os osVersion platform pointerSize user wordSize}
# Test assumes twos-complement arithmetic, which is true of virtually
# everything these days. Note that this does *not* use wide(), and
diff --git a/tests/safe.test b/tests/safe.test
index 2c6218b..e1b4a36 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: safe.test,v 1.21 2006/03/21 14:35:26 dgp Exp $
+# RCS: @(#) $Id: safe.test,v 1.22 2006/12/05 18:45:51 andreas_kupries Exp $
package require Tcl 8.5
@@ -184,7 +184,7 @@ test safe-6.3 {test safe interpreters knowledge of the world} {
set r [lreplace $r $threaded $threaded]
}
set r
-} {byteOrder platform wordSize}
+} {byteOrder platform pointerSize wordSize}
# more test should be added to check that hostname, nameofexecutable,
# aren't leaking infos, but they still do...
diff --git a/unix/Makefile.in b/unix/Makefile.in
index e7b2207..eb95043 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.198 2006/11/25 17:18:10 dkf Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.199 2006/12/05 18:45:51 andreas_kupries Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -753,7 +753,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs
else true; \
fi; \
done;
- @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.5; \
+ @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \
do \
if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -794,6 +794,12 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs
@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm;
@echo "Installing package tcltest 2.3a1 as a Tcl Module";
@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3a1.tm;
+
+ @echo "Installing package platform 1.0.2 as a Tcl Module";
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.2.tm;
+ @echo "Installing package platform::shell 1.1.1 as a Tcl Module";
+ @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.1.tm;
+
@echo "Installing library encoding directory";
@for i in $(TOP_DIR)/library/encoding/*.enc ; do \
$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/encoding; \
diff --git a/win/Makefile.in b/win/Makefile.in
index b8bdbfd..1352921 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.110 2006/11/25 17:18:10 dkf Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.111 2006/12/05 18:45:51 andreas_kupries Exp $
VERSION = @TCL_VERSION@
@@ -605,7 +605,7 @@ install-libraries: libraries install-tzdata install-msgs
else true; \
fi; \
done;
- @for i in http1.0 opt0.4 encoding ../tcl8 ../tcl8/8.2 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.5; \
+ @for i in http1.0 opt0.4 encoding ../tcl8 ../tcl8/8.2 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \
do \
if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -644,6 +644,10 @@ install-libraries: libraries install-tzdata install-msgs
@$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm;
@echo "Installing package tcltest 2.3a1 as a Tcl Module";
@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3a1.tm;
+ @echo "Installing package platform 1.0.2 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.2.tm;
+ @echo "Installing package platform::shell 1.1.1 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.1.tm;
@echo "Installing encodings";
@for i in $(ROOT_DIR)/library/encoding/*.enc ; do \
$(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)/encoding"; \
diff --git a/win/makefile.bc b/win/makefile.bc
index 0a847a0..36ae8c0 100644
--- a/win/makefile.bc
+++ b/win/makefile.bc
@@ -439,6 +439,11 @@ install-libraries:
-@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\tcltest2.3"
-@copy "$(ROOT)\library\tcltest\tcltest.tcl" "$(SCRIPT_INSTALL_DIR)\tcltest2.3"
-@copy "$(ROOT)\library\tcltest\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\tcltest2.3"
+ @echo installing platform1.0
+ -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\platform1.0"
+ -@copy "$(ROOT)\library\platform\platform.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0"
+ -@copy "$(ROOT)\library\platform\shell.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0"
+ -@copy "$(ROOT)\library\platform\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0"
@echo installing $(TCLDDEDLLNAME)
-@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\dde1.3"
-@copy "$(TCLDDEDLL)" "$(SCRIPT_INSTALL_DIR)\dde1.3"
diff --git a/win/makefile.vc b/win/makefile.vc
index 1a5bb27..c2b13c9 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -12,7 +12,7 @@
# Copyright (c) 2001-2004 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.156 2006/11/25 17:18:10 dkf Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.157 2006/12/05 18:45:51 andreas_kupries Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -986,6 +986,8 @@ install-libraries: tclConfig install-msgs install-tzdata
$(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.3"
@if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4" \
$(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4"
+ @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform" \
+ $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform"
@if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5" \
$(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5"
@echo Installing header files
@@ -1023,6 +1025,12 @@ install-libraries: tclConfig install-msgs install-tzdata
@echo Installing package tcltest 2.3a1 as a Tcl Module
@$(COPY) "$(ROOT)\library\tcltest\tcltest.tcl" \
"$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\tcltest-2.3a1.tm"
+ @echo Installing package platform 1.0.2 as a Tcl Module
+ @$(COPY) "$(ROOT)\library\platform\platform.tcl" \
+ "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform-1.0.2.tm"
+ @echo Installing package platform::shell 1.1.1 as a Tcl Module
+ @$(COPY) "$(ROOT)\library\platform\shell.tcl" \
+ "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform\shell-1.1.1.tm"
@echo Installing $(TCLDDELIBNAME)
!if $(STATIC_BUILD)
@$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\"