Start Frame class.

This commit is contained in:
2023-10-14 23:28:43 -07:00
parent 8edcba0f88
commit a00d358b15
8 changed files with 233 additions and 30 deletions

50
scripts/install-cmake-debian.sh Normal file → Executable file
View File

@@ -6,36 +6,36 @@ set -eu
source /etc/lsb-release
preinstall () {
echo "[+] preparing to install"
sudo apt-get update
sudo apt-get install ca-certificates gpg wget
echo "[+] preparing to install"
sudo apt-get update
sudo apt-get install ca-certificates gpg wget
}
do_install () {
if [ ! -f /etc/apt/sources.list.d/kitware.list ]
then
echo "[+] fetching initial keyring"
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
if [ ! -f /etc/apt/sources.list.d/kitware.list ]
then
echo "[+] fetching initial keyring"
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo "[+] adding repo to sources.list.d"
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${DISTRIB_RELEASE} main" | \
sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
echo "[+] adding repo to sources.list.d"
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${DISTRIB_RELEASE} main" | \
sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
echo "[+] installing kitware keyring"
if [ -f "/usr/share/keyrings/kitware-archive-keyring.gpg" ]
then
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
fi
sudo apt-get install kitware-archive-keyring
fi
echo "[+] installing kitware keyring"
if [ -f "/usr/share/keyrings/kitware-archive-keyring.gpg" ]
then
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
fi
sudo apt-get install kitware-archive-keyring
fi
if [ "${USE_CMAKE_RC}" = "YES" ]
then
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${DISTRIB_RELEASE}-rc main' | \
sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
fi
if [ "${USE_CMAKE_RC}" = "YES" ]
then
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${DISTRIB_RELEASE}-rc main' | \
sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
sudo apt-get update
fi
}
sudo apt-get install cmake cmake-curses-gui cmake-extras
do_install

97
scripts/install-depdendencies.sh Normal file → Executable file
View File

@@ -1,4 +1,101 @@
#!/usr/bin/env bash
#####################################################################
# This script attempts to install the appopriate build dependencies #
# for the host system. #
# #
# For platforms marked as unverified, it means that I was able to #
# start a Docker container for that platform and could look up the #
# right package names. I haven't actually tried building on these #
# platforms. #
# #
# This is primarily developed on the latest Ubuntu LTS release and #
# MacOS; other platforms are best-effort. #
#####################################################################
set -eu
install_debianesque () {
echo "[+] distribution is ${DISTRIB_ID}, choosing Debianesque install."
echo "[+] installing tools"
sudo apt-get install git cmake clang scdoc
echo "[+] installing libraries and development headers"
sudo apt-get install libsdl2-dev libfreetype-dev
}
install_redhat () {
echo "[+] distribution is ${DISTRIB_ID}, choosing Redhat install."
echo "[!] WARNING: installation for Redhat systems is unverified."
echo "[+] installing tools"
sudo dnf install git cmake clang scdoc
echo "[+] installing libraries and development headers"
sudo dnf install SDL2-devel freetype-devel
}
install_alpine () {
echo "[+] distribution is ${DISTRIB_ID}, choosing Alpine install."
echo "[!] WARNING: installation for Alpine systems is unverified."
echo "[+] installing tools"
sudo dnf install git cmake clang scdoc
echo "[+] installing libraries and development headers"
sudo dnf install sdl2-dev freetype-dev
}
install_macos () {
# TODO: consider supporting macports?
echo "[+] host system is MacOS"
echo "[+] installing tools"
brew install git cmake scdoc
echo "[+] installing libraries and development headers"
# TODO: look up proper package names in homebrew
}
install_linux () {
echo "[+] host system is Linux"
[[ -f "/etc/lsb-release" ]] && source /etc/lsb-release
if [ -z "${DISTRIB_ID}" ]
then
if [ -d /etc/apt ]
then
DISTRIB_ID="apt-based"
elif [ -f /etc/alpine-release ]
DISTRIB_ID=Alpine
elif [ -d /etc/dnf -o /etc/yum.repos.d ]
# I don't use Fedora, this is based on a cursory
# glance at the filesystem on a Docker image.
DISTRIB_ID="Fedora"
fi
fi
case ${DISTRIB_ID} in
Ubuntu) install_debianesque ;;
Debian) install_debianesque ;;
apt-based) install_debianesque ;;
Fedora) install_redhat ;;
Alpine) install_alpine ;;
*)
echo "[!] distribution ${DISTRIB_ID} isn't supported in this script." > /dev/null
;;
esac
}
case "$(uname -s)" in
Linux) install_linux ;;
Darwin) install_macos ;;
*)
echo "[!] platform $(uname -s) isn't supported in this script." > /dev/null
;;
esac