Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes, refactors and enhances Linux build-scripts #8269

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
apt update
apt upgrade -y

build_linux="./build_linux.sh -u"
echo "-----------------------------------------"
echo "Running BuildLinux.sh with update flag..."
echo "Running ${build_linux}..."
echo "-----------------------------------------"
./BuildLinux.sh -u
${build_linux}

echo "------------------------------"
echo "Installing missing packages..."
echo "------------------------------"
apt install -y libgl1-mesa-dev m4 autoconf libtool
apt install -y libgl1-mesa-dev m4 autoconf libtool
2 changes: 1 addition & 1 deletion .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- '**/CMakeLists.txt'
- 'version.inc'
- ".github/workflows/build_*.yml"
- 'BuildLinux.sh'
- 'build_linux.sh'
- 'build_release_vs2022.bat'
- 'build_release_macos.sh'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ jobs:
run: |
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
sudo ./BuildLinux.sh -ur
sudo ./build_linux.sh -ur
sudo chown $USER -R ./
./BuildLinux.sh -dr
./build_linux.sh -dr
cd deps/build
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ jobs:
libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }}

- name: Install dependencies from BuildLinux.sh
- name: Install dependencies from build_linux.sh
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
run: sudo ./BuildLinux.sh -ur
run: sudo ./build_linux.sh -ur

- name: Fix permissions
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
Expand All @@ -263,7 +263,7 @@ jobs:
env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
run: |
./BuildLinux.sh -isr
./build_linux.sh -isr
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage

Expand Down
192 changes: 0 additions & 192 deletions BuildLinux.sh

This file was deleted.

14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
cmake_minimum_required(VERSION 3.13)

option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
if (${FORCE_COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif ()
endif ()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")

if (APPLE)
# if CMAKE_OSX_DEPLOYMENT_TARGET is not set, set it to 11.3
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
Expand Down Expand Up @@ -761,7 +773,7 @@ endif()

if (NOT WIN32 AND NOT APPLE)
set(SLIC3R_APP_CMD "orca-slicer")
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh @ONLY)
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh USE_SOURCE_PERMISSIONS @ONLY)
endif()

option(BUILD_BBS_TEST_TOOLS "Build bbs test tools" OFF)
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ WORKDIR OrcaSlicer

# These can run together, but we run them seperate for podman caching
# Update System dependencies
RUN ./BuildLinux.sh -u
RUN ./build_linux.sh -u

# Build dependencies in ./deps
RUN ./BuildLinux.sh -dr
RUN ./build_linux.sh -dr

# Build slic3r
RUN ./BuildLinux.sh -sr
RUN ./build_linux.sh -sr

# Build AppImage
ENV container podman
RUN ./BuildLinux.sh -ir
RUN ./build_linux.sh -ir

# It's easier to run Orca Slicer as the same username,
# UID and GID as your workstation. Since we bind mount
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Explore the latest developments in Orca Slicer with our nightly builds. Feedback
- For most common errors, open `DockerRun.sh` and read the comments.
- Ubuntu
- Dependencies **Will be auto installed with the shell script**: `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 libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo`
- run 'sudo ./BuildLinux.sh -u'
- run './BuildLinux.sh -dsir'
- run './build_linux.sh -u'
- run './build_linux.sh -dsir'

# Note:
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
Expand Down
Loading