Code Signing
Code signing is required for MacOS packages to ensure their authenticity and integrity, especially when distributing software. Unsigned packages may be rejected during installation on MacOS, leading to deployment issues.
For the number of current potential hobbyists, code signing isn't worth the cost, so building Pterm locally is required. The Retro1.org project will not purchase a code-signing certificate and building the project is beneficial both from a hobbyist and practical perspective.
This is a security feature from Apple. The single most important thing to know is that you can allow individual apps to be exempt from this feature. This allows the app to run while the rest of the system remains under protection.
For this reason, the build process for the MacOS package relies on a self-signed certificate which must be created prior to the final make
stage. Generating a self-signed certificate a is relatively easy procedure.
Always leave system-wide protection enabled, and disable it only for specific apps as needed.
Selectively Bypassing Protection
If you’re sure you want to trust the app, you can disable protection for it by right-clicking its icon and choosing Open:
In the resulting dialog, click the Open button to have MacOS permanently allow the app to run on this Mac. Don’t do this unless you’re sure you trust the app.
Environment Reminder
Set the environment variable in your USER or SYSTEM environment:
export PYTHONUTF8=1
Failing to do so will result in warnings from the utility function.
It is highly recommended that this same line be added to the .bashrc
(or its equivalent) environment file.
Once preparation of the environment is complete, the next (somewhat optional) steps leading to a successful build are:
PtermKeyTabs.h
PtermVersion.h
wxversion.h
This is done using the utility functions from the command line:
cd /d <MyRepositoryFolder>
Then issue the following Case Sensitive commands (This only needs to be done ONCE as long as the underlying libraries and version numbers have not been changed.):
python3 -m PTDevUtils make.ptermversion.h -r src/pterm.rc --wxheaderfn src/wxversion.h --ptheaderfn src/PtermVersion.h python3 -m PTDevUtils make.ptermkeytabs.h --ptkeytabsfn src/PtermKeyTabs.h python3 -m PTDevUtils make.wxversion.h -p pterm7.vcxproj --wxheaderfn src/wxversion.h
What's Happening
PTerm's headers are used the the application for various core functions and in assorted displays.
src/PtermKeyTabs.h
PLATO
character encoding, CDC
character encoding, UNICODE
character transformation, Cut/Paste operations, and more, are all controlled by this file. This header is not very volatile so if this step is accidentally skipped, the existing file stored in the repository should be sufficient.src/PtermVersion.h
and src/wxversion.h
Open a terminal window and change to the repository root:
make info
The following results should indicate that you're ready to build:
Then issue the make buildall
command which will clean all files before rebuilding:
make buildall
If no errors appeared - the build was successful!