2003-04-08 Gaurav Vaish <gvaish_mono AT lycos.com>
[mono.git] / doc / gtk-sharp
1 * Gtk#
2
3         <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
4         sharp) is a set of C# language bindings for the
5         <a href="http://www.gtk.org">Gtk+</a> toolkit and other
6         libraries that are part of the 
7         <a href="http://www.gnome.org">GNOME</a> platform . 
8
9 ** API of Gtk#
10
11         The API is browsable 
12         <a href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
13
14 ** Where to learn more.
15
16         Visit the official site for the <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
17         The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
18         information too.
19         
20 ** GTK# On Linux
21
22 <p>Where to get distributions of GTK# for Linux: 
23         <ul>
24                 <li><a href="http://gtk-sharp.sourceforge.net">RPMs</a></li>
25                 <li><a href="http://www.debianplanet.org/mono/">Debs</a></li>
26         </ul>
27
28 <p>Buidling on Linux:
29
30 <ul>
31         <li>Get GTK# source from <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.</li>
32         <li>run ./autogen.sh --prefix=my_mono_installation_prefix</li>
33         <li>make</li>
34         <li>make install</li>
35 </ul> 
36
37 ** GTK# On Windows
38
39 <p>There is a Windows Installer for GTK# <a href="http://www.sport-huettn.de/mono/gtk-sharp-0.6-stable-2.exe">here</a>.\r
40
41 <p>If you want to build GTK# yourself on Windows:\r
42 \r
43 <p>To build gtk# under windows, you will need the following:\r
44 \r
45 <ul>\r
46  <li>cygwin from <a href="http://www.cygwin.com/">here</a>  When installing Cygwin via setup.exe, \r
47    by default binutils and other tools do not get installed; you have to make \r
48    sure to select these items.  Just make\r
49    sure Base and Development are set to Install.</li>\r
50  <li>Mono 0.17 or later from <a href="http://www.go-mono.com/download.html">here</a>\r
51   You can use Windows Setup Wizard (NT/2000/XP).</li>\r
52  <li>GTK+ 2.0 (and dependencies).  You can obtain gtk+ 2.0 by either of the\r
53 following:\r
54         <ul>\r
55                 <li>You can get a Windows Installer at:\r
56           <a href="http://www.dropline.net/jade/download.html">here</a> </li>\r
57                 <li>or get the separate binary and dev/lib packages at\r
58            at <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a> </li>\r
59         <li>or binary package from Dev-C++ site <a href="http://www.bloodshed.net/dev/packages/gtk.html">here</a> </li>\r
60                 <li>or get Gtk4Win <a href="http://wingtk.sourceforge.net/index.html">here</a> </li>\r
61                 <li>or the source at <a href="http://www.gtk.org/">here</a> </li>\r
62      </ul>\r
63   </li>\r
64  <li>binary distriubtion of a current web browser\r
65   like Internet Explorer 4.0, Mozilla 1.0, or Netscape 7.0 which\r
66   includes things like msvcrt.dll.</li>\r
67  <li>Microsoft .NET Framework at\r
68   <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a> </li>\r
69 \r
70 <p>If you are running Windows 95/98/ME, then you will need Unicode support.\r
71 Look in\r
72 mono-list archives for information about how to get\r
73 Mono to work on Windows 9x.\r
74 <a href="http://lists.ximian.com/archives/public/mono-list/2002-December/004158.html">here</a>\r
75 \r
76 <p>Environment Variables to set:\r
77 <ul>\r
78 <li>PATH - set to your mono installation bin and lib path.\r
79   For example, my mono installation prefix is:\r
80 <pre>\r
81 F:/cygwin/home/DanielMorgan/mono/install\r
82 </pre>\r
83   <p>So, I would set my PATH in the Windows Control Panel as:\r
84 <pre>\r
85 F:/cygwin/home/DanielMorgan/mono/install/bin;F:/cygwin/home/DanielMorgan/mono/install/lib</li>\r
86 </pre>\r
87 </li>\r
88 <li>LD_LIBRARY_PATH - set to your mono installation lib path</li>\r
89 <li>PKG_CONFIG_PATH - set to your mono installation lib/pkgconfig path, such\r
90  as,\r
91 <pre>\r
92   F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig</li>\r
93 </pre>\r
94 \r
95  <p>If you got the gtk-sharp source, cd to the gtk-sharp directory, type:\r
96 <pre>\r
97  ./autogen.sh --prefix=~/mono/install\r
98 </pre>\r
99 \r
100  <p>Set your --prefix= to whatever your mono installation prefix is located.\r
101  This will take awhile to go through the ./autogen.sh and ./configure...\r
102 \r
103  <p>After that it finishes succesfully, you run make with the makefile.win32\r
104  like:\r
105 <pre>\r
106  make -f makefile.win32\r
107 </pre>\r
108 \r
109  <p>After that finishes succesfully, you can copy to your mono installation lib\r
110  path like:\r
111 <pre>\r
112  cp */*.dll ~/mono/install/lib\r
113 </pre>\r
114 </ul>\r
115 \r
116 <p>The pkg-config files for\r
117 gtk+ 2.0 and dependencies will need to be set correctly if they haven't\r
118 already been.\r
119 \r
120 <p>Look in your mono installation/lib/pkgconfig, such as,\r
121 <pre>\r
122 F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig\r
123 </pre>\r
124 \r
125 <p>You will find files like: gtk+-2.0.pc\r
126 \r
127 <p>Edit the line that says\r
128 \r
129 <pre>\r
130  prefix=something\r
131 </pre>\r
132 \r
133 <p>And set it to your mono installation prefix, such as,\r
134 \r
135 <pre>\r
136  prefix=F:/cygwin/home/DanielMorgan/mono/install\r
137 </pre>\r
138 \r
139 <p>Do this for all the .pc files in that directory.  If there are not any, then\r
140 you will need to create them.  Or get them from somewhere like the dev\r
141 packages at\r
142 <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a>\r
143 \r
144 ** GTK# On FreeBSD\r
145 \r
146  TODO.  Any volunteers?\r
147 \r
148 ** GTK# On Solaris\r
149 \r
150  TODO.  Any volunteers?\r
151 \r
152 ** GTK# On AIX\r
153 \r
154  TODO.  Any volunteers?\r