Files
OrcaSlicer/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml
T
a5413efc37 refactor: printer agent infrastructure changes to work with other printer agents aside from bambu (#15710)
* Add developer flag for printer agents

* Parse user print info on the UI thread to prevent heap corruption (#119)

get_user_print_info()'s HTTP fetch can run on a worker thread (e.g. BindJob),
but parse_user_print_info() mutates userMachineList (insert/erase/delete
MachineObject). on_machine_alive (SSDP) mutates the same maps on the UI thread
without locking, so parsing off-thread races the map and frees MachineObjects
out from under it -> heap corruption.

Keep all device-list mutation on the UI thread: parse inline when already on
the main thread, otherwise marshal via CallAfter so it stays serialized with
on_machine_alive.

* Prevent loss of user access code on LAN reselect

Keep user access code intact to maintain access rights even if
device slot is unpopulated, ensuring continuous connection
and status message reception.

* Harden send flow and separate upload failure recovery (#111)

* fix(send): harden FT send path + IP pre-flight UX

* Remove early returns

* Working Moonraker and Qidi printer agent transport (#104)

Folds the Qidi AMS box-mapping print
overrides (apply_box_mapping +
start_* wrappers) that the transport
fix builds on.

* Add support for runtime error status in plugins

Distinguish a loaded plugin whose
capability errored (RuntimeError,
warn-styled, stays checked) from a
load-time Error. Status now derives
via resolve_plugin_status(); enum
ordinal keeps dialog sort priority.
Unloading clears stale errors.

* Resolve duplicate agent ID conflicts

Reject a printer-agent capability
whose agent ID is already owned by
another capability or built-in:
flag the plugin error, disable the
capability, and warn the user
instead of silently ignoring it.

* fix: checkbox should depend on plugin is_loaded status

* Replace fake-enum printer agent dropdown (#121)

A dedicated PrinterAgentChoice field
reads rows straight from the live
agent registry and stores the agent
id string, replacing the fake-coEnum
index mapping. The field moves to
TabPrinter and registers with the
searcher so UnsavedChanges renders
it; the PhysicalPrinterDialog copy
and its update hook are removed
(#125). switch_printer_agent now
resolves ids via
resolve_printer_agent_id.

* Reset device selection on agent swap or unload (#124)

set_live_printer_agent centralizes
the swap: deselect the machine,
clear stale sidebar state and the
previous agent's Other Devices, then
install the new agent (or null when
its provider vanished). Plugin
load/unload callbacks refresh the
dropdown and re-run agent selection.
load_last_machine no longer falls
back to the first available machine.

* Gate agent mode behind use_printer_agents toggle

Replace per-printer auto-activation
(is_current_printer_agent_plugin)
with a global experimental AppConfig
toggle, default off: legacy
print-host behavior is unchanged
until the user opts in. The toggle
drives device-tab routing, print
button defaults, connect-button
visibility and sidebar layout, and
dedups machine-select dialog opens.

* Track BBLPrinterAgentPlugin.py

* Add printer-agent and plugin status tests

Ports the agent lifecycle, duplicate
agent-id, built-in-id clash and
status-resolution tests. The loader
runs on a detached worker thread, so
the lifecycle tests live in their own
executable. Tests install the
production unload-side registry
wiring themselves (no GUI in the
test binary) and register agents
manually so concurrent loads stay
deterministic.

* fix: pin HTTP to prevent connection refusal

Set `use_ssl` to false to ensure Moonraker
connectivity, as the service uses HTTP rather
than HTTPS, preventing connection issues. Initialize
device info early for reliable name resolution.

* Bring Moonraker device panel to feature parity

The monitor panel showed wrong or missing
data for Moonraker printers, and its
controls did nothing.

Push payload now carries layer number and
total layers. Remaining time replaces the
wrong total_duration - print_duration
formula. The chamber light toggle maps to
Klipper SET_PIN / SET_LED, and pause,
resume and stop post to
/printer/print/{action}. Task thumbnails
resolve via /server/files/thumbnails onto
a new MachineObject thumbnail url.

Filament sync switches to pull mode so the
agent is queried on demand.

Not compiled or run.

* Stop blocking print on unreported nozzle data

* fix: make Klipper macro lamp control reliable

* Surface Moonraker webcams and gate unrunnable controls

* Keep Bambu AMS dialect out of the agent waist

M620 is Bambu firmware dialect, not a
neutral command. Composing it in
MachineObject let non-Bambu agents
(Moonraker/Klipper) forward it and
report success on firmware that
cannot run it.

Agents now own the dialect: the
default refusal on IPrinterAgent
returns not-supported so the UI
can say so; BBLPrinterAgent keeps
the byte-identical composition.

* Fix multi-color filament logic

Reuse color decoding across functions to improve
code readability and maintain consistency in
multi-color filament handling.

* Move Moonraker commands off the UI thread

Pause/resume/stop, g-code sends, temps, and
light ran synchronous HTTP on the UI thread,
freezing the app up to 10s per click on slow
or unreachable printers.

Run them on a single agent-owned FIFO worker
so g-code ordering is preserved, while command
translation stays synchronous so unsupported-
command dialogs still work.

Add a pending-disabled state to the pause,
resume, and abort buttons for Moonraker-family
printers: the icon only flips once the
WebSocket reports the real state, which also
rules out double-click races.

* Show Snapmaker U1 camera in Device tab

The U1 exposes no /server/webcams/list entry;
its camera only captures after an explicit
camera.start_monitor RPC, which the Moonraker
websocket executes unauthenticated but only
answers over MQTT - so the call is fire and
forget.

Start the camera when the camera view is
shown and renew every 300 s: the printer
retires the capture task at ~362 s and
stop_monitor is accepted but ineffective,
so teardown is simply to stop renewing.

Frames land in monitor.jpg as still JPEGs
(~2 fps at interval 0), so the webview loads
a local HTML wrapper that repolls with a
cache buster.

* fix: start stream when camera URL changes

* fix: stop Qidi slot parse throwing on null

* Keep printer-agent progress in sync

Keep the shared task progress aligned with agent
reports that lack Bambu cloud task identity.

Release the lazily allocated task during reset to
avoid leaks when machine objects reconnect.

* docs: document the printer-agent subsystem

* fix: merge access codes into one

* Reconcile implementation split with PR tip

* feat: abstract remaining gcode commands in devicemanager

* refactor: abstract bambu specific protocol to printer agent

* refactor: push bbl workflows to bbl printer agent

* remove unused

* fix: default impl

* fix callback error

* fix: remove redundant cache

* specify api for getting file transfer url

* revert file transfer abstraction

* fix: ams filament mapping workflow

* feat: update qidi to use subscription based filament sync mode

* fix: resolve stubgen byte header conflict

* fix: ams sync info and periodic ams sync via subscription workflow

* fix: skip filament sync dialog if filamentSyncMode is none

* feat: parse nozzle information for qidi and moonraker printer agents

* fix: extend access code requirements t 0, 8 or more characters.

* remove irrelevant docs

* fix: remove heavy includes from IPrinterAgent

* fix: defer filesystem and camera abstractions

* fix: remote do_fetch_filament_info from tests

* cleanup moonraker and snapmaker printer agents

* fix: access codes regression

* fix: tests

* fix: printer agent switching on preset change

* fix: remove unused variable

* fix: snapmaker U1 SelectMachineDialog blocking print

* fix: merge artifact

* fix: clear up some unrelated changes

* feat: connect to cloud printer and monitor

* feat: connect to cloud printer and monitor

* feat: generic camera stream support for http snapshot and rtsp

* fix: build & access code UI

* feat: generic camera stream support for http snapshot and rtsp

* fix: build & access code UI

* feat: connect to cloud printer and monitor

* feat: connect to cloud printer and monitor

* fix: build errors

* feat: camera via webrtc

* fix: build

* fix: cmake

* feat: remove frame assembler and change config to set protocol

* fix: orcaprinteragent refactor

* fix: LAN paths and camera stream

* feat: use ffmpeg to render http camera stream

* fix: make model_id/dev_type optional instead of blocking

* fix: connect via ip dialog

* feat: LAN impl for Orca Printer Agent

* fix: model_id resolution method for non bambu printers

* fix: ffmpeg http camera stream jittering due to incomplete frames

* fix: revert sdcard check

* feat: check printer storage status before sending

* fix: moonraker printer agent hang on printer power cut

* fix: shim layer for any compatibiliity changes

* fix: cloud printers were using the wrong MQTT endpoint

* feat: cloud download via HTTP

* temp: doc for intended change

* fix: warnings

* fix: warnings

* fix: camera auto-play on startup

* fix: split infra from impl

* fix: uninitialized ams state blocking print

* Fixes nullptr deref

* Log first before std::move

* fix: printer agent virutal optional functions

* fix: parameterize orcaslicer_copy_test_dlls() for printer_agent_plugin_tests

* Revert "fix: parameterize orcaslicer_copy_test_dlls() for printer_agent_plugin_tests"

This reverts commit 2f566e3779.

* Guard libdatachannel. Remove unused code

* fix: unit tests & unused variables

* fix(ci): deps build order for datachannel

* Resolve printer agent first before getting cloud printer agent

* fix(ci): set depends openssl

* fix: re-include apply header guarded by ifdef __APPLE__

* fix(ci): add libdatachannel to flatpak manifest

* fix: add internal_developer_mode chekc back to MediaPlayCtrl::load()

* fix: invoke js clearInterval on WebMediaController::stop

* fix: change rtc log level

* fix: inject provider, agent id and generation to get_user_print_info to ensure correct metadata

* fix: revert moonraker specific behavior

* fix: remove stale comment

* fix: use ORCA_CLOUD_PROVIDER instead of hardcoded string

* fix: remove hardcoded ICE servers

* feat: enable https camera stream mode

* fix: move non-mandatory printer agent function stubs to IPrinterAgent

* fix: dedupe compatible printer type check

* fix: stop the correct media controller

* fix: scope get_my_machine_list to printers listed under the current printer agent

* fix: move printer agent plugin tests into test_plugin_lifecycle.cpp

* fix: always build bundled DataChannel dep

* fix: disable unused DataChannel media support

* revert: filament sync work

* fix: wrap command_* with small wrapper

* fix: regression bug, connecting to bambu needs bblp username

* fix: default impl for vendor agnostic gcode commansd

* refactor: media controller playback routing and ownership

* fix: bump libdatachannel ver & update flatpak to use tar instead

* fix: stop flatpak DataChannel build from re-cloning over the sandboxed network

* fix: update windows ffmpeg prebuild

* fix: update printer agent plugin API

* fix: shift camera signaling channel to network agent

* fix: follow external-packages for flatpak libdatachannel deps & add flatpak path to use source_dir

* feat: add printer-agent.md doc to HLSD

* fix: guard DeviceManager command dispatch when no printer agent is bound

* fix: port BBL implementations from #15711

* refactor: connect_printer api and dialog

* fix(tests): make omitted printer agent operations answer like a missing agent

* fix: preserve printer agent defaults in PrinterAgentPluginCapabilityTrampoline

* test: cover printer agent default command dispatch

* fix: validate windows FFmpeg avformat library

* feat: extend optional printer model warnings to calibration & ams workflows

* fix: handle malformed printer progress values safely

* fix: clear webview document on stop

* chore: reduce diagnostic logging level to trace

* refactor: centralize printer compatibility checks

* tests: add device manager integration coverage

* tests: cover WebMediaController lifecycle with wxWebView stub

* fix: make integration tests headless

* refactor: collapse command_ams_refresh_rfid and command_ams_refresh_rfid2

* refactor: make printer connection SSL agent-specific

* fix: persist input printer host and port

* fix: use correct device id for Moonraker connections

* fix: make moonraker gcode commands asynchronous

* fix: preserve moonraker device names

* fix: add include for non BBL_RELEASE_TO_PUBLIC path in BBLPrinterAgent

---------

Co-authored-by: Andrew <159703254+andrewsoonqn@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
2026-10-01 00:30:44 +08:00

475 lines
18 KiB
YAML

app-id: com.orcaslicer.OrcaSlicer
runtime: org.gnome.Platform
runtime-version: "50"
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.llvm21
command: entrypoint
separate-locales: true
rename-icon: OrcaSlicer
build-options:
append-path: /usr/lib/sdk/llvm21/bin
prepend-ld-library-path: /usr/lib/sdk/llvm21/lib
env:
CC: clang
CXX: clang++
LDFLAGS: "-fuse-ld=lld"
finish-args:
- --share=ipc
- --socket=x11
- --socket=wayland
- --share=network
- --device=all
- --filesystem=home
- --filesystem=xdg-run/gvfs
- --filesystem=/run/media
- --filesystem=/media
# Network shares (CIFS/NFS) are commonly mounted under /mnt, which the default
# finish-args don't grant; without it, opening a model from such a share fails
# with "The file does not contain any geometry data."
# https://github.com/flathub/com.orcaslicer.OrcaSlicer/issues/2
- --filesystem=/mnt
- --filesystem=/run/spnav.sock:ro
# Allow read-only access to OrcaSlicer's legacy config and cache directories (if they exist) for migration purposes.
- --filesystem=~/.var/app/io.github.softfever.OrcaSlicer:ro
# Allow OrcaSlicer to own and talk to instance-check D-Bus names (InstanceCheck.cpp)
- --talk-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
- --own-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
- --system-talk-name=org.freedesktop.UDisks2
- --env=SPNAV_SOCKET=/run/spnav.sock
modules:
# JPEG codec and GTK video sink (Wayland liveview) for the liveview
- name: gst-plugins-good
buildsystem: meson
config-opts:
- -Dauto_features=disabled
- -Djpeg=enabled
- -Dgtk3=enabled
- -Ddoc=disabled
- -Dexamples=disabled
- -Dtests=disabled
sources:
- type: archive
url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz
sha256: e305b9f07f52743ca481da0a4e0c76c35efd60adaf1b0694eb3bb021e2137e39
- name: glu
build-options:
cxxflags: -Wno-register
config-opts:
- --disable-static
sources:
- type: archive
url: https://ftp.osuosl.org/pub/blfs/conglomeration/glu/glu-9.0.2.tar.xz
sha256: 6e7280ff585c6a1d9dfcdf2fca489251634b3377bfc33c29e4002466a38d02d4
cleanup:
- /include
- /lib/*.a
- /lib/*.la
- /lib/pkgconfig
- name: kde-extra-cmake-modules
buildsystem: cmake-ninja
sources:
- type: git
url: https://github.com/KDE/extra-cmake-modules
tag: v5.249.0
commit: 008ae77d0cd2a97c346228ab30b99279643e5022
cleanup:
- /
- name: libspnav
sources:
- type: archive
url: https://github.com/FreeSpacenav/libspnav/releases/download/v1.2/libspnav-1.2.tar.gz
sha256: 093747e7e03b232e08ff77f1ad7f48552c06ac5236316a5012db4269951c39db
# wxWidgets built as a separate module for Flathub (no network at build time)
# Config-opts mirror deps/wxWidgets/wxWidgets.cmake with FLATPAK=ON, DEP_WX_GTK3=ON
- name: wxWidgets
buildsystem: cmake-ninja
build-options:
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DwxBUILD_PRECOMP=ON
- -DwxBUILD_TOOLKIT=gtk3
- -DCMAKE_DEBUG_POSTFIX:STRING=d
- -DwxBUILD_DEBUG_LEVEL=0
- -DwxBUILD_SAMPLES=OFF
- -DwxBUILD_SHARED=ON
- -DBUILD_SHARED_LIBS=ON
- -DwxUSE_MEDIACTRL=ON
- -DwxUSE_DETECT_SM=OFF
- -DwxUSE_PRIVATE_FONTS=ON
- -DwxUSE_OPENGL=ON
- -DwxUSE_GLCANVAS_EGL=ON
- -DwxUSE_WEBREQUEST=ON
- -DwxUSE_WEBVIEW=ON
- -DwxUSE_WEBVIEW_EDGE=OFF
- -DwxUSE_WEBVIEW_IE=OFF
- -DwxUSE_REGEX=builtin
- -DwxUSE_LIBSDL=OFF
- -DwxUSE_XTEST=OFF
- -DwxUSE_STC=OFF
- -DwxUSE_AUI=ON
- -DwxUSE_LIBPNG=sys
- -DwxUSE_ZLIB=sys
- -DwxUSE_LIBJPEG=sys
- -DwxUSE_LIBTIFF=OFF
# sys, not builtin (unlike the static deps build): wxWidgets installs the
# builtin libwxwebp*.so only for static builds, so a shared build leaves
# them missing at runtime. The GNOME runtime provides libwebp.
- -DwxUSE_LIBWEBP=sys
- -DwxUSE_EXPAT=sys
- -DwxUSE_NANOSVG=OFF
- -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
- -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
- -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld
sources:
# Use git instead of archive: wxWidgets 3.3 relies on multiple git
# submodules (PCRE2, etc.) that are not included in GitHub tarballs.
- type: git
url: https://github.com/SoftFever/Orca-deps-wxWidgets.git
tag: orca-3.3.2
commit: db1005db3dea2c37a46fb455a9a02e37aa360751
# OrcaSlicer C++ dependencies (built offline with pre-downloaded archives)
- name: orca_deps
buildsystem: simple
build-options:
env:
BUILD_DIR: deps/build_flatpak
build-commands:
- tar xf deps.tar
- |
cmake -S deps -B $BUILD_DIR \
-DFLATPAK=ON \
-DDEP_DOWNLOAD_DIR=/run/build/orca_deps/external-packages \
-DCMAKE_PREFIX_PATH=/app \
-DDESTDIR=/app \
-DCMAKE_INSTALL_PREFIX=/app \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld"
- cmake --build $BUILD_DIR --parallel
- rm -rf /run/build/orca_deps/external-packages
cleanup:
- /include
- "*.a"
- "*.la"
# CPython headers: useless at runtime (no compiler in the runtime
# sandbox, so C-extension source builds can't happen anyway), and a
# few MB of bloat. /app/libpython is installed by this module, so the
# entry must live in THIS module's cleanup (module-level cleanup only
# matches files the module itself installed).
- /libpython/include
sources:
# flatpak-builder cannot checksum a directory, so a `type: dir` here would
# rebuild every dependency on every run. Generated by make_deps_tar.sh.
- type: file
path: deps.tar
# ---------------------------------------------------------------
# Pre-downloaded dependency archives
# These are placed in external-packages/<Name>/ so CMake's
# ExternalProject_Add finds them and skips network downloads.
# ---------------------------------------------------------------
# Boost 1.84.0
- type: file
url: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz
sha256: 4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95
dest: external-packages/Boost
# Eigen 5.0.1
- type: file
url: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.zip
sha256: 0dbb1f9e3aaad66f352c03227d8c983f6f0b49e0b07e71a7300f4abcc01aee12
dest: external-packages/Eigen
# TBB v2021.5.0
- type: file
url: https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip
sha256: 83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
dest: external-packages/TBB
# Cereal v1.3.0
- type: file
url: https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip
sha256: 71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657
dest: external-packages/Cereal
# Qhull v8.0.2
- type: file
url: https://github.com/qhull/qhull/archive/v8.0.2.zip
sha256: a378e9a39e718e289102c20d45632f873bfdc58a7a5f924246ea4b176e185f1e
dest: external-packages/Qhull
# GLFW 3.4
- type: file
url: https://github.com/glfw/glfw/archive/refs/tags/3.4.zip
sha256: a133ddc3d3c66143eba9035621db8e0bcf34dba1ee9514a9e23e96afd39fd57a
dest: external-packages/GLFW
# OpenCSG 1.4.2
- type: file
url: https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip
sha256: 51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5
dest: external-packages/OpenCSG
# SolveSpace libslvs (2D sketch constraint solver, Design tab)
- type: file
url: https://github.com/JacobStoren/SolveSpaceLib/archive/4d8704523e4bf212fadf5189f92484244f670fea.zip
sha256: 1c4bdde9c3c6ef20ea4b50b73601de56769f2eb131b36927d7c6489f102e6c30
dest: external-packages/SLVS
# Blosc 1.17.0 (tamasmeszaros fork)
- type: file
url: https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
sha256: dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
dest: external-packages/Blosc
# OpenEXR v2.5.5
- type: file
url: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
sha256: 0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
dest: external-packages/OpenEXR
# OpenVDB (custom fork)
- type: file
url: https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
sha256: f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
dest: external-packages/OpenVDB
# GMP 6.2.1
- type: file
url: https://github.com/SoftFever/OrcaSlicer_deps/releases/download/gmp-6.2.1/gmp-6.2.1.tar.bz2
sha256: eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c
dest: external-packages/GMP
# MPFR 4.2.2
- type: file
url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.bz2
sha256: 9ad62c7dc910303cd384ff8f1f4767a655124980bb6d8650fe62c815a231bb7b
dest: external-packages/MPFR
# CGAL 5.6.3
- type: file
url: https://github.com/CGAL/cgal/releases/download/v5.6.3/CGAL-5.6.3.zip
sha256: 5d577acb4a9918ccb960491482da7a3838f8d363aff47e14d703f19fd84733d4
dest: external-packages/CGAL
# NLopt v2.5.0
- type: file
url: https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz
sha256: c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
dest: external-packages/NLopt
# libnoise 1.0
- type: file
url: https://github.com/SoftFever/Orca-deps-libnoise/archive/refs/tags/1.0.zip
sha256: 96ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6
dest: external-packages/libnoise
# Draco 1.5.7
- type: file
url: https://github.com/google/draco/archive/refs/tags/1.5.7.zip
sha256: 27b72ba2d5ff3d0a9814ad40d4cb88f8dc89a35491c0866d952473f8f9416b77
dest: external-packages/Draco
# Assimp 5.4.3
- type: file
url: https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz
sha256: 66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb
dest: external-packages/Assimp
# OpenSSL 1.1.1w (GNOME SDK has 3.x; OrcaSlicer requires 1.1.x)
- type: file
url: https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz
sha256: 2130e8c2fb3b79d1086186f78e59e8bc8d1a6aedf17ab3907f4cb9ae20918c41
dest: external-packages/OpenSSL
# CURL 7.75.0 (built from source to link against OpenSSL 1.1.x)
- type: file
url: https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.zip
sha256: a63ae025bb0a14f119e73250f2c923f4bf89aa93b8d4fafa4a9f5353a96a765a
dest: external-packages/CURL
# OCCT (OpenCASCADE) V7_6_0
- type: file
url: https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip
sha256: 28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc
dest: external-packages/OCCT
# OpenCV 4.6.0
- type: file
url: https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
sha256: 1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
dest: external-packages/OpenCV
# CPython 3.12.13
- type: file
url: https://www.python.org/ftp/python/3.12.13/Python-3.12.13.tar.xz
sha256: c08bc65a81971c1dd5783182826503369466c7e67374d1646519adf05207b684
dest: external-packages/python3
# wxInspector 1.0.0
- type: file
url: https://github.com/Noisyfox/wxInspector/archive/refs/tags/v1.0.0.zip
sha256: 0ba163956f2d468b19a91b96c5aba66ee9610843ea41dda628ea44cdafde7db7
dest: external-packages/wxInspector
# FFmpeg n7.0.3
- type: file
url: https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n7.0.3.tar.gz
sha256: deedcabe339165214a3637df4c86a507aef0d793cf8774ff68735f4737e8ddbc
dest: external-packages/FFMPEG
# libdatachannel v0.24.5
# The Git checkout includes the submodules that are missing from the
# GitHub source archive. DataChannel.cmake consumes it as SOURCE_DIR.
- type: git
url: https://github.com/paullouisageneau/libdatachannel.git
tag: v0.24.5
commit: 443f6934d9007eb7076ab7825ba330f355fcbead
dest: external-packages/DataChannel
# ---------------------------------------------------------------
# Fallback archives for deps normally provided by the GNOME SDK.
# These are only used if find_package() fails to locate them.
# ---------------------------------------------------------------
# ZLIB 1.2.13
- type: file
url: https://github.com/madler/zlib/archive/refs/tags/v1.2.13.zip
sha256: c2856951bbf30e30861ace3765595d86ba13f2cf01279d901f6c62258c57f4ff
dest: external-packages/ZLIB
# libpng 1.6.35
- type: file
url: https://github.com/glennrp/libpng/archive/refs/tags/v1.6.35.zip
sha256: 3d22d46c566b1761a0e15ea397589b3a5f36ac09b7c785382e6470156c04247f
dest: external-packages/PNG
# libjpeg-turbo 3.0.1
- type: file
url: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.0.1.zip
sha256: d6d99e693366bc03897677650e8b2dfa76b5d6c54e2c9e70c03f0af821b0a52f
dest: external-packages/JPEG
# Freetype 2.12.1
- type: file
url: https://github.com/SoftFever/orca_deps/releases/download/freetype-2.12.1.tar.gz/freetype-2.12.1.tar.gz
sha256: efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938
dest: external-packages/FREETYPE
- name: OrcaSlicer
buildsystem: simple
build-commands:
- |
cmake . -B build_flatpak \
-DFLATPAK=ON \
-DORCA_TOOLS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/app \
-DCMAKE_INSTALL_PREFIX=/app \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld"
- cmake --build build_flatpak --target OrcaSlicer -j$FLATPAK_BUILDER_N_JOBS
- ./scripts/run_gettext.sh
- cmake --build build_flatpak --target install -j$FLATPAK_BUILDER_N_JOBS
# Per-vendor preset caches. On the other platforms CI runs this script
# itself; the flatpak is built inside flatpak-builder and the generator
# only exists in here, so the swap is a build step instead, against the
# profiles the install above copied into /app.
- cmake --build build_flatpak --target generate_system_cache -j$FLATPAK_BUILDER_N_JOBS
- ./scripts/build_preset_cache.sh -n -b build_flatpak /app/share/OrcaSlicer/profiles
# Built (not run) here when CI injects run-tests, then shipped to a separate
# test job. Only the test sources compile; nothing installs to /app.
test-commands:
- cmake . -B build_flatpak -DBUILD_TESTS=ON
# A suite missing from this list fails the leg loudly, since ctest registers a
# <target>_NOT_BUILT test for it. (tests/all is a Ninja subdirectory target and
# this build uses the default Makefile generator, so it is not available here.)
- cmake --build build_flatpak -j"${FLATPAK_BUILDER_N_JOBS:-$(nproc)}" --target
libslic3r_tests fff_print_tests sla_print_tests libnest2d_tests slic3rutils_tests
filament_group_tests
cleanup:
- /include
post-install:
- | # Desktop integration files
install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/OrcaSlicer.svg
install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop
install -Dm755 entrypoint /app/bin
install -Dm755 umount /app/bin
- install -Dm644 LICENSE.txt /app/share/licenses/${FLATPAK_ID}/LICENSE.txt
- | # Install fonts into fontconfig-scanned directory so Pango finds them
# before initialization (avoids ensure_faces crash from AddPrivateFont)
install -Dm644 -t /app/share/fonts/OrcaSlicer/ resources/fonts/*.ttf
fc-cache -f /app/share/fonts/OrcaSlicer/
sources:
# OrcaSlicer source tree (specific dirs to avoid copying .git from worktree)
- type: dir
path: ../../cmake
dest: cmake
- type: dir
path: ../../deps_src
dest: deps_src
- type: dir
path: ../../resources
dest: resources
- type: dir
path: ../../src
dest: src
- type: dir
path: ../../localization
dest: localization
# For the post-build unit-test step (BUILD_TESTS=ON); not built by the app.
- type: dir
path: ../../tests
dest: tests
- type: file
path: ../../CMakeLists.txt
- type: file
path: ../../LICENSE.txt
- type: file
path: ../../version.inc
- type: file
path: ../run_gettext.sh
dest: scripts
- type: file
path: ../build_preset_cache.sh
dest: scripts
- type: file
path: ../run_unit_tests.sh
dest: scripts
# AppData metainfo for GNOME Software & Co.
- type: file
path: com.orcaslicer.OrcaSlicer.metainfo.xml
# Startup script
- type: file
path: entrypoint
# umount wrapper used to redirect umount calls to UDisks2
- type: file
path: umount