mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 08:38:40 -07:00
* Auto generate CMAKE_PREFIX_PATH/DESTDIR * Auto set CMAKE_INSTALL_PREFIX * Always default SLIC3R_STATIC to on * Only allow one value for CMAKE_OSX_ARCHITECTURES * Set arch for OpenSSL from CMAKE_OSX_ARCHITECTURES * Set CMAKE_INSTALL_RPATH from CMAKE_PREFIX_PATH * Default CMAKE_MACOSX_RPATH and CMAKE_MACOSX_BUNDLE to on * Auto set BBL_RELEASE_TO_PUBLIC based on build config * Default to GTK 3 * Fix linux debug build Update find modules to also look for the debug variant of the libraries * Set DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO based on CMAKE_BUILD_TYPE * Add a fallback value for Windows SDK if the env variables are not set * Reflect CMake changes in the build scripts * Add missing line * Fix auto setting DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO * Update dep folder name for linux in GH actions * Invert dep-folder-name conditions `''` is considered a falsy value, which was causing the value to always be set to 'OrcaSlicer_dep' * Properly handle finding the debug version of libnoise * Convert FindNLopt.cmake to a config mode wrapper * Use separate build directory for debug builds on Linux * Move find_package for libnoise * Cleanup and improve linux build script - Add dry run - Add build in RelWithDebInfo - Add function to print and run commands * Remove linux destdir deprecation and cleanup * Fix flatpak build * Disable fail fast for flatpak builds * Flatpak improvements - Build wxWidgets using deps cmake - Improve handling of space freeing commands while building deps - Allow cmake to directly download deps - Set needed flags within cmake instead of the build manifest * Print clean build commands * Implement shellcheck recommendations * Cleanup * Fix CMakeLists.txt syntax by replacing empty elseif with else statement --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
63 lines
1.5 KiB
Bash
63 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
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 '')
|