Overview
This article outlines the detailed process of building PTerm 1) from sources. Use the navigation provided in the table of contents (on the right) to jump to the correct section.
Project Support
The Retro1 project supports an installer distribution for:
About Apple
Although the project will build a self-signed installer, we will not distribute the appication through the Apple Store and therefore, will not pay for a code-signing certificate. If your system will not permit installation without a signed application, you will need to build it yourself.
These are 64-bit application binaries only.
While instructions are provided here to build PTerm on any Linux-like platform, the project will not provide support beyond the two noted above.
Gathering and verifying all of the prerequisite tooling, libraries and setting up the Development environment will save time.
packages
installed, you should read this article for instructions on updating your existing installation.This tutorial article relies on the the Hobbyist's prior understanding of the tools noted above. Before proceeding, understading the Development repository's structure is also a critical element in generating a successful build.
To install Xcode, you can download it from the Mac App Store . Alternatively, you can use the command line tool xcode-install
to automate the installation process.
Before Proceeding
Before proceeding, note that we use Brew because manually building these libraries for each potential platform is onerous to do, and to document. Therefore we recommend that you review the limitations of Brew's Support Tiers before proceeding. If your particular operating system and architecture isn't supported, you will need to figure out the process of building each required library, making the necessary changes to the Makefile, on your own.
To install build tools, paste at a terminal prompt:
Debian or Ubuntu
sudo apt-get install build-essential procps curl file git
Fedora, CentOS, or Red Hat/Rocky
sudo yum groupinstall 'Development Tools' sudo yum install procps-ng curl file git
(NOTE: you may use the 'dnf' command instead of 'yum' on modern installations.)
Arch Linux
sudo pacman -S base-devel procps-ng curl file git
Homebrew installs packages to their own directory and then symlinks their files into /opt/homebrew
(on Apple Silicon) and in /home/linuxbrew
on Linux distributions. Homebrew won’t install files outside its prefix and you can place a Homebrew installation wherever you like. It’s all Git and Ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.
(ALL Platforms)
Bootstrapping Homebrew on Linux or Mac is done by issuing the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(MacOS)
On MacOS - you may use the Homebrew installation package
.
(Linux)
Install Python Minimum version 3.12 or greater, using the Homebrew installer.
brew install python@3.13
(MacOS)
From the Python Download page, install Python using the Universal Installer .
(ALL Platforms)
Ensure that you have the proper version by issuing the following command:
python3 --version
Python will respond with the following information
Python 3.x.y
Where: x
(minor version) is 12 or greater and y
is the patch level for that minor version
Set the environment variable PYTHONUTF8
to '1':
export PYTHONUTF8=1
You are encouraged to simply add this statement to your .bashrc
or equivalent environment-setting resource.
Once installation is complete, you must test the integrated build tool (a Python module called PTDevUtils) by issuing the following command:
python3 -m PTDevUtils version
That command should produce the following response if Python was correctly installed:
Package PTDevUtils Command PTDevUtils Version 1.0.1.0
On MacOS, the packaging process is arcane. This tool makes the process (virtually) painless.
About This Library
wxWidgets is a notoriously 'finicky' library to build and configure. This has been significantly simplified by Homebrew
on MacOS, but it it preferable to build wxWidgets “by hand” for all other LINUX platforms. To minimize complexity in the Linux/MacOS build, we use the Brew
versions of the libraries.
MacOS
Homebrew's formula for wxWidgets builds the dynamically linked libraries. For packaging, distribution and general reliability, we want the statically-linked libraries. This requires us to modify the brew formula
.
Launch the terminal
application and perform the following procedure:
HOMEBREW_NO_INSTALL_FROM_API
to 1
export HOMEBREW_NO_INSTALL_FROM_API=1
brew tap –force homebrew/core
“–disable-monolithic”,
.“–disable-shared”,
immediately beneath it.:wq
(Write/Quit) brew install –build-from-source –verbose –debug wxwidgets
Linux ANY LINUX SYSTEMS
On Linux systems it is generally preferable (and easier) to manually build the wxWidgets libraries “by hand”.
sudo dnf -y install gtk3-devel
sudo apt-get install libgtk-3-dev
tar.bz2
file into the Projects
directory (along-side of the Pterm7 repository directory) as wxWidgets-3.2.7
cd <PathTo>/wxWidgets-3.2.7 md gtk-build cd gtk-build ../configure --disable-shared --with-gtk
Verify the configuration results:
make -j6
cd samples; make -j6; cd ..
cd demos; make -j6; cd ..
Linux
It is frequently the case that the installed libraries are not in the available load path. The loader path may need to be added prior to execution of pterm
. This command may need to be used to update the standard load library path:
export LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib:$LD_LIBRARY_PATH
The other option is to examine the libraries required using the 'ldd' command 4) to determine which libraries are needed, and simply copy them into the same directory as the executable.
Release Libraries Only
This library is used as-supplied and the release
versions of the libraries are linked into both release
and debug
executables.
NOTE: This library's .dll
file is dynamically linked. Therefore, we use Homebrew on all platforms to assure a compatible library binary.
MacOS|Linux
brew install libsndfile
Release Libraries Only
This library is used as-supplied and the release
versions of the libraries are linked into both release
and debug
executables.
NOTE: This library's .dll
file must be included in the installer.
Linux
On Linux systems, use of the distribution-specific libraries is recommended.
sudo apt-get install libsdl2-dev
sudo dnf install SDL2-devel
sudo yum install SDL2-devel
MacOS|Linux(Preferred)
brew install sdl2
Part 1 Complete
The development environment should now be fully-functional and ready to build Pterm!