RISC OS Build EnvironmentROBE

Reference guide25Project and CI

Introduction and Overview

This chapter groups tools used to create projects, manage version files, prepare CI metadata, and interact with remote build execution services.

Technical Details

Project generators and maintainers

riscos-project creates and updates standard project files. riscos-vmanage and riscos-vtranslate are the related version-oriented tools, and riscos-cport prepares initial RISC OS ports from existing C repositories.

riscos-allocate belongs with the same project-preparation workflow. It converts Allocate request files between the native binary format and an editable YAML description so that allocation requests can be reviewed, kept in source control, and recreated before submission to the allocations service.

riscos-project is the main scaffold and maintenance tool. It can create new project skeletons, generate Git and CI support files, and refresh object lists when source files are added or removed.

riscos-vmanage manages VersionNum and related language-specific version files. It initialises the version at the start of a project, increments it as features are added, and updates companion files such as VersionAsm or VersionBas,ffb when those files already exist.

riscos-vtranslate is used when plain text or BASIC source files need substitutions from VersionNum, such as embedding a current version string into generated output.

riscos-cport creates a first-pass RISCOS/ tree from an existing C library or command-line project. It generates makefiles, links source and header files into the expected RISC OS directory layout, and leaves the resulting port ready for normal riscos-amu validation.

Remote build and run tools

riscos-build-run is the simpler high-level route for uploading files, running commands remotely, and collecting results. riscos-build-online is the lower-level client that works with prepared archives and raw output handling.

For integration with GitHub CI workflows, see Appendix Y: GitHub CI Actions which describes the gerph/riscos-build-service-action and gerph/riscos-prminxml-action.

Porting and scaffolding helpers

The project tool family also includes wrappers such as riscos-cport for project porting and related management tools. These are usually relevant once a repository already exists and needs to be adapted to the build environment's project structure.

System Variables

GITHUB_USER_LOGIN
GitHub username used when populating ownership templates

Read by riscos-project create-pr when generating the CODEOWNERS file and GitHub issue and pull-request templates. If unset, the generated templates are left without an owner for the GitHub-specific entries.

GITLAB_USER_LOGIN
GitLab username used when populating ownership templates

Read by riscos-project create-pr when generating the GitLab issue and merge-request templates. If unset, the generated templates are left without an owner for the GitLab-specific entries.

Commands

riscos-project
Create and maintain standard RISC OS project files
riscos-project operation -help -h -debug -d -version -v -type type -t type -name name -n name -skeleton -outputdir directory -o directory license-name-or-list
<operation>-One of create, create-ci, create-pr, create-git, create-license, update, or inc.
-help -Display the help text.
-h -Short form of --help.
-debug -Enable debug output.
-d -Short form of --debug.
-version -Display the tool version number.
-v -Short form of --version.
-type -Choose the component type for create. The default is command.
-t -Short form of --type.
-name -Choose the component name for create.
-n -Short form of --name.
-skeleton -Create starter source files and directories as well as Makefile,fe1.
-outputdir -Create or update files in the named directory instead of the current directory.
-o -Short form of --outputdir.
<license-name-or-list>-For create-license, either a license template name or list to list the installed templates.

Creates and maintains the standard editable project files used by RISC OS components in this environment. Its main jobs are generating a new Makefile,fe1, optionally creating starter source skeletons, updating object lists, generating Git and CI support files, creating PR and license templates, and incrementing the project version through VersionNum.

The main operations are:

OperationBehaviour
createGenerate a new Makefile,fe1. With --skeleton, also create starter directories and initial source files.
updateRefresh the OBJS list in an existing makefile by scanning the standard source directories.
create-ciGenerate CI workflow files and a .robuild.yaml configuration.
create-prGenerate issue and pull-request templates for GitHub and GitLab, plus a CODEOWNERS file.
create-gitGenerate .gitignore and .gitattributes for a RISC OS project.
create-licenseGenerate a LICENSE file from an installed template. Use create-license list to see the available template names.
incIncrement the version number held in VersionNum.

