Fixes, refactors and enhances Linux build-scripts (#8269)

* fixes and refactors linux build scripts
 - build_linux.sh: fixes wrong AppImage build folder; refactors script; enhances help text
 - harmonizes names: BuildLinux.sh and BuildLinuxImage.sh
 - fixes file permissions: cmake inherits .in-file permission; removes chmod 755 in scripts
 - linux.d/debian: removes false positive error message
 - updates documentation

* enables ANSI-colored output for GNU or Clang

* build_linux.sh: adds -p flag to disable PCH for boosting ccache hit rate

* Allow compilation on distributions based on Ubuntu/Debian (#8625)

* build_linux.sh: takes over changes from BuildLinux.sh

* CMakeLists.txt: removes leftovers, enables ANSI-colored output

* CMakeLists.txt: fixes issue where FORCE_COLORED_OUTPUT was not respected form environment (introduces -C cli arg)

* merges 5df4275: Make it easy to pass extra build args to deps and orca in BuildLinux.sh (#9648)
This commit is contained in:
Dipl.-Ing. Raoul Rubien, BSc
2025-06-14 18:41:20 +02:00
committed by GitHub
parent 153c478c35
commit 6da7fe62a2
14 changed files with 252 additions and 233 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
export ROOT=$(echo $ROOT | grep . || pwd)
export NCORES=`nproc --all`
@@ -8,7 +8,7 @@ while getopts ":ih" opt; do
i )
export BUILD_IMAGE="1"
;;
h ) echo "Usage: ./BuildLinuxImage.sh [-i]"
h ) echo "Usage: ./build_linux_image.sh [-i]"
echo " -i: Generate Appimage (optional)"
exit 0
;;
@@ -67,9 +67,9 @@ EOF
chmod ug+x @SLIC3R_APP_CMD@
cp -f @SLIC3R_APP_CMD@ package/@SLIC3R_APP_CMD@
pushd package
pushd package > /dev/null
tar -cvf ../@SLIC3R_APP_KEY@.tar . &>/dev/null
popd
popd > /dev/null
#} &> $ROOT/Build.log # Capture all command output
echo "done"
@@ -77,10 +77,10 @@ if [[ -n "$BUILD_IMAGE" ]]
then
echo -n "Creating Appimage for distribution..."
#{
pushd package
pushd package > /dev/null
chmod +x ../build_appimage.sh
../build_appimage.sh
popd
popd > /dev/null
mv package/"@SLIC3R_APP_KEY@_Linux_V@SoftFever_VERSION@.AppImage" "@SLIC3R_APP_KEY@_Linux_V@SoftFever_VERSION@.AppImage"
#} &> $ROOT/Build.log # Capture all command output
echo "done"