Skip to content

Commit

Permalink
Merge branch 'main' into bugfox/layer-cooling
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever authored Dec 25, 2024
2 parents 6169b4f + aa1f1df commit f3b2dc2
Show file tree
Hide file tree
Showing 778 changed files with 18,275 additions and 4,773 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
11 changes: 9 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"name": "OrcaSlicer",
"image": "mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04",
"build": {
"dockerfile": "Dockerfile",
"args": {
"PLATFORM": "linux/amd64",
"BASE_IMAGE": "mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04"
},
"options": ["--platform=linux/amd64"]
},
"runArgs": ["--env-file", "/tmp/devcontainer.env"],
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {
Expand Down Expand Up @@ -48,4 +55,4 @@
"Set postCreate executable flag": "chmod +x .devcontainer/postCreate.sh"
},
"postCreateCommand": "sudo .devcontainer/postCreate.sh"
}
}
36 changes: 18 additions & 18 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ jobs:
arch: ${{ matrix.arch }}
build-deps-only: ${{ inputs.build-deps-only || false }}
secrets: inherit
# flatpak:
# name: "Flatpak"
# runs-on: ubuntu-latest
# container:
# image: bilelmoussaoui/flatpak-github-actions:gnome-45
# options: --privileged
# steps:
# # maybe i'm too dumb and fucked up to do CI. OH WELL :D -ppd
# - name: "Remove unneeded stuff to free disk space"
# run:
# sudo rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY"
# - uses: actions/checkout@v4
# - uses: flatpak/flatpak-github-actions/flatpak-builder@v6
# with:
# bundle: orcaslicer.flatpak
# manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
# cache-key: flatpak-builder-${{ github.sha }}
# cache: false
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-46
options: --privileged
steps:
# maybe i'm too dumb and fucked up to do CI. OH WELL :D -ppd
- name: "Remove unneeded stuff to free disk space"
run:
sudo rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: orcaslicer.flatpak
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
cache-key: flatpak-builder-${{ github.sha }}
cache: false
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
add_compile_options(-gz=zstd)
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=template-id-cdtor" )
endif()

endif()

if (SLIC3R_ASAN)
Expand Down Expand Up @@ -407,12 +411,14 @@ if(SLIC3R_STATIC)
set(Boost_USE_STATIC_LIBS ON)
# Use boost libraries linked statically to the C++ runtime.
# set(Boost_USE_STATIC_RUNTIME ON)
else()
add_definitions(-DBOOST_LOG_DYN_LINK)
endif()
#set(Boost_DEBUG ON)
# set(Boost_COMPILER "-mgw81")
# boost::process was introduced first in version 1.64.0,
# boost::beast::detail::base64 was introduced first in version 1.66.0
find_package(Boost 1.66 REQUIRED COMPONENTS system filesystem thread log locale regex chrono atomic date_time iostreams program_options)
find_package(Boost 1.66 REQUIRED COMPONENTS system filesystem thread log log_setup locale regex chrono atomic date_time iostreams program_options)

add_library(boost_libs INTERFACE)
add_library(boost_headeronly INTERFACE)
Expand Down
1 change: 0 additions & 1 deletion DockerBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
PROJECT_ROOT=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")

set -x

# Wishlist hint: For developers, creating a Docker Compose
# setup with persistent volumes for the build & deps directories
# would speed up recompile times significantly. For end users,
Expand Down
2 changes: 2 additions & 0 deletions DockerRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -x
# -h $HOSTNAME \
# If there's problems with the X display, try this
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# If you get an error like "Authorization required, but no authorization protocol specified," run line 9 in your terminal before rerunning this program
# xhost +local:docker
docker run \
`# Use the hosts networking. Printer wifi and also dbus communication` \
--net=host \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ WORKDIR OrcaSlicer
RUN ./BuildLinux.sh -u

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

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

# Build AppImage
ENV container podman
RUN ./BuildLinux.sh -i
RUN ./BuildLinux.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
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Join our Discord community here:<br>

<h3>🚨🚨🚨Important Security Alert🚨🚨🚨</h3>

Please be aware that "orcaslicer.net" is NOT an official website for OrcaSlicer and may be potentially malicious. This site appears to use AI-generated content, lacking genuine context, and seems to exist solely to profit from advertisements. Worse, it may redirect download links to harmful sources. For your safety, avoid downloading OrcaSlicer from this site as the links may be compromised.
Please be aware that "**orcaslicer.net**" or "**orcaslicer.info**" are NOT an official website for OrcaSlicer and may be potentially malicious. This site appears to use AI-generated content, lacking genuine context, and seems to exist solely to profit from advertisements. Worse, it may redirect download links to harmful sources. For your safety, avoid downloading OrcaSlicer from this site as the links may be compromised.

The only official platforms for OrcaSlicer are our GitHub project page and the <a href="https://discord.gg/P4VE9UY9gJ">official Discord channel</a> .

Expand Down Expand Up @@ -103,11 +103,19 @@ Explore the latest developments in Orca Slicer with our nightly builds. Feedback
- Run => Options tab => Document Versions: uncheck `Allow debugging when browsing versions`
- menu bar: Product => Run

- 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'

- Linux (All Distros)
- Docker
- Dependencies: Docker [Installation Instructions](https://www.docker.com/get-started/), git
- clone this repository `git clone https://github.com/SoftFever/OrcaSlicer`
- run `cd OrcaSlicer`
- run `./DockerBuild.sh`
- To run OrcaSlicer:
- run `./DockerRun.sh`
- 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'

# Note:
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
Expand All @@ -134,11 +142,6 @@ Thank you! :)
</a>
</td>
<td>
<a href="https://phrozen3d.com/">
<img src="SoftFever_doc\sponsor_logos\Phrozen_Logo圓_.png" alt="Phrozen Technology" width="96" height="">
</a>
</td>
<td>
<a href="https://bigtree-tech.com/">
<img src="SoftFever_doc\sponsor_logos\BigTreeTech.png" alt="BIGTREE TECH" width="96" height="">
</a>
Expand Down
Binary file removed SoftFever_doc/sponsor_logos/Phrozen_Logo圓_.png
Binary file not shown.
Binary file modified SoftFever_doc/sponsor_logos/QIDI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ if (APPLE)

endif ()

if(POLICY CMP0135) # DOWNLOAD_EXTRACT_TIMESTAMP
cmake_policy(SET CMP0135 NEW)
endif()

project(OrcaSlicer-deps)

include(ExternalProject)
Expand All @@ -56,10 +60,6 @@ endif ()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF)
else()
if(POLICY CMP0135) # DOWNLOAD_EXTRACT_TIMESTAMP
cmake_policy(SET CMP0135 NEW)
endif()
endif()

set(IS_CROSS_COMPILE FALSE)
Expand Down
1 change: 1 addition & 0 deletions doc/developer-reference/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ This is a documentation from someone exploring the code and is by no means compl

- [Preset, PresetBundle and PresetCollection](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/Preset-and-bundle.md)
- [Plater, Sidebar, Tab, ComboBox](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/plater-sidebar-tab-combobox.md)
- [Slicing Call Hierarchy](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/slicing-hierarchy.md)
5 changes: 5 additions & 0 deletions doc/developer-reference/slicing-hierarchy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Slicing Call Hierarchy

The Slicing logic is not the easiest to locate in the code base. Below is a flow diagram of function calls that are made after clicking the `Slice Plate` button in the UI. Most of the processing happens in different threads. Note the calls after `BackgroundSlicingProcess::start()`, but this is how you can find the slicing logic.

<img src="../images/slicing_call_heirarchy.svg" alt="Example Image" width="320">
4 changes: 4 additions & 0 deletions doc/images/slicing_call_heirarchy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions flatpak/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ grep -q org.freedesktop.Platform.GL.nvidia /.flatpak-info && export WEBKIT_DISAB
# Work-around https://github.com/bambulab/BambuStudio/issues/3440
export LC_ALL=C.UTF-8

if [ $BAMBU_STUDIO_DARK_THEME == true ]; then
export GTK_THEME='Adwaita:dark'
# echo "Message: $(date +%T): INFO: using dark theme variant"
fi

