Skip to content

Repository files navigation

MeatballCraft OpenComputers packages

This repo contains the code that my friends and I used for various automations during our playthrough.

This repository is an OpenPrograms Package Manager (OPPM) package source for OpenComputers.

Register the repository

Register this repository on an OpenComputers machine with:

oppm register dyc3/meatballcraft-infra

OPPM requires the default branch to be named master and reads package definitions from programs.cfg at the repository root.

Add a package

Place the package files in a directory in this repository and add an entry to programs.cfg:

{
  ["example-package"] = {
    files = {
      ["master/example-package/example.lua"] = "/bin"
    },
    name = "Example package",
    description = "A short description",
    authors = "Your name",
    repo = "tree/master/example-package"
  }
}

Paths such as /bin are relative to the selected OPPM installation root (normally /usr). Use a double slash, such as //etc, only for an absolute destination. Do not leave example entries in programs.cfg unless their referenced files exist.

End-to-end testing

The test harness boots a real OpenComputers machine in Ocelot Brain, starts its bundled OpenOS 1.8.9, mounts this repository as a disk, and runs a Lua program inside the emulated computer.

Initialize the emulator submodule after cloning:

git submodule update --init --recursive

Run the smoke test with JDK 17 (the first run downloads the pinned sbt launcher and Scala dependencies):

./test/e2e/run

The runner finds common Linux JDK 17 installations automatically. Elsewhere, set OC_E2E_JAVA to the path of a JDK 17 java executable; Ocelot's pinned Scala 2.13.10 compiler is not compatible with JDK 21.

Run any repository-relative Lua program that terminates on its own:

./test/e2e/run path/to/program.lua

The runner provides a tier-three CPU, memory, GPU, screen, keyboard, the Lua BIOS, OpenOS, and a writable disk. Programs needing mod-specific components or user input need a purpose-built fixture before they can complete unattended.

Provision server drives

Install the drive provisioner on an OpenOS computer where OPPM is already configured with this repository:

oppm install provision-drive

Attach the OpenOS installation disk and a new server drive, then run:

provision-drive

Pick the target from the displayed writable drives and approve the destructive operation once. The tool erases the target, then uses the standard install command for both OpenOS and OPPM against that exact filesystem address without further keyboard input. If the OPPM disk is not already attached, it waits automatically while you swap installation media. It then installs fresh OPPM package state plus the dyc3/meatballcraft-infra repository registration. OPPM's installer requires an Internet Card. A target label or address can also be supplied directly; --yes skips the initial approval.

About

OpenComputers packages and infrastructure for MeatballCraft

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages