]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - packages/Windows/SetUp.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / packages / Windows / SetUp.tcl
1 # This script installs TclCurl in a Windows system, you only
2 # have to double-click on it and, provided Tcl/Tk is already
3 # installed, TclCurl will be ready to use.
4 #
5 # Copyright (c) 2001-2009 Andres Garcia Garcia.
6 #
7 # See the file "license.terms" for information on usage and redistribution
8 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9
10
11 wm withdraw .
12
13 set tclLibDir     [file dirname $tcl_library]
14 set tclBinDir     [file join [file dirname $tclLibDir] bin]
15 set windowsSystem [file join $env(windir) SYSTEM]
16
17 foreach oldie [glob -nocomplain $tclLibDir/tclcurl*] {
18     catch {file delete -force $oldie}
19 }
20
21 file copy -force tclcurl7.19.6 $tclLibDir
22
23 foreach sslFile [glob -nocomplain ssl/*] {
24     catch {file copy -force $sslFile $windowsSystem}
25 }
26 foreach sslFile [glob -nocomplain certs/*] {
27     file copy -force $sslFile [file join $env(windir) curl-ca-bundle.crt]
28 }
29
30 package forget TclCurl
31
32 if {[catch {package require TclCurl} version]} {
33     tk_messageBox -icon error -type ok -title Error \
34         -message "Install failed\n$version"
35 } else {
36     tk_messageBox -icon info -type ok -title Installed \
37         -message "Version $version installed"
38 }
39
40 exit