CPL

CPL-on-Debian-on-Windows howto

Step by step instructions to use CPL with Microsoft Windows.
1 - Enable WSL:
To enable the Windows Subsystem for Linux (WSL) of Microsoft Windows 10, you can use a sequence of Powershell terminal commands detailed here, or alternately open the Control Panel, then Programs and Features, then Turn Windows Features On or Off, and check the box for Windows Subsystem for Linux.
2 - Install Debian on WSL:
Open Microsoft Store, enter debian in search box, install the free Debian app (or your favourite other Linux distribution); launch the app.
3 - Bring Debian up to date. In the Debian terminal enter:
sudo apt update
sudo apt upgrade
4 - Install needed packages gcc, make, info, curl:
sudo apt install gcc make info curl
5 - Copy the CPL archive you previously downloaded from your browser to your new Debian home:
cp /mnt/c/Users/yourusername/Downloads/∗cpl.sh ./
(where yourusername must be replaced by your own Windows user directory, enclosed in quotes if it contains spaces).
6 - Unpack the cpl archive:
sh ∗cpl.sh
You may need to close and re-open the Debian window before the newly installed commands become available at the command prompt. You can open as many Debian windows as you like; for instance, one to edit and one to execute your own CPL program.

You are all set!

Notice about graphics: Microsoft's Windows Subsystem for Linux provides a terminal-only experience of a Linux distribution, deprived of its graphical user interface. The CPL compiler, interpreter and editor are all built to run in a terminal and will fit in seamlessly, but if your CPL program draws graphics and needs the additional gnuplot package, installing it via Debian (as apt install gnuplot) will not do. Instead you may want to install the Windows version of gnuplot, available from the official gnuplot site, and then

7 - link the gnuplot executable to your Debian home. After you have downloaded and installed gnuplot for Windows, open a Debian terminal and enter (with attention to spaces):
ln -s '/mnt/c/Program Files/gnuplot/bin/gnuplot.exe' bin/gnuplot
    
Now you can open gnuplot as just gnuplot in your Debian terminal, and CPL programs will automatically find it too.