Check-in [573dc5879d]
Bounty program for improvements to Tcl and certain Tcl packages.
Overview
Comment: * tls.tcl (tls::initlib): add support for Windows starpack operation that unbundles any constituent libraries. [AS Bug 82888]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 573dc5879d948fa6f473c67ab99fafcfa0eb9d6a
User & Date: hobbs2 on 2009-04-23 23:12:07
Other Links: manifest | tags
Context
2010-07-27
17:15
* tls.tcl (tls::socket): some socket implementations have a -type support (e.g. for inet6). check-in: 119a8780e7 user: hobbs2 tags: trunk
2009-04-23
23:12
* tls.tcl (tls::initlib): add support for Windows starpack operation that unbundles any constituent libraries. [AS Bug 82888] check-in: 573dc5879d user: hobbs2 tags: trunk
2008-06-18
11:29
Fixed ciphers test for 0.9.8 and updated win build to support testing. check-in: 4b6990b1fa user: patthoyts tags: trunk
Changes

Modified ChangeLog from [a72d9b7c9c] to [569bdf16e2].

            1  +2009-04-23  Jeff Hobbs  <[email protected]>
            2  +
            3  +	* tls.tcl (tls::initlib): add support for Windows starpack
            4  +	operation that unbundles any constituent libraries. [AS Bug 82888]
            5  +
     1      6   2008-06-18  Pat Thoyts  <[email protected]>
     2      7   
     3      8   	* tests/ciphers.test: Fix for different openssl versions.
     4      9   	* win/makefile.vc:    Updates to support tests.
     5     10   	* win/rules.vc:
     6     11   	* win/nmakehlp.c:
     7     12   

Modified tls.tcl from [aea23a4bee] to [6631e237f4].

     1      1   #
     2      2   # Copyright (C) 1997-2000 Matt Newman <[email protected]> 
     3      3   #
     4         -# $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.tcl,v 1.10 2008/03/19 02:34:21 patthoyts Exp $
            4  +# $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.tcl,v 1.11 2009/04/23 23:12:07 hobbs2 Exp $
     5      5   #
     6      6   namespace eval tls {
     7      7       variable logcmd tclLog
     8      8       variable debug 0
     9      9    
    10     10       # Default flags passed to tls::import
    11     11       variable defaults {}
................................................................................
    23     23   
    24     24   proc tls::initlib {dir dll} {
    25     25       # Package index cd's into the package directory for loading.
    26     26       # Irrelevant to unixoids, but for Windows this enables the OS to find
    27     27       # the dependent DLL's in the CWD, where they may be.
    28     28       set cwd [pwd]
    29     29       catch {cd $dir}
           30  +    if {[string equal $::tcl_platform(platform) "windows"] &&
           31  +	![string equal [lindex [file system $dir] 0] "native"]} {
           32  +	# If it is a wrapped executable running on windows, the openssl
           33  +	# dlls must be copied out of the virtual filesystem to the disk
           34  +	# where Windows will find them when resolving the dependency in
           35  +	# the tls dll. We choose to make them siblings of the executable.
           36  +	package require starkit
           37  +	set dst [file nativename [file dirname $starkit::topdir]]
           38  +	foreach sdll [glob -nocomplain -directory $dir -tails *eay32.dll] {
           39  +	    catch {file delete -force            $dst/$sdll}
           40  +	    catch {file copy   -force $dir/$sdll $dst/$sdll}
           41  +	}
           42  +    }
    30     43       set res [catch {uplevel #0 [list load [file join [pwd] $dll]]} err]
    31     44       catch {cd $cwd}
    32     45       if {$res} {
    33     46   	namespace eval [namespace parent] {namespace delete tls}
    34     47   	return -code $res $err
    35     48       }
    36     49       rename tls::initlib {}
................................................................................
   244    257       if {$level > $debug || $logcmd == ""} {
   245    258   	return
   246    259       }
   247    260       set cmd $logcmd
   248    261       lappend cmd $msg
   249    262       uplevel #0 $cmd
   250    263   }
          264  +