128 Commits

Author SHA1 Message Date
SoftFever
fd47370c5c fix Windows build errors - wip 2026-03-26 10:17:19 +08:00
SoftFever
f77e7d833b Copy wx/private headers after wxWidgets install
wxWidgets 3.3 cmake install doesn't include private headers.
OrcaSlicer uses some private headers for accessibility support.
Add a post-install step to copy the private headers directory.
2026-03-25 12:49:35 +08:00
SoftFever
7658cf9076 Disable wxWidgets bundled NanoSVG to avoid duplicate symbols
wxWidgets 3.3 bundles its own NanoSVG in bmpsvg.cpp, conflicting with
OrcaSlicer's bundled copy which includes the nsvgRasterizeXY extension.
Set wxUSE_NANOSVG=OFF in deps cmake to use OrcaSlicer's version only.
2026-03-25 12:44:02 +08:00
SoftFever
7de8fbb0da Remove _wx_opengl_override from wxWidgets dep cmake
wxWidgets 3.3 handles OpenGL discovery natively via imported targets
(OpenGL::GL, OpenGL::OpenGL). The override was corrupting wx-config
output with malformed "-framework OpenGL" entries, causing
FindwxWidgets.cmake to fail.
2026-03-25 11:28:23 +08:00
SoftFever
2d7e26292b Update build system for wxWidgets 3.1.5 → 3.3.2 upgrade
- deps/wxWidgets/wxWidgets.cmake: Add GIT_TAG v3.3.2 to track the
  correct branch; remove -DwxUSE_UNICODE=ON (unicode-only in 3.3,
  option removed)
- src/CMakeLists.txt: Bump find_package minimum version from 3.0/3.1
  to 3.3; remove SLIC3R_WX_STABLE conditional (3.0 no longer supported)
- CMakeLists.txt: Remove SLIC3R_WX_STABLE option definition
- scripts/flatpak/com.orcaslicer.OrcaSlicer.yml: Update wxWidgets
  source URL to v3.3.2 branch archive; remove sha256 (placeholder
  TODO); remove -DwxUSE_UNICODE=ON
