The XView Toolkit, Version 1.0 This document contains a brief summary of the contents of this source distribution and installation instructions for the XView Toolkit. Note that this release is an alpha version; many improvements will be made between now and the final release of the X Window System Version 11, Release 4. In addition, this release of XView will not lint cleanly. This problem is partly due to XView's extensive use of varargs. We plan to fix this in time for Release 4. Should you encounter problems with XView, please send a bug report to xviewbugs@sun.com. A sample bug report form is in this directory in the file bug_report. Requirements XView requires the use of an ICCCM-compliant window manager. One such window manager is olwm, which supports the OPEN LOOK (TM) user interface. Further, XView requires full ICCCM support in Xlib. This will be standard in the X Window System Version 11, Release 4. In order to run under Release 3, you must define the PRE_R4_ICCCM compile-time flag. Though XView is currently being ported to many different platforms, this version of XView has only been tested on Sun hardware. To build XView, you must also have the X Window System source. XView requires standard utilities from the X Window System source tree, such as imake, bdftosnf, and mkfontdir. This document assumes a working knowledge of imake. Extracting XView There are two copies of XView in this directory. The file XView.tar.Z is a compressed version of the entire XView source tree. If you have a relatively fast and stable ftp connection, this is the file you should get. You'll need to use ftp in binary mode. Once you have copied it to your local machine, uncompress it, untar it, and you're ready to go. If you have a slower connection, you might want to pick up XView in pieces. These files are XView.tar.[1-8].Z. When you have copied these to your machine, uncompress them and concatenate them together, in numeric order, into one 'tar' file. Then untar this file. There are also two additional files in this directory. The first, olwm.tar.Z, contains the alpha source for the OPEN LOOK window manager (OLWM). The second, XViewConversion.tar.Z, contains Sunview to XView conversion tools. Contents At the top level of this hierarchy there are three directories: usr.bin, usr.lib, and doc. Usr.bin and usr.lib are similar to the usr.bin and usr.lib directories typically found under /usr/src in a standard UNIX environment. Usr.bin contains the source for the sample applications and demo programs. Usr.lib contains the XView library source and fonts. Doc contains PostScript source for two XView manuals: a reference manual for the API and a guide for converting SunView programs to XView. XView consists of two parts: libxvin, which contains the XView intrinsics; and libxvol, which provides the OPEN LOOK user interface. These parts may be built as separate libraries, or may be combined into one library, libxview.a. By default, separate libraries are built. Both must be linked with an XView application. The source for the sample applications and demo programs may be found in subdirectories under usr.bin/tools/xview. Briefly, these are: term cmdtool and shelltool (OPEN LOOK terminal emulators) clock digital/analog clock textedit a mouse-based text editing tool examples various XView example programs Building XView XView should build properly regardless of where its source hierarchy is installed. Throughout the following steps, we will denote the top-level source directory by . A. Building the Libraries ------------------------- 1) Determine where you wish to install the XView header files. XView creates three subdirectories of header files: xview, xview_private, and pixrect. The header files MUST be installed in order to build XView. If you don't wish to install the header files elsewhere, you must at least install them somewhere within the XView source tree. 2) Determine where you wish to install the XView libraries. 3) Edit the XView configuration file to reflect the desired header file and library locations. The configuration file is /usr.lib/XView.config. Set HEADER_DEST to be the header destination and LIBRARY_DEST to the library destination. If your version of Xlib does not contain all of the Release 4 ICCCM functions, define CDEBUGFLAGS to be -DPRE_R4_ICCCM. You may also want to add -O to CDEBUGFLAGS to compile an optimized library. The XView Imakefiles determine the location of the X11 include files and binaries by using the default locations from the imake templates (Imake.tmpl and site.def). If your X11 include files or utilities are not in the default locations within the X11 source tree, then the build may break. To avoid this, either override the defaults using your local site.def file or place the necessary definitions in XView.config. For example, if your "mkfontdir" binary is /usr/bin/mkfontdir, rather than in the X11 source tree, you will need to place a line "MKFONTDIR=/usr/bin/mkfontdir" in XView.config. 4) Run imake on the top-level Imakefile to create a normal Makefile. The standard imake template and rules should be used. You should also define TOPDIR in your imake command line to be the top level of your X source tree relative to the current working directory. Such an imake command might look like: imake -TImake.tmpl -I../../../../X11/util/imake.includes \ -DTOPDIR=../../../../X11 -s Makefile It is important that TOPDIR be relative to the current working directory, otherwise, step 5 will fail. 5) Make the Makefiles for all of the library and font subdirectories. In /usr.lib, type make Makefiles This should cause make to descend into all the appropriate subdirectories and use imake to create the necessary Makefiles. 6) Install the header files. In /usr.lib, type make install_headers This should create the header file subdirectories "xview," "xview_private," and "pixrect," then proceed to install the proper header files in each. NOTE: If you are compiling on a Sun 386i, replace the header file pixrect/memvar.h with the one already present on your system (/usr/include/pixrect/memvar.h). 7) Install the icon and cursor images. Change directories to /usr.bin/tools/images, run "imake" as in step 4 to create a Makefile from the Imakefile, and then make install 8) Build the two libraries and the fonts. In /usr.lib, type make This should create /usr.lib/libxvin/libxvin.a and /usr.lib/libxvol/libxvol.a. It will also build a small patch library which provides two functions not available in pre-release 4 versions of Xlib. Alternatively, if you wish to build a combined library, use make libxview.a 9) Install the libraries and fonts, if desired. In the top-level library directory, type make install B. Building the Application Binaries ------------------------------------ 1) Decide where you want to install the demo binaries. 2) Set your current working directory to /usr.bin/tools/xview and edit the Imakefile in that directory. Set LIBRARY_DEST to point to the directory containing the XView libraries built in part A. Set HEADER_DEST to the directory containing the XView header files. Set DEMO_DEST to the location where you want the sample programs (those in the "examples" subdirectory) installed. The other applications will be installed in the standard X11 bin directory unless you specify otherwise. 3) Run imake to create a Makefile from the Imakefile. This is done exactly as in step 4 above, except that the relative pathnames will differ. 4) Make the Makefiles in the subdirectories by typing make Makefiles This will proceed into all the subdirectories and use imake to generate Makefiles from all the Imakefiles. 5) Make the binaries. To make all the binaries at once, simply type make If you wish to make a subset of the binaries, type make SUBDIRS='' all where is a list of subdirectories under /usr.bin/tools/xview, separated by spaces. For example, to build just the clock and cmdtool binaries, type make SUBDIRS='clock term' all 6) Install the binaries, if desired. To do so, use make install C. Making the Documentation --------------------------- PostScript source for the two manuals may be found in /doc/api and /doc/conversion. 1) Modify the two Makefiles, /doc/api/Makefile and /doc/conversion/Makefile. In each, define PSPRINT to be the command for printing PostScript files on your machine. 2) In each directory, type make all