mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 16:23:46 +08:00
Drop Ubuntu 20.04 support (#34557)
This commit is contained in:
+12
-15
@@ -4,20 +4,17 @@ Import('env', 'arch', 'common')
|
||||
|
||||
renv = env.Clone()
|
||||
|
||||
UBUNTU_FOCAL = int(subprocess.check_output('[ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "20.04" ] && echo 1 || echo 0', shell=True, encoding='utf-8').rstrip())
|
||||
rayutil = env.Library("rayutil", ['raylib/util.cc'], LIBS='raylib')
|
||||
linked_libs = ['raylib', rayutil, common]
|
||||
renv['LIBPATH'] += [f'#third_party/raylib/{arch}/']
|
||||
|
||||
if not UBUNTU_FOCAL:
|
||||
rayutil = env.Library("rayutil", ['raylib/util.cc'], LIBS='raylib')
|
||||
linked_libs = ['raylib', rayutil, common]
|
||||
renv['LIBPATH'] += [f'#third_party/raylib/{arch}/']
|
||||
mac_frameworks = []
|
||||
if arch == "Darwin":
|
||||
mac_frameworks += ['OpenCL', 'CoreVideo', 'Cocoa', 'GLUT', 'CoreFoundation', 'OpenGL', 'IOKit']
|
||||
elif arch == 'larch64':
|
||||
linked_libs += ['GLESv2', 'GL', 'EGL', 'wayland-client', 'wayland-egl']
|
||||
else:
|
||||
linked_libs += ['OpenCL', 'dl', 'pthread']
|
||||
|
||||
mac_frameworks = []
|
||||
if arch == "Darwin":
|
||||
mac_frameworks += ['OpenCL', 'CoreVideo', 'Cocoa', 'GLUT', 'CoreFoundation', 'OpenGL', 'IOKit']
|
||||
elif arch == 'larch64':
|
||||
linked_libs += ['GLESv2', 'GL', 'EGL', 'wayland-client', 'wayland-egl']
|
||||
else:
|
||||
linked_libs += ['OpenCL', 'dl', 'pthread']
|
||||
|
||||
if arch != 'aarch64':
|
||||
renv.Program("spinner", ["raylib/spinner.cc"], LIBS=linked_libs, FRAMEWORKS=mac_frameworks)
|
||||
if arch != 'aarch64':
|
||||
renv.Program("spinner", ["raylib/spinner.cc"], LIBS=linked_libs, FRAMEWORKS=mac_frameworks)
|
||||
|
||||
@@ -79,16 +79,6 @@ function install_ubuntu_lts_latest_requirements() {
|
||||
python3-venv
|
||||
}
|
||||
|
||||
# Install Ubuntu 20.04 packages
|
||||
function install_ubuntu_focal_requirements() {
|
||||
install_ubuntu_common_requirements
|
||||
|
||||
$SUDO apt-get install -y --no-install-recommends \
|
||||
libavresample-dev \
|
||||
qt5-default \
|
||||
python-dev
|
||||
}
|
||||
|
||||
# Detect OS using /etc/os-release file
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
source /etc/os-release
|
||||
@@ -96,9 +86,6 @@ if [ -f "/etc/os-release" ]; then
|
||||
"jammy" | "kinetic" | "noble")
|
||||
install_ubuntu_lts_latest_requirements
|
||||
;;
|
||||
"focal")
|
||||
install_ubuntu_focal_requirements
|
||||
;;
|
||||
*)
|
||||
echo "$ID $VERSION_ID is unsupported. This setup script is written for Ubuntu 24.04."
|
||||
read -p "Would you like to attempt installation anyway? " -n 1 -r
|
||||
@@ -106,11 +93,7 @@ if [ -f "/etc/os-release" ]; then
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ "$UBUNTU_CODENAME" = "focal" ]; then
|
||||
install_ubuntu_focal_requirements
|
||||
else
|
||||
install_ubuntu_lts_latest_requirements
|
||||
fi
|
||||
install_ubuntu_lts_latest_requirements
|
||||
esac
|
||||
|
||||
if [[ -d "/etc/udev/rules.d/" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user