GNUstep Build Guide for Unix Systems

A basic system

Mr. Dennis Leeuw

Pieter Bothstraat 32
3531 GZ
Utrecht
NL

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".


Table of Contents
Document description
Introduction
Credits
1. The GNUstep sources
Versioning
2. Building GNUstep
The Makefile System
Getting the sources
Dependencies
Building the Makefile system
The Foundation
Getting the sources
Dependencies
Building the Foundation
The AppKit
Getting the sources
Dependencies
Building the AppKit
The Backend
Getting the sources
Dependencies X11
Building the X11 backend
Dependencies libart
Building the libart backend
ArtResources
3. Configure GNUstep
The defaults command
GNUstep Filesystem Domains
Changing the backend
Setting the system default backend
Setting the backend per application
Localization
Local Time Zone
Language settings
Metrics used
Application Settings
Setting the Workspace application
Default PostScript previewer for printing
Default Bundles
Look and Feel
Styles
Fonts
GNUstep color system
Displaying Files
Icons
MiniWindows
Progress Panel for Save and Open
4. GNUstep services
gdomap
Boot script
gdnc
gpbs
X startup script
5. Building Extensions
Renaissance
Getting the sources
Building Renaissance
StepTalk
Getting the sources
Building StepTalk
6. Basic Tools
GWorkspace
Getting the sources
Dependencies
Building GWorkspace
7. Developer Tools
Project Center
Getting the sources
Building ProjectCenter
GORM
Getting the sources
Building GORM
8. The end
A. Build from source
Tips while installing
Build ffcall
List of Tables
1. Credits
3-1. System Font Defaults
3-2. Color names
3-3. GNUstep color keys
List of Examples
3-1. List all defaults features
3-2. List all available domains
3-3. GSBackend system
3-4. GSBackend application
3-5. Local Time Zone
3-6. NSLanguages
3-7. NSMeasurementUnit
3-8. GSWorkspaceApplication
3-9. NSPreviewApp
3-10. GSX11HandlesWindowDecorations
3-11. GSFontAntiAlias
3-12. GSFontMask
3-13. GSXEnableFontSet
3-14. Change color keys
3-15. GraphicCompositing
3-16. GSBrowserCellFontify
3-17. GSFileBrowserHideDotFiles
3-18. GSUseFreedesktopThumbnails
3-19. UseWindowMakerIcons
3-20. GSAppOwnsMiniwindow
3-21. GSUseWMTaskBar
3-22. GSSavePanelShowProgress
4-1. NSHost
4-2. GSOldClipboard

Document description

Introduction

This guide will try to guide you through the installation process of building GNUstep from source code. I only have GNU/Linux systems, so it might be that some things are GNU/Linux related.

Some things are just assumed to be there, like a working system and the X-windows system (X11R6). If you work your way through the document from start to finish, you should end up with a working system. No guarantees are made ofcourse. If you find things to be different on your system, please let me know.


Credits

Writing a guide is not a one man job. First of all there needs to be a subject to write about, then there is the need to gather information and after that bugs, omissions, etc. are found in the work. The list tries to thank the people that helped me writing this guide. It is far from complete, but the best I could do. If you feel you should be on the list, but are not let me know.

Table 1. Credits

Adam FedorThe maintainer of the GNUstep project and one that was always willing to answer my sometimes plain stupid questions.
Richard Frith-MacdonaldHe is a genius, what else can I say. Thanks.
Nicola PeroGood programmers guides, and hell why did you write Gomoku.app. So much time is lost with that addictive game.
David Nelsonfor his valuable input on the Build Guide.
Martin BrecherFor finding a lot of bugs in the Build Guide. Thanks Martin you have been, and still are a big help. And he also craeted the German translation available at http://www.stupid-design.com/martin/GNUstep/develop-de.html
Stefan BoehringerFor helping with the use of correct English.
Peter CooperThank you for nit-picking the Guide. Great help.
Gerold RupprechtFor correcting a lot of mistakes and making the English more clear.
Chris B. VetterFor the FreeBSD additions. And his help with the German translation by Martin Brecher.
Ben LindseySolaris 8 notes
Helge HessFor his notes on a more userfriendly guide.
Jef TeunissenTechnical contributions
Fred Kiefernsmapping.strings stuff, answered all my questions concerning fonts and menus.
Adrian RobertExplained the way the new NSColorList works

Microsoft and Windows are trademarks of Microsoft, Inc., registered in the U.S. and other countries.

Apple, Mac and Mac OS are trademarks of Apple, Inc., registered in the U.S. and other countries.

Enterprise Objects, Enterprise Objects Framework, NeXT, NextStep, Objective-C and OpenStep are trademarks of NeXT Software, Inc., registered in the U.S. and other countries.


Chapter 1. The GNUstep sources

GNUstep can be build in various ways. The easiest is to use the GNUstep-Startup script, which can be found at http://ftp.gnustep.org/pub/gnustep/core/. If you go that route, you can stop reading now.

Those that want to do it by hand with the same result can use the source packages located at the same location. This guide is aimed at those people.

And the last option is to use SVN for part or all of the parts described in this Guide. The SVN servers and the way to checkout the different parts is described here also, but remember... SVN has all the newest features, including the broken ones!


Versioning

The GNUstep sources (the core part) are numbered X.Y.Z, where X is the major number, Y the minor and Z the bugfix-release.

If the minor number changes it means there are changes that influence the system in such a way that you should recompile everything that depends on it. So if the gnustep-gui minor version changes, you should also recompile all your applications. The bugfix-release number is set to 0, so be prepared to find some bugs and other stuff.

The higher the bugfix-release number the more stable the package gets.


Chapter 2. Building GNUstep

By default GNUstep is built into /usr/GNUstep. We will follow this procedure. Be sure you build GNUstep as root. That means configure, make and make install should be run as root.


The Makefile System

This package sets up the GNUstep directory tree, sets some environment variables and contains scripts for all other packages installed hereafter.


Dependencies

Required

A shell, GCC objc compiler and runtime , GNU make, ar, ranlib, install, ln, chown, grep, libc, sed, awk, yacc, bison, flex, lex, strip, tar

Optional

latex2html, rpm


Building the Makefile system

./configure --prefix=/usr/GNUstep
make
make install

GNUstep requires a couple of environment settings, since it is an abstract from the actual operating system. To set the settings one has to source the GNUstep shell script. There are two different versions. One based on the Bourne Shells and one for the C based shells.

To setup your system and to be able to e.g. compile software you have source this script. Assuming GNUstep is build within it's default directory the commands to accomplish the sourcing are:

Bourne and Korn type shells. Shells like bash, ash, sh, ksh:

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh

C type shells. Shells like csh, tcsh:

source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh


The Foundation

It provides functionality that aims to implement the non-graphical portion of the OpenStep standard (the Foundation library).


Dependencies

Required

gnustep-make, ffcall, libssl, libxml2, libxslt, libz, libcrypto, libpthread

Optional

iconv (BSD), gmp


Building the Foundation

Note

FreeBSD: If you installed libxml2 through ports, make sure that you change in the gnustep-base the configure script. It should include -lgiconv.

./configure
make
make install


The AppKit

It is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon the OpenStep specification as released by NeXT Software, Inc. The library does not completely conform to the specification and has been enhanced in a number of ways to take advantage of the GNU system. These classes include graphical objects such as buttons, text fields, popup lists, browser lists, and windows; there are also many associated classes for handling events, colors, fonts, pasteboards and images.


Dependencies

Required

gnustep-base, libtiff, libpng, libjpeg, libgcrypt, libgnutls

Optional

libaspell, cups, audiofile, ungif


Building the AppKit

Note

For BSD systems add ADDITIONAL_LIB_DIRS = -L/usr/local/lib to core/gui/Source/GNUmakefile.preamble

./configure
make
make install

When you get the following error:

Making all for service example...
./shared_obj/ix86/linux-gnu/gnu-gnu-gnu/make_services: error while loading
shared libraries: libgnustep-base.so.1: cannot open shared object file: No
such file or directory
make[2]: *** [example.service/Resources/Info-gnustep.plist] Error 1
make[1]: *** [example.all.service.variables] Error 2
make[1]: Leaving directory `/usr/src/gnustep-gui-0.7.0/Tools'
make: *** [internal-all] Error 2
Try:
make LD_LIBRARY_PATH=$LD_LIBRARY_PATH


The Backend

GNUstep can run on a variaty of systems with a variaty of display engines. To accompany all those systems the GNUstep developers where smart enough to invent a system called a backend. This means that you only have to install the backend that you need for your displaying engine, which keeps things lean and mean. And it makes it easier to port a GNUstep system to a new displaying engine.

Ofcourse it is also possible to install different bundles on your system (as long as the different displaying engines are also installed on your system). Then one can choose which backend to use. This can be done for the entire system or for a single application.

There are currently backends for libx, libart, cairo or Microsoft® Windows®.


Dependencies X11

Required

gnustep-gui, libICE, libSM, libX11, libXext, libXi, libXmu, libXt, libGL, libXft, libXrender, libexpat, libfontconfig, libfreetype

Optional


Building the X11 backend

./configure --enable-graphics=xlib --with-name=xlib
make
make install


Dependencies libart

Required

gnustep-gui, libICE, libSM, libX11, libXext, libXi, libXmu, libXt, libGL, libXft, libXrender, libexpat, libfontconfig, libfreetype, libart

Optional


Building the libart backend

make distclean
./configure --enable-graphics=art --with-name=art
make
make install


ArtResources

With the art-backend you also need special fonts, called nfonts. The ArtResources packages provides you with an initial set of nfonts.


Installing ArtResources

mkdir ArtResources
cd ArtResources
tar jxvf ArtResources-x.y.z.tar.bz2
Adjust the Makefile esp. FONT_DEST variable.
make install


Chapter 3. Configure GNUstep

This chapter describes the settings for the GNUstep system. GNUstep uses a per user configuration file called ~/GNUstep/Defaults/.GNUstepDefaults. Since these settings are per user the changes you make should be made per user too.

Most default settings will work most people. The first four sections are a must read, the rest can be done now, or later when needed.


The defaults command

The defaults command is used to set or change your settings. If you are on a multi-user system it is only possible to change the settings for your account, or with the -u <username> option the settings of a user for which you have write access to his or her database.

The defaults database is stored in a non-binary format in $GNUSTEP_USER_ROOT/Defaults/.GNUstepDefaults. It is thus not possible through the defaults command to set a default for all users on a system.

The generic syntax for defaults is:

defaults function domain key value

function. A function can be read, write or delete.

domain. The domain used with the defaults command is a section within the defaults database that you want to alter. This can be settings for a certain application or the NSGlobalDomain for a generic setting affecting all the applications.

key. The key is a certain setting you want to address.

value. The value is the setting you want to give to a key.

A couple of useful examples:

Example 3-1. List all defaults features

defaults help

Example 3-2. List all available domains

defaults domains


GNUstep Filesystem Domains

Data, programs and libraries can be installed on a system in four different ways. First there is the stuff installed/ supplied by a vendor, second are the things that are installed by the local system administrator, third is the data that is shared over a network and last there is the user that can install his or her own applications, data and the like.

To decide which has presidence over what, it is defined within the GNUstep system that there is a search order. This definition says that everything installed in the User domain has precedence over the Network domain, which in turn has precendence over the Local domain, which has precedence over the System domain.

These different domains are defined in variables with the logical names: GNUSTEP_SYSTEM_ROOT, GNUSTEP_LOCAL_ROOT, GNUSTEP_NETWORK_ROOT and GNUSTEP_USER_ROOT. Which are actually paths to directories.

The order is expected throughout this document unless mentioned otherwise. Paths mentioned in this document are thus only addressed by the part that comes behind the domain paths mentioned.


Changing the backend

GNUstep can run on a variaty of systems with a variaty of display engines. To accompany all those systems the GNUstep developers where smart enough to invent a system called a backend. This means that you only have to install the backend that you need for your displaying engine, which keeps things lean and mean. And it makes it easier to port a GNUstep system to a new displaying engine.

Ofcourse it is also possible to install different bundles on your system (as long as the different displaying engines are also installed on your system). Then one can choose which backend to use. This can be done for the entire system or for a single application.

There are currently backends for libx, libart, cairo or Microsoft® Windows®.


Setting the system default backend

To set the system to use a certain backend as a default use:

Example 3-3. GSBackend system

defaults write NSGlobalDomain GSBackend libgnustep-back

The default setting is libgnustep-back.

Dependend on how gnustep-back was configured there are different names for the backend. If you e.g. used --with-name=art you should use libgnustep-art as the name for the backend.


Setting the backend per application

If you want to change the backend for a certain application and you have more then one backend installed, you can set the backend like this:

Example 3-4. GSBackend application

defaults write ApplicationName GSBackend libgnustep-back

The default setting is identical to the backend set in NSGlobalDomain.


Localization

Localization means that the system is set to use your native language, currency, metric system, time zone, etc.

The major part of the localization can be done within the GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/Languages/ directory. Within that directory you will find a file per English name of a certain language. Adjusting the file for your language gives you the opportunity to almost completely localize your system.


Local Time Zone

GNUstep comes with its own time zone files, this might seem redundant, but it isn't. GNUstep runs on a lot of different systems with a lot of different ways of handling time. With GNUstep provided time zone solution, this problem is solved without the need of adding code for every possible system in the universe to the code base.

The time zone files are located in the GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones/, with all needed documention and code available. The real zones are in a subdirectory called zones/.

Example 3-5. Local Time Zone

defaults write NSGlobalDomain "Local Time Zone" Europe/Amsterdam

as you can see the entire path is not needed just the file Europe/Amsterdam within the zones/ directory.


Language settings

To set the system to use your local language use the NSLanguages key. If the system and/ or an application is able to use your language it will do so. If it can not then it will use the default.

You could also specify a string of languages where you decide what language should be used next. When you for instance specify Dutch,English the system will first try the Dutch translation, then English and then the default.

To setup your system to use a certain language use:

Example 3-6. NSLanguages

defaults write NSGlobalDomain NSLanguages "(Dutch,English)"
By replacing the NSGlobalDomain with the name of an application, you could specify per application which language order it should use.


Creating your local language support

If you want to change an application to support your language you can find within Resources/ directory of the Application a .lproj file. If you copy e.g. the English.lproj directory to the English name of your language e.g Dutch.lproj. You then have to adjust the Localizeable.strings file and start Gorm to adjust the .gorm file.


Metrics used

The NSMeasurementUnit is a string describing the measurement unit for rulers. The default is Centimeters. Other possible values are Inches, Points, and Picas.

Example 3-7. NSMeasurementUnit

defaults write NSGlobalDomain NSMeasurementUnit Points


Application Settings

Setting the Workspace application

The NSWorkspace needs an application to connect to when some operations require an external application. The application called by NSWorkspace can be set through the GSWorkspaceApplication setting. Default this is set to GWorkspace.

Example 3-8. GSWorkspaceApplication

defaults write NSGlobalDomain GSWorkspaceApplication GWorkspace


Default PostScript previewer for printing

The default application that the NSPrintOperation uses to preview PostScript® files is controlled by NSPreviewApp. This defaults to gv, unless there is already an application registed as a viewer of PostScript® files.

Example 3-9. NSPreviewApp

defaults write NSGlobalDomain NSPreviewApp gv


Default Bundles

A bundle is a collection of resources making up a discrete package for use. There are currently three types of bundles: applications, frameworks and loadable bundles.

A loadable bundle is a kind of plug-in. There are two types of loadable bundles, namely plug-ins and palettes. The plug-in is noramlly refered to as a bundle, which can make it a bit complex. A plug-in is a bundle that can be loaded by an application to provide additional functionality, while a palette is a plug-in for GORM, the interface builder. A palette is used to extend GORM with custom UI objects. Palettes have a .palette extension.

The GSAppKitUserBundles contains an array of bundles. These bundles will be loaded into each application at startup. The most useful function is to load "theme" bundles.


Look and Feel

Styles

GNUstep can handle the window decorations itself, without a window manager doing it. This way you get a real GNUstep look-and-feel.

Example 3-10. GSX11HandlesWindowDecorations

defaults write NSGlobalDomain GSX11HandlesWindowDecorations NO

NSInterfaceStyleDefault can be used to change the interface style. This is described somewhere... [META]

Styles: NSNextStepInterfaceStyle, NSMacintoshInterfaceStyl, NSWindows95InterfaceStyle, GSWindowMakerInterfaceStyle

Default: NSNoInterfaceStyle

An interface style specific to menu operation. If not set the NSInterfaceStyleDefault value is used.


Fonts

GNUstep can make use of the by the system supplied fonts, e.g. de fonts already installed on Windows®, or the ones supplied by X11, or GNUstep could use the specific fonts located in the Library/Fonts/ directories.

Every font key, like NSBoldFont, also has a size element, NSBoldFontSize. Within the following table the size component is mentioned in the Size column. If there is no setting for a certain key it defaults to the value corresponding with the key mentioned in the Value or Size column.

Table 3-1. System Font Defaults

KeyValueSize
NSBoldFontHelvetica-BoldNSFontSize
NSControlContentFontNSFontNSFontSize
NSFontHelvetica12
NSLabelFontNSFontNSFontSize
NSMenuFontNSFontNSFontSize
NSMessageFontNSFontNSFontSize
NSPaletteFontNSBoldFontNSFontSize
NSTitleBarFontNSBoldFontNSFontSize
NSToolTipsFontNSFontNSFontSize
NSUserFixedPitchFontCourierNSFontSize
NSUserFontNSFontNSFontSize
An exception to the rule is NSSmallFontSize, which only has a size, which per default is set to 9.


Anti-Aliased Fonts

Anti-aliased fonts are per default set to YES for GNUstep. It can be controlled through the GSFontAntiAlias setting.

If X11 has the XFT extension the X11 backend will use anti-aliased fonts. If you get an error message saying that the Helvetica font is not found, try setting GSFontAntiAlias to NO.

The libart backend text uses anti-aliased text at small sizes (9-16 pixels).

Example 3-11. GSFontAntiAlias

defaults write NSGlobalDomain GSFontAntiAlias YES


Font mask for X11

Normally all fonts available in the X-server will be used with GNUstep, the default for GSFontMask is thus "*". If there are enormous amounts of fonts installed it might happen that the font_cacher is having problems with the X-server. To solve that problem you could select a mask of fonts to be used, e.g. "*-iso8859-1" so only the ISO Western fonts are loaded.

Example 3-12. GSFontMask

defaults write NSGlobalDomain GSFontMask "*-iso8859-1"


Multi-byte and Unicode support

To enable Multi-byte/Unicode support, which is useful for many East Asian languages set the GSXEnableFontSet to YES. It's default value is NO since the backend is somewhat slower with GSXEnableFontSet enabled.

Example 3-13. GSXEnableFontSet

defaults write NSGlobalDomain GSXEnableFontSet YES


nfonts for libart

For GNUstep there is special font format. The font is called an nfont, which actually is a directory containing the fonts and a font description.

The libart based backend can use the fonts using the .nfont extension. An .nfont is a directory containing a single, complete font family. It also contains a FontInfo.plist with information about the family, and any files needed to render the faces in the family, referenced from FontInfo.plist.

The official specification of an nfont can be found at http://w1.423.telia.com/~u42308495/alex/GNUspec/nfont_packages.txt


GNUstep color system

Internally GNUstep uses names to address colors. These names are defined in externs.m and NSColor.m. The system grey scales are described in externs.m which is used and completed by NSColor.m to result in the following table:

Table 3-2. Color names

ColornameRed valueGreen valueBlue ValueAlpha Value
black0.00.00.01.0
blue0.00.01.01.0
brown0.60.40.21.0
clear0.00.00.00.0
cyan0.01.01.01.0
darkGray0.3330.3330.3331.0
gray0.50.50.51.0
green0.01.00.01.0
lightGray0.6670.6670.6671.0
magenta1.00.01.01.0
orange1.00.50.01.0
purple0.50.00.51.0
red1.00.00.01.0
white0.00.00.01.0
yellow1.01.00.01.0

The first time a GNUstep application is started a system color file called System.clr is created in the GNUSTEP_USER_ROOT/Library/Colors/ directory. This is a binary file, and thus not easily adjustable. To change the system colors one needs the defaults command.

The values of Red, Green and Blue are not X11 RGB values, those have to be calculate using a formula of decimal-color-value devided by 255. A value of #505075 (as used by webpages) is hexadecimal, which means you have 80 decimal for red, 80 for green and 117 for blue. Which results in the following values:

Red = 80/255 = 0.313

Green = 80/255 = 0.313

Blue = 117/255 = 0.418

If you would like to change the colors of your system, you need to calculate the values for the keys defined in the system. The following keys are defined and can be used to change the GNUstep-looks:

Table 3-3. GNUstep color keys

KeyDescriptionDefault
controlBackgroundColorThe color used for buttons, sliders, and the background of non-filled browser space.lightGray
selectedMenuItemColorThe color for a selected menu item.white
selectedMenuItemTextColorThe color of the text on a selected menu item.black
controlColor lightGray
controlHighlightColor lightGray
controlLightHighlightColor white
controlShadowColorThe shadow color around buttonsdarkGrey
controlDarkShadowColor black
controlTextColor black
disabledControlTextColor darkGray
gridColor gray
headerColor lightGray
headerTextColor black
highlightColor white
keyboardFocusIndicatorColor black
knobColor lightGray
scrollBarColor gray
selectedControlColor white
selectedControlTextColor black
selectedKnobColor lightGrey
selectedTextBackgroundColor lightGrey
selectedTextColor black
shadowColor black
textBackgroundColor white
textColor black
windowBackgroundColor lightGray
windowFrameColor black
windowFrameTextColor white

To change the keys use:

Example 3-14. Change color keys

defaults write NSGlobalDomain controlBackgroundColor "0.313 0.313 0.418"


Alpha channel

For the Xlib backend GNUstep uses various tricks to get alpha colors working. This trickery may slow down the drawing of images. So if you use a very slow machine you might want to turn this off.

This is an Xlib backend only setting:

Example 3-15. GraphicCompositing

defaults write NSGlobalDomain GraphicCompositing NO
The default is YES.


Application color names

Within an application it is possible to use ones own list of named colors. This list is loaded by NSColorList and can be created as an ASCII configuration file with the .scr extension. Such a file might look like this:

3
0 1.000 0.980 0.980 1.0 snow
0 0.972 0.972 1.000 1.0 ghost white
0 0.972 0.972 1.000 1.0 GhostWhite
The first line tells the system the amount of colors it can expect. In this case 3 new entries.

The first element of a line describes the type of color that is defined. In this case the 0 says RGB+Alpha since that is currently the only supported one.

The next three elements are the Red, Green, and Blue values.

The 1.0 entry is the value for alpha.

And finally there is the name that is given to the color entry.


Setting the colors per channel

NSColorsPerChannel defines the maximum number of colors to display. The default value is ???. This option is only available when using an X11 backend.

On pseudo-color displays this would limit the amount of colors available.

On true-color displays it limits the amount of red, green and blue ranges.


Displaying Files

Displaying directories

To make directory names stand out compared to filenames one can set the boolean value of GSBrowserCellFontify to YES. Per default this setting is set to NO, which means that the font used for filenames and directory names in e.g. the filebrowser are drawn in a non-bold font. To set the behaviour so that directories are drawn in a bold font use:

Example 3-16. GSBrowserCellFontify

defaults write NSGlobalDomain GSBrowserCellFontify YES


Hide dot-files

Per default files starting with a dot ('.') are not hidden. On Unix-like systems this might clutter the users home directory. The GSFileBrowserHideDotFiles setting changes this for the save and open panels.

The setting is a boolean, default set to NO. To change this use:

Example 3-17. GSFileBrowserHideDotFiles

defaults write NSGlobalDomain GSFileBrowserHideDotFiles YES


Icons

There are two things within this documentation that are refered to as icons. The first one is the square picture that represents an application, and the second one is any image used within the GNUstep interface.

To make the distinction clear the squares representing applications will be addressed as application icons, where all other GNUstep images are refered to as icons.

You may change most icons, by editing the nsmapping.strings file. This file can be found in the GNUSTEP_SYSTEM_ROOT/Library/Images/ directory per default. To change your personal settings use the GNUSTEP_USER_ROOT/Library/Images/nsmappings.strings.

The syntaxt of the file looks like this:

/* Examples */
NSSwitch = common_SwitchOff;
NSHighlightedSwitch = common_SwitchOn;
NSRadioButton = common_RadioOff;
The lefthand part is the OpenStep® name, and the left hand part is the filename without the extension. The images must be found in the same directory as the nsmapping.strings file.


Freedesktop icons

GNUstep makes it possible to use the Freedesktop thumbnail files as icons for the desktop, instead of the icons provided by GNUstep.

The GSUseFreedesktopThumbnails contains a boolean value which per default is set to NO. If you change this setting and the images are not found, the GNUstep provided ones are used.

Example 3-18. GSUseFreedesktopThumbnails

defaults write NSGlobalDomain GSUseFreedesktopThumbnails YES


Window Maker Dock

To make GNUstep applications dockable in Window Maker UseWindowMakerIcons should be set to YES (the default). If Window Maker isn't used this setting has no effect.

If the UseWindowMakerIcons is NO the application icon window is provided by the application itself, instead of being provided by Window Maker

Example 3-19. UseWindowMakerIcons

defaults write NSGlobalDomain UseWindowMakerIcons YES


MiniWindows

A minimized window within GNUstep terminology is refered to as a MiniWindow, since it is an actual miniturized display of the contents of a full size window. MiniWindows are normally displayed on the bottom of the screen next to the application icons.

Per default GNUstep handles the miniaturization of MiniWindows itself. This is equivalent to setting GSAppOwnsMiniwindow to YES.

However if you want the window manager to control the behaviour of the iconification of the application window you should change the value to NO.

Example 3-20. GSAppOwnsMiniwindow

defaults write NSGlobalDomain GSAppOwnsMiniwindow NO


MiniWindow on taskbar

The setting of GSUseWMTaskBar is only useful for the Windows® backend, since is affects the placement of MiniWindows on the taskbar.

If set to YES, the backend assumes that MiniWindows are displayed in a task bar. In this case, the application icon is not shown and the main menu behavior is changed so it is not ordered out, but minimized, so clicking on the minimized menu will activate the application.

Example 3-21. GSUseWMTaskBar

defaults write NSGlobalDomain GSUseWMTaskBar YES


Progress Panel for Save and Open

On slow systems it might be handy to see a progress bar when the system is reading the contents of a large directory. This way the user knows that nothing is wrong.

The GSSavePanelShowProgress can be used to enable this behaviour for both the Save Panel as the Open Panel. Per default the setting is NO.

Example 3-22. GSSavePanelShowProgress

defaults write NSGlobalDomain GSSavePanelShowProgress YES


Chapter 4. GNUstep services

GNUstep knows two kinds of services: the ones that are started at boot time and the once that are used per user session. The boot service is gdomap, and the once used per user are gdnc and gpbs.

Since it is very hard to supply scripts that work on every system. I will supply you with some example scripts, that should work on almost any system. But your milage may vary.


gdomap

The gdomap daemon is used by GNUstep programs to look up distributed objects of processes running on the local machine as well as across the network. This way applications can talk to one another. The gdomap process uses the with IANA registered port 538.

To get a complete overview of the options available for gdomap use:

gdomap --help

gdomap probes the network for other hosts running gdomap. This might pose a security risk, and creates some additional network use. If you want to be used only for localhost, start gdomap as:

gdomap -p
This prevents gdomap from polling other hosts. One could also use the -c poll-filename option to provide gdomap with a list of systems it can poll, or use the -a net-filename to provide gdomap with a list of addresses and network masks.

The poll-filename should contain one IP address per line in the normal dotted format.

The net-filename should contain per line an IP address, a mask and a broadcast address in dotted format, seperated by a spaces. The broadcast address is optional and might be left out.


Boot script

Create the following script in the Makefiles directory e.g. /usr/GNUstep/System/Library/Makefiles with the name GSBoot.sh.

#!/bin/sh
 
# GSBoot.sh
# (c) 2003 Dennis Leeuw
# License: GPL version 2 or any newer version
# 
# If GNUstep is not installed in the default place (/usr/GNUstep)
# set this variable to the GNUstep Makefile directory
# e.g. /usr/GNUstep/System/Library/Makefiles
GNUSTEP_MAKEFILES=""
echo -n "GNUstep services: "
# Make sure GNUSTEP_MAKEFILES is set to something
if [ "x$GNUSTEP_MAKEFILES" = "x" ]; then
        if [ -d /usr/GNUstep/System/Library/Makefiles ]; then
	                GNUSTEP_MAKEFILES="/usr/GNUstep/System/Library/Makefiles"
        else
	                echo "GNUstep is not installed"
	                exit 1
        fi
fi
# Make sure GNUSTEP_MAKEFILES contains GNUstep.sh
# And source it if available
if [ -x $GNUSTEP_MAKEFILES/GNUstep.sh ]; then
        . $GNUSTEP_MAKEFILES/GNUstep.sh
else
        echo "GNUstep.sh not found in $GNUSTEP_MAKEFILES"
        exit 1
fi
#See if we are flattened
if [ "x$GNUSTEP_FLATTENED" = "xyes" ]; then
        TOOLS_DIR=$GNUSTEP_SYSTEM_ROOT/Tools
else
	        TOOLS_DIR=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
fi
# Do what is requested
case $1 in
        start)
                if [ -x $TOOLS_DIR/gdomap ]; then
                        echo -n "gdomap "
                        $TOOLS_DIR/gdomap
                fi
                echo "started."
                exit 0
        ;;
        stop)
                echo -n "gdomap "
                killall gdomap
        ;;
        restart)
                $0 stop; $0 start;
        ;;
        "")
                # Assume GSBoot.sh start
                $0 start
                exit
        ;;
        *)
                echo "GSBoot.sh [start|stop]"
                exit
        ;;
esac
# END
Create a symbolic link to your bootscript directory when you use System V style init-scripts, or add the script to your bootscript for BSD-style init-scripts.


gdnc

gdnc is the distributed notification server - it provides support for the NSDistributedNotificationCenter class. This allows applications to send notifications that are visible to other applications - for example a notification that an app has started up or shut down. Every user must have its own private instance running.

Normally gdnc is started without options and as soon as the user logs in.

To attach gdnc to a remote session it can be started as

gdnc [-NXHost hostname]


gpbs

gpbs is the pasteboard server. The gpbs daemon serves as a clipboard/pasteboard for GNUstep programs, handling the copying, cutting and pasting of objects as well as drag and drop operations between applications. It is also used by the 'services' facility.

Normally gpbs is started without options as soon as the user logs in. gpbs is a user process.

To attach gpbs to a remote session it can be started as

gpbs [-NSHost hostname]

To get help on the gpbs usage use:

gpbs [--help]

If the pasteboard server is running on another host as the application, the NSHost can be set. NSHost is used by the NSPasteboard to find the host that the pastboard server (gpbs) is running on.

Example 4-1. NSHost

defaults write NSGlobalDomain NSHost localhost

If you are running an old X environment you may need the GSOldClipboard feature. This feature swaps the PRIMARY for selection and CLIPBOARD for pasteboard to the old behaviour of PRIMARY for the pasteboard and CLIPBOARD for the selection.

The default setting is NO.

Example 4-2. GSOldClipboard

defaults write NSGlobalDomain GSOldClipboard YES


X startup script

Create the following script in the Makefiles directory e.g. /usr/GNUstep/System/Library/Makefiles with the name GSXBoot.sh.

#!/bin/sh
 
# GSXBoot.sh
# (c) 2003 Dennis Leeuw
# License: GPL version 2 or any newer version
# 
# If GNUstep is not installed in the default place (/usr/GNUstep)
# set this variable to the GNUstep Makefile directory
# e.g. /usr/GNUstep/System/Library/Makefiles
GNUSTEP_MAKEFILES=""
# Make sure GNUSTEP_MAKEFILES is set to something
if [ "x$GNUSTEP_MAKEFILES" = "x" ]; then
        if [ -d /usr/GNUstep/System/Library/Makefiles ]; then
	                GNUSTEP_MAKEFILES="/usr/GNUstep/System/Library/Makefiles"
        else
	                echo "GNUstep is not installed"
	                exit 1
        fi
fi
# Make sure GNUSTEP_MAKEFILES contains GNUstep.sh
# And source if available
if [ -x $GNUSTEP_MAKEFILES/GNUstep.sh ]; then
        . $GNUSTEP_MAKEFILES/GNUstep.sh
else
        echo "GNUstep.sh not found in $GNUSTEP_MAKEFILES"
        exit 1
fi
#See if we are flattened
if [ "x$GNUSTEP_FLATTENED" = "xyes" ]; then
        TOOLS_DIR=$GNUSTEP_SYSTEM_ROOT/Tools
else
	        TOOLS_DIR=$GNUSTEP_SYSTEM_ROOT/Tools/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
fi
# Start the services
if [ -x $TOOLS_DIR/gdnc ]; then
        $TOOLS_DIR/gdnc
fi
if [ -x $TOOLS_DIR/gpbs]; then
        $TOOLS_DIR/gpbs
fi
Run this script whenever X is started. Dependend on your setup this could be in your ~/.xinitrc or in your Xsession startup files.


Chapter 5. Building Extensions

The following parts are options, but enhance GNUstep or are so important to applications that they are considered a vital part of GNUstep. You are free to skip some parts or this entire section, but we advise you not to.


Renaissance

GNUstep Renaissance allows you to describe your user interfaces (that is, the windows in your application, and the buttons, boxes, textfields, etc in the windows) in simple and intuitive XML files, using an open, standard format describing the logic of the interface. GNUstep Renaissance can then, at run time, generate the user interfaces (using the native host OpenStep-like libraries) by reading the XML files. The connections between the objects created from the XML files, and the other objects in the application are done via outlets (as traditionally in OpenStep); a new quick and intuitive syntax has been developed to make creating outlets as easy as possible.


Building Renaissance

make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install


StepTalk

With StepTalk you can create scriptable servers or applications. It is written using GNUstep. It is language independent: you can use any available scripting language that is provided as a separate bundle.


Building StepTalk

make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install


Chapter 6. Basic Tools

GWorkspace

The GNUstep Workspace Manager of which the most visible part is the filebrowser.


Dependencies

Required

gnustep-gui

Optional

PDFKit


Building GWorkspace

To build GWorkspacebuild:

./configure
make GNUSTEP_INSTALLATION_DIR=$GNUSTEP_SYSTEM_ROOT install
cd Apps_wrappers
cp -a * $GNUSTEP_SYSTEM_ROOT/Applications


Chapter 7. Developer Tools

Project Center

The GNUstep Project Center.


Building ProjectCenter

make GNUSTEP_INSTALLATION_DIR=$GNUSTEP_SYSTEM_ROOT install


GORM

The GNUstep Interface Builder.


Building GORM

make GNUSTEP_INSTALLATION_DIR=$GNUSTEP_SYSTEM_ROOT install


Chapter 8. The end

You now have a complete GNUstep development environment. The Makfile system and the libraries are there. It is now up to you how you want to procede, which programs you want to use, all is possible now.

Happy Stepping!


Appendix A. Build from source

Tips while installing

Be sure to have atleast /usr/local/lib and /usr/X11R6/lib in your /etc/ld.so.conf before you continue.

The general procedure to compile most software programs is to use:

./configure
make
make install

Make sure you use GNU make for this. That means that on e.g. FreeBSD you'll have to substitute the make command with gmake. I don't know much about other compilers then gcc, so I guess you are on your own on that one. Let me know if you have good tips.

I always like to keep track about what a program installs and where, so I always do (I assume sources go under /usr/src):

mkdir -p /var/adm/[programname]
touch /usr/src/test
./configure
make
make install
find / -cnewer /usr/src/test | grep -v /proc | grep -v /var | grep -v /usr/src > /var/adm/[programname]/filelist

Now I have a complete list of all installed files, which saves me trouble in generating packages, but also when removing the program, before upgrading or if something was build wrong (which happens).


Build ffcall

This is a collection of four libraries which can be used to build foreign function call interfaces in embedded interpreters. The four packages are:

  • avcall - calling C functions with variable arguments

  • vacall - C functions accepting variable argument prototypes

  • trampoline - closures as first-class C functions

  • callback - closures with variable arguments as first-class C functions (a reentrant combination of vacall and trampoline)

Download URL

ftp://ftp.gnustep.org/pub/gnustep/libs/

Filename

ffcall-1.10.tar.gz

./configure --prefix=$GNUSTEP_SYSTEM_ROOT
make
make install