These instructions cover the steps needed to install the development source of PC-BASIC and its dependencies.
General installation instructions for PC-BASIC can be found in
README.md
. The instructions there cover the most common platforms and use cases. The instructions in this file are for developers only.
The following packages are needed, recommended or optional when installing PC-BASIC:
Package | Status | Used for |
---|---|---|
Python 3.6.9 or later | required | |
importlib_resources |
required for Python <= 3.6 | |
SDL2 | recommended | graphics and sound |
PySerial 3.4 | optional | physical or emulated serial port access |
PyParallel | optional | physical parallel port access |
PyAudio | optional | sound without SDL2 |
Once you have a working Python installation, most dependencies can be installed with pip
:
pip install pysdl2-dll pyserial
If pip
is not included with your copy of Python, install it with python -m ensurepip
or through your system's package manager.
For Windows, Mac, and Linux, it is recommended to use the SDL2 and SDL2-gfx libraries provided by the pysdl2-dll package.
Alternatively, you can get the library directly from libsdl.org.
Install the library in your OS's standard location for libraries. If this causes difficulties, you can alternatively place the library in pcbasic/lib
.
PyAudio is only used if SDL2 is not available. The project only distributes binary wheels for Windows.
On Mac or Linux, pip3 install pyaudio
will try to compile the module from source; for this to succeed, you need to have the PortAudio library
and the header files for your Python version and for PortAudio installed on your system.
PyParallel is only needed to access physical parallel ports, not for printing to a CUPS or Windows printer.
Note that most modern machines do not actually have parallel ports. If you have a parallel port and want to use it with PC-BASIC,
download and install PyParallel from the link above. Although a pyparallel
package exists in on PyPI, at present this does not work
as essential libraries are missing.
PC-BASIC employs the following external command-line tools, if available:
Tool | OS | Status | Used for |
---|---|---|---|
notepad.exe |
Windows | essential | printing |
lpr |
Mac, Linux, Unix | essential | printing |
paps |
Mac, Linux, Unix | recommended | improved Unicode support for printing |
beep |
Mac, Linux, Unix | optional | sound through PC speaker |
The following additional packages and tools are used for development, testing and packaging:
Package | OS | Used for |
---|---|---|
Git | all | development |
lxml |
all | documentation |
markdown |
all | documentation |
Prince | all | documentation |
pylint |
all | testing |
coverage |
all | testing |
colorama |
Windows | testing |
wheel |
all | packaging |
twine |
all | packaging |
toml |
all | packaging |
pillow |
all | packaging |
cx_Freeze 6.11.1 |
Windows, MacOS | packaging |
dpkg |
Linux | packaging |
alien |
Linux | packaging |
These are the steps to set up the local repository ready to run PC-BASIC:
-
Clone the repo from GitHub
git clone --recursive https://github.com/robhagemans/pcbasic.git
-
Make pcbasic/data/USAGE.txt
python3.7 -m make local
-
Run pcbasic directly from the source directory
pc-basic
The following features are deprecated and will be removed in the near future: