From 86f51cd9d03ccd553ea51b31165180f701c18ee8 Mon Sep 17 00:00:00 2001 From: Terrence Mitchem <49457334+tjmitchem@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:44:00 -0500 Subject: [PATCH] Changes for Ubuntu 23.04. General housekeeping. (#2007) - Small changes for Ubuntu 23.04 - Moved the creation of the main "build" directory so it doesn't end up owned by root, causing an error later. --- BuildLinux.sh | 55 +++++++++++++++++++++++---------------------------- README.md | 3 ++- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/BuildLinux.sh b/BuildLinux.sh index a3c44e12ba..0226f1e761 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -27,6 +27,19 @@ function check_available_memory_and_disk() { fi } +function usage() { + echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" + echo " -i: Generate appimage (optional)" + echo " -g: force gtk2 build" + echo " -b: build in debug mode" + echo " -d: build deps (optional)" + echo " -s: build orca-slicer (optional)" + echo " -u: only update clock & dependency packets (optional and need sudo)" + echo " -r: skip free ram check (low ram compiling)" + echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" + echo " and then './BuildLinux.sh -dsi'" +} + unset name while getopts ":dsiuhgbr" opt; do case ${opt} in @@ -51,16 +64,7 @@ while getopts ":dsiuhgbr" opt; do r ) SKIP_RAM_CHECK="1" ;; - h ) echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" - echo " -i: Generate appimage (optional)" - echo " -g: force gtk2 build" - echo " -b: build in debug mode" - echo " -d: build deps (optional)" - echo " -s: build orca-slicer (optional)" - echo " -u: only update clock & dependency packets (optional and need sudo)" - echo " -r: skip free ram check (low ram compiling)" - echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" - echo " and then './BuildLinux.sh -dsi'" + h ) usage exit 0 ;; esac @@ -68,25 +72,10 @@ done if [ $OPTIND -eq 1 ] then - echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" - echo " -i: Generate appimage (optional)" - echo " -g: force gtk2 build" - echo " -b: build in debug mode" - echo " -d: build deps (optional)" - echo " -s: build orca-slicer (optional)" - echo " -u: only update clock & dependency packets (optional and need sudo)" - echo " -r: skip free ram check (low ram compiling)" - echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" - echo " and then './BuildLinux.sh -dsi'" + usage exit 0 fi -# mkdir build -if [ ! -d "build" ] -then - mkdir build -fi - # Addtional Dev packages for OrcaSlicer export REQUIRED_DEV_PACKAGES="libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules" # libwebkit2gtk-4.1-dev ?? @@ -109,11 +98,11 @@ then echo -e "\nFind libgtk-3, installing: libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n" apt install -y libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git fi - # for ubuntu 22.04: - ubu_version="$(cat /etc/issue)" - if [[ $ubu_version == "Ubuntu 22.04"* ]] + # for ubuntu 22+ and 23+: + ubu_major_version="$(grep VERSION_ID /etc/os-release | cut -d "=" -f 2 | cut -d "." -f 1 | tr -d /\"/)" + if [ $ubu_major_version == "22" ] || [ $ubu_major_version == "23" ] then - apt install -y curl libssl-dev libcurl4-openssl-dev m4 + apt install -y curl libfuse-dev libssl-dev libcurl4-openssl-dev m4 fi if [[ -n "$BUILD_DEBUG" ]] then @@ -212,6 +201,12 @@ then echo "done" fi +# Create main "build" directory +if [ ! -d "build" ] +then + mkdir build +fi + if [[ -n "$BUILD_ORCA" ]] then echo "[7/9] Configuring Slic3r..." diff --git a/README.md b/README.md index 24d3a81a37..0d12c75213 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr - run `build_release_macos.sh` - Ubuntu - - run `BuildLinux.sh -udisr` + - run 'sudo ./BuildLinux.sh -u' + - run './BuildLinux.sh -dsir' # Note: