Skip to content

software

J-Donald Tournier edited this page Oct 15, 2024 · 6 revisions

Proposal:

Windows and KCL-managed systems:

  • Set up and provide access to instance of MSYS2, preloaded with:
    • from standard MSYS2 repos (install via pacman -Syu package):
      • g++
      • micro
      • winpty (required to allow micro to run without glitching)
      • tree
      • zip & unzip
      • git
      • less
    • from Donald's GitHub repos:
      • build script from simple_build repo
      • terminal_graphics.h header from terminal_graphics repo (does not need to be pre-installed, but to be used later in course)

Windows Subsystem for Linux (WSL)

This is also an option, but requires:

macOS:

  • iTerm2 or WezTerm
  • g++ as installed on first run through Apple's Command-line Tools
  • any text editor - can use micro if students want to ensure environment consistent with the course

The build script is a straight download, we can provide instructions to add it to the PATH if required. Though simplest is to Download to home folder and invoke as ~/build.

Linux

  • WezTerm (preferred), or mlTerm. If all else fails, xterm -ti 340 will also do the job...
  • all other dependencies are trivial on any reasonably recent distro (though the compiler on Ubuntu 22.04 does not support std::format() - you will need something more recent - or clang++?)

Suggested config for MSYS2:

If micro turns out not to be usable, we can fall back to nano with a heavily customised configuration more familiar to Windows users - see nano config file with Windows keybindings.

/etc/nsswitch.conf

...

db_home: windows cygwin desc

...

/etc/inputrc

...

# alternate mappings for "up" and "down" to search the history
"\e[A": history-search-backward
"\e[B": history-search-forward

/etc/bash.bashrc

...

# micro needs to run within a winpty session
# also, there is no option to set a system-wide config for micro.
# for both reasons, we define an alias:
alias micro="winpty micro -diffgutter true -fileformat unix -softwrap true -wordwrap true -xterm true -tabstospaces true"
export EDITOR=micro

For reference only, since we are unlikely to be able to set up config file in user home folders, and there is no option to set a system-wide config for micro:

~/.config/micro/settings.json (may not be possible to set in user home, but not critical anyway)

{
    "diffgutter": true,
    "fileformat": "unix",
    "softwrap": true,
    "wordwrap": true,
    "xterm": true
}
Clone this wiki locally