ftp.nice.ch/pub/next/graphics/viewer/ToyViewer.2.6a.b.NIHS.tar.gz#/doc/COMPILE.rtf

This is COMPILE.rtf in view mode; [Download] [Up]

ToyViewer  Ver.2.6 (Feb. 1997)
		Copyright (C) 1995,1996,1997  Takeshi Ogihara

How to Compile & Install ToyViewer
This document explains how to compile source programs of ToyViewer and how to install the binary.
To compile ToyViewer, NEXTSTEP Developer Kit is needed.  Otherwise, get the binary version of ToyViewer and install it, please.

Files Included in the Package
After decompression,  you would get files as below:

	ToyViewer2.6/
		doc/
			README
			COMPILE.rtf
			lipo.csh
			strip.csh
		src/
			(source programs)

Compile
Open src/PB.project with ProjectBuilder.  First, click "Attributes" button and type "English" into Language-field instead of "Japanese".
Click "Builder" button on the window, then click "Options..." button.  Find "Build For"part in the panel opened, and select architectures for which you want to make executables.  Next, type "ENGLISH=YES" into Arguments-field (This is IMPORTANT).  Then, close the panel.
Click "BUILD" button to start compiling.  If succeeded, ToyViewer.app will be in src directory.


The following steps should be done on Terminal.  Assume that the directory named "ToyViewer2.6" in previous section is referred to as $TOY.  Replace $TOY with the actual pathname.

Installation
(1) Remove binaries for unused architectures
Executable files that have been already compiled are included in the package.  They  
have binaries for m68k, i386, hppa, and sparc architectures.
If you do not want binaries for architectures that you do not use, remove them.  Otherwise, skip this step and go to (2).
There is a file named "$TOY/doc/lipo.csh", which is described to leave only binaries for m68k and i386 architectures.  Modify this file to leave binaries you want.  The part to be modified is "-extract m68k -extract i386" of the following line.

alias	LIPO	'echo \!\!:1; /bin/lipo -extract m68k -extract i386 \!\!:1 -output X; mv X \!\!:1'

For example, If you want binaries for only sparc, modify as "-extract sparc".
Then, type commands as below:

	% cd $TOY/src
	% csh ../doc/lipo.csh


(2) Do strip
In order to remove information for debugging from executables, there is a shell script file named "$TOY/doc/strip.csh".
Type commands as below:

	% cd $TOY/src
	% csh ../doc/strip.csh

(3) Move files into the directory where ToyViewer is installed
Decide where ToyViewer should be installed.  If only you use it alone, ~/Apps would be a good choice.  If some persons use ToyViewer, it should be installed in /LocalApps.  In this case, installation must be done as root.  You can install ToyViewer into other directory, however, in order to use Image Conversion Filter Services described in next section, install ToyViewer into ~/Apps or /LocalApps.
In case of ~/Apps:
	% mv $TOY/src/Toyviewer.app ~/Apps
Incase of /LocalApps:
	% su
	% mv $TOY/src/Toyviewer.app /LocalApps
	% chown -R root.wheel /LocalApps/Toyviewer.app

Customization
You can add new image formats to be displayed to ToyViewer.
The method of customization for individual users can be seen in the Help Panel of ToyViewer, which is written in "ToyViewer.app/English.lproj/HelpCustom.rtf".
Here, customization that should be done during installation is described.  First, you should read the help, then work as below.

(1) Information for customization
In case that individual users customize ToyViewer, the following 2 files are modified.
(a) Addition of filters		~/.toyviewerrc, or ~/Library/ToyViewer/rc.arch
(b) Addition of Filter Services	~/Library/Services/ToyViewer.service
Just as them, ToyViewer has 2 files for global setting.
(a') Addition of filters		ToyViewer.app/filters
(b') Addition of Filter Services	ToyViewer.app/services
Therefore, if you want to change in advance the setting of Toyviewer, modify the contents of these files.
Note that specification written in files (a) and (b) is prior to the setting in (a') and (b').  So, only in case that the customization is shared by some persons, modification to (a') and (b') would be effective.  Otherwise, change (a) and (b) individually.  Be cautious of modifying files (a') and (b').

(2) Remove useless filters (NEVER!)
In ToyViewer2.3 or older versions, users can remove filter programs presented by ToyViewer in the directory ToyViewer.app.  However, in ToyViewer2.4 and later versions, DO NOT remove filter programs in the directory.  For example, cjpeg and djpeg are programs to read and write jpg images.  The versions of cjpeg and djpeg presented by ToyViewer2.4 are extended to read and write comments into image data.  If they are replaced with other programs, ToyViewer can not read / write jpg images.

(3) Remove useless Filter Services
There are other programs that provide image conversion filter services, such as ImageViewer or OmniImageFilter.  If you want to use their filter services instead of ToyViewer, you could remove the corresponding lines in ToyViewer.app/services.
To specify individually filter service programs to be activated, you should describe obviously the definition of services in ~/Library/Services.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.