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.
This commit is contained in:
Terrence Mitchem 2023-09-05 08:44:00 -05:00 committed by GitHub
parent d4c70f5528
commit 86f51cd9d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 31 deletions

View file

@ -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..."

View file

@ -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: