mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 06:53:47 -07:00
Initial release
This commit is contained in:
3
scripts/linux.d/README.md
Normal file
3
scripts/linux.d/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Files in this directory are named for the **exact** output of `awk -F= '/^ID=/ {print $2}' /etc/os-release` for their respective distribution.
|
||||
|
||||
When `build_linux.sh` is executed, the respective file for the distribution will be sourced so the distribution specific instructions/logic are used.
|
||||
46
scripts/linux.d/arch
Normal file
46
scripts/linux.d/arch
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# these are the Arch Linux specific build functions
|
||||
|
||||
# Additional Dev packages for OrcaSlicer
|
||||
export REQUIRED_DEV_PACKAGES=(
|
||||
cmake
|
||||
curl
|
||||
dbus
|
||||
eglexternalplatform
|
||||
extra-cmake-modules
|
||||
file
|
||||
gettext
|
||||
git
|
||||
glew
|
||||
gstreamer
|
||||
gstreamermm
|
||||
gtk3
|
||||
libmspack
|
||||
libsecret
|
||||
libspnav
|
||||
mesa
|
||||
ninja
|
||||
openssl
|
||||
texinfo
|
||||
wayland-protocols
|
||||
webkit2gtk
|
||||
wget
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
echo -n -e "Updating linux ...\n"
|
||||
NEEDED_PKGS=()
|
||||
for PKG in "${REQUIRED_DEV_PACKAGES[@]}"; do
|
||||
pacman -Q "${PKG}" > /dev/null || NEEDED_PKGS+=("${PKG}")
|
||||
done
|
||||
|
||||
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
|
||||
sudo pacman -Syy --noconfirm "${NEEDED_PKGS[@]}"
|
||||
fi
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(pacman -Q gtk3)
|
||||
45
scripts/linux.d/cachyos
Normal file
45
scripts/linux.d/cachyos
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# these are the CachyOS Linux specific build functions
|
||||
|
||||
# Additional Dev packages for OrcaSlicer
|
||||
export REQUIRED_DEV_PACKAGES=(
|
||||
cmake
|
||||
curl
|
||||
dbus
|
||||
eglexternalplatform
|
||||
extra-cmake-modules
|
||||
file
|
||||
gettext
|
||||
git
|
||||
glew
|
||||
gstreamer
|
||||
gtk3
|
||||
libmspack
|
||||
libsecret
|
||||
libspnav
|
||||
mesa
|
||||
ninja
|
||||
openssl
|
||||
texinfo
|
||||
wayland-protocols
|
||||
webkit2gtk
|
||||
wget
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
echo -n -e "Updating linux ...\n"
|
||||
NEEDED_PKGS=()
|
||||
for PKG in "${REQUIRED_DEV_PACKAGES[@]}"; do
|
||||
pacman -Q "${PKG}" > /dev/null || NEEDED_PKGS+=("${PKG}")
|
||||
done
|
||||
|
||||
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
|
||||
sudo pacman -Syy --noconfirm "${NEEDED_PKGS[@]}"
|
||||
fi
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(pacman -Q gtk3)
|
||||
34
scripts/linux.d/clear-linux-os
Normal file
34
scripts/linux.d/clear-linux-os
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# these are the Clear Linux specific build functions
|
||||
|
||||
# Additional bundles for OrcaSlicer
|
||||
export REQUIRED_BUNDLES=(
|
||||
c-basic
|
||||
dev-utils
|
||||
devpkg-curl
|
||||
devpkg-glew
|
||||
devpkg-glu
|
||||
devpkg-gstreamer
|
||||
devpkg-gtk3
|
||||
devpkg-libmspack
|
||||
devpkg-libsecret
|
||||
devpkg-openssl
|
||||
devpkg-webkitgtk
|
||||
file
|
||||
git
|
||||
lib-opengl
|
||||
perl-basic
|
||||
texinfo
|
||||
wget
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
echo "Updating linux ..."
|
||||
echo swupd bundle-add -y "${REQUIRED_BUNDLES[@]}"
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(find /usr/lib64/libgtk-3.so 2>/dev/null || true)
|
||||
75
scripts/linux.d/debian
Normal file
75
scripts/linux.d/debian
Normal file
@@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_DEV_PACKAGES=(
|
||||
autoconf
|
||||
build-essential
|
||||
cmake
|
||||
eglexternalplatform-dev
|
||||
extra-cmake-modules
|
||||
file
|
||||
g++
|
||||
gettext
|
||||
git
|
||||
libbz2-dev
|
||||
libcurl4-openssl-dev
|
||||
libdbus-1-dev
|
||||
libfuse2
|
||||
libgl1-mesa-dev
|
||||
libglew-dev
|
||||
libgstreamerd-3-dev
|
||||
libgtk-3-dev
|
||||
libmspack-dev
|
||||
libosmesa6-dev
|
||||
libsecret-1-dev
|
||||
libspnav-dev
|
||||
libssl-dev
|
||||
libtool
|
||||
libudev-dev
|
||||
libunwind-dev
|
||||
libx264-dev
|
||||
libxkbcommon-dev
|
||||
libavcodec-dev
|
||||
libavutil-dev
|
||||
libswscale-dev
|
||||
nasm
|
||||
nlohmann-json3-dev
|
||||
clang
|
||||
lld
|
||||
ninja-build
|
||||
texinfo
|
||||
wget
|
||||
yasm
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/os-release
|
||||
if [ "${ID}" == "ubuntu" ] && [ -n "${VERSION_ID}" ]; then
|
||||
if dpkg --compare-versions "${VERSION_ID}" ge 22 && dpkg --compare-versions "${VERSION_ID}" lt 24 ;
|
||||
then
|
||||
REQUIRED_DEV_PACKAGES+=(curl libfuse-dev m4)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$BUILD_DEBUG" ]]
|
||||
then
|
||||
REQUIRED_DEV_PACKAGES+=(libssl-dev libcurl4-openssl-dev)
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
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 '')
|
||||
50
scripts/linux.d/fedora
Normal file
50
scripts/linux.d/fedora
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_DEV_PACKAGES=(
|
||||
autoconf
|
||||
automake
|
||||
cmake
|
||||
dbus-devel
|
||||
eglexternalplatform-devel
|
||||
extra-cmake-modules
|
||||
file
|
||||
gcc
|
||||
gcc-c++
|
||||
gettext
|
||||
git
|
||||
gstreamer1-devel
|
||||
gstreamermm-devel
|
||||
gtk3-devel
|
||||
libmspack-devel
|
||||
libquadmath-devel
|
||||
libsecret-devel
|
||||
libspnav-devel
|
||||
libtool
|
||||
m4
|
||||
mesa-libGLU-devel
|
||||
ninja-build
|
||||
openssl-devel
|
||||
perl-FindBin
|
||||
texinfo
|
||||
wayland-protocols-devel
|
||||
webkit2gtk4.1-devel
|
||||
wget
|
||||
libcurl-devel
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
NEEDED_PKGS=()
|
||||
for PKG in "${REQUIRED_DEV_PACKAGES[@]}"; do
|
||||
rpm -q "${PKG}" > /dev/null || NEEDED_PKGS+=("${PKG}")
|
||||
done
|
||||
|
||||
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
|
||||
sudo dnf install -y "${NEEDED_PKGS[@]}"
|
||||
fi
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(rpm -qa | grep -P '^gtk3-devel' || true)
|
||||
75
scripts/linux.d/gentoo
Normal file
75
scripts/linux.d/gentoo
Normal file
@@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v qlist > /dev/null 2>&1; then
|
||||
echo "app-portage/portage-utils is required but not installed. Installing..."
|
||||
sudo emerge --ask --verbose app-portage/portage-utils
|
||||
fi
|
||||
|
||||
REQUIRED_DEV_PACKAGES=(
|
||||
app-crypt/libsecret
|
||||
dev-build/autoconf
|
||||
dev-build/cmake
|
||||
dev-build/libtool
|
||||
dev-build/ninja
|
||||
dev-cpp/gstreamermm
|
||||
dev-libs/libmspack
|
||||
dev-libs/libspnav
|
||||
dev-libs/openssl
|
||||
dev-vcs/git
|
||||
gui-libs/eglexternalplatform
|
||||
kde-frameworks/extra-cmake-modules
|
||||
media-libs/glew
|
||||
media-libs/gst-plugins-base:1.0
|
||||
media-libs/gstreamer:1.0
|
||||
net-misc/curl
|
||||
net-misc/wget
|
||||
sys-apps/dbus
|
||||
sys-apps/file
|
||||
sys-apps/texinfo
|
||||
sys-devel/gcc
|
||||
sys-devel/gettext
|
||||
sys-devel/m4
|
||||
virtual/libudev
|
||||
x11-libs/gtk+:3
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
echo -e "Updating Gentoo ...\n"
|
||||
|
||||
# Check which version of webkit-gtk is available/preferred
|
||||
if qlist -I net-libs/webkit-gtk:4 > /dev/null 2>&1; then
|
||||
REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4)
|
||||
elif qlist -I net-libs/webkit-gtk:4.1 > /dev/null 2>&1; then
|
||||
REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4.1)
|
||||
else
|
||||
# Default to 4.1 if neither is installed
|
||||
REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4.1)
|
||||
fi
|
||||
|
||||
if [[ -n "$BUILD_DEBUG" ]]
|
||||
then
|
||||
REQUIRED_DEV_PACKAGES+=(dev-libs/openssl net-misc/curl)
|
||||
fi
|
||||
|
||||
# Filter out packages that are already installed
|
||||
packages_to_install=()
|
||||
for pkg in "${REQUIRED_DEV_PACKAGES[@]}"; do
|
||||
if ! qlist -I "$pkg" > /dev/null 2>&1; then
|
||||
packages_to_install+=("$pkg")
|
||||
fi
|
||||
done
|
||||
|
||||
# Install them if there are any to install
|
||||
if [ ${#packages_to_install[@]} -gt 0 ]; then
|
||||
sudo emerge --ask --verbose --noreplace "${packages_to_install[@]}"
|
||||
else
|
||||
echo "All required packages are already installed."
|
||||
fi
|
||||
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(qlist -I x11-libs/gtk+:3 2>/dev/null || find /usr/lib64/libgtk-3.so 2>/dev/null || true)
|
||||
49
scripts/linux.d/suse
Normal file
49
scripts/linux.d/suse
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_DEV_PACKAGES=(
|
||||
autoconf
|
||||
automake
|
||||
cmake
|
||||
dbus-1-devel
|
||||
eglexternalplatform-devel
|
||||
extra-cmake-modules
|
||||
file
|
||||
gcc
|
||||
gcc-c++
|
||||
gettext
|
||||
git
|
||||
gstreamer-devel
|
||||
gtk3-devel
|
||||
libmspack-devel
|
||||
libquadmath-devel
|
||||
libsecret-devel
|
||||
libspnav-devel
|
||||
libtool
|
||||
m4
|
||||
glu-devel
|
||||
ninja-build
|
||||
openssl-devel
|
||||
perl-FindBin-Real
|
||||
texinfo
|
||||
wayland-protocols-devel
|
||||
webkit2gtk4-devel
|
||||
wget
|
||||
libcurl-devel
|
||||
)
|
||||
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
NEEDED_PKGS=()
|
||||
for PKG in "${REQUIRED_DEV_PACKAGES[@]}"; do
|
||||
rpm -q "${PKG}" > /dev/null || NEEDED_PKGS+=("${PKG}")
|
||||
done
|
||||
|
||||
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
|
||||
sudo zypper install -y "${NEEDED_PKGS[@]}"
|
||||
fi
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export FOUND_GTK3_DEV
|
||||
FOUND_GTK3_DEV=$(rpm -qa | grep -P '^gtk3-devel' || true)
|
||||
Reference in New Issue
Block a user