The project templates support these component types:

TypeMeaning
appC-based desktop application.
asmmoduleAssembler-based module.
c++commandC++ command-line tool.
c++moduleC++ module.
cmoduleC-based module.
cmoduletaskC-based module task.
commandC command-line tool.
fcommandFortran command-line tool.
libC library for export.
pcommandPascal command-line tool.

Without --type, the default type is command. Without --name, the tool picks a type-appropriate default name such as MyCommand, MyModule, or MyLibrary.

create-pr uses the environment variables GITHUB_USER_LOGIN and GITLAB_USER_LOGIN (see the System Variables section below) when populating ownership templates. After creating a new component, the normal next step is to build it immediately with riscos-amu.

The C++ templates target the 64-bit toolchain. With --skeleton, c++command creates cc/main and a Makefile,fe1 using LibraryCommand with ${CLIB} ${C++LIB} in LIBS. The c++module template creates cc/module, cmhg/modhead, and a Makefile,fe1 using CModule with ${C++LIB} in LIBS. Build either template with riscos-amu BUILD64=1.

The fcommand skeleton creates a real Fortran project template. With --skeleton it creates f90/main and a Makefile,fe1 using LibraryCommand with ${CLIB} ${FLIB} in LIBS. The starter source includes VersionFortran, so create that companion file when needed and refresh it with riscos-vmanage.

Use create-license list to enumerate the installed license templates. Then pass the chosen template name as the positional argument to create-license.

riscos-project create --type command --name MyTool --skeleton
riscos-vmanage
Manage VersionNum and companion version files
riscos-vmanage operation -version version-number version-number
<operation>-One of init, inc, increment, update, or set.
-version -For init or set, set the version number explicitly using the shipped command syntax -version x.yy.
<version-number>-For set, version number in the form x.yy.

Creates and updates VersionNum as the main version source for a project. If language-specific companion files such as VersionAsm, VersionBas,ffb, or VersionFortran already exist, riscos-vmanage update refreshes them from the current VersionNum data.

For BASIC projects, the generated VersionBas,ffb library provides PROCinit_version and a set of version variables derived from the main version file.

Use -version x.yy when you need to supply the version explicitly for init or set.

riscos-vmanage init -version 0.01
riscos-vtranslate
Substitute VersionNum values into text files
riscos-vtranslate -quiet version-file input-file output-file
<version-file>-Version source file, usually VersionNum.
<input-file>-Template or source file containing brace-delimited substitutions such as {Module_FullVersion}.
<output-file>-Generated output file with substitutions applied.
-quiet -Suppress warnings for undefined substitution names while still leaving the original token text in the output. The shipped syntax names this switch as -quiet.

Reads a VersionNum-style header and substitutes its #define values into a template or source file. It is commonly used for Messages, !Help, generated release text, and BBC BASIC source files that need embedded version strings.

