-
slevy authored
Update FLTK. Avoid mentioning fltk 2.0 since it probably doesn't work. Try using <verb> around code blocks; with sgml2latex, <code> places ugly horizontal rules around the blocks and misplaces them so that they crop some of the text. Describe "detach" command and new cross-eyed stereo feature. Describe thresh, only=/only-/only+, see and sel commands. But really need a separate section about how selection sets should work. (Maybe writing the section will make it clear how they *should* work.) Add "thresh" example. Look at stellar distribution by B-V -- the Orion spur really does show up in blue! Describe transform syntax including "tfm camera", making multiplication order explicit. Describe colormap file syntax in new section. Document "cment" & "vcmap" cmds.
slevy authoredUpdate FLTK. Avoid mentioning fltk 2.0 since it probably doesn't work. Try using <verb> around code blocks; with sgml2latex, <code> places ugly horizontal rules around the blocks and misplaces them so that they crop some of the text. Describe "detach" command and new cross-eyed stereo feature. Describe thresh, only=/only-/only+, see and sel commands. But really need a separate section about how selection sets should work. (Maybe writing the section will make it clear how they *should* work.) Add "thresh" example. Look at stellar distribution by B-V -- the Orion spur really does show up in blue! Describe transform syntax including "tfm camera", making multiplication order explicit. Describe colormap file syntax in new section. Document "cment" & "vcmap" cmds.
partiview-1.html 11.09 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE> Partiview (PC-VirDir): Installation</TITLE>
<LINK HREF="partiview-2.html" REL=next>
<LINK HREF="partiview.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="partiview-2.html">Next</A>
Previous
<A HREF="partiview.html#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1. Installation</A></H2>
<P>
<P>This assumes you have the July 2001 release (version 0.6 or later) of
<B>partiview</B>, not the earlier "<B>gview</B>" release that was described
in earlier versions of this document. We keep copies of some Linux support
files (Mesa, FLTK) on our current
<A HREF="http://www.astro.umd.edu/nemo/amnh">http://www.astro.umd.edu/nemo/amnh</A> website. Although
more current versions of support libraries may be available, they
may not have been tested out. This release has been tried on
Linux (red hat 6.2, 7.1, 7.2), Irix and Windows.
<P>partiview needs two libraries to compile: OpenGL (or MESA) for the
drawing operations, and FLTK for the graphical user interface.
These libraries are known to work on MS-Windows as well as many Unix flavors.
<P>
<P>
<H2><A NAME="ss1.1">1.1 MESA/OpenGL</A>
</H2>
<P>
<P>First make sure <CODE>Mesa</CODE> is installed, for <CODE>redhat6.2</CODE>
there are rpm files available. For <CODE>redhat7.1+</CODE> they
are now included in the basic distribution.
Check if you have something like the following (version numbers may be different):
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
% rpm -qa | grep Mesa
Mesa-3.2-2
Mesa-devel-3.2-2
else:
% rpm -i Mesa-3.2-2.i686.rpm Mesa-devel-3.2-2.i686.rpm
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>You should have both installed. Some packages will use <CODE>libMesaGL</CODE>, others
<CODE>libGL</CODE>. Our <CODE>configure</CODE> script (see below)
should take care of the two possible options.
<P>Homepage:
<A HREF="http://mesa3d.sourceforge.net/">http://mesa3d.sourceforge.net/</A><P>
<P>Redhat packages: (part of powertools I believe)
<P>
<P> Mesa3D is under continuous development. As of this writing the
stable release is 4.0.1, but it has not been tested with the current partiview release.
Redhat 7.1 comes with Mesa-3.4 and also works with partiview.
You can also use a CVS release of Mesa.
<P>
<H2><A NAME="ss1.2">1.2 FLTK</A>
</H2>
<P>Also make sure <CODE>FLTK</CODE> is installed. If you got our version, do this (as
root)
<P>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
% locate libfltk.a
% locate Fl_Slider.h
if they fail, then
% cd <where-ever>/fltk-1.0.9
% make install
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>(you only need it if you want to recompile the program at some point,
not if you just want to run it)
<P>Homepage:
<A HREF="http://www.fltk.org/">http://www.fltk.org/</A><P>Redhat packages:
<A HREF="http://www.cs.cornell.edu/nogin/RPM/fltk-devel.html">http://www.cs.cornell.edu/nogin/RPM/fltk-devel.html</A><P>Find rpms:
<A HREF="http://rpmfind.net">http://rpmfind.net</A><P>
<P> FLTK is under continuous development. Versions from 1.0.9 through
1.1.0rc3 have been successfully tested with partiview. The upcoming 2.0
version of FLTK is unlikely to work with partiview.
<P>
<P>
<H2><A NAME="ss1.3">1.3 partiview</A>
</H2>
<P>
<P>You can decide to use a branded version, usually available as a tar or zip file,
or use the CVS (see below).
Extract the tarball, and install the program from within the
<CODE>src</CODE> directory:
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
% tar zxf partiview-0.6.tar.gz
% cd partiview-0.6/src
% make clean (if you really must compile a new executable)
% ./configure (GNU autoconf toolset to ease installation)
% make depend (might need to make new local dependancies)
% make partiview (should not have to edit Makefile anymore)
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>
<P>If you encounter difficulties of locating either the FLTK or MESA/OpenGL
libraries, configure script options can specify them:
<CODE>--with-fltk=</CODE><I>dirname</I> names the directory which contains the
<CODE>lib</CODE> and <CODE>FL</CODE> subdirectories, <CODE>--with-mesa=</CODE><I>dirname</I>
can specify the Mesa installation directory [??], and
<CODE>--with-kira=</CODE><I>dirname</I> names the Starlab directory, whose default
value is taken from environment variable STARLAB_PATH if that is set.
<P>
<H2><A NAME="ss1.4">1.4 CVS</A>
</H2>
<P>Since version 0.5 <CODE>partiview</CODE> is under CVS control, and occasionally we
will stamp out a new release when we deem it stable. Anonymous or read-only
CVS access is also offered. Currently the CVS repository machine is
<CODE>cvs.astro.umd.edu</CODE> and you will need to setup your developers account with
Peter (<CODE>teuben@astro.umd.edu</CODE>). Here's a sample session with some commonly
used CVS commands:
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
setenv CVSROOT :pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot
setenv CVSEDITOR emacs
setenv CVS_RSH ssh (not needed for pserver access though)
cvs login (only needed once, and only for pserver type access)
cvs checkout partiview # get a new local sandbox to work in, or
cd partiview # goto the root directory of partiview
cvs -n -q update # check if others had made any changes
cvs update # if so, update your sandbox and/or resolve conflicts
cd partiview/src # goto the 'src' directory of partiview
./configure
emacs partibrains.c # edit some files
make all # compile the program
./partiview # test the program
emacs kira_parti.cc # edit another file
make all # check if it still compiles
cvs -n -q update # check if anybody else made changes
cvs update # if so, update your sandbox again, resolve conflicts
cvs commit # and commit your changes
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss1.5">1.5 Compiling under Windows</A>
</H2>
<P>Partiview can be compiled from the command line on Windows using either the
Microsoft Visual C tools (<CODE>cl, nmake,</CODE> etc.) or using <CODE>gcc/g++</CODE> with
<CODE>MinGW32, MSYS and w32api</CODE>. The MinGW route is currently the only way
to compile with kira/Starlab support. There's no provision for building
partiview within the MS Visual Studio GUI.
<P>To compile with Microsoft C:
<P>
<OL>
<LI> Install FLTK using MS Visual C++ as described in its documentation.</LI>
<LI> Unpack the <CODE>partiview</CODE> distribution from its tarball or via CVS.</LI>
<LI> Edit the file <CODE>partiview/src/partiview.mak</CODE>,
changing <CODE>FLTK_DIR</CODE> as appropriate.</LI>
<LI> Run the <CODE>vcvars32.bat</CODE> script from the Developer Studio <CODE>Bin</CODE>
directory; this will set the MSVCDIR environment variable,
add the <CODE>Bin</CODE> directory to PATH, etc.</LI>
<LI> In the <CODE>partiview/src</CODE> directory, compile with
<BLOCKQUOTE><CODE>
<PRE>
nmake -f partiview.mak
</PRE>
</CODE></BLOCKQUOTE>
Dependencies are <I>not</I> properly maintained by this Makefile, so
use <CODE>nmake -f partiview.mak clean</CODE> if you change anything.</LI>
</OL>
<P>
<P>To compile with MinGW and company, you'll need to:
<OL>
<LI> Install <CODE>MinGW</CODE> (gcc, etc.), its associated <CODE>w32api</CODE>
libraries and header files, and the <CODE>MSYS</CODE> suite of
UNIX-like tools. All three packages are available at:
<A HREF="http://www.sourceforge.net/projects/mingw/">http://www.sourceforge.net/projects/mingw/</A>
Recent releases of w32api include MinGW versions of OpenGL
libraries and headers, which partiview needs.
As of June 2002, current versions seem to be <CODE>mingw-1.0.1-20010726,
w32api-1.4-2, and MSYS-1.0.7</CODE>.
Unpack the .zip or .tar archives of MinGW and w32api;
both packages are intended to live in the same directory.
The MSYS package comes as a self-extracting archive and
can be extracted into a different directory as desired.
(But don't attempt to merge the MSYS <CODE>bin</CODE> directory contents
into <CODE>mingw/bin</CODE>.)</LI>
<LI> Add both the MSYS <CODE>bin</CODE> subdirectory and MinGW <CODE>bin</CODE>
subdirectory to the Windows PATH environment variable,
with the MSYS directory coming earlier, e.g. in a command window
<BLOCKQUOTE><CODE>
<PRE>
set path=%path%;C:\util\msys\1.0\bin;C:\util\mingw\bin
</PRE>
</CODE></BLOCKQUOTE>
or the analogous setting of PATH using (on WinNT/2000 at least)
<CODE>My Computer -> Control Panel -> System -> Environment</CODE>
to make a permanent change to PATH.
</LI>
<LI> Build FLTK using MinGW. Unpack its source distribution and say
<BLOCKQUOTE><CODE>
<PRE>
sh configure
make
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI> Build the Starlab libraries, if desired:
<OL>
<LI>You may need to install CVS for Windows. Binary packages
are available; follow the Win32 link on
<A HREF="http://www.cvshome.org/downloads.html">http://www.cvshome.org/downloads.html</A>.
Put the resulting cvs.exe file into the PATH somewhere.
</LI>
<LI>Use CVS to checkout the Starlab sources into some directory:
<BLOCKQUOTE><CODE>
<PRE>
cd C:\some\where
set CVSROOT=:pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot
cvs login
cvs checkout starlab
cd starlab
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Copy <CODE>templates\starlab_setup.bat</CODE> to
<CODE>local\starlab_setup.bat</CODE>, and edit it.
Change the first two <CODE>set</CODE> commands: set <CODE>STARLAB_PATH</CODE>
to the installation directory -- in the above example,
<CODE>set STARLAB_PATH=C:\some\where\starlab</CODE>.
Also optionally update (or remove) <CODE>set PATH=...</CODE>
to add MSYS and MinGW <CODE>bin</CODE> directories to it.</LI>
<LI>From a Windows command window, type
<BLOCKQUOTE><CODE>
<PRE>
local\starlab_setup
make libs
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>If successful, you should find in the <CODE>lib</CODE> directory
the files <CODE>libdstar.a libdyn.a libnode.a librdc.a libsstar.a libstd.a libtdyn.a</CODE></LI>
</OL>
<P>
</LI>
<LI>Now, back in the <CODE>partiview/src</CODE> directory,
use <CODE>configure</CODE> and <CODE>make</CODE> as under Unix.
The MSYS package imposes its own UNIX-like syntax for Windows pathnames,
which you'll need to use as arguments to configure and friends,
with forward- instead of backslashes and a /<I>drive-letter</I> prefix.
Also, if typing to a Windows command-window, shell scripts like
<CODE>configure</CODE> must be explicitly fed to <CODE>sh</CODE>.
Thus for example if FLTK is installed in <CODE>C:\util\fltk-1.1.0</CODE>
and Starlab is in <CODE>F:\src\starlab</CODE>, then you might build
partiview by typing
<BLOCKQUOTE><CODE>
<PRE>
sh configure --with-fltk=/c/util/fltk-1.1.0 --with-kira=/f/src/starlab
make
</PRE>
</CODE></BLOCKQUOTE>
Note there's no need to specify the location of the OpenGL or other
libraries; the configure script and MinGW tools already know
where to find them.</LI>
</OL>
<P>
<P>
<HR>
<A HREF="partiview-2.html">Next</A>
Previous
<A HREF="partiview.html#toc1">Contents</A>
</BODY>
</HTML>