Oberon RTK

Astrobe on macOS

Running Astrobe's command line tools on a Mac

Overview

Astrobe IDE & Tools includes a set of command line tools that provide the same development capabilities as the integrated GUI environment.

This document outlines the basics of running these tools on macOS.

Mono

My current basis for running Windows programs on macOS is the Mono framework. As the large text box the the top of the website explains, the "stewardship" of the project has been taken over by WineHQ from Microsoft, and Microsoft has done integration work into their .NET efforts. Honestly, I don't really understand all this yet in detail as regards future development and availability.

However, we can download a working release of Mono for macOS. It's the same release we also could install using Homebrew. I have used the download from Mono's project site, which installs the framework into /Library/Frameworks/Mono, and extends the $PATH for the corresponding binaries.

After executing the installer, running mono as means to run Astrobe's command line programs just worked. Hence, for now we're good, but need to keep an eye on the further developments regarding the Mono framework, or other means to run Windows programs on macOS.

Tools Installation

Copy the command line tools to suitable directories on the Mac, where they can be easily referenced from the command line, or scripts (see below). I would not install them in any of the Unix-y bin directories, since they cannot be run directly.

Running Astrobe's Command Line Tools

There's not a lot to say here – just run

$ mono AstrobeCompile.exe astrobeFolder configFile moduleFile 

from a shell to compile an Oberon module, or the other programs to recursively compile a module and all its IMPORTs as needed (AstrobeBuild.exe), or to link the compiled modules into a binary (AstrobeLink.exe). astrobeFolder is an optional parameter to denote the variable such as %AstrobeRP2040% used in the configFile for the library search path definition.

In my view, the command line tools should be used from a build system, which can be a set of simple shell scripts.[1] I always use absolute file and directory paths for the programs and their parameters, which is straightforward from scripts and build systems.

Refer to Build & Load how to build, load, and run the programs, with or without debugging.

Required Changes

For macOS, the library search path defined in the config .ini file needs to be changed to use forward slashes /. They remain compatible for Windows as well, and the Astrobe IDE and the command line tools on Windows work fine with the forward slashes.

Line Delimiters

Windows uses CRLF as line delimiter in text files, macOS uses the Unix-style LF. The Git repository stores text files using LF, and then checks out the files in the format native to the current platform. That is, on macOS we get text files with LF line delimiter. Since we're running a Windows program on macOS, this can trip up the source line number identification when compiling a module. This shows as wrong line number inserted into the binary code, eg. for procedure calls, or the source line inserted into the assembly listing at different places compared to Windows.

The solution is to check out source files with the CRLF line ending on macOS. The repository's .gitattributes file is now set to do that, ie. .mod files get the CRLF line delimiter also on macOS. Already checked out files will not be automatically checked out again, though, so we have to do this manually. There are numerous pieces of differing advice you can find on-line on how to achieve that, but none has worked for me, so I ended up deleting the repository and all files, and cloning the repo again. Not elegant, but effective. Just make sure you don't have any uncommitted local changes. If you're cloning the repo on macOS now for the first time, all should be good right away.


  1. I make use of the command line tools to implement a simple IDE within the Sublime Text working environment. Sublime Text is available on macOS and Windows, and the corresponding Packages are cross-platform, hence my experience is the same on either platform. ↩︎

Last updated: 18 April 2026