exec /app/bin/orca-slicer "$@" &
$(/app/bin/set-dark-theme-variant.py) &
exec /app/bin/orca-slicer "$@"
64 changes: 11 additions & 53 deletions flatpak/io.github.softfever.OrcaSlicer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: io.github.softfever.OrcaSlicer
runtime: org.gnome.Platform
runtime-version: "45"
runtime-version: "46"
sdk: org.gnome.Sdk
command: entrypoint
separate-locales: true
Expand All @@ -14,11 +14,11 @@ finish-args:
- --filesystem=xdg-run/gvfs
- --filesystem=/run/media
- --filesystem=/media
- --filesystem=/run/spnav.sock:ro
# Allow OrcaSlicer to talk to other instances
- --talk-name=io.github.softfever.OrcaSlicer.InstanceCheck.*
- --system-talk-name=org.freedesktop.UDisks2
# set dark theme
- --env=BAMBU_STUDIO_DARK_THEME=false
- --env=SPNAV_SOCKET=/run/spnav.sock

modules:

Expand All @@ -36,47 +36,6 @@ modules:
url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz
sha256: e305b9f07f52743ca481da0a4e0c76c35efd60adaf1b0694eb3bb021e2137e39

# xprop, xlib is needed to manipulate the X11 window and set _GTK_THEME_VARIANT dark on X11
# and paint the window dark when PRUSA_SLICER_DARK_THEME is true
# see: entrypoint & set-dark-theme-variant.py (originated from spotify client flatpak)
- name: xprop
sources:
- type: archive
url: http://mirrors.ircam.fr/pub/x.org/individual/app/xprop-1.2.5.tar.gz
sha256: b7bf6b6be6cf23e7966a153fc84d5901c14f01ee952fbd9d930aa48e2385d670
- name: python-flit_core
buildsystem: simple
build-commands:
- pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/c4/e6/c1ac50fe3eebb38a155155711e6e864e254ce4b6e17fe2429b4c4d5b9e80/flit_core-3.9.0.tar.gz
sha256: 72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba
- name: python-packaging
buildsystem: simple
build-commands:
- pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz
sha256: 026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002
- name: python-setuptools_scm
buildsystem: simple
build-commands:
- pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/57/38/930b1241372a9f266a7df2b184fb9d4f497c2cef2e016b014f82f541fe7c/setuptools_scm-6.0.1.tar.gz
sha256: d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92
- name: python-xlib
buildsystem: simple
build-commands:
- pip3 install --no-deps --no-build-isolation --verbose --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/86/f5/8c0653e5bb54e0cbdfe27bf32d41f27bc4e12faa8742778c17f2a71be2c0/python-xlib-0.33.tar.gz
sha256: 55af7906a2c75ce6cb280a584776080602444f75815a7aff4d287bb2d7018b32

# For libOSMesa
- name: mesa
buildsystem: meson
Expand Down Expand Up @@ -121,6 +80,12 @@ modules:
tag: v5.249.0
cleanup:
- /

- name: libspnav
sources:
- type: archive
url: https://github.com/FreeSpacenav/libspnav/releases/download/v1.1/libspnav-1.1.tar.gz
sha256: 04b297f68a10db4fa40edf68d7f823ba7b9d0442f2b665181889abe2cea42759

- name: orca_wxwidgets
buildsystem: simple
Expand Down Expand Up @@ -162,6 +127,8 @@ modules:
url: https://github.com/SoftFever/Orca-deps-wxWidgets
branch: master
path: ../
- type: patch
path: patches/0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch
cleanup:
- "*.la"
- "*.a"
Expand Down Expand Up @@ -323,7 +290,6 @@ modules:
install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
mv /app/share/applications/OrcaSlicer.desktop /app/share/applications/${FLATPAK_ID}.desktop
desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop
install -Dm755 set-dark-theme-variant.py /app/bin
install -Dm755 entrypoint /app/bin
install -Dm755 umount /app/bin
Expand All @@ -343,15 +309,7 @@ modules:
- type: file
path: io.github.softfever.OrcaSlicer.metainfo.xml

# script to set dark theme variant
- type: file
path: set-dark-theme-variant.py

# start-up script
# README: workaround for the following issues, also enables dark theme variant:
# SEE: https://github.com/flathub/com.bambulab.BambuStudio/issues/27
# SEE: https://github.com/flathub/com.bambulab.BambuStudio/issues/3
# SEE: https://github.com/prusa3d/PrusaSlicer/issues/2365
- type: file
path: entrypoint

Expand Down
Loading

0 comments on commit f3b2dc2

Please sign in to comment.