docs/install.md

Thu, 23 Mar 2023 15:12:30 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 23 Mar 2023 15:12:30 +0000
changeset 174
662bd8c5ae28
parent 168
873f6fec12f2
permissions
-rw-r--r--

Serialize XML in a consistent order by default

This overrides all XML serialization to emit attributes in an ordered form, so
the XML will match across multiple runs. This can be useful for comparing
different runs, or even two stanzas printed in the same run (e.g. if there is
a mismatch).

## Installation and setup

### Source code

The source code can be cloned or downloaded from https://code.matthewwild.co.uk/scansion

#### Dependencies

Scansion requires:

- Lua 5.2
- Verse (a version is bundled by default)
- LuaExpat
- LuaCJSON
- LuaSec
- LuaSocket
- LuaFileSystem (optional)

If these are present, a simple 'make' and 'sudo make install' should suffice to install scansion to `/usr/local/bin/`.

On Debian and Ubuntu, these can be installed with the following command:

```
apt install lua5.2 lua-expat lua-cjson lua-sec lua-socket lua-filesystem
```

### Docker

A Dockerfile is also provided, to allow you to build and run scansion inside a clean environment with all dependencies
installed already.

First, build the image:

```
docker build -t scansion .
```

To run it with a directory of test scripts in ./spec/scansion:

```
docker run -v$PWD/spec/scansion:/scripts scansion
```

To run it [as a service](usage/service.md):

```
docker run -p 8007:8007 -v$PWD/spec/scansion:/scripts scansion --serve

```

mercurial