summaryrefslogtreecommitdiffstats
path: root/tools/genWinImage.tcl
diff options
context:
space:
mode:
authorstanton <stanton@noemail.net>1999-04-16 00:46:29 (GMT)
committerstanton <stanton@noemail.net>1999-04-16 00:46:29 (GMT)
commit98569293dc21e22480004e4e3f2ce85ec0bfd80f (patch)
treece9959f2747257d98d52ec8d18bf3b0de99b9535 /tools/genWinImage.tcl
parent6a4a1d8213f4de5bce0eaafa8f4d86117022bf1a (diff)
downloadtcl-98569293dc21e22480004e4e3f2ce85ec0bfd80f.zip
tcl-98569293dc21e22480004e4e3f2ce85ec0bfd80f.tar.gz
tcl-98569293dc21e22480004e4e3f2ce85ec0bfd80f.tar.bz2
merged tcl 8.1 branch back into the main trunk
FossilOrigin-Name: f3b32fb71c9011ac220779bd9dbe5617c9dc87d9
Diffstat (limited to 'tools/genWinImage.tcl')
-rw-r--r--tools/genWinImage.tcl120
1 files changed, 120 insertions, 0 deletions
diff --git a/tools/genWinImage.tcl b/tools/genWinImage.tcl
new file mode 100644
index 0000000..b5fc051
--- /dev/null
+++ b/tools/genWinImage.tcl
@@ -0,0 +1,120 @@
+# genWinImage.tcl --
+#
+# This script generates the Windows installer.
+#
+# Copyright (c) 1999 by Scriptics Corporation.
+# All rights reserved.
+#
+# RCS: @(#) $Id: genWinImage.tcl,v 1.2 1999/04/16 00:47:39 stanton Exp $
+
+
+# This file is insensitive to the directory from which it is invoked.
+
+namespace eval genWinImage {
+ # toolsDir --
+ #
+ # This variable points to the platform specific tools directory.
+
+ variable toolsDir
+
+ # tclBuildDir --
+ #
+ # This variable points to the directory containing the Tcl built tree.
+
+ variable tclBuildDir
+
+ # tkBuildDir --
+ #
+ # This variable points to the directory containing the Tk built tree.
+
+ variable tkBuildDir
+}
+
+# genWinImage::init --
+#
+# This is the main entry point.
+#
+# Arguments:
+# None.
+#
+# Results:
+# None.
+
+proc genWinImage::init {} {
+ global tcl_platform argv argv0
+ variable tclBuildDir
+ variable tkBuildDir
+ variable toolsDir
+
+ puts "\n--- genWiImage.tcl started: \
+ [clock format [clock seconds] -format "%Y%m%d-%H:%M"] --\n"
+
+ if {$tcl_platform(platform) != "windows"} {
+ puts stderr "ERROR: Cannot build TCL.EXE on Unix systems"
+ exit 1
+ }
+
+ if {[llength $argv] != 3} {
+ puts stderr "usage: $argv0 <tclBuildDir> <tkBuildDir> <toolsDir>"
+ exit 0
+ }
+
+ set tclBuildDir [lindex $argv 0]
+ set tkBuildDir [lindex $argv 1]
+ set toolsDir [lindex $argv 2]
+
+ generateInstallers
+
+ puts "\n--- genWiImage.tcl finished: \
+ [clock format [clock seconds] -format "%Y%m%d-%H:%M"] --\n\n"
+}
+
+# genWinImage::generateInstallers --
+#
+# Perform substitutions on the pro.wse.in file and then
+# invoke the WSE script twice; once for CD and once for web.
+#
+# Arguments:
+# None.
+#
+# Results:
+# Leaves proweb.exe and procd.exe sitting in the curent directory.
+
+proc genWinImage::generateInstallers {} {
+ variable toolsDir
+ variable tclBuildDir
+ variable tkBuildDir
+
+ # Now read the "pro/srcs/install/pro.wse.in" file, have Tcl make
+ # appropriate substitutions, write out the resulting file in a
+ # current-working-directory. Use this new file to perform installation
+ # image creation. Note that we have to use this technique to set
+ # the value of _WISE_ because wise32 won't use a /d switch for this
+ # variable.
+
+ set __TCLBASEDIR__ [file native $tclBuildDir]
+ set __TKBASEDIR__ [file native $tkBuildDir]
+ set __WISE__ [file native [file join $toolsDir wise]]
+ set f [open tcl.wse.in r]
+ set s [read $f]
+ close $f
+ set s [subst -nocommands -nobackslashes $s]
+ set f [open tcl.wse w]
+ puts $f $s
+ close $f
+
+ set wise32ProgFilePath [file native [file join $__WISE__ wise32.exe]]
+
+ # Run the Wise installer to create the Windows install images.
+
+ if {[catch {exec [file native $wise32ProgFilePath] \
+ /c tcl.wse} errMsg]} {
+ puts stderr "ERROR: $errMsg"
+ } else {
+ puts "\"TCL.EXE\" created."
+ }
+
+ return
+}
+
+genWinImage::init