install s2plot MacOS

Installing s2plot for Mac OS X running Leopard:
-----------------------------------------------------------------------------

There are instructions online and in the INSTALL.TXT and ENVIRONMENT.TXT files,
as well as online. This is documentation specifically for Mac Laptops running Leopard. 
Note that the full list of supported architectures is available at 
http://astronomy.swin.edu.au/s2plot/index.php?title=S2PLOT:Installation


1) Install XCODE for compiling.

2) s2plot
     a) Install
     b) Configure
     c) Test
     d) Implement

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

1)  Install XCODE:  This has the compilers, etc. used by the s2plot scripts. 

a) Using Mac Install Disc 2, in the XCODE folder click on Xcode Tools.mpkg and use the
wizard. It will install in the /Developer directory.

Alternatively grab  XCODE off of web - takes 2 hours to download and is 1 GB. 

b) Reboot your computer so that the gcc compiler will be put into the /usr/bin/ directory.

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

2) S2PLOT

2a) Install S2PLOT:

--Download the tar file for the full release from
    http://astronomy.swin.edu.au/s2plot/index.php?title=S2PLOT:Download

-- Bunzip by clicking s2plot-all-2.4-2008-09-29.tar.bz2 in a Finder window. 

-- Move the resulting s2plot-2.4. directory to /usr/local/

-- Open up the permissions 
            chmod -R 777 s2plot-2.4


2b) Configure S2PLOT:

-- Check that s2plot-2.4/s2plot.csh has S2X11PATH  which points to  /usr/X11R6

-- Set environmental variables in a dot rc file.

     - check the kind of shell you are running by typing "ps".  It will be
       listed.   The following instructions assume that  bash is running. 

    - make a .bashrc file with the following:

# s2plot settings
export S2PATH="/usr/local/s2plot-2.4"
export S2ARCH="darwin-gnu-i386"
export PATH="${PATH}:${S2PATH}:${S2PATH}/${S2ARCH}"
export S2TEXPATH="${S2PATH}/textures"
export S2PLOT_LATEXBIN="/usr/texbin"
export S2PLOT_DVIPNGBIN="/usr/texbin"
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${S2PATH}/${S2ARCH}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${S2PATH}/${S2ARCH}"
export C_INCLUDE_PATH="${C_INCLUDE_PATH}:${S2PATH}"
export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${S2PATH}"
export PATH="${PATH}:${S2PATH}:${S2PATH}/${S2ARCH}"

-- to source these variables type

      . .bashrc 


Note that the S2PLOT_LATEXBIN and S2PLOT_DVIPNGBIN environment variables 
assume that you have a working installation of LaTeX and the dvipng program,
which is available from http://sourceforge.net/projects/dvipng/
These packages are *only* required for two S2PLOT functions:
	ss2ltt - Create a texture with LATEX commands.

If you wish to use Freetype fonts for creating texture-mapped labels via
function:
	ss2ftt - Use a named freetype font to create a texture map

will also need to set:

export S2FREETYPE="yes"


2c)  Testing that the installation and configurations have worked: 

Test that you can run the programs from a terminal (do not use the Apple Finder
or other file managers).

--   Change to directory for s2plot-2.4

       cd $S2PATH 

-- The test programs haven't been compiled yet.  To do this type

       build-functions.csh

    which puts them in the darwin-gnu-i386 dir which can be called with
    $S2PATH/$S2ARCH
 
-- move to  the directory with the functions 
       cd  $S2PATH/$S2ARCH

-- Select  any name at random and type it's name to run.  
          At the graphics device prompt it best to select /S2MONO.



2d)  Implement S2PLOT functions. 

-- Make a directory in your home area in which you want to store the functions
    (e.g. s2plotfn).  

-- Copy the functions over to this directory and compile them.  Example:

       Copy s2opend.c from the directory ${S2PATH}/functions to ~/s2plotfn
       directory. Compile with 
 
         cbuild.csh s2opend 

      This builds an executable binary called "s2opend" 

-- To run the executable  you then just type the name.  
            F1 toggles on info about what you can do. 
            Shift-ESC or Shift-Q to quit.

-- A full list of keypresses and mouse controls is available at 
	http://astronomy.swin.edu.au/s2plot/index.php?title=S2PLOT:Controls

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
原文地址:https://www.cnblogs.com/shaoguangleo/p/2805746.html