]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - ReadMeW32.txt
Imported Upstream version 7.19.6
[sven/tclcurl.git] / ReadMeW32.txt
1 To install TclCurl in Windows you simply have to double-click on the 'SetUp.tcl'
2 file, provided you already have Tcl/Tk installed, the script will take care of
3 everything.
4
5 By the way, Tcl's console doesn't seem to like the output sent by TclCurl,
6 for example, if you type:
7
8 curl::transfer -url www.scriptics.com
9
10 you will only get an error, you will have to dump it to a file with the
11 'file' option, read it in to a variable with 'bodyvar', use Cygwin's console
12 or use tkCon from msys-mingw.
13
14
15 Compiling TclCurl in Windows
16
17
18 First of all a little disclaimer:
19
20 I know nothing about Windows programming, no kidding, not a thing,
21 zip, zilch, nada. I can barely manage using tools, like Tcl/Tk and
22 gcc, whose origin is in the Unix world, but that is just about it, so
23 if you think that the following is just plain stupid, that is because
24 it probably is, but in that case, don't forget to tell me all about it.
25
26 To compile TclCurl in Windows you are going to need several things:
27
28     - A msys-mingw enviroment, you can get it at SourceForge:
29
30           http://sourceforge.net/projects/tcl/
31
32       or you can get MinGW and Msys from their project page:
33
34           http://sourceforge.net/projects/mingw/
35
36     - Since you are already at Tcl's page at SF, you can download the
37       lastest Tcl version, 8.4.13 at this writing. (These instructions won't
38       work with 8.3.x versions)
39
40     - Download zlib from http://www.gzip.org/zlib/
41
42     - Download bc from http://gnuwin32.sourceforge.net/packages/bc.htm and
43       install it.
44
45     - Extract Tcl, cURL, zlib and TclCurl in the same directory.
46
47     - Copy the 'tclcurl.mk' file in TclCurl/packages/windows to this directory.
48
49     - Start msys, go to the directory and type:
50
51             $ make -f tclcurl.mk tclcurl-plain
52
53       This command will compile and install Tcl, zlib, cURL and TclCurl, if
54       you want to have Tk though, you will have to install it yourself.
55
56       After compiling and installing all the elements, the make file will
57       try to create the self-extracting archive using 'rar', if you don't
58       have it installed it will fail, but don't worry, everything is already
59       installed. If you have rar and you want to create the archives, don't
60       forget to change the path at the end of the make file.
61
62     - If you want to use TclCurl with the Tcl/Tk you have installed in 
63       c:\Program Files or anywhere else, copy the directory
64       '/usr/local/lib/tclcurl0.110' to 'c:\Program Files\Tcl\lib'
65
66     - And now you should have a working TclCurl, run Tcl/Tk and type:
67
68             $ package require TclCurl.
69
70       Tcl should return TclCurl's version, if it doesn't something went wrong,
71       could you please tell me?
72
73     - Wish console doesn't really like TclCurl, so if you do:
74
75             $ curl::transfer -url slashdot.org
76
77       It will return a '0' to tell you that the transfer was successful, but it will
78       show you nothing, you will have to dump the page into a file to be able to read
79       it or use Cygwin's console.
80
81
82
83 Compiling TclCurl with threads support
84
85 You have to do basically the same thing, except that the command to compile is:
86
87     $ make -f tclcurl.mk tclcurl-threaded
88
89
90 Compiling TclCurl with SSL support
91
92 To prevent patent trouble, the SSL enabled binaries don't support the idea, rc5 and mdc2
93 algorithms, if you need them, and you are allowed to do so, you can compile them yourself.
94
95
96       - First of all you have to compile Openssl, you can get the lastest version
97         at http://www.openssl.org, these instructions should work with version 0.9.8e
98
99       - To compile it you are going to need Perl in your system, for whatever the reason
100         I couldn't get it to work with the Perl that comes with Cygwin, so I had to
101         download ActivePerl: http://www.activestate.com.
102
103       - You will also need to download the MinGW compiler, the compiling scripts don't
104         like the msys enviroment though.
105
106       - The open a MS-DOS console in the openssl directory and make sure that both
107         perl and mingw are in you path:
108
109             c:\openssl-0.9.8e\> echo %PATH%
110
111         if they aren't add them:
112
113             c:\openssl-0.9.8e\> PATH=%PATH%;C:\Perl\bin;c:\MinGW\bin
114
115         change the paths if you need to.
116
117       - Only thing left is to type in the MS-DOS console:
118
119              c:\openssl-0.9.8e\> ms\mingw32.bat
120  
121         and hope for the best.
122
123       - After it compiles you have to copy some files around:
124
125         - libcryto.a, libeay32.a, libssl.a and libssl32.a from 
126           openssl-0.9.8e\out to c:\msys\local\lib.
127
128         - libeay32.dll and libssl32.dll from openssl-0.9.8e to
129           c:\msys\local\lib and c:\msys\local\bin.
130
131         - The contents of openssl-0.9.8e\outinc to c:\msys\local\include.
132
133       - Now copy the 'tclcurl.mk' file from TclCurl/packages/windows to
134         the directory in which you have TclCurl, Tcl, cURL, TclCurl and OpenSSL.
135
136         - $ make -f tclcurl.mk tclcurl-ssl
137
138       - If you want to have threads support:
139
140         - $ make -f tclcurl.mk tclcurl-threaded-ssl        
141
142 Sounds like a lot of work to run a little extension, but then again, you could
143 have downloaded the self-extracting archive file.
144
145
146 Share the wonders,
147 Andres
148 fandom@telefonica.net
149
150
151