2026-03-24 20:22:19 +08:00
SoftFever
acbe5c708e respect clang flag for all deps 2026-03-19 23:14:47 +08:00
SoftFever
e00fcbb44e update cmake to 4.3.x (#12842)
# Description

update cmake to 4.3.x version for better support of new build tools

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
2026-03-19 18:17:33 +08:00
SoftFever
4ffe260228 update cmake to 4.3.x 2026-03-19 15:48:32 +08:00
Kevin J. Lynagh
882af4d1fe CMake: Accept ignored prefixes from build_release_macos.sh
Defaults to ignore:

/opt/local    (MacPorts)
/opt/homebrew (Homebrew on ARM)
/opt/local    (Homebrew on x86)

We want to ignore these paths so any dependencies they might contain don't interfere with the build.

This fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/10460
2026-03-18 21:51:54 +01:00
SoftFever
322b44d84a Feature/flatpak clang llvm21 (#12727)
* Fix GIT_COMMIT_HASH not set in Flatpak builds

The env var check was gated inside the .git directory check, so
Flatpak builds (which exclude .git from the sandbox) always fell
back to "0000000". Lift the env var check to top level and inject
the commit hash into the Flatpak manifest via build-options.env.

* Switch Flatpak build to Clang/LLD via LLVM 21 SDK extension

- Add org.freedesktop.Sdk.Extension.llvm21
- Bump runtime to GNOME 49 (SDK 25.08) for llvm21 availability

* fix build errors and improving build speed for flatpak

* fxi more build errors

* Update error messages for GNOME Platform and SDK versions
2026-03-11 14:59:29 +08:00
SoftFever
52a2c033d3 Remove upstreamed wxWidgets dark theme patch for Flatpak
The GNOME dark style support patch has been submitted upstream to wxWidgets, so the local Flatpak patch is no longer needed.
2026-03-05 01:13:26 +08:00
SoftFever
1745e8b910 Reapply "Switch to self hosted mac runner (#12024)" with proper fix (#12278)
* Reapply "Switch to self hosted mac runner (#12024)" with proper fix

This reverts commit 783f9926e3.

* use conditional logic for self-hosted runners

* improve readbility
2026-02-17 16:31:40 +08:00
Matthias Blaicher
bf59fe458f Fix EGL/GLX mismatch causing blank 3D preview on Linux (#12308)
- Add configurable GLEW_USE_EGL option (default OFF) to match wxWidgets
- Explicitly set wxUSE_GLCANVAS_EGL=OFF for vendored wxWidgets build
- Add compile-time check to detect EGL/GLX backend mismatch between
  GLEW and wxWidgets, preventing silent rendering failures

The bug occurred when GLEW was compiled with EGL support (using
eglGetProcAddress) but wxWidgets created GLX contexts. This mismatch
caused OpenGL function pointers to fail loading, resulting in blank
3D model preview.

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-02-15 16:26:16 +08:00
Maeyanie
bb30999673 Add support for Draco (.drc) format (#10681)
* Add read support for Google's Draco (.drc) format.

* Fix build on Linux

* Use boost instead of fstat.

* Switch to boost memory-mapped file to save RAM and potentially improve performance.

* Trim trailing whitespace.

* Initial Draco write support.

Currently always exports with 16-bit precision and speed 0 (best compression).
The back-end function does have arguments to specify them, it's just not hooked into the GUI.

* Add Draco to the About dialogue.

* Fix Linux compile (hopefully)

* Add an option to associate DRC files on Windows.

* Implement a Preferences option to set Draco position quantization bits

* Update src/slic3r/GUI/Preferences.cpp

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>

* Some slight changes to ianalexis's suggestion.

* Implement a create_item_spinctrl() function for numeric inputs, and use that instead of create_item_input().

* Move "bits" to inside the spinctrl box.

* Refactor following yw4z's feedback

* Update src/slic3r/GUI/Preferences.cpp

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>

* Change to 0 bits as the default setting for Draco export precision.

* Change to a lossy checkbox and a bits field with a range of 8-30.

* Proper SpinInput code from yw4z

* Revert "Proper SpinInput code from yw4z"

This reverts commit 7e9c85f31a.

* Revert "Change to a lossy checkbox and a bits field with a range of 8-30."

This reverts commit d642c9bcc0.

* Redo preferences based on SoftFever's feedback

* Refactor to minimize code duplication

* Fix padding

* Improve Draco export quality level tooltip clarity

Clarify that 0 means lossless compression (not uncompressed),
document the valid lossy range (8-30), and better explain the
tradeoff between file size and geometric detail.

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-02-06 18:27:17 +08:00
luzpaz
a036de042b Fix various typos in source documentation (#11553)
* Fix various typos in source documentation

* Delete cmake/modules/Catch2/CatchAddTests.cmake

* Delete tests/example/example_tests_main.cpp

* Revert test_config.cpp

---------

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-01-21 09:19:25 -03:00
SoftFever
541f3bb93b Merge branch 'main' into feat/configurable-bambu-network-lib 2026-01-05 08:39:21 +08:00
mosfet80
504a5d3b70 Update Qhull.cmake (#10848)
# Description
[Updated Qhull]
changelog
https://github.com/qhull/qhull/releases/tag/v8.0.2

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

<!--
> Please describe the tests that you have conducted to verify the changes made in this PR.
-->
2026-01-03 00:36:04 +08:00
SoftFever
5f18efa9e2 Merge branch 'main' into feat/configurable-bambu-network-lib 2025-12-27 23:40:35 +08:00
mosfet80
3da093b756 Update CGAL.cmake (#10850)
* Update CGAL.cmake

* Delete deps/CGAL/0001-clang19.patch

* Update CGAL.cmake

* Update CGAL.cmake

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-12-23 00:44:36 +08:00
Maciej Wilczyński
a4d4bfff27 Allow selecting specific network plugin versions 2025-12-14 14:26:16 +01:00
Ian Bassi
f71e09a8c6 Fix Flatpak build: Add fallback URL for MPFR source download (#11512)
Add fallback URL for MPFR source download

Updated MPFR.cmake to include both the GNU FTP and mpfr.org URLs for downloading the MPFR source. This improves reliability in case one of the sources is unavailable.
2025-11-29 15:53:40 +08:00
Noisyfox
7f1aad8bc1 Support Visual Studio 2026 (#11349)
* Add script with VS version auto detection

* Add msvc145 toolset support

* Fix issue when build slicer only

* Fix vs2026 OpenCV build

* Set github action to use new build script

* Get vs version from `msbuild --version` so it works for github action
2025-11-13 23:11:56 +08:00
Ocraftyone
026499c5b7 Better CMake Defaults (#10294)
* Auto generate CMAKE_PREFIX_PATH/DESTDIR

* Auto set CMAKE_INSTALL_PREFIX

* Always default SLIC3R_STATIC to on

* Only allow one value for CMAKE_OSX_ARCHITECTURES

* Set arch for OpenSSL from CMAKE_OSX_ARCHITECTURES

* Set CMAKE_INSTALL_RPATH from CMAKE_PREFIX_PATH

* Default CMAKE_MACOSX_RPATH and CMAKE_MACOSX_BUNDLE to on

* Auto set BBL_RELEASE_TO_PUBLIC based on build config

* Default to GTK 3

* Fix linux debug build

Update find modules to also look for the debug variant of the libraries

* Set DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO based on CMAKE_BUILD_TYPE

* Add a fallback value for Windows SDK if the env variables are not set

* Reflect CMake changes in the build scripts

* Add missing line

* Fix auto setting DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO

* Update dep folder name for linux in GH actions

* Invert dep-folder-name conditions

`''` is considered a falsy value, which was causing the value to always be set to 'OrcaSlicer_dep'

* Properly handle finding the debug version of libnoise

* Convert FindNLopt.cmake to a config mode wrapper

* Use separate build directory for debug builds on Linux

* Move find_package for libnoise

* Cleanup and improve linux build script

- Add dry run
- Add build in RelWithDebInfo
- Add function to print and run commands

* Remove linux destdir deprecation and cleanup

* Fix flatpak build

* Disable fail fast for flatpak builds

* Flatpak improvements

- Build wxWidgets using deps cmake
- Improve handling of space freeing commands while building deps
- Allow cmake to directly download deps
- Set needed flags within cmake instead of the build manifest

* Print clean build commands

* Implement shellcheck recommendations

* Cleanup

* Fix CMakeLists.txt syntax by replacing empty elseif with else statement

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-10-25 22:05:09 +08:00
bytedream
9061b12aee Fix timelapse crash
(cherry picked from commit 1600f476bb8461fbc8b23c538880731977bd3211)
2025-10-05 16:06:55 +08:00
Noisyfox
df1c5722ef Revert "OpenCV don't build its own libjpeg, to avoid symbol conflict"
This reverts commit 7a90b26e57.
2025-10-05 16:06:40 +08:00
Noisyfox
7a90b26e57 OpenCV don't build its own libjpeg, to avoid symbol conflict 2025-09-26 13:29:14 +08:00
SoftFever
883607e1d4 Refactor folder (#10475)
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
2025-08-22 20:02:26 +08:00
Jack Boswell
05181779d1 Update WebView2 to 1.0.3351.48 (#10239) 2025-08-11 13:44:01 +08:00
SoftFever
e5ea789b89 Fix broken freetype-2.12.1.tar.gz link 2025-08-02 17:23:26 +08:00
Jack Boswell
c8a27715a9 Replace DEPS_BITS with DEPS_ARCH (#10183)
* Replace DEPS_BITS with DEPS_ARCH

* Restore missing DEP_MSVC_GEN

* STREQUAL

* STREQUAL

* Other cmakelists

* webview2 rename
2025-07-23 19:17:05 +08:00
lodriguez
be3bbfa39e remove OSMesa (#9708)
* remove OSMesa

OSMesa is depricated for quite a while and got removed with Mesa 25.1.0

* remove OSMesa from all buildfiles, readmes, etc…

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2025-06-15 14:53:42 +08:00
Vasily Khoruzhick
b72e28c116 Various flatpak fixes and improvements (#9527)
* Revert 98be94a729

We carry a wxgtk patch [1] that detects dark theme automatically. If it
doesn't work, it means that either selected Gtk theme is not installed
in flatpak environment, or appropriate xdg-desktop-portal for the DE is not
installed.

Plasma users may need to install org.gtk.Gtk3theme.Adapta

Also see https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html

[1] 0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch

* flatpak: introduce ORCA_SLICER_DARK_THEME to force dark theme

If ORCA_SLICER_DARK_THEME is set, dark theme will be applied regardless
of system settings.

* FIX: occt build failure

Pick up build error fix from upstream:
7236e83dcc

/run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx: In member function ‘Standard_Boolean StdPrs_BRepFont::renderGlyph(Standard_Utf32Char, TopoDS_Shape&)’:
/run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx:465:30: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ [-fpermissive]
  465 |     const char* aTags      = &anOutline->tags[aStartIndex];
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              unsigned char*

* Set policy CMP0167 to NEW

Newer cmake switched to using BoostConfig.cmake shipped with boost-1.70
or later for detecting boost, to preserve old behavior policy CMP0167
was introduced.

Set it to "NEW" to indicate that we want to use .cmake shipped with
boost

* Add OpenSSL tarball link to the manifest

* Add curl zip to the manifest

* flatpak: bump runtime version to 47

Gnome 47 has been released a while ago

---------

Co-authored-by: Bastien Nocera <hadess@hadess.net>
2025-06-15 12:10:51 +08:00
Maciej Lisiewski
2490564f7f Fix building with GCC 15 (#9643)
* Patch GMP to build on GCC15

* Add cstdint include - GCC15 defaults to C23

* Update GMP PATCH_COMMAND to work without a valid git repo

* Set GMP_DIRECTORY_FLAG
2025-05-16 23:48:59 +08:00
Noisyfox
aebc01abfc Removed dependency on libtiff (#9514)
(cherry picked from commit prusa3d/PrusaSlicer@f12e0b4d21)

Co-authored-by: Lukas Matena <lukasmatena@seznam.cz>
2025-05-14 15:04:49 +08:00
Noisyfox
a9d426a3dc Fix Xcode 16.3 build (#9422)
* Fix build with Xcode 16.3

* Simplify OpenVDB patch, from 930c3acb8e (diff-bc3061cc2fe6c64a3d67c8350330bb3a530d01037faace6da27ad9a12aa03e29)

* Fix CGAL header under clang 19
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281880

* Fix compile error due to removal of base template for `std::char_traits` in clang 19
https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html#deprecations-and-removals
2025-05-01 17:09:45 +08:00
SoftFever
54a5ac9235 reenable appimage build on ubuntu 24.04 (#9458)
* reenable appimage build on ubuntu 24.04

* update TIFF

* fix build error
2025-04-24 08:13:15 +08:00
SoftFever
658669d103 Universal mac build (#9074)
build universal Mac app
2025-03-27 22:53:37 +08:00
SoftFever
41450b3a64 avoid using https://www.mpfr.org/mpfr-current link (#9034)
* avoid using https://www.mpfr.org/mpfr-current link
2025-03-23 13:25:50 +08:00
lodriguez
c3542ce014 Update to mpfr-4.2.2.tar.bz2 (#9007)
Needed an update, the old link is 404.
2025-03-22 16:42:34 +08:00
Pouria Mousavizadeh Tehrani
a407feed24 fix: typo in CMakeLists.txt (#8707) 2025-03-05 21:29:54 +08:00
Joseph Palazzolo
b82d13a5a9 Fix OCCT and OpenCV patching during build (#8465)
* Fix OCCT and OpenCV patching during build

The inclusion of the `--directory` flag here isn't necessary because of
how `PATCH_COMMAND` applies patches. In fact this causes issues when
trying to build from an archive, `--directory` seems to imply `--index`
and thus this patch only succeeds if you're inside an initialized git
repo. If you simply use the archive without a git repo the build fails
at the patch step.

* Alter patch command based on git repo status

`git apply` has different behavior when inside a git repo vs not. If
we're in a git repo we need to fully quality the path for these patches,
otherwise we can omit the directory flag.

---------

Co-authored-by: Joe Palazzolo <joe@joepalazzolo.net>
2025-02-21 12:50:17 +08:00
SoftFever
6ed68342e0 fix build errors (#8210)
* fix build errors

* fix windows

* fix flatpak
2025-01-28 01:07:27 +08:00
Nick Johnson
fd0b2547f2 Add support for structured noise (perlin) fuzzy skin (#7678)
* Add support for perlin noise fuzzy skin

* Support multiple types of coherent noise

* Updated tooltips for more clarity.

* Reorder options as suggested by @discip

* Fix accidental removal of &

* Move libnoise to deps

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-01-27 22:45:16 +08:00
Dima Buzdyk
2e017a73cf Fix cmake warning on policy CMP0135 (#7247) 2024-11-12 00:24:54 +08:00
SoftFever
002125fbe4 Revert "Revert "Some flatpak fixing (#5510)""
This reverts commit e29cba2eff.
2024-07-16 22:39:43 +08:00
SoftFever
e29cba2eff Revert "Some flatpak fixing (#5510)"
This reverts commit 657954901f.
2024-07-11 20:27:45 +08:00
Aidan
657954901f Some flatpak fixing (#5510)
* Use fixed commit for wxwidgets

* disable cache

* Fix imports

* revert some build stuff

* fix python builds

* Don't build OCCT docs, a constexpr borks flatpak

* fix thread import

* Fix import

* Fix import again

* remove git commit

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2024-07-11 00:07:55 +08:00
Noisyfox
a877d642f6 Fix build with VS2022 17.10.x (#5575)
* Fix dep build with latest vs2022

* Fix opencv build with latest vs2022
2024-06-04 19:59:23 +08:00
Aidan
17fec83e5b Flatpak build (#4175)
* Initial commit for the builder

* fix wx, use hack to install into /app

* add some workarounds for /usr/local

* fix up rest of paths

* attempt to fix wxwebview undef

* figure out why wxwidgets isnt getting its patches applied

* do "proper" patching of wxwidgets

* Flip the flag

* actually append the /usr/local

* restrict package finding to flatpak only

* Update the destdir stuff for mpfr, gmp

* Transfer over all the _destdir, again

* update patch command for all other plats

* initial ci check

* what even happened

* clear ci image

* I doubt this will do anything

* do cleanup after running each step

* remove build objects for flatpak ci

* compress debug info

* Fix MacOS build

* Try saving space after building deps

* No debug info for now

* Do debug info, use thin static archives

* use BSD flag, not --thin

* try building with lto

* Use release, no debug info

* remove lto

* Revert the last 5 commits

* It might require write perms

* Revert "It might require write perms"

This reverts commit 44cec58a57.

* Import fixes for merge

* remove some patch stuff

* the worst hack!

* remove uneeded patches

* Initial commit for the builder

* note to self, go back to regular wx

* attempt to fix wxwebview undef

* do "proper" patching of wxwidgets

* update patch command for all other plats

* what even happened

* -ldep_name-NOTFOUND is still here

* concat patches

* Build wx with flatpak

* more wx shenatigans

* fix a missing import

* build wx with proper flags

* fix imports and libs

* trigger ci

* try fixing mac and windows ci

* remove duplicate definition of freetype

* curl may not have openssl for a dep

* has openssl been found?

* force building

* build images on apple

* cleanup for review

* cleanup cmake files

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2024-05-25 09:11:19 +08:00
SoftFever
5bceebdd9d disable eigen for OpenCV (#5311) 2024-05-10 21:50:29 +08:00