Login
Art Menagerie
Login

Create your web-space

Website: https://artmenagerie.app/

Source Code: https://code.artmenagerie.app/

Requirements

Running

Open a terminal or command prompt window and run the software:

./artmenagerie

The software will output a URL, like: http://localhost:4747

Point your web browser to the URL.

To view help and options, run:

./artmenagerie -help

Source Code

The source code is available at: https://code.artmenagerie.app/download

You have several options for download:

  1. .zip file
  2. .tar file
  3. Clone with the fossil source code manager

To clone with Fossil run:

fossil clone https://code.artmenagerie.app artmenagerie.fossil

Build Requirements

To compile this software, you will need:

Compiling

To compile the software, run:

go build ./cmd/artmenagerie

Or on BSD, Linux, Mac, or any operating system with a POSIX shell; run:

./buld.sh

This has the advantage of including the commit hash in the version if you cloned the repository with fossil.

Coding

Common tasks for working on the source code.

Linting:

golangci-lint run

Note: Assumes you have golangci-lint installed.

Testing:

go test ./...

Fossil hooks to ensure linting and testing pass before a commit:

fossil hook add --command 'golangci-lint run' --type before-commit
fossil hook add --command 'go test ./...' --type before-commit

Note: Assumes Fossil was used to copy the code.

Cross Platform Builds

It is possible to build cross-platform. To view the possible list, run:

go tool dist list

Most platforms do not require CGO (using a C/C++ compiler with go) and can be compiled like so:

env GOOS=linux GOARCH=arm64 go build \
    -o artmenagerie-linux-arm64 ./cmd/artmenagerie

Note that this uses the env command to set environment variables (GOOS and GOARCH) for a single command. It is available on most UNIX-based systems (BSD, Linux, Mac, etc.)

Set GOOS to the target operating system (OS) and GOARCH to the target CPU architecture (e.g. amd64, arm64, etc.)

Some platforms require CGO which can be configured to use Zig as the C/C++ compiler for cross-platform builds.

This example cross-compiles to FreeBSD targeting the x86_64 / amd64 CPU architecture.

env CC="zig cc -target x86_64-freebsd" CXX="zig c++ -target x86_64-freebsd" \
    CGO_ENABLED=1 GOOS=freebsd GOARCH=amd64 go build \
    -o artmenagerie-freebsd-amd64 ./cmd/artmenagerie

Don't forget to install Zig first!

License

See LICENSE.md.