parc
ARES System Manual: pkg Package Manager

parc is a backend program that assists ax and software in managing installed software. Quite unlike the _xanadu-client package manager in Companion, parc is designed to rely heavily on the input shell for sequencing commands.

Note: parc was formerly known as pkg. For compatibility reasons, an exec shell alias mapping the command pkg to parc is standard.

IMPORTANT: Every AX package is a shell script with full execution privileges. Never install packages from servers or creators you don't recognize.


User Commands

parc index: updates the index of package metadata

Control Commands

parc local [<package>]: lists versions of installed packages
parc clean: delete all .parc, .sparc, .pkg, and .spkg files from local memory
parc open <archive>: opens a package archive (rezzes an object from the unit's inventory), retrieving it first from a server in the region if it is not found
parc close|detach <archive>: closes a package archive (sends the rezzed object a command to self-destruct)
parc extract <archive> <file>: copies <file> from <archive> to the local filesystem (ring 3) (instructs the rezzed object to send the file)
parc inject <archive> <file>: copies <file> from the local filesystem (ring 3) to <archive> (archive must be rezzed; PARC version 2.0 and later only)
parc upload <server> <file>: copies <file> from the local filesystem (ring 3) to arbitrary UUID <server> (file must not be a script)
parc erase <archive> <file>: removes <file> from <archive> (archive must be rezzed; PARC version 2.0 and later only)
parc list <archive>: lists files in <archive> (archive must be rezzed; PARC version 2.0 and later only)
parc sideload|attach <archive>: searches for a package archive that is already attached to your avatar (see Sideloading, below)


Managing Packages

Once a package is downloaded, you may run it with do <package>.pkg as with other shell scripts. Standard package scripts provide actions, which are read as command-line arguments:

- do <package>.pkg install: Installs the package from scratch.
- do <package>.pkg remove: Removes the package's files and deletes any associated settings.
- do <package>.pkg reinstall: Removes the package's files, then installs them again.
- do <package>.pkg update: Removes the package's files without removing settings. This is also known as 'prepping' or 'preparing' a package for installing an upgrade.
- do <package>.pkg cache: Downloads the package archive so that the installation may be completed later.
- do <package>.pkg uncache: Removes the package archive and the package.

During both remove and update, the package file and script are deleted. To upgrade a package to a new version, use update to remove the old version and then install to add the new version.

The settings... > software... > downloaded... menu can be used to the same effect.


Creating New Packages

The package sample.pkg is available from official NS servers. It provides instructions, as well as a template package archive (sample.ax.parc) and minimal example application, which can be used to create and package your own software.

The ARES SDK contains a number of header files which are required to create ARES programs. Visit http://develop.nanite-systems.com/ for information on ARES application development.

Make sure you fully understand the ARES software copyright license (see license) before distributing your work.


Sideloading

The parc sideload command is equivalent to parc open and only prepares the attached package for installation; to complete the installation process you will still need to type the relevant pkg extract commands (or have a script do it for you).

However, if the package archive's filename ends in .sparc, then it is (probably) a self-extracting package archive that will autonomously complete the installation process without guidance from ARES.

Sideloading SPARCs is the standard method of distribution for unbundled ARES software products, like Sexuality and Warrior.


Repacking

Most packages are created by using the typical SL tools to edit the contents of the PARC, but you can also use parc's inject, erase, and list commands. This is convenient if you have many files in your package but only need to update a few.

However, be aware that there is no way to put a rezzed object back into the file system of your ARES installation. To repack, you must first sideload the package from your own inventory, NOT open it from ARES. Otherwise any changes will be lost!

Repacking is only possible with PARC 2.0 (compiled Nov 12 2023) and later. The original PARC 1.0 files (compiled Jun 23 2023) cannot be modified this way. SPARCs cannot be repacked.