Quick start guide

From PROSE Programming Language - Wiki
Revision as of 22:23, 21 September 2017 by Cambridge (Talk | contribs)

Jump to: navigation, search

Getting started with PROSE 0.11.x

This article is written for the impatient among you, who wish to get the PROSE 0.11.x release up-and-running quickly without having to read the documentation. To learn more about the PROSE Programming Language, visit http://prose.sourceforge.net.

Configuring, compiling and installing

Download the latest release from http://sourceforge.net/project/showfiles.php?group_id=50184.

Uncompress and extract the archive:

    $ gunzip -c prose-<version>.tar.gz | tar xvf -

Run the configure script to test for the various features of your platform. By default the software will be installed under the /usr/local directory. If this should be different (for example, /djgpp if you're using DJGPP), you must use the --prefix option. Run configure --help for a full list of options available and how to set them.

    $ cd prose-<version>
    $ ./configure

Once the configure script has finished, begin compilation:

    $ make

When compilation has finished, check that the compilation tests complete without error:

    $ make check

If all tests pass, you can now install the product. On many systems, you will need to be a privileged user to install in directories such as /usr/local, for example in UNIX you would use the su command to switch to the root user, before the installation will work. If in doubt, refer to your operating system manual.

    # make install

What files are installed

The following files will be installed by this release. Note that the prefix /usr/local may have been changed by configure --prefix.

Binaries /usr/local/bin/prose
/usr/local/bin/prism
Shared libraries /usr/local/lib/libIvor.so
/usr/local/lib/libpal.so
/usr/local/lib/libprose.so
Modules /usr/local/share/prose/modules/ps_core.so
/usr/local/share/prose/modules/ps_core.conf
/usr/local/share/prose/modules/ps_gmp.so
/usr/local/share/prose/modules/ps_gmp.conf
Schema /usr/local/share/prose/schema/00core.schema
/usr/local/share/prose/schema/01gmp.schema
Online manuals /usr/local/man/man1
/usr/local/man/man3
/usr/local/man/man5
Header files /usr/local/include/prose

Note that libraries will be created that are appropriate for the platform that PROSE has been configured for. They may be shared objects, static archives, or both.

The header files are only required if you are going to write your own APIs or modules for the PROSE environment.

Preparing your environment

You will need to ensure that the /usr/local/bin directory (or wherever you installed to) is in your PATH, so that when you type prose or prism, the tool can be located. You may also need to ensure that the /usr/local/lib directory is in your LD_LIBRARY_PATH, and /usr/local/man is in your MANPATH.

An example of setting these environment variables is given below. Typically you would put these commands in your login script, so that they persist from one login session to the next.

In a Bourne-shell variant:

    $ PATH=$PATH:/usr/local/bin
    $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    $ MANPATH=$MANPATH:/usr/local/man
    $ export PATH LD_LIBRARY_PATH MANPATH

In a C-shell variant:

    % set path=($path /usr/local/bin)
    % setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib
    % setenv MANPATH $MANPATH:/usr/local/man

In Microsoft Windows, you can set environment variables by right-clicking on 'My Computer', and choosing Properties -> Advanced -> Environment Variables. You only need to modify the PATH variable.

Testing your environment

To check the newly installed binaries are working:

    $ prose --version
    $ prism --version

To check the manual pages are working:

    $ man pal_intro

Running your first program

Now try out your first program by following the instructions in Running your first program. In release 0.11.x, only the PROSE Assembly Language (PAL) is available, and then only a subset of those instructions. So be aware, it's very low-level programming at this time.

How to uninstall

Should you wish to uninstall PROSE, go back into your build directory and type make uninstall. The files that were previously installed will now be removed from your system.