summaryrefslogtreecommitdiff
path: root/doc/cygwin.htm
blob: c206af1cedb294608d205ca288987cbda8c9ae03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Icon on Cygwin</TITLE>
    <LINK REL="STYLESHEET" TYPE="text/css" HREF="istyle.css">
    <LINK REL="SHORTCUT ICON" HREF="shortcut.gif">
</HEAD>
<BODY>

<P><A HREF="http://www.cs.arizona.edu/icon/"> <IMG SRC="wwwcube.gif"
ALT="[Icon home]" WIDTH=128 HEIGHT=144 BORDER=0 ALIGN=RIGHT> </A>

<H1> Icon on Cygwin </H1>

<P> Gregg M. Townsend
<BR> <SMALL> Department of Computer Science </SMALL>
<BR> <SMALL> The University of Arizona </SMALL>

<P> <SMALL> www.cs.arizona.edu/icon/v950/cygwin.htm
<BR> 
Last updated November 8, 2009</SMALL>
<!-- $Id: cygwin.htm,v 1.11 2009/11/08 21:53:08 gmt Exp $ -->


<H2> Introduction </H2>

<P> Most contemporary operating systems trace their underlying design
to the Unix operating system,
as refined and specified today by the POSIX family of standards.
Microsoft Windows, however, was developed independently and
defines a different set of interfaces for the programmer and the user.

<P> The <A HREF="http://www.cygwin.com/">Cygwin</A> package provides a
Unix environment under Microsoft Windows.
This allows the latest version of Icon (and many other things)
to be built on a Windows system.
Successful use of Cygwin requires familiarity with both 
Windows and Unix.

<P> This document describes some of the peculiarities of the Cygwin
port of Icon.
These differences are not necessarily identified in other documentation.


<H2> Building Icon </H2>

<P> Icon is built in a Cygwin shell window using the same process as on
on other platforms.
See the <A HREF=build.htm>installation documentation</A> for instructions.
There are two possible choices for configuration name:
The <CODE>cygwin</CODE> configuration uses the native Windows graphics system;
the <CODE>xcygwin</CODE> configuration uses the X window system and thus
is closer to other Unix implementations of Icon.

<P> The Cygwin package is available from
<A HREF="http://www.cygwin.com/">www.cygwin.com</A>.
A custom installation of the Cygwin system is required;
the default installation provides a bare-bones system
insufficient for building software.
Icon requires a C compiler and the usual tools and utilities
available on a standard POSIX development system; these are found
in the <CODE>gcc-core</CODE> and <CODE>make</CODE> packages.
The <CODE>xinit</CODE> and <CODE>libXt-devel</CODE> packages are also needed
to build the <CODE>xcygwin</CODE> configuration with graphics enabled.


<H2> Running Icon programs </H2>

<P> Icon is run by commands entered in a Cygwin terminal window.
The simplest command is "<CODE>icon prog.icn</CODE>",
which runs the program contained in the source file <CODE>prog.icn</CODE>.
The translator <CODE>icont</CODE> can create executable programs
from Icon source code.
The Unix-style "man pages" for <A HREF=icon.txt><CODE>icon</CODE></A>
and <A HREF=icont.txt><CODE>icont</CODE></A>
describe the command options in a traditionally cryptic manner.


<H2> Interpreter path and environment</H2>

<P> Icon programs require an interpreter for execution.
On Windows, the path of the interpreter is not embedded
in an executable program.
The program must be able to find
<CODE>iconx.exe</CODE> in the search path.

<P> The Cygwin X server must be running, with a correct <CODE>DISPLAY</CODE>
variable in the environment, to execute graphics programs built by the
<CODE>xcygwin</CODE> configuration of Icon.

<P> When the environment is correctly set,
with <CODE>cygwin1.dll</CODE> in the Windows path,
a compiled Icon program may be run from the Cygwin shell or by
double-clicking its graphical icon.


<H2> Extra built-in functions </H2>

<P> For compatibility with an earlier port of Icon to Windows,
the <CODE>cygwin</CODE> configuration includes some extra built-in functions.
These are described in section 6.2 of
<A HREF="http://www.cs.arizona.edu/icon/docs/ipd271.htm">IPD271</A>,
which documents that earlier port.

<P> These unsupported functions are not part of Icon on other platforms,
nor of the <CODE>xcygwin</CODE> configuration,
so their use renders a program non-portable.


<H2> Feature test symbols </H2>

<P> The symbols <CODE>_MS_WINDOWS</CODE> and <CODE>_CYGWIN</CODE>
are defined by the Icon preprocessor.
The symbol <CODE>_UNIX</CODE> is not defined.
The symbol <CODE>_GRAPHICS</CODE> is defined if Icon is built with
graphics enabled;
the symbol <CODE>_X_WINDOW_SYSTEM</CODE> is also defined
in the <CODE>xcygwin</CODE> configuration.
The corresponding strings are produced or omitted, as appropriate,
by the <CODE>&amp;features</CODE> keyword.


<H2> Known bugs </H2>

<UL>
    <LI>Some Unix dependencies cause the <CODE>tpp</CODE>
    and <CODE>opts</CODE> tests to fail.
    <LI> Resizing a window sends a large number of events to the program.
</UL>


<P> <HR>

</BODY>
</HTML>