Skip to content
Snippets Groups Projects
partiview-1.html 10.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • teuben's avatar
    teuben committed
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    
    slevy's avatar
    slevy committed
     <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
    
    teuben's avatar
    teuben committed
     <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.</A> <A HREF="partiview.html#toc1">Installation</A></H2>
    
    
    teuben's avatar
    teuben committed
    
    
    slevy's avatar
    slevy committed
    <P>This release has been tried on Linux (Fedora, Ubuntu, etc.), Mac OS X, Irix and Windows.</P>
    
    <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>
    
    
    
    slevy's avatar
    slevy committed
    <H2><A NAME="ss1.1">1.1</A> <A HREF="partiview.html#toc1.1">OpenGL (possibly via Mesa)</A>
    
    teuben's avatar
    teuben committed
    </H2>
    
    
    slevy's avatar
    slevy committed
    <P>Most platforms will have it installed already, whether as libMesaGL or libGL.
    Our <CODE>configure</CODE> script (see below) 
    
    should take care of the two possible options.</P>
    
    teuben's avatar
    teuben committed
    <P>Homepage: 
    
    <A HREF="http://mesa3d.sourceforge.net/">http://mesa3d.sourceforge.net/</A></P>
    
    <P>Redhat packages: (part of powertools I believe)</P>
    
    
    <H2><A NAME="ss1.2">1.2</A> <A HREF="partiview.html#toc1.2">FLTK</A>
    
    teuben's avatar
    teuben committed
    </H2>
    
    
    slevy's avatar
    slevy committed
    <P>Also make sure <CODE>FLTK</CODE> is installed, from fltk.org.
    FLTK versions 1.1.x (e.g. 1.1.7, 1.1.9, ...) work.  
    FLTK 2 will not work with partiview.</P>
    <P>If you're not sure whether you already have it, try</P>
    
    teuben's avatar
    teuben committed
    <BLOCKQUOTE><CODE>
    <HR>
    <PRE>
    
           % locate libfltk.a 
           % locate Fl_Slider.h
    
    
    pteuben's avatar
    pteuben committed
    if they fail, then
    
    
    slevy's avatar
    slevy committed
           % cd &lt;where-ever&gt;/fltk-1.1.9
    
    teuben's avatar
    teuben committed
           % make install
    
    teuben's avatar
    teuben committed
    </PRE>
    <HR>
    </CODE></BLOCKQUOTE>
    
    slevy's avatar
    slevy committed
    <P>(you only need it if you want to recompile partiview at some point,
    not if you just want to run it, since FLTK is built-in to partiview binaries.)</P>
    
    teuben's avatar
    teuben committed
    <P>Homepage: 
    
    <A HREF="http://www.fltk.org/">http://www.fltk.org/</A></P>
    <P>Find rpms: 
    <A HREF="http://rpmfind.net">http://rpmfind.net</A></P>
    
    
    slevy's avatar
    slevy committed
    <P>     FLTK is under continuous development.   Versions from 1.1.1 through
    1.1.9 have been successfully tested with partiview. Some problems
    with other versions exist, but 1.1.4 is also known to work.</P>
    
    
    
    <H2><A NAME="ss1.3">1.3</A> <A HREF="partiview.html#toc1.3">partiview</A>
    
    teuben's avatar
    teuben committed
    </H2>
    
    
    pteuben's avatar
    pteuben committed
    <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>
    
    teuben's avatar
    teuben committed
    <P>
    <BLOCKQUOTE><CODE>
    <HR>
    <PRE>
    
    slevy's avatar
    slevy committed
           % tar zxf partiview-0.6.tar.gz
    
    teuben's avatar
    teuben committed
    
    
    teuben's avatar
    teuben committed
           % make clean                (if you really must compile a new executable)
    
    teuben's avatar
    teuben committed
           % ./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)
    
    teuben's avatar
    teuben committed
    </PRE>
    <HR>
    </CODE></BLOCKQUOTE>
    
    <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</A> <A HREF="partiview.html#toc1.4">CVS</A>
    
    teuben's avatar
    teuben committed
    </H2>
    
    
    slevy's avatar
    slevy committed
    <P>The current source code of <CODE>partiview</CODE> is always available from CVS,
    with public anonymous read-only access.  Occasionally we stamp out a
    packaged release, too, but looking to CVS is best.</P>
    <P>(Partiview developers can request a non-anonymous CVS account
    from Peter Teuben -- <CODE>teuben@astro.umd.edu</CODE>.)</P>
    <P>Currently the CVS repository machine is <CODE>cvs.astro.umd.edu</CODE>.
    Here's a sample session with some commonly used CVS commands:</P>
    
    teuben's avatar
    teuben committed
    <P>
    <BLOCKQUOTE><CODE>
    <HR>
    <PRE>
    
    pteuben's avatar
    pteuben committed
     setenv CVSROOT   :pserver:anonymous@cvs.astro.umd.edu:/home/cvsroot
    
    teuben's avatar
    teuben committed
     setenv CVSEDITOR emacs
    
    
     cvs login                      (only needed once, and only for pserver type access)
    
    teuben's avatar
    teuben committed
    
     cvs checkout partiview              # get a new local sandbox to work in, or
    
    pteuben's avatar
    pteuben committed
     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
    
    pteuben's avatar
    pteuben committed
     cd partiview/src                    # goto the 'src' directory of partiview
    
    slevy's avatar
    slevy committed
     ./configure --with-fltk=/some/where/fltk-1.1.something/ ...
    
    
     emacs partibrains.c                 # edit some files
    
    teuben's avatar
    teuben committed
     make all                            # compile the program
    
     ./partiview                         # test the program
    
    slevy's avatar
    slevy committed
     emacs kira_parti.cc                 # edit another file
    
    teuben's avatar
    teuben committed
     make all                            # check if it still compiles
    
    teuben's avatar
    teuben committed
     cvs -n -q update                    # check if anybody else made changes
    
     cvs update                          # if so, update your sandbox again, resolve conflicts
    
    
    teuben's avatar
    teuben committed
     cvs commit                          # and commit your changes
    </PRE>
    <HR>
    </CODE></BLOCKQUOTE>
    
    </P>
    
    <H2><A NAME="ss1.5">1.5</A> <A HREF="partiview.html#toc1.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>
    <P>To compile with Microsoft C:</P>
    
    <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>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>
    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>
    
    slevy's avatar
    slevy committed
    <LI> Use MinGW to build FLTK.   (FLTK 1.1.x, e.g. 1.1.9, works with partiview.  FLTK 2.0 won't work.
    Not sure about versions in between.)   Unpack the FLTK 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>
    
    
    </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>.
    
    slevy's avatar
    slevy committed
    Thus for example if FLTK is installed in <CODE>C:\util\fltk-1.1.9</CODE>
    
    and Starlab is in <CODE>F:\src\starlab</CODE>, then you might build
    partiview by typing
    <BLOCKQUOTE><CODE>
    <PRE>
    
    slevy's avatar
    slevy committed
            sh configure --with-fltk=/c/util/fltk-1.1.9  --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
    
    slevy's avatar
    slevy committed
    where to find those.  Omit the "--with-kira=..." if you're not using Starlab.</LI>
    
    teuben's avatar
    teuben committed
    <HR>
    <A HREF="partiview-2.html">Next</A>
    Previous
    <A HREF="partiview.html#toc1">Contents</A>
    </BODY>
    </HTML>