Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Install multiple versions in CentOS or Ubuntu

Help
Anonymous
2011-02-26
2013-05-30

  • Anonymous
    2011-02-26

    Does anyone know how to install multiple versions of Asymptote in Ubuntu (Debian) or CentOS (RedHat)?

    We have many code snippets that are not compatible with Asy 2, especially those involving 3d.

     
  • John Bowman
    John Bowman
    2011-02-26

    The change I think you are referring to happened 2.5 years ago!
    You should upgrade:

    Release Notes for Version 1.44

    Full interactive 3D support has been added to Asymptote, with the option of
    generating and embedding 3D PRC data in PDF files or rendering scenes
    directly with Asymptote's own fast OpenGL-based renderer.  The implicit
    casts from 3D to 2D objects were removed (in favour of call explicit calls
    to project).  A path texpath(string s) routine was added to convert
    string into the paths that TeX would fill. Add boolean stroke parameter was
    added for shading (and clipping to) stroked paths.  The Circle and Arc
    routines were fixed.  Autoscaling of graph axes limits is now disabled by
    default.  A path3 path3(path p, triple plane(pair)=XYplane) constructor was
    added; the path3 routines were moved to C++ code.  Optimized and robust
    versions of the intersection, windingnumber, inside, and surface extrema
    routines were implemented.  The lighting routines were replaced by the
    OpenGL model.  Each Asymptote process once again uses a separate
    currentpen.  A segmentation fault and an incorrect parameter in the
    Delaunay triangulation routine were fixed.  This major overhaul of the
    three-dimensional graphics has necessitated a few backwards
    incompatibilities. The most significant change involves filldraw:

    filldraw(polygon(5),red);

    should be replaced by

    draw(surface(bezulate(polygon(5))),red);

    Also, the solids module has been improved so that

    revolution a=revolution(O-X+Z,Z);
    a.filldraw(red,blue);

    is now more sensibly written as

    revolution a=revolution(O-X+Z,Z);
    draw(surface(a),red);
    draw(a,blue);

     

  • Anonymous
    2011-02-28

    Yes, I'm aware the change happened a long time ago. We have many old scripts that require the use of old versions of Asymptote. That is why we would like to have the old version and new version installed. Is there any way to do this?

     
  • Chris Savage
    Chris Savage
    2011-02-28

    I have some old asymptote code that I sometimes wish to run.  I do the following to install multiple versions that can be called by asy-0.95, asy-1.23, etc.

    *) Download whichever older version you wish to use.  If you download the source, compile it as directed, but do not do the "make install" step.

    *) Make some directories, using asymptote version 0.95 as an example:

    mkdir -p /usr/local/bin
    mkdir -p /usr/local/share/asymptote-0.95
    

    *) Copy the newly compiled binaries (or the binaries from a precompiled package):

    cp asy /usr/local/share/asymptote-0.95/asy-0.95
    cp xasy /usr/local/share/asymptote-0.95/xasy-0.95
    

    *) Copy the base files:

    cp -r base/* /usr/local/share/asymptote-0.95/
    

    *) Create the following script as "asy-0.95" and place in /usr/local/bin with appropriate permissions.  Do the equivalent for xasy if you use it:

    1
    2
    3
    #!/bin/bash
    export ASYMPTOTE_DIR=/usr/local/share/asymptote-0.95
    /usr/local/share/asymptote-0.95/asy-0.95 $*
    

    Now you should be able to use "asy-0.95" when you want to use asymptote version 0.95.  You can do the same for other versions.