Substitutions are written as {Name}. If Name is defined in the version file, its value is inserted into the output. Undefined names are left unchanged and normally produce a warning. Use \{ when a literal left brace is required in the output.

The input is treated as ordinary text. The tool does not modify the source file in place; it writes a separate output file.

riscos-vtranslate VersionNum MessagesSrc Messages
riscos-allocate
Display, extract, or create Allocate request files
riscos-allocate -extract | -create -extract-filesdirectory -ooutput file
-extract -Extract the input Allocate request as a YAML description.
-create -Create a binary Allocate request from a YAML description file or from a directory containing Allocation.yaml.
-extract-files directory -Write a detached YAML export into the named directory, including Allocation.yaml and any filetype attachments as sibling files.
-o
or -output
-Write extracted YAML or created binary output to the named file instead of standard output.
<file>-Input Allocate request file, YAML file, or YAML export directory, depending on the selected mode.

riscos-allocate works with the request format used by the historical !Allocate desktop application. It reads binary Allocate request files, can print a summary for inspection, can extract those files into a UTF-8 YAML description, and can recreate the binary request after the YAML has been edited.

With no conversion switch, the command displays a human-readable summary of the binary request. Use --extract when you want one YAML file, or --extract-files when filetype attachments should be written out as sibling files instead of being embedded in YAML.

Use --create to rebuild a binary request from YAML. The input may be either a YAML file or a directory containing Allocation.yaml; detached attachment filenames are resolved relative to that file or directory. If -o is omitted, extract mode writes YAML to standard output and create mode writes the binary request to standard output.

The YAML description preserves the developer details and the ordered registration list. Text fields in the binary format are Latin-1, so the creator warns and replaces characters outside Latin-1 with ?. It also warns about missing fields, unexpected fields, missing detached files, and other structural problems in the YAML input.

The YAML schema and the binary Allocate request format are described in Appendix N: Allocate request file formats.

riscos-allocate --extract request,fb0 riscos-allocate --create request.yaml -o request,fb0
riscos-cport
Create an initial RISC OS port layout from a C project
riscos-cport -name component-name -type mode -output-dir directory -source-dir directory -source file-or-directory -exclude-source file-or-glob -header file-or-directory -internal-header file-or-directory -export-header file-or-directory -command-source file-or-directory -define symbol -command-define command=symbol -include path -command-lib library -summary -no-report library-dir
<library-dir>-Repository or source-tree root to scan and port.
-name -Override the inferred component or library name.
-type -Force the port to be treated as a lib or command project. If omitted, the tool autodetects the project type from the discovered sources.
-output-dir -Write the generated port under the named directory instead of the default RISCOS/ directory.
-source-dir -Choose a fallback source directory when autodiscovery is not sufficient.
-source -Add source files or source directories to the discovered library source set.
-exclude-source -Remove files or glob patterns from the discovered source set.
-header -Add exported public headers.
-internal-header -Add compile-only headers that should not be exported.
-export-header -Replace the exported-header list entirely.
-command-source -Add command-line source files containing main().
-define -Add a library-wide preprocessor define to the generated makefiles.
-command-define -Add a define only to one generated command makefile.
-include -Add an include path to the generated makefiles.
-command-lib -Add an extra library dependency to generated command makefiles.
-summary -Print only a short summary of the generated port.
-no-report -Do not write RISCOS/RISCOS_PORT.md.

Scans an existing C repository and creates a RISCOS/ subdirectory containing a normal RISC OS port skeleton. The generated tree links the original files into RISCOS/c/ and RISCOS/h/, creates makefiles with riscos-project, and prepares library exports or command makefiles for later editing.

The tool is intended as a structural first pass. Let it discover the obvious inputs, then use the override switches to correct unusual layouts, generated headers, host-only test sources, or command-specific dependencies. Once the generated tree is structurally correct, validate it with riscos-amu export for libraries or with a specific makefile build for command ports.

When discovery is wrong, the most useful controls are usually --exclude-source, --command-source, --define, --command-define, and --include. These usually remove the need for broader source edits until the final compiler-validation stage.

Autodiscovery covers source files but not headers: a run with no --header switch reports Exported headers: None and Compile-time headers: None in RISCOS_PORT.md even when the original repository has a header directory, and the export build then fails to find any #include that needs them. Pass --header for each public header file or directory explicitly. Generated headers also land flatly in RISCOS/h/ with no subdirectory prefix, so a source tree that uses namespaced includes such as #include "mylib/util.h" needs those includes rewritten to the flat form before riscos-amu export succeeds.

riscos-cport mylib
riscos-build-run
Upload files to the RISC OS Build Service and run commands
riscos-build-run file-or-directory ... -command riscos-command -c riscos-command -return-dir directory -r directory -return-file file -R file -return-to host-path -o host-path -set-variable variable-and-value -s variable-and-value -timeout seconds -t seconds -ansi -a -arch architecture -A architecture -32 -32bit -64 -64bit -quiet -q -very-quiet -Q -help -h
<file-or-directory>-File or directory to upload to the remote run. May be repeated. If a directory name ends in /, only its contents are added; otherwise the directory itself is added.
-command -RISC OS command to run on the remote system.
-c -Short form of --command.
-return-dir -Remote directory to return on completion.
-r -Short form of --return-dir.
-return-file -Remote file to return on completion.
-R -Short form of --return-file.
-return-to -Host filename or directory to receive the returned file or directory.
-o -Short form of --return-to.
-set-variable -Set a RISC OS variable for the remote run, written as name=value.
-s -Short form of --set-variable.
-timeout -Execution timeout in seconds.
-t -Short form of --timeout.
-ansi -Use ANSI colouring in the output.
-a -Short form of --ansi.
-arch -Select the target architecture: aarch32 or aarch64.
-A -Short form of --arch.
-32 -Shorthand for --arch aarch32.
-32bit -Alternative shorthand for --arch aarch32.
-64 -Shorthand for --arch aarch64.
-64bit -Alternative shorthand for --arch aarch64.
-quiet -Suppress non-output informational messages.
-q -Short form of --quiet.
-very-quiet -Suppress all non-failure informational messages.
-Q -Short form of --very-quiet.
-help -Display the help text.
-h -Short form of --help.

Runs one or more RISC OS commands remotely, optionally returning files or directories to the host project afterwards.

The most common pattern is to upload one or more files, add one or more --command switches for the RISC OS commands to execute, and then use either --return-file or --return-dir together with --return-to when you want artifacts copied back to the host.

Use --timeout to stop runaway jobs, --arch or the --32 and --64 shorthands to select the target architecture, and --ansi if ANSI-coloured output is preferred. --quiet and --very-quiet reduce wrapper chatter.

riscos-build-run aif32/Tool,ff8 --command Tool
riscos-build-online
Low-level client for the online build service
riscos-build-online -i input-file -o output-prefix -b build-log-file -s service-uri -t seconds -a on-or-off -A architecture -q -Q
-i -Source archive to upload.
-o -Output filename prefix for returned artifacts. The service appends the returned host-side filetype suffix such as ,xxx. The default prefix is output.
-b -Write the textual build output to a separate file.
-s -Connect to a different build-service URI instead of the default server.
-t -Set a timeout for the remote operation, in seconds.
-a -Enable or disable ANSI text in the build output. Use the values on or off.
-A -Select the target architecture: aarch32 or aarch64. The default is aarch32.
-q -Reduce non-output informational messages.
-Q -Suppress all non-failure informational messages.

Uploads a prepared archive directly to the build service and writes returned artifacts back to the host.

The command is the lower-level client underneath riscos-build-run. Use -i to supply the input archive, -o to choose the output filename prefix, -b to save the textual build log separately, and -A to select aarch32 or aarch64.

For service control, use -s to point at a different build-service URI, -t for timeout control, -a on|off for ANSI text, and -q or -Q to suppress non-essential messages.

riscos-build-online -i source.zip -A aarch64 -o result

Examples

Preparing CI files for a new repository

The generated files remain normal editable project files.

riscos-project create-ci

Creating and updating a BASIC version library

Create the main version file first, then add VersionBas,ffb and refresh the companion files.

riscos-vmanage init -version 0.01
touch VersionBas,ffb
riscos-vmanage update

Substituting version strings into a text resource

This is the normal pattern when a resource file needs to embed version strings from VersionNum.

riscos-vtranslate VersionNum MessagesSrc Messages

Preparing a first-pass port from an existing library

This creates the RISC OS port tree and validates the generated library export.

riscos-cport mylib
cd mylib/RISCOS
riscos-amu export