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.
5 # Copyright (c) 2001-2009 Andres Garcia Garcia.
7 # See the file "license.terms" for information on usage and redistribution
8 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 set tclLibDir [file dirname $tcl_library]
14 set tclBinDir [file join [file dirname $tclLibDir] bin]
15 set windowsSystem [file join $env(windir) SYSTEM]
17 foreach oldie [glob -nocomplain $tclLibDir/tclcurl*] {
18 catch {file delete -force $oldie}
21 file copy -force tclcurl7.19.6 $tclLibDir
23 foreach sslFile [glob -nocomplain ssl/*] {
24 catch {file copy -force $sslFile $windowsSystem}
26 foreach sslFile [glob -nocomplain certs/*] {
27 file copy -force $sslFile [file join $env(windir) curl-ca-bundle.crt]
30 package forget TclCurl
32 if {[catch {package require TclCurl} version]} {
33 tk_messageBox -icon error -type ok -title Error \
34 -message "Install failed\n$version"
36 tk_messageBox -icon info -type ok -title Installed \
37 -message "Version $version installed"