• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.latex2html-initH A D05-Apr-20201.4 KiB4838

DESIGNH A D05-Apr-202018.5 KiB487382

GNUmakefileH A D05-Apr-20206.6 KiB198103

GNUstep.7H A D05-Apr-20206.5 KiB190176

README.CygwinH A D05-Apr-20204.7 KiB192128

README.DarwinH A D05-Apr-202016.5 KiB480333

README.MinGWH A D05-Apr-202020.8 KiB770512

README.MinGWOnCygwinH A D05-Apr-20207.6 KiB206150

announce.texiH A D05-Apr-2020889 2718

debugapp.1H A D05-Apr-20201 KiB4540

end.texiH A D05-Apr-202010 32

gnustep-config.1H A D05-Apr-20202.2 KiB9284

gnustep-faq.texiH A D05-Apr-202028.5 KiB621479

gnustep-filesystem.texiH A D05-Apr-202037.1 KiB913715

gnustep-howto.texiH A D05-Apr-202017.7 KiB495383

gnustep-internals.texH A D05-Apr-20207.7 KiB199185

gnustep-machines.texiH A D05-Apr-202026.8 KiB868662

gnustep-make.texiH A D05-Apr-202069.6 KiB1,6411,381

gnustep-tests.1H A D05-Apr-20201.2 KiB5851

gnustep-userfaq.texiH A D05-Apr-202021.8 KiB519397

gnustep.initH A D05-Apr-2020879 2924

install.texiH A D05-Apr-202013.4 KiB385294

library-combo.7H A D05-Apr-20208.9 KiB224212

news.texiH A D05-Apr-202021 KiB599437

openapp.1H A D05-Apr-20202.9 KiB114102

opentool.1H A D05-Apr-20201,014 3731

readme.texiH A D05-Apr-20202.3 KiB6746

releasenotes.texiH A D05-Apr-202031.5 KiB702561

README.Cygwin

1Date:	17-Sep-2002 (tested under windows-xp)
2Author: Ildar Mulyukov <ildar@users.sourceforge.net>
3Update:	23-Oct-2004 (tested under windows-2000)
4Author: Adam Fedor <fedor@gnu.org>
5
6
7PURPOSE
8-------
9
10This document may be treated as just an appendix to GNUstep-HOWTO. You
11can find GNUstep-HOWTO link here:
12http://gnustep.org/experience/documentation.html
13
14This document is intended to provide a step by step instruction on how
15to get the GNUstep base library into a usable state on a recent windows
16operating system (XP, 2000, and probably NT) within Cygwin environment.
17
18Cygwin is unix-like environment working on top of Win32 (Windows, Windows
19NT/2k/XP). You can find complete information about it on the website
20http://cygwin.org
21
22For the moment GNUstep can be built with GUI support. (Native Win32
23GUI, not X11) The gui library is only partially ported to run under
24Win32 API so be warned.
25
26Several people have reported that GNUstep installation on Cygwin works
27fine, but as always, a slightly different Window's setup can cause
28unforseen problems. You should be relatively confident at working with
29Cygwin before attempting to install GNUstep.
30
31ADDITIONAL COMMENTS
32-------------------
33
34Note: These comments are just my experience. You don't need these to build
35GNUstep. If you don't understand something don't worry.
36
37Cygwin project is now in a very advanced stage. It's ready to be used by
38end-users and in commercial purposes and very convenient for programmers.
39
40Cygwin provides "General UNIX" environment and APIs. In fact
41GNUstep-base is compiled using Unix alternatives of classes (like
42NSConcreteUnixTask). But it has several particularities that must been
43taken into consideration. There is a very good documentation on Cygwin
44website on these questions. See e.g.
45http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html I would like to
46mention two of them:
47
481. Filesystem is case-insensitive. Now it's (luckily) supports
49soft-links. But case-insensitivity hinders quite a lot.
50
512. Dynamic libraries mechanism is not so good. (Windows DLL). It does
52not support several features (and this makes so hard to port some
53software e.g. licq) And it has those ugly __declspec(dllexport) /
54__declspec(dllimport) . But (Cygwin hackers are just cool!) in later
55releases of binutils ld is capable to link wrongly declared exports!
56This eliminates a lot of problems when dealing with DLLs (including
57objc.dll and gnustep-*.dll)
58
59PRELIMINARIES
60-------------
61
62Before you start, you need Cygwin in some programming-oriented
63configuration (full configuration is OK but it's VERY big
64now). Installation instructions are on Cygwin site.
65
66Cygwin already contains every package needed for GNUstep. The default
67installation, however, does not include every package needed. See the
68GNUstep-HOWTO lists all the packages you might need. A probably incomplete
69list is given below:
70
71For base (non-GUI):
72gcc-objc
73libxml2
74libxslt
75
76For GUI:
77X11 installation
78libtiff
79libtiff-devel
80libjpg
81libpng
82
83
84Obtaining GNUstep
85-----------------
86
87The main GNUstep project pages tell you how to get hold of this. You
88can get the latest release of the following libraries.
89
90You need these packages:
91
92GNUstep-make
93ffcall
94GNUstep-objc
95GNUstep-base
96
97GNUstep-gui
98GNUstep-back
99
100
101Building and installing libraries
102---------------------------------
103
104FFCALL: Unpack, configure, make, make install. See GNUstep-HOWTO for details.
105Note again: you can make package. See APPENDIX A
106
107
108Building and installing gnustep-make
109------------------------------------
110
111As ususal. e.g.
112
113./configure
114make
115make install
116
117
118Building and installing libobjc
119-------------------------------
120
121You need to install gnustep-objc as it properly exports symbols for
122DLLs and it's DLL.
123
124Unpack gnustep-objc, and type:
125
126  make install
127
128Note: do not use configure.
129
130
131Building and installing GNUstep-base
132------------------------------------
133
134Unpack gnustep-base, and type:
135
136  make install
137
138This should automatically run the configure script for you, build the
139base library and some tools, and install the whole lot.
140
141
142Building and installing GNUstep-gui
143-----------------------------------
144
145Unpack to gnustep-gui, and type:
146
147  make install
148
149
150Building and installing GNUstep-back
151------------------------------------
152
153In the back directory, type
154
155  make install
156
157
158
159Troubleshooting
160---------------
161
162APPENDIX A
163----------
164
165This is mkpkg.sh script for making packages from sources.
166
167#!/bin/bash
168# make a cygwin package
169#   launch this script in the building dir
170
171TMPDIR=/tmp/__TMP_$RANDOM
172FLIST=$TMPDIR/files.list
173
174rm -rf $TMPDIR
175mkdir $TMPDIR
176
177touch /usr/time.stamp
178make install
179
180pushd .
181cd /
182find usr ! -type d -newer /usr/time.stamp > $FLIST
183rm /usr/time.stamp
184
185# Don't forget to rename it to real package name
186tar cjf $TMPDIR/package.tar.bz2 `cat $FLIST`
187popd
188
189unset TMPDIR FLIST
190
191--- *** CUT *** ---
192

README.Darwin

1Date : 15-Jan-2004
2Last update: 20071229
3Authors: Adam Fedor <fedor@gnu.org>
4         Quentin Math� <qmathe@club-internet.fr>
5         Lars S.-Helldorf <lars.sonchocky-helldorf@hamburg.de>
6
7PURPOSE
8-------
9
10This document is intended to provide a step by step instruction on how to get
11the GNUstep installed on Mac OS X and Darwin.
12
13COMMONLY USED SYMBOLS
14---------------------
15
16<> denotes a variable depending on your preferences. To be replaced with the
17actual values from your system. For instance, if you installed GCC in /opt/local
18
19     ./configure CC=<gcc install dir>/bin/gcc
20
21will become:
22
23     ./configure CC=/opt/local/bin/gcc
24
25[] denotes an optional parameter. For instance:
26
27     ./configure [--enable-graphics=art]
28
29can be either:
30
31     ./configure
32
33or:
34
35     ./configure --enable-graphics=art
36
37PRELIMINAIRES
38-------------
39
40For all targets, get the following software. I'd recommend installing
41Fink (and FinkCommander on Mac OS X) or MacPorts to get all this
42software. Make sure that Fink or MacPorts is in your path; newer
43versions do a good job of doing this for you. It's quite possible for
44libraries installed via Fink/Macports to conflict with Apple
45libraries, which cause strange errors running GNUstep apps (like odd
46crashes and seg faults).  In that cause you might want to hand-compile
47the libraries you need (only the tiff and libffi libraries are REALLY needed,
48everything else is basically optional).
49
50Remember you usually need root access to install software. That means when you
51see an instruction like 'make install', you usually need to use sudo
52('sudo make install') or be logged in as root (not recommended).
53
54     libxml2  (Optional, highly recommended, already in
55               Mac OS X 10.3 / Darwin 7 and later)
56     libxslt  (Optional)
57     libtiff  (Required)
58     libjpeg  (Optional, highly recommended - don't get from fink!)
59     libpng   (Optional, highly recommended)
60
61     libffi   (Required, from ftp.gnustep.org/pub/gnustep/libs)
62     ffcall   (On Darwin x86 - use instead of libffi)
63
64     Xfree86  (Required, already in Mac OS X 10.3/Darwin 7 and later)
65
66     libart2   (Required for art backend)
67     freetype2 (Required for art backend)
68
69     dlcompat (Required, already in Mac OS X 10.3 or later)
70
71Obtaining GNUstep
72-----------------
73
74The main GNUstep project pages tell you how to get hold of this. You
75can get the latest release of the following libraries.  You need these
76gnustep packages:
77
78     GNUstep-make
79     GNUstep-base
80     GNUstep-gui
81     GNUstep-back
82
83Targets
84-------
85
86For GNUstep, there are several combinations of Objective-C runtime, Foundation
87library and Application Kit library possible, called library combos. The usual
88notation is:
89
90     objcruntime-foundation-applicationkit
91
92Theoretically possible are:
93
94     gnu-gnu-gnu       # gnu-objc runtime with gnustep-base and gnustep-gui.
95                       # Most widely tested.
96     apple-gnu-gnu     # apple-objc runtime with gnustep libraries. Does
97                       # not work.
98     apple-apple-gnu   # Apple Foundation with gnustep-gui on the top. Only of
99                       # academic interest.
100     apple-apple-apple # Cocoa with GNUstep additions. For porting GNUstep apps
101                       # to Cocoa.
102
103All gnu-*-apple library combos are purely theoretical and only available to the
104folks inside Apple since no mortal person ever saw the Cocoa source code. ;-)
105You can use either the Apple compiler or compile your own FSF compiler. This
106potentially gives two different targets:
107
108     Apple GCC, gnu-gnu-gnu
109     FSF   GCC, gnu-gnu-gnu
110
111In addition, if you are on Mac OS X, you can also use the Apple
112Foundation and AppKit frameworks to do GNUstep development with Cocoa,
113but this only works with the Apple compiler:
114
115     Apple GCC, apple-apple-apple
116
117GNUstep on Darwin x86
118---------------------
119
120For GNUstep on Darwin x86, Apple GCC compiles GNUstep-base, but causes strange
121problems when running programs (e.g. the program hangs while allocating memory
122or executes methods multiple times). So we have to use FSF GCC.  Additionally,
123libffi has not been ported to Darwin x86, so you will need to install ffcall
124instead. NOTE: Has not been tested in a long time...
125
126GNUstep on Darwin PowerPC
127-------------------------
128
129You can use either the Apple compiler of the FSF compiler. For the Apple
130compiler, you need at least Mac OS X 10.4 with XCode 2.5 release.
131
132Building FSF-GCC
133----------------
134
135The easiest way to get FSF GCC is through Fink or MacPorts. If you
136would like to compile by hand, follow these directions:
137
138Darwin x86:
139
140FSF GCC is difficult to compile here. The only way I could do it was like this:
141
142     ln -s /usr/bin/c++filt /usr/bin/c++filt3          # Missing on Darwin 7.0.1
143                                                       # x86 but not necessary
144                                                       # on OpenDarwin 7.2.1
145
146and then configure GCC with:
147
148     mkdir build                                       # Create a sibling to the
149                                                       # toplevel source dir
150     cd build
151     <dir>/gcc-X.X.X/configure \                       # Don't try to build c++
152      --enable-languages=c,objc
153
154     make bootstrap
155     make install
156     cd /usr/local/lib
157     ln -s libobjc.a libobjc.dylib                     # So the linker sees us
158
159(Replace X.X.X with the actual distribution you have).
160
161GCC on Darwin doesn't appear to support threads.
162
163Darwin PowerPC:
164
165Configure and build as follows (tested using gcc-3.3.2 on Mac OS X 10.2 and
16610.3):
167
168     mkdir build
169     cd build
170     <dir>/gcc-x.x.x/configure \                       # The first option
171     [--prefix=<gcc install dir>] \                    # permits to change the
172     [--enable-languages=c,objc]                       # fact GCC installs by
173                                                       # default in /usr/local
174                                                       # The second option
175                                                       # permits to speed the
176                                                       # GCC compilation in the
177                                                       # case you will not use
178                                                       # languages other than c
179                                                       # and objc
180
181     make bootstrap
182     make install
183     cd <gcc install dir>/lib
184     ln -s libobjc.a libobjc.dylib                     # So the linker sees us
185     # Note when using gcc 4 or greater, make sure this is libobjc-gnu.dylib
186
187Setting up the GNUstep make environment
188---------------------------------------
189
190In the GNUstep-make (core/make) package, do with bourne shell like bash
191(Mac OS X 10.3):
192
193     echo 'export CC=<gcc install dir>/bin/gcc' >> ~/.profile
194
195with c shell like tcsh (Mac OS X 10.2):
196
197     echo 'setenv CC <gcc install dir>/bin/gcc' >> ~/.tcshrc
198
199else use [CC=<gcc install dir>/bin/gcc] option when running configure.
200
201then:
202
203     ./configure --with-library-combo=gnu-gnu-gnu \
204     [--prefix=<GNUstep install dir>] [CC=<gcc install dir>/bin/gcc]
205
206(apple-apple-apple is the default if you don't specify
207gnu-gnu-gnu). If you want to be able to compile for different
208targets/platforms together. Do this:
209
210     ./configure --with-library-combo=gnu-gnu-gnu --disable-flattened \
211     --enable-multi-platform [--prefix=<GNUstep install dir>] \
212     [CC=<gcc install dir>/bin/gcc]
213
214Now:
215
216     make
217     make install
218
219Source GNUstep.sh
220-----------------
221
222If you are using bourne shell like bash, type:
223
224     . <GNUstep install dir>/System/Library/Makefiles/GNUstep.sh
225
226If you are using c shell like tcsh, type:
227
228     source <GNUstep install dir>/System/Library/Makefiles/GNUstep.csh
229
230Building and installing libobjc (target Apple GCC, gnu-gnu-gnu only !!!)
231-------------------------------
232
233Warning ! Don't compile libobjc if you are using FSF GCC.  Go to gnustep-objc
234(or from CVS, into dev-libs/libobjc), and type:
235
236     make install
237     cd $GNUSTEP_SYSTEM_ROOT/Library/Libraries
238     ln -s libobjc.dylib libobjc-gnu.dylib
239
240This should build and install the GNU Objective-C runtime and headers for you.
241
242Building and installing libffi (on Darwin PowerPC only !!!)
243------------------------------
244
245There's no official libffi release. Get the one from the GNUstep ftp site
246
247     ./configure --prefix=$GNUSTEP_SYSTEM_ROOT \
248     --libdir=$GNUSTEP_SYSTEM_ROOT/Library/Libraries \
249     --includedir=$GNUSTEP_SYSTEM_ROOT/Library/Headers
250     make
251     make install
252
253Building and installing ffcall (on Darwin x86 only (may work on PPC))
254------------------------------
255
256     ./configure --prefix=$GNUSTEP_SYSTEM_ROOT \
257     --libdir=$GNUSTEP_SYSTEM_ROOT/Library/Libraries \
258     --includedir=$GNUSTEP_SYSTEM_ROOT/Library/Headers
259     make
260     make install
261
262Building and installing GNUstep-base
263------------------------------------
264
265     ./configure [--with-xml-prefix=/usr] [--disable-xmltest] [--disable-do] \
266     [LDFLAGS=-L/sw/lib] [CPPFLAGS=-I/sw/include] [CC=<gcc install dir>/bin/gcc] \
267     [CPPFLAGS=-fnested-functions]
268
269To know which options you need to use with your environment:
270
271     --disable-xmltest is needed with Mac OS X 10.3 / Darwin 7
272     versions xml2-config tool and libxml2 headers reports differents versions,
273     because of this versions conflict the GNUstep xmltest fails.
274
275     --with-xml-prefix=/usr is needed with Mac OS X 10.3 / Darwin 7 when you
276     want to build the base library with xslt support and you have installed
277     libxslt with Fink (because Fink installs lixml2 without the headers when
278     you install lixslt, and by default the base library tries to link Fink
279     libxml2 first, then the configuration fails because configure looks for
280     the libxml2 headers).
281
282     --disable-do is needed when you decide to not build libffi or ffcall. You
283     probably do not want to do this.
284
285     LDFLAGS=-L/sw/lib is needed when you installed libxslt with Fink and you
286     want to compile the base library with libxslt support.
287
288     CPPFLAGS=-I/sw/include is needed when you installed libxslt with Fink and
289     you want to compile the base library with libxslt support.
290
291     CPPFLAGS=-fnested-functions is required when using Apple gcc
292
293followed by:
294
295     make
296     make install
297
298On the apple-apple-apple target, it will only build the GNUstep additions
299library that adds extra stuff to Foundation. If you are using the
300apple-apple-apple target, there currently is no reason to go on and compile
301GNUstep-gui.
302
303Building and installing GNUstep-gui
304-----------------------------------
305
306Go to GNUstep-gui (or from CVS into the core/gui directory).
307
308     ./configure --disable-gsnd
309
310followed by:
311
312     make
313     make install
314
315Note: The gsnd server hasn't been ported to Mac OS X / Darwin yet.
316
317Some other configure options:
318    --with-jpeg-library=<jpeg libdir>
319    --with-jpeg-include=<jpeg include dir>
320      to have the libjpeg detected.
321    --disable-jpeg
322
323Building and installing GNUstep-back
324------------------------------------
325
326Warning !  You must have installed X11User.pkg from the Panther
327install disc and also X11SDK.pkg from the xCode Tools install disc to
328be able to compile GNUstep-back under Mac OS X 10.3.
329
330If you aren't installing GNUstep under Mac OS X 10.3 / Darwin 7, you can use
331XDarwin (ftp://ftp.xfree86.org/pub/XFree86/4.3.0/binaries/Darwin-ppc-6.x/) for
332the X server, take a look at http://www.xdarwin.org
333
334In the back directory, type:
335
336     ./configure
337     make
338     make install
339
340In the case, you choose to use the art backend, you will need to have the
341freetype2 and libart2 libraries installed, first be sure to have libart2 in your
342path, for example, with Fink installation type:
343
344     export DYLD_LIBRARY_PATH=/sw/lib:$DYLD_LIBRARY_PATH
345
346NOTE: I found also that even though the X11SDK.pkg package has freetype2,
347it is missing a crucial include file and also has some undefined symbols. I
348had to install the freetype2-dev package from fink and add this to my path
349so that it could be found:
350PATH=/sw/lib/freetype/bin:$PATH
351make sure in config.make that -L/sw/lib/freetype2/lib is included before -L/usr/X11R6/lib (Adam Fedor <fedor@gnu.org>) Mac OS X 10.4 doesn't have this problem.
352
353You also need to have /sw/lib in your library path before running GNUstep apps
354with the art backend, as it needs to find libart2, so put the above export
355DYLD_LIBRARY_PATH somewhere in your .profile (or do the export before launching
356an application). The backend architecture which GNUstep-gui is built upon, has
357been written to be used within X Windows, then you need to start up an X Server
358(like Apple X11) to run the GNUstep-gui applications.
359
360Warning ! With the art backend, before to launch applications based on
361GNUstep-gui, in the shell, don't forget to edit the defaults (no need it to redo
362it later):
363
364     defaults write NSGlobalDomain XWindowBufferUseXShm NO
365
366because Apple X11 doesn't support well shared memory for buffering (which
367libart2 uses by default).
368
369POTENTIAL ERRORS WHEN RUNNING MAKE ESPECIALLY WITH BACK AND GUI
370---------------------------------------------------------------
371
372If you get errors like below, just do:
373
374     make clean
375     make
376
377The second or the third time, the errors should disappear. It's probably due to
378some potential issues between FSF GCC and the libtool/ld Mac OS X / Darwin
379versions.
380
381     Linking subproject x11 ...
382     /usr/bin/ld: shared_obj/xdnd.o bad magic number (not a Mach-O file)
383     collect2: ld returned 1 exit status
384     make[3]: *** [shared_obj/subproject.o] Error 1
385     make[2]: *** [x11.all.subproject.variables] Error 2
386     make[1]: *** [libgnustep-back.all.bundle.variables] Error 2
387     make: *** [internal-all] Error 2
388
389More informations on the art backend
390------------------------------------
391
392To have a working art backend... You will also need to download and install
393fonts, as it uses a specific font format. Use for example the file
394http://w1.423.telia.com/~u42308495/alex/backart/ArtResources-0.1.2.tar.bz2 and
395put the .nfont directories somewhere in $(GNUSTEP_SYSTEM_ROOT)/Library/Fonts
396
397Other fonts are available on http://www.knuddel.org/Downloads/Fonts/
398
399Window Maker
400------------
401
402Window Maker is the traditional window manager for GNUstep.
403
404In the case you choose to use it, don't forget to execute wmaker.inst else
405Window Maker will crash with signal 10.
406
407Example with Fink, do:
408
409     /sw/bin/wmaker.inst
410
411GNUstep daemons
412---------------
413
414Refer to GNUstep-HOWTO to know how to launch GNUstep daemons.
415
416Note: If you try to start GNUstep daemons by hand with 'sudo opentool dameon',
417it won't work, because when you become root on Mac OS X / Darwin with sudo or
418su, the DYLD_LIBRARY_PATH environment variable of your user isn't used, then to
419start them in the shell, do:
420
421     sudo opentool gdomap                              # gdomap doesn't rely on
422                                                       # the GNUstep libraries
423                                                       # or other special
424                                                       # librairies.
425     su root
426
427then with bourne shell like bash (Mac OS X 10.3):
428
429     . $GNUSTEP_SYSTEM_ROOT/Library/Makesfiles/GNUstep.sh
430
431or with c shell like tcsh (Mac OS X 10.2):
432
433     source $GNUSTEP_SYSTEM_ROOT/Library/Makesfiles/GNUstep.csh
434
435and just do:
436
437     opentool gdnc
438     opentool gpbs
439
440GNUstep applications
441--------------------
442
443Now you can install GNUstep applications like Gorm, ProjectCenter etc.
444Remember the fact that when you do 'sudo make install', the $DYLD_LIBRARY_PATH
445variable of your user is not used by root. In that case, GNUstep-make could
446complain for the undefined library path, the solution is identical to the one we
447used to launch the GNUstep daemons above:
448
449     su root
450
451then with bourne shell like bash (Mac OS X 10.3):
452
453     . $GNUSTEP_SYSTEM_ROOT/Library/MakeFiles/GNUstep.sh
454
455or with c shell like tcsh (Mac OS X 10.2):
456
457     . $GNUSTEP_SYSTEM_ROOT/Library/MakeFiles/GNUstep.sh
458
459and just do:
460
461     make install
462
463Note: upon launching applications like Project Center which links a framework,
464you will probably get an error message about the library
465<Framework name>.framework/<Framework name> which cannot be found, to fix that,
466just create a symbolic link to the actual library file, which is installed
467deeper in the hierarchy:
468
469     cd $GNUSTEP_SYSTEM_ROOT/Library/Frameworks/<Framework name>.framework
470     sudo ln -s Versions/<Current version>/lib<Framework name>.dylib <Framework name>
471
472Example with the ProjectCenter framework (0.4.0 version):
473
474     cd $GNUSTEP_SYSTEM_ROOT/Library/Frameworks/ProjectCenter.framework
475     sudo ln -s Versions/0.4.0/libProjectCenter.dylib.0.4.0 ProjectCenter
476
477---
478
479That's all.
480

README.MinGW

1Date:	28-Feb-2007
2Update: 19-Feb-2015
3Author: Nicola Pero <nicola.pero@meta-innovation.com>
4        after Richard Frith-Macdonald <rfm@gnu.org>,
5	Germán Arias <germanandre@gmx.es> and others.
6
7
8PURPOSE
9-------
10
11This document is intended to provide a step by step instruction on how
12to use GNUstep on recent Windows operating systems.
13
14It will get as far as explaining how to build a GNUstep application
15and create a standalone version that can be shipped standalone to
16Windows end users.
17
18The recommended way to get GNUstep working on Windows is to use MinGW
19and MSYS to get a Unix-like environment where you can easily build
20your GNUstep software (this is what is described in this file).
21
22Software built in the MinGW/MSYS environment is native Windows
23software that you can then run without having to rely on the environment
24you used to build.
25
26So, this document is divided in two parts.
27
28In the first part ("STEP BY STEP INSTALLATION INSTRUCTIONS"), we will
29describe how to get MinGW/MSYS up and running, and how to build
30GNUstep software in this environment.
31
32In the second part ("HOW TO SHIP YOUR GNUSTEP APPLICATION TO WINDOWS
33USERS"), we'll show an example of how to package (and use) the .exes,
34.dlls and resources (that you can build using the environment
35described in the first part) as Windows standalone binaries.
36
37
38INTRODUCTION TO MINGW
39---------------------
40
41MinGW is a collection of header files and import libraries that allow
42one to use GCC and produce native Windows32 programs that do not rely
43on any 3rd-party DLLs.
44
45MSYS is a very much cut down version of the Cygwin environment ...
46providing a minimal set of tools needed to build programs using
47MingGW.  If you wish to build for MinGW by cross-compiling from a
48Cygwin environment, please read README.Cygwin instead.
49
50
51PRELIMINARIES
52-------------
53
54One way to vastly simplify installing GNUstep, is to use the Windows-based
55GNUstep installer. Get it from:
56
57http://www.gnustep.org/windows/installer.html
58
59If you have already installed this, you can skip to the end and just
60start compiling and packaging applications!  Although you may want to
61read the rest of the instructions for other helpful information.
62
63
64
65A. STEP BY STEP INSTALLATION INSTRUCTIONS
66-----------------------------------------
67
681. Install MinGW
69================
70
71Download MinGW-Get-Setup.exe from
72
73 http://sourceforge.net/projects/mingw/files/Installer/
74
75Then start it up. Set the installation path to
76
77C:\xxx\
78
79Where \xxx\ is the top-level path you want to use, I use Nicola/GNUstep so
80I install it into C:\Nicola\GNUstep\. We will refer to this path as MINGWPATH.
81
82
832. Install necessary packages
84=============================
85
86MinGW create an access on the desktop to the "MinGW installer", a package
87manager you can use to install packages available to MinGW. To build GNUstep
88you will need many packages.
89
90At MinGW Installer select "All packages" and then install the following
91packages (bin and dev packages when correspond):
92
93(I'm really not sure if all them are necessary)
94
95mingw32-autoconf
96mingw32-binutils
97mingw32-bzip2
98mingw32-gcc
99mingw32-gcc-g++
100mingw32-gcc-objc
101mingw32-gdb
102mingw32-gmp
103mingw32-libbz2
104mingw32-libgmp
105mingw32-libiconv
106mingw32-libintl
107mingw32-libpthread-old
108mingw32-libpthreadgc
109mingw32-libtool
110mingw32-libunistring
111mingw32-libz
112mingw32-make
113mingw32-pkginfo
114mingw32-pthreads-w32
115mingw32-w32api
116msys-base
117msys-bash
118msys-console
119msys-crypt
120msys-diffutils
121msys-libcrypt
122msys-libgmp
123msys-libiconv
124msys-libminires
125msys-m4
126msys-minires
127msys-zlib
128
129
1303. Additional Useful Tools
131==========================
132
133You will need install GNUstep from Subversion, so you need a Subversion
134client. I used:
135
136http://www.sliksvn.com/pub/Slik-Subversion-1.6.9-win32.msi
137
138and then install subversion in a random directory.
139
140
141You will need and editor, for example Emacs. Get a Windows version for
142MinGW from:
143
144https://www.gnu.org/software/emacs/
145
146To install it, simply unpack it in your MINGWPATH, you can now
147execute the binary in 'MINGWPATH/bin'.
148
149
1503. Additional Windows steps
151===========================
152
153You may need to edit /MINGWPATH/include/winsock2.h to change the size of the
154sa_data field in the sockaddr structure from 14 to 22 ... this is because
155some versions of Windows have changed the layout of this structure.
156This modification may be needed to be able to correctly determine the
157network interface details for your machine.
158
159
160On Windows Vista and later, an additional problem has been reported
161where 'make install' would sometimes fail because of permission
162problems.  The problem is discussed here --
163
164http://lists.gnu.org/archive/html/gnustep-dev/2010-06/msg00055.html
165
166you may have to install the additional MinGW files, as explained
167there.
168
169
1704. Mount your MINGWPATH directory
171=================================
172
173With Emacs create a file called "fstab" in C:\MINGWPATH\msys\x.x\etc and add
174a line like:
175
176  C:\MINGWPATH  /mingw
177
178Remember MINGWPATH is the path where you installed mingw (We assume you
179install it at your C: drive, if not change it). "mingw" is the name to
180refer to your MINGWPATH directory inside MSYS console, you can use any other
181name, but remember it because we will need this later. We will refer to this
182name as MOUNTDIR.
183
184
1855. Launch the MSYS console
186==========================
187
188Launch the console at C:\MINGWPATH\msys\x.x\msys.bat (double click).
189
190
1916. Installing gnustep-make
192==========================
193
194Get gnustep-make:
195
196svn co http://svn.gna.org/svn/gnustep/tools/make/trunk make
197
198Then install it (avoid warning about conftest.exe):
199
200cd make
201./configure
202make
203make install
204
205
2067. Special recommendation
207=========================
208
209In next steps don't use "make -j", because can cause problems.
210
211
2128. Installing libffi
213====================
214
215Download libffi-x.x.x.tar.gz from https://sourceware.org/libffi/.
216Unpack it, compile and install:
217
218cd libffi-x.x.x
219./configure --prefix=/MOUNTDIR
220make
221make install
222mv /MOUNTDIR/lib/libffi-x.x.x/include/* /MOUNTDIR/include/
223
224(if you get a popup about contest.exe failing, just ignore it)
225NB. The headers have to be moved manually because the package won't install
226them in the right place.
227
228
2299. Install ICU
230==============
231
232Download latest ICU from http://site.icu-project.org/ (zip package).
233Unpack it, compile and install as fallow:
234
235cd icu/source
236./runConfigureICU --disable-release MinGW --prefix=/MOUNTDIR
237make
238make install
239
240
24110. Install GNUtls
242==================
243
244Download the latest version from the official page (windows binary). Copy
245this at your MINGWPATH directory and unpack it.
246
247
24811. Install pkg-config
249======================
250
251The best option is install pkg-config lite from:
252
253http://sourceforge.net/projects/pkgconfiglite/files/
254
255Download latest version, unpack it an copy the files at corresponding
256directories in your MINGWPATH directory.
257
258
25912. Install xml2
260================
261
262There are available binary packages of xml, but all these don't provide an
263m4 file to be used with pkg-config. And since gnustep-base use pkg-config to
264detect xml we need install it from source. So download the latest version
265from http://xmlsoft.org/ and install it:
266
267cd libxml2-x.x.x
268./configure --prefix=/MOUNTDIR
269make
270make install
271
272
27313. Fix problem with mingwrt
274============================
275
276(I you are using mingw32-mingwrt-3.21.1 or above skip this step.
277Run MinGW Installer to see what version are you using.)
278
279Launch Emacs and open the file /MINGWPATH/include/unistd.h
280
281And comment the line 95 (#include <parts/time.h>) and all the function
282nanosleep (from line 104 to 117). Save the file.
283
284
28514. Source GNUstep.sh
286=====================
287
288Probably you will need source the GNUstep script:
289
290. /local/share/GNUstep/Makefiles/GNUstep.sh
291
292
29315. Install gnnustep-base
294=========================
295
296Get gnustep-base:
297
298svn co http://svn.gna.org/svn/gnustep/libs/base/trunk base
299
300Then compile and install it:
301
302cd base
303./configure
304make
305make install
306
307
30816. Install jpeg
309================
310
311Download the latest version from http://ijg.org/. Then compile and install it
312as fallow:
313
314cd jpeg-xx
315autoheader
316./configure --prefix=/MOUNTDIR
317make
318make install
319
320
32117. Install libtiff
322===================
323
324Download latest version from http://www.libtiff.org/. Then compile and
325install it:
326
327cd tiff-x.x.x
328./configure --prefix=/MOUNTDIR
329make
330make install
331
332
33318. Install libpng
334==================
335
336Download latest version from http://libpng.org/pub/png/libpng.html.
337Then compile and install it:
338
339cd lpngXXX
340cp scripts/pnglibconf.h.prebuild pnglibconf.h
341cp scripts/makefile.msys makefile
342
343Launch Emacs and edit the makefile to set prefix as "prefix=/MOUNTDIR", then:
344
345make
346make install
347
348
34919. Install libungif
350====================
351
352From http://gnuwin32.sourceforge.net/ download
353
354  libungif-4.1.4-1.exe
355
356Execute it and install the package into your MINGWPATH directory.
357
358
35920. Install libao
360=================
361
362Download libao from http://xiph.org/ao/. And install it:
363
364cd libao-x.x.x
365./cofigure --prefix=/MOUNTDIR
366make
367make install
368
369
37021. Install Aspell
371==================
372
373Download the windows port http://aspell.net/win32/. And
374install it in your MINGWPATH directory (directly in your MINGWPATH directory,
375not under the Aspell directory).
376
377Download also the dev package, unpack it and copy the libraries and headers
378to the corresponding directories at your MINWGPATH directory.
379
380Download also the installers for the dictionaries you want use, extract and
381install them into your MINGWPATH directory (directly in your MINGWPATH
382directory, not under the Aspell directory).
383
384Now you need change the name of some libraries, go to directory MINGWPATH/lib
385and change the name of these files:
386
387aspell-15.def   ---->  aspell.def
388aspell-15.lib   ---->  aspell.lib
389libaspell-15-dll.lib  ---->  libaspell-dll.lib
390
391
39222. Add path to icu libraries
393=============================
394
395FIXME: Why this is needed?
396
397Edit the file /MINGWPATH/msys/etc/profile and add the path to ICU libs:
398
399export PATH=$PATH:/MOUNTDIR/lib
400
401
40223. Install gnustep-gui
403=======================
404
405Get gnustep-gui:
406
407svn co http://svn.gna.org/svn/gnustep/libs/gui/trunk gui
408
409Then compile and install it:
410
411cd gui
412./configure
413make
414make install
415
416
41724. Install gnustep-back
418========================
419
420Get gnustep-back:
421
422svn co http://svn.gna.org/svn/gnustep/libs/back/trunk back
423
424Then compile and install it:
425
426cd back
427./configure
428make
429make install
430
431
43225. Install gnustep-back with cairo graphics (optional but highly recommended)
433==============================================================================
434
435Download fallowing packages:
436
437http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.10.2-2_win32.zip
438http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.10.2-2_win32.zip
439http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.3-1_win32.zip
440http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.2-1_win32.zip
441http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype-dev_2.4.2-1_win32.zip
442http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip
443http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig-dev_2.8.0-2_win32.zip
444
445
446Copy these packages at your MINGWPATH directory and unpack them. Now move some
447headers:
448
449mv /MOUNTDIR/include/cairo/* /MOUNTDIR/include/
450mv /MOUNTDIR/include/freetype2/freetype/ /MOUNTDIR/include/
451
452Now we need recompile gnustep-back to use cairo backend:
453
454cd back
455make distclean
456./configure --enable-graphics=cairo --with-name=cairo LIBS=-lcairo
457make
458make install
459
460Now set defaults to use this backend:
461
462defaults write NSGlobalDomain GSBackend cairo
463
464
46526. Install WinUXTheme (optional)
466=================================
467
468Get WinUXTheme:
469
470svn co http://svn.gna.org/svn/gnustep/plugins/themes/WinUXTheme/ winuxtheme
471
472Then compile and install it:
473
474cd winuxtheme
475make
476make install
477
478Set it:
479
480defaults write NSGlobalDomain GSTheme WinUXTheme
481
482
48327. Source the gnustep script when launch the console
484=====================================================
485
486Edit the file /MINGWPATH/msys/etc/x.x/profile and add this line to source the
487gnustep script:
488
489. /local/share/GNUstep/Makefiles/GNUstep.sh
490
491
49228. Set up the spell chequer service
493====================================
494
495The spell chequer service need be configured. So we need launch it once
496to configure it. Run the command:
497
498/local/lib/GNUstep/Services/GSspell.service/GSspell.exe
499
500
50129. Testing your gui installation
502=================================
503
504Get the examples:
505
506svn co http://svn.gna.org/svn/gnustep/tests/examples/trunk/ examples
507
508Go in a simple gui application (examples/gui a very good starting
509point), compile and run it. :-). Ink and PowerPaint should work fine
510on Windows, test these.
511
512Additionally, you might want to compile and run Gorm or other GNUstep
513applications.  Gorm (and hopefully other GNUstep applications too)
514should compile and run out of the box.
515
516
517Troubleshooting
518---------------
519
520Issues with updating:
521Before attempting to update your GNUstep installation, be sure to stop/kill
522all running GNUstep programs or services (i.e. gdomap, gdnc, gpbs) since
523Windows cannot overwrite files that are currently in use.
524
525Where we specify specific versions of packages to be used, we have
526tested with those versions - later or earlier versions may work, but
527may well not.  Generally earlier versions should be assumed not to
528work.
529
530
531
532B. HOW TO SHIP YOUR GNUSTEP APPLICATION TO WINDOWS USERS
533--------------------------------------------------------
534
535You probably want to ship your Windows application as a standalone
536.zip file that Windows users can easily download and use.
537
538We will explain what to do with an example: that of packaging
539Gomoku.app.  We will first build the application (creating
540Gomoku.app), then we'll add to to it all the GNUstep DLLs and
541resources that are needed to run the application, and we'll end up
542with a single directory, Gomoku.app, that contains a program
543(Gomoku.exe) and a bunch of DLLs and various other resources required
544to run the program.
545
546The end user just needs to get this directory (from a .zip or .tgz
547file, for example) and can double-click on Gomoku.exe to start the
548program (no GNUstep installation required).
549
550
5511. Build the application
552========================
553
554Build your application (Gomoku.app in this example) in your
555MinGW/GNUstep environment.  Generally, this means getting the source
556code and typing 'make' in it.  If you're trying to follow the
557Gomoku.app example, the source code is here:
558
559http://www.gnustep.it/nicola/Applications/Gomoku/index.html
560
561Once you have built it, make sure you can run your application from
562within mingw by using 'openapp', as in 'openapp ./Gomoku.app'.
563
5642. Copy your application somewhere
565==================================
566
567Now take your built application and copy it somewhere -- we'll be
568working on it!  Eg, I just copy it in my home directory.
569
570cp -R /home/Nico/Gomoku-1.2.8/Gomoku.app /home/Nico/
571
572
5733. Copy DLLs into your application
574==================================
575
576Now search for MinGW/GNUstep DLL files in /MOUNTDIR/bin, /MOUNTDIR/lib and
577/local/bin, and copy them all into Gomoku.app:
578
579cp $(find /MOUNTDIR/bin -name *.dll) /home/Nico/Gomoku.app/
580cp $(find /MOUNTDIR/lib -name *.dll) /home/Nico/Gomoku.app/
581cp $(find /local/bin -name *.dll) /home/Nico/Gomoku.app/
582
583
5844. Copy config files into your application
585==========================================
586
587Now copy the "etc" directory in /MOUNTDIR to Gomoku.app:
588
589cp -R /MOUNTDIR/etc /home/Nico/Gomoku.app/
590
591
5925. Copy your GNUstep Library folder
593===================================
594
595Now copy all of the GNUstep resources into the application --
596
597mkdir -p /home/Nicola/Gomoku.app/GNUstep/
598cp -R /local/lib/GNUstep/* /home/Nico/Gomoku.app/GNUstep/
599
600I put them all into Gomoku.app/GNUstep/, which means that later on
601I'll set up the GNUstep.conf file to map GNUSTEP_*_LIBRARY to that
602directory.
603
604
6056. Copy key GNUstep binary programs
606===================================
607
608cp /local/bin/gpbs.exe /home/Nicola/Gomoku.app
609cp /local/bin/gdnc.exe /home/Nicola/Gomoku.app
610cp /local/bin/gdomap.exe /home/Nicola/Gomoku.app
611cp /local/bin/make_services.exe /home/Nicola/Gomoku.app
612cp /local/bin/defaults.exe /home/Nicola/Gomoku.app
613
614I put them all into Gomoku.app, which means that later
615on I'll set up the GNUstep.conf file to map GNUSTEP_*_TOOLS to that
616directory.
617
618
6197. Add a GNUstep.conf
620=====================
621
622You need to add a Gomoku.app/GNUstep.conf file to tell gnustep-base
623where to find things inside Gomoku.app -- here is the one I use (which
624matches the locations where I copied things in the previous steps) --
625
626GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
627GNUSTEP_USER_DIR=GNUstep
628GNUSTEP_USER_DEFAULTS_DIR=GNUstep/Defaults
629
630GNUSTEP_SYSTEM_APPS=./GNUstep/Apps
631GNUSTEP_SYSTEM_ADMIN_APPS=./GNUstep/Apps
632GNUSTEP_SYSTEM_TOOLS=./
633GNUSTEP_SYSTEM_ADMIN_TOOLS=./
634GNUSTEP_SYSTEM_LIBRARY=./GNUstep
635GNUSTEP_SYSTEM_HEADERS=./GNUstep/Headers
636GNUSTEP_SYSTEM_LIBRARIES=./GNUstep/Libraries
637GNUSTEP_SYSTEM_DOC=./GNUstep/Documentation
638GNUSTEP_SYSTEM_DOC_MAN=./GNUstep/Documentation/man
639GNUSTEP_SYSTEM_DOC_INFO=./GNUstep/Documentation/info
640
641GNUSTEP_NETWORK_APPS=./GNUstep/Apps
642GNUSTEP_NETWORK_ADMIN_APPS=./GNUstep/Apps
643GNUSTEP_NETWORK_TOOLS=./
644GNUSTEP_NETWORK_ADMIN_TOOLS=./
645GNUSTEP_NETWORK_LIBRARY=./GNUstep
646GNUSTEP_NETWORK_HEADERS=./GNUstep/Headers
647GNUSTEP_NETWORK_LIBRARIES=./GNUstep/Libraries
648GNUSTEP_NETWORK_DOC=./GNUstep/Documentation
649GNUSTEP_NETWORK_DOC_MAN=./GNUstep/Documentation/man
650GNUSTEP_NETWORK_DOC_INFO=./GNUstep/Documentation/info
651
652GNUSTEP_LOCAL_APPS=./GNUstep/Apps
653GNUSTEP_LOCAL_ADMIN_APPS=./GNUstep/Apps
654GNUSTEP_LOCAL_TOOLS=./
655GNUSTEP_LOCAL_ADMIN_TOOLS=./
656GNUSTEP_LOCAL_LIBRARY=./GNUstep
657GNUSTEP_LOCAL_HEADERS=./GNUstep/Headers
658GNUSTEP_LOCAL_LIBRARIES=./GNUstep/Libraries
659GNUSTEP_LOCAL_DOC=./GNUstep/Documentation
660GNUSTEP_LOCAL_DOC_MAN=./GNUstep/Documentation/man
661GNUSTEP_LOCAL_DOC_INFO=./GNUstep/Documentation/info
662
663So, just copy and paste this code into a GNUstep.conf file that you
664put into /home/Nico/Gomoku.app/GNUstep.conf.
665
666
6678. Add a GlobalDefaults.plist
668=============================
669
670You need to add a Gomoku.app/GlobalDefaults.plist file to tell GNUstep
671the defaults you want use (the theme, backend, etc.), and save this file
672with write/read permission only for the owner (chmod 600). For example:
673
674<?xml version="1.0" encoding="UTF-8"?>
675<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">
676<plist version="0.9">
677  <dict>
678	<key>GSTheme</key>
679	<string>WinUXTheme</string>
680	<key>GSBackend</key>
681	<string>cairo</string>
682  </dict>
683</plist>
684
685
6868. Now the application should be working
687========================================
688
689At this stage, everything should be working "standalone".
690
691By that we mean that if you give your Gomoku.app/ to a Windows user
692(with no GNUstep installed on their machine), they should be able to
693run it by just double-clicking on the Gomoku executable inside of the
694Gomoku.app/ directory! :-)
695
696Try it out and make sure that it works.
697
698
6999. Cleanup
700==========
701
702If you look at your Gomoku.app/ directory, you will see that it is
703really big.  We mass-copied stuff from the GNUstep/MinGW directories;
704but generally, you want to make sure you remove anything that you
705don't strictly need.  So go in there and remove anything that you
706don't need.
707
708First thing, you should remove the MSYS libraries, which we never use --
709
710rm Gomoku.app/msys-1.0.dll
711rm Gomoku.app/msysltdl-3.dll
712rm Gomoku.app/libW11.dll
713rm Gomoku.app/libperl.dll
714rm Gomoku.app/librle3.dll
715
716Then, remove any additional library that your application doesn't use;
717for example, I removed --
718
719rm Gomoku.app/Renaissance.dll
720rm Gomoku.app/ProjectCenter.dll
721
722Finally, remove Apps and other stuff that you might have copied from
723the general GNUstep installation --
724
725rm -Rf Gomoku.app/GNUstep/Apps
726rm -Rf Gomoku.app/GNUstep/Frameworks/ProjectCenter.framework
727
728Generally, you may want to build the whole stuff making sure you only
729include what you strictly need.
730
731
73210. Stripping
733=============
734
735The resulting directory might still be pretty big.  If you are trying
736to distribute it over the internet, your users will probably
737appreciate if you stripped it, removing symbols.  Just run 'strip'
738on all the .exe and .dll files in your application.
739
740strip $(find /home/Nico/Gomoku.app/ -name '*.exe')
741strip $(find /home/Nico/Gomoku.app/ -name '*.dll')
742
743That will reduce the size a lot.  If you're not distributing it over
744the internet, you might be happy leaving the symbols in though.
745
746
74711. Checking Licenses
748====================
749
750Finally, before deployment, you need to realize that you are shipping
751a lot of GNUstep (and non-GNUstep) software with your application.
752
753This is fine, just make sure you are aware of the licenses, and that
754you comply with them.
755
756
757PACKAGING/WINDOWS TODOS
758-----------------------
759
760The gdnc, gpbs processes are somehow a bit of a pain.  They are
761automatically started when you start your application, but they are
762not automatically stopped when you quit it.  This might have bad
763consequences, eg, if you are using your application from a USB flash
764disk, Windows doesn't let you unplug the USB disk while gdnc/gpbs are
765running, because they are running from the disk!
766
767Also, it's not clear what happens if you have two or three such
768GNUstep apps downloaded from the web and you try to run them at the
769same time.  What about gdomap etc ?
770

README.MinGWOnCygwin

1
2
3Cross Compiling GNUstep for MinGW from Cygwin
4=============================================
5
6If you wish to build on a native MinGW system (recommended),
7please read README.MinGW instead.
8
9MinGW is a collection of header files and import libraries that allow
10one to use GCC and produce native Windows32 programs that do not rely
11on any 3rd-party DLLs. GNUstep has only partially been ported to MinGW
12so expect some problems when trying to compile. Also, there are still
13subtle problems with running GNU tools on Windows, so any problems you
14may encounter may just as easly have to do with the compilation tools
15you are using as with GNUstep.
16
17The base library is not completely ported to run on MinGW yet, but most
18stuff works, including networking/distributed objects.
19Probably background file handle operations (other than networking) and
20advanced parts of NSTask code do not currently work.
21
22Note for compiling with shared libraries (DLLs), it's a good idea to
23remove the libobjc.a that comes with gcc (gcc -v for location) so that
24it isn't accidentally found instead of the libobjc DLL that you will
25compile below. Also note that, despite the statement in the GNUstep-HOWTO,
26even if you have 3.x, you still need to install gnustep-objc as it properly
27exports symbols for DLLs.
28
29Note also that the //c construct for specifying paths with drives has
30been depreciated. You'll need to use /cygwin/path or C: style paths now.
31
32MinGW on Cygwin
33---------------
34
35Not recommended. This is a cross compilation solution. Using native
36mingw/msys is simpler and less error prone.
37
38Uses the Cygwin tools to help out with the configuration and compilation of
39the libraries. It's always good to get the very latest version of
40Cygwin and MinGW. These instructions were performed
41with Cygwin DLL 1.3.9-1 and MingW gcc 2.95.3-6. If you have more
42experience with MinGW than me, please help improve these instructions!
43
44I assume you have installed Cygwin and MinGW, and dowloaded and
45unpacked the GNUstep packages:
46
47ffcall
48gnustep-make
49gnustep-objc
50gnustep-base
51
52See the GNUstep-HOWTO file for more information on where to get
53various files. You need to build and install each package separately,
54as described below.
55
561. First, start up a Cygwin BASH shell and make sure the MinGW tools
57are in your path:
58
59  export PATH=/c/mingw/bin:$PATH
60
61(Put in whatever path you have for the mingw tools).
62
63NB. Using MinGW-1.1 the header file winsock2.h needed to be slightly
64updated for 2000 or XP.  The size of the sa_data field in struct sockaddr
65had to be increased from 14 to 22.  If you don't do this before building
66the gnustep base library, the gdomap tool will not correctly determine the
67internet addresses of your machine.
68
692. Configure and compile gnustep-make.
70The default location for GNUstep on Windows systems in C:/GNUstep.
71To use another location you can use the --prefix argument to configure.
72First, go to the 'gnustep-make' package and configure:
73
74  cd gnustep-make
75  ./configure --target=i386-mingw32
76
772a.  The configure script may not have recognised that you are running in
78a cygwin environment ... so you may need to edit 'fixpath.sh' to set the
79CYGWIN variable to 'yes' before you build and install the make package.
80
813. Now build the gnustep-make package. Occationally, the make that comes
82with MinGW doesn't like the way GNUstep makefiles are setup (or perhaps
83it's that MingW make doesn't work with bash), so you can try
84using Cygwin's make instead (/usr/bin/make instead of just make).
85
86  make target=i386-mingw32
87  make target=i386-mingw32 install
88
894. Now source the GNUstep.sh file so the rest of the packages will
90compile correctly:
91
92  . C:/GNUstep/System/Library/Makefiles/GNUstep.sh
93
94Also put this command in your shell startup script. Be sure to adjust
95this path to match your real GNUstep root directory if you changed it
96when configuring gnustep-make.
97
98NOTE for WIN98 users: You should also define the environment variables
99HOMEDRIVE and HOMEPATH, since these aren't defined normally.
100
1015. Compile and install the ffcall package (Version 1.8b). It's
102simply a C library so it requires no special tools other than the compiler.
103
104LD=ld RANLIB=touch ./configure --target=i386-mingw32 \
105	--prefix=`$GNUSTEP_MAKEFILES/fixpath.sh -u $GNUSTEP_SYSTEM_ROOT`
106
107which installs the libraries in the GNUstep directory structure (There is
108a script in ffcall-1.8d and higher that automatically configures ffcall
109and installs, called compile-mingw). Then
110
111  make				# NOTE: Might need to be 'make LN_S=cp'
112  make install
113
1146. Now you can compile the Objective-C runtime DLL, gnustep-objc (unless
115you already have one installed):
116
117  cd gnustep-objc
118  make target=i386-mingw32 shared=yes
119  make target=i386-mingw32 shared=yes install
120
121Make sure to remove libobjc.a that comes with gcc, otherwise it will find that
122one instead of the one we want. The libobjc library that comes with gcc-3.x
123MAY work if you add some extra lines to the .def file, but I won't go into
124that here. It's good just to use gnustep-objc.
125
1267. Now we can configure and build the gnustep-base library.
127
128  cd gnustep-base
129  ./configure --target=i386-mingw32
130  make target=i386-mingw32 shared=yes
131  make target=i386-mingw32 shared=yes install
132
133If you get tired of typing  "target=i386-mingw32" all the time, then before
134you exec the GNUstep.sh script, just set the GNUSTEP_HOST:
135
136  export GNUSTEP_HOST=i586-pc-mingw32
137  . $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh
138
139Problems?
140---------
141
142[1] It's really important that all the libraries you link with GNUstep be
143shared libraries. Even static libraries based on C (e.g. libtiff) will
144prevent Objective-C modules from being loaded in Objective-C libraries.
145
146[2] On Windows XP, at least, there are sometimes spaces in the path to the
147user directory. The make program cannot deal with this.
148Probably the best solution is to add a .GNUsteprc file in your home
149directory with a line of the form -
150GNUSTEP_USER_ROOT=/home/myname
151setting your personal GNUstep root directory to be '/home/myname' ...
152some path which does not contain spaces.
153
154[3] Some users report needing to make gnustep libs like this (perhaps
155when using Cygwin's gcc only):
156
157export CC="gcc"
158export CFLAGS="-mno-cygwin"
159export CPPFLAGS="-mno-cygwin"
160find . -name "*.lnk" -print -exec rm {} \;
161make target=i386-mingw32 shared=yes LN_S="ln -s" \
162  SHARED_LD_PREFLAGS="--driver-flags=\"-mno-cygwin -mdll -Wl,--enable-stdcall-fixup\" --target=i386-mingw32 --export-all-symbols"
163
164[4] Compiling iconv (1.8):
165
166(the part with the most problems - maybe you download it precompiled
167but if you want to compile it - here is the guide) Make sure you are
168compiling from a mapped drive (eg. d:) not from an UNC Path!!!!
169
170./configure --target=i386-mingw32 --host=i386-mingw32 (ignore warnings here)
171edit libtool and libcharset/libtool so that the CC variable reads
172"gcc -mno-cygwin -mdll"
173make
174(After a while make breaks with an error in linking)
175find . -name "*.lnk" -print -exec rm {} \;
176make
177(make breaks now in the src folder, but the DLL is already buildt,
178that is what we need)
179cp include/iconv.h $GNUSTEP_SYSTEM_ROOT/Headers
180cp lib/.libs/libiconv-2.dll $GNUSTEP_SYSTEM_ROOT/Tools/libiconv-2.dll
181cp lib/.libs/libiconv.dll.a $GNUSTEP_SYSTEM_ROOT/Libraries/libiconv.a
182
183Good Sites for Pre-Compiled Binaries
184------------------------------------
185
186Many libraries, etc from:
187
188<http://sourceforge.net/project/showfiles.php?group_id=7382>
189<http://penguin.at0.net/~fredo/files/old/> (for libxml2, more?)
190<http://sourceforge.net/project/showfiles.php?group_id=23617> (libtiff)
191
192MingW guile from
193
194<http://www.textsure.net/~ela/devel.html>.
195
196also need guile from
197
198<http://sourceforge.net/project/showfiles.php?group_id=7382>
199
200for guile-config file.
201
202Author
203------
204
205Adam Fedor <fedor@gnu.org>
206

readme.texi

1@chapter GNUstep makefile package
2
3Here is some introductory info to get you started:
4
5@section What is the GNUstep makefile package?
6
7The makefile package is a simple, powerful and extensible way to
8write makefiles for a GNUstep-based project.  It allows the user to
9write a project without having to deal with the complex issues
10associated with configuration, building, installation, and packaging.
11It also allows the user to easily create cross-compiled binaries.
12
13@section Information
14
15The file @samp{NEWS} has this packages feature history.
16
17The files @samp{INSTALL} or @samp{GNUstep-HOWTO}
18give instructions for installing the packages. Also see the @file{machines}
19documentation and various machine specific READMEs in the Documentation
20directory.
21
22Files in the @samp{Documentation} directory have information on the
23design of the Makefile system and how to write your own makefiles that
24work with it.
25
26@section License
27
28The GNUstep libraries are covered under the GNU Lesser Public License.
29This means you can use these libraries in any program (even non-free
30programs). If you distribute the libraries along with your program,
31you must make the improvements you have made
32to the libraries freely available. You should read the COPYING.LIB file
33for more information.
34
35GNUstep tools, test programs, and other files are covered under the GNU
36General Public License. The GNU GPL is a free software license, which
37requires that all the released improved versions be free software as
38well.  You should read the COPYING file for more information.
39
40The GNUstep make package is licensed under the GNU GPL.
41
42@section History
43
44The GNUstep makefile package was designed by Scott Christley
45and Ovidiu Predescu.
46
47Flags for building shared libraries and bundles on several systems were
48originally identified by Mircea Oancea @email{mircea@@pathcom.com}.
49
50Richard Frith-Macdonald @email{richard@@brainstorm.co.uk} also
51contributed with ideas.
52
53Nicola Pero @email{nicola@@brainstorm.co.uk} rewrote much of the rule
54procedures to increase the speed of the package by over a factor of 7.
55He also rewrote much of the rest of the system to make it simpler and
56more effective.
57
58@section How can you help?
59
60@itemize @bullet
61
62@item
63Give us feedback!  Tell us what you like; tell us what you think
64could be better.  Send bug reports to @email{bug-gnustep@@gnu.org}.
65
66@end itemize
67