]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - packages/Windows/SetUp.tcl
Imported Upstream version 7.22.0
[sven/tclcurl.git] / packages / Windows / SetUp.tcl
1 # This script inst`pwd+alls 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-2011 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 cd [file dirname [info script]]
18
19 foreach oldie [glob -nocomplain $tclLibDir/tclcurl*] {
20     catch {file delete -force $oldie}
21 }
22
23 file copy -force tclcurl7.22.0 $tclLibDir
24
25 foreach sslFile [glob -nocomplain ssl/*] {
26     catch {file copy -force $sslFile $windowsSystem}
27 }
28 foreach sslFile [glob -nocomplain certs/*] {
29     file copy -force $sslFile [file join $env(windir) cacert.pem]
30 }
31
32 package forget TclCurl
33
34 if {[catch {package require TclCurl} version]} {
35     tk_messageBox -icon error -type ok -title Error \
36         -message "Install failed\n$version"
37 } else {
38     tk_messageBox -icon info -type ok -title Installed \
39         -message "Version $version installed"
40 }
41
42 exit