OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tix/] [docs/] [WinInst.html] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<TITLE>Building the Windows Binaries</TITLE>
2
<Center><H1>Building the Windows Binaries</H1></Center>
3
 
4
  To build Tix on Windows, you must have the following:<p>
5
 
6
  <ul>
7
 
8
    <li> Visual C++ 4.0 or later; or Borland C++ 4.5 or later. There
9
    is not yet built-in support for Tix to work with other compilers.
10
 
11
    <li> The sources of Tcl/Tk for Windows.
12
 
13
    <li> The sources of Tix for Windows.
14
 
15
  </ul>
16
 
17
<h3> 1. Download the Tcl, Tk and Tix sources </h3>
18
 
19
  You can download latest version of the Tcl7.5, 7.6 or 8.0 from <a
20
  href="ftp://ftp.sunlabs.com/pub"> ftp://ftp.sunlabs.com/pub
21
  </a>. There are detailed instructions that comes with these packages
22
  about compiling them on Windows. Hopefully that will give you a good
23
  exercise on setting up the environment for compiling Tcl-based
24
  programs on the Windows platforms.<p>
25
 
26
  You can then get the Tix source distribution at <a
27
  href="ftp://ftp.xpi.com/pub/Tix41.zip">
28
  ftp://ftp.xpi.com/pub/Tix41.zip </a>. This ZIP file contains files
29
  with long file names and must be unzipped by an UNZIP program that
30
  knows long filenames, such as <b>winzip.exe</b>. <p>
31
 
32
  You should put the Tcl, Tk and Tix source packages in the same
33
  directory. For example, my directories look like this: <p>
34
 
35
      <blockquote><code><b>
36
      C:\tcl7.6<br>
37
      C:\tk4.2<br>
38
      C:\Tix4.1<br>
39
      </b></code></blockquote>
40
 
41
<h3> 2. Compile Tcl and Tk </h3>
42
 
43
  Follow the instructions that come with Tcl and Tk. If you can
44
  compile successfully, you would get the following files: <p>
45
 
46
      <blockquote><b><code>
47
      C:\tcl7.6\win\tcl76.dll<br>
48
      C:\tcl7.6\win\tclpip76.dll<br>
49
      C:\tk4.2\win\tk42.dll<br>
50
      </code></b></blockquote>
51
 
52
  These are the files you need to run Tix on Windows.
53
 
54
<h3> 3. Compile Tix </h3>
55
 
56
  Change to the Tix4.1\Win subdirectory. Tix supports several versions
57
  of Tcl. You choose the version of Tcl to compile Tix with by using
58
  the <b>TCL_VER</b> variable:
59
 
60
  <ul>
61
    <li> Tcl 7.5: <b><code>nmake -f makefile.vc TCL_VER=7.5</code></b>
62
    <li> Tcl 7.6: <b><code>nmake -f makefile.vc TCL_VER=7.6</code></b>
63
    <li> Tcl 8.0: <b><code>nmake -f makefile.vc TCL_VER=8.0</code></b>
64
    <li> Itcl 2.2: <b><code>nmake -f makefile.vc TCL_VER=2.2i</code></b>
65
  </ul>
66
 
67
  If you have BC++, use <b>make -f makefile.bc</b> instead. <p>
68
 
69
  When <b>make</b> or <b>nmake</b> finishes, you will get Tix binaries
70
  inside the build directories. For example, if you compile Tix for
71
  Tcl 7.6, you will be the following files:
72
 
73
      <blockquote><b><code>
74
      C:\Tix4.1\win\tcl7.6\tix4176.dll<br>
75
      C:\Tix4.1\win\tcl7.6\tix4176.exe<br>
76
      </code></b></blockquote>
77
 
78
  The executable file <b>tix4176.exe</b> contains Tcl, Tk and Tix. You
79
  can use it to run an Tix script by:
80
 
81
      <blockquote><b><code>
82
      set TIX_LIBRARY=C:\Tix4.1\library
83
      C:\Tix4.1\win\tcl7.6\tix4176.exe foo.tcl<br>
84
      </code></b></blockquote>
85
 
86
<h3> 4. Fixing DLL problems</h3>
87
 
88
  You may run into certain problems related to DLL's when you execute
89
  <b>tix4176.exe</b>. For example:
90
  <ul>
91
    <li> Windows complains that a DLL, usually tcl76.dll, is not found.
92
    <li> Windows complains that a symbol is missing.
93
    <li> Some weird things happen.
94
  </ul>
95
 
96
  When <b>tix4176.exe</b> starts up, it will load in the following DLL's
97
  <ul>
98
    <li><code><b>tcl76.dll</b></code>
99
    <li><code><b>tclpip76.dll</b></code>
100
    <li><code><b>tk42.dll</b></code>
101
    <li><code><b>tix4176.dll</b></code>
102
  </ul>
103
 
104
  Windows searches for a DLL file by the following order:
105
  <ol>
106
    <li>Same directory as executable.
107
    <li>Windows system directory.
108
    <li>directories in the PATH environment variable.
109
  </ol>
110
 
111
  To ensure that the correct DLLs are loaded, you can copy all the
112
  DLL's used by tix4176.exe into the directory where tix4176.exe is. <p>
113
 
114
<h3> 5. Installing Tix</h3>
115
 
116
  You can install Tix into the Tcl installation directory so that you
117
  can load Tix with the "package require" command and no longer need
118
  to set the TIX_LIBRARY variable: <p>
119
  <ol>
120
 
121
    <li> Create a directory <b>tix4.1</b> under the Tcl installation
122
    directory, usually in <b>C:\Program Files\Tcl7.6\lib</b>. <p>
123
 
124
    <li> Copy all the files under <b>Tix4.1b1\library</b> into the
125
    <b>C:\Program Files\Tcl7.6\lib\tix4.1</b> directory. <p>
126
 
127
    <li> Copy the file <b>Tix4.1\win\pkgIndex.tcl</b> into the
128
    <b>C:\Program Files\Tcl7.6\lib\tix4.1</b> directory. <p>
129
 
130
  </ol>
131
 
132
  Now you should be able to start up wish42.exe and execute the
133
  following command to load in Tix.
134
      <blockquote><b><code>
135
      package require -exact Tix [tixBinVer 4.1]
136
      </code></b></blockquote>
137
 
138
 
139
  Read the file <a href="Pkg.txt">Tix4.1\docs\Pkg.txt</a> for more
140
  info about dynamically loading Tix.<p>
141
 
142
<!---------------------------------------------------------------------->
143
<hr>
144
 
145
<h3> FAQ's for running Tix on Windows</h3>
146
 
147
<DL>
148
  <DT> <b>How do I set an environment variable.</b><p>
149
  <DD>
150
 
151
       You can set it in your DOS window by typing something like
152
       "<b>set TIX_LIBRARY=C:\Tix4.1\win</b>". This will affect that
153
       particular DOS window only. If you want the change to affect
154
       the whole Windows environment (for example, you want launch
155
       <b>txwish41.exe</b> by double-clicking on its icon), you must
156
       put the commands in your <b>AUTOEXEC.BAT</b> file and then
157
       reboot your machine. <p>
158
 
159
  <DT> <b>I get an "out of environment space" error from DOS.</b><p>
160
  <DD>
161
 
162
        Edit your <b>CONFIG.SYS</b> file and add the switch
163
        "<b>/E:1024</b>" to the <b>SHELL=COMMAND.COM</b>
164
        line. Reboot. This should give you enough env space.<p>
165
 
166
  <DT> <b>My C compiler says "unrecognized file format tk42.lib" or
167
  something like that.</b><p>
168
 
169
  <DD>
170
       You compiled <b>tk42.lib</b> with VC++ and are compiling Tix
171
       with Borland C++, or vice verse. Use the same compiler to
172
       compile all binaries.<p>
173
</DL>
174
 
175
<!Serial 851729141>
176
<hr><i>Last modified Sat Feb 15 21:52:36 EST 1997 </i> ---
177
<i>Serial 856069650</i>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.