mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 08:38:40 -07:00
Some checks failed
Shellcheck / Shellcheck (push) Has been cancelled
* Shellcheck all shell scripts * Implement Shellcheck's recommendations * Shellcheck the distribution-specific files * Include the distro scripts to trigger action * Fix array usage (hopefully) * Use single-quote string TIL: single quote string in yaml treats everything as literal, but double quote allows backslash escaping. * Make all cmake commands use set+-x dance and fix macos getopts line Make Claude happy getopts has colon after a command which takes an argument --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
65 lines
1.5 KiB
Bash
65 lines
1.5 KiB
Bash
#!/bin/bash
|
|
export FOUND_GTK3
|
|
FOUND_GTK3=$(dpkg -l libgtk* | grep gtk-3 || echo '')
|
|
|
|
REQUIRED_DEV_PACKAGES=(
|
|
autoconf
|
|
build-essential
|
|
cmake
|
|
eglexternalplatform-dev
|
|
extra-cmake-modules
|
|
file
|
|
gettext
|
|
git
|
|
libcurl4-openssl-dev
|
|
libdbus-1-dev
|
|
libglew-dev
|
|
libgstreamerd-3-dev
|
|
libgtk-3-dev
|
|
libmspack-dev
|
|
libsecret-1-dev
|
|
libspnav-dev
|
|
libssl-dev
|
|
libtool
|
|
libudev-dev
|
|
ninja-build
|
|
texinfo
|
|
wget
|
|
)
|
|
|
|
if [[ -n "$UPDATE_LIB" ]]
|
|
then
|
|
# shellcheck source=/dev/null
|
|
source /etc/os-release
|
|
if [ "${ID}" == "ubuntu" ] && [ -n "${VERSION_ID}" ]; then
|
|
# It's ubuntu and we have a VERSION_ID like "24.04".
|
|
if dpkg --compare-versions "${VERSION_ID}" ge 22 && dpkg --compare-versions "${VERSION_ID}" lt 24 ;
|
|
then
|
|
# Some extra packages needed on Ubuntu 22.x and 23.x:
|
|
REQUIRED_DEV_PACKAGES+=(curl libfuse-dev libssl-dev libcurl4-openssl-dev m4)
|
|
fi
|
|
fi
|
|
|
|
if [[ -n "$BUILD_DEBUG" ]]
|
|
then
|
|
REQUIRED_DEV_PACKAGES+=(libssl-dev libcurl4-openssl-dev)
|
|
fi
|
|
|
|
# check which version of libwebkit2gtk is available
|
|
if [ "$(apt show --quiet libwebkit2gtk-4.0-dev 2>/dev/null)" != "" ]
|
|
then
|
|
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev)
|
|
else
|
|
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
|
|
fi
|
|
|
|
# install them all at once
|
|
sudo apt update
|
|
sudo apt install -y "${REQUIRED_DEV_PACKAGES[@]}"
|
|
|
|
echo -e "done\n"
|
|
exit 0
|
|
fi
|
|
|
|
export FOUND_GTK3_DEV
|
|
FOUND_GTK3_DEV=$(dpkg -l libgtk* | grep gtk-3-dev || echo '')
|