Compare commits

...

66 Commits

Author SHA1 Message Date
SoftFever
1e87666487 Add support for OrcaSlicer 2.3.1-alpha infill rotation template warning
Implement a check for projects created with OrcaSlicer 2.3.1-alpha to warn users about potential issues with infill rotation template settings. If the infill pattern is not safe to rotate, prompt the user to clear the rotation template settings to avoid print quality issues.
2025-09-14 20:35:58 +08:00
boromyr
5cee8ed086 Correct 4 Italian translations (#10704)
* ita fix

* ita fix

* ita fix
2025-09-14 16:32:48 +08:00
Heiko Liebscher
71c7944eab fix some german translations (#10702)
* fix some german translations

* fix Maximun

* is better
2025-09-14 16:15:12 +08:00
SoftFever
3c0c36d11c bump version to 2.3.1-beta 2025-09-12 00:24:17 +08:00
SoftFever
2f2018f9ee Fix logic for precise_outer_wall condition in PerimeterGenerator to only apply when wall_sequence is set to InnerOuter. 2025-09-12 00:24:17 +08:00
SoftFever
d76524f03f Update the Filament Selection Guide page by moving the generic filaments to the front. 2025-09-11 23:09:48 +08:00
SoftFever
466aa76642 fix typo and tweak precise_outer_wall message 2025-09-11 21:07:46 +08:00
SoftFever
d2eb007d57 Ignore the precise outer wall option when the wall sequence is not set to InnerOuter. (#10687) 2025-09-11 20:10:51 +08:00
SoftFever
4f50fdc94e Fixed many profile issues and cleaned up some messes. (#10686) 2025-09-11 17:50:53 +08:00
SoftFever
5e9570c946 fix check_filament_compatible_printers 2025-09-10 23:21:45 +08:00
SoftFever
f9973bc2c5 Enable Precise wall by default 2025-09-10 23:21:45 +08:00
SoftFever
e3d55b3c5b update profiles 2025-09-10 23:21:45 +08:00
SoftFever
13e8189b80 delete unused files 2025-09-10 23:21:45 +08:00
SoftFever
88a29dc7e2 update locale and Simp Chinese translation 2025-09-10 21:08:58 +08:00
Alexandre Folle de Menezes
914425e526 Update strings for keyboard shortcuts (#10399)
* Update strings for keyboard shortcuts
2025-09-09 21:48:42 +08:00
yw4z
0eef794824 [DOC] Fix typo "rotatation" (#10592)
init
2025-09-09 11:22:21 +08:00
David Eccles (gringer)
d6c6e0785e [OPTIMIZATION] Update Fill3DHoneycomb.hpp - remove bridge flow (#10453)
Update Fill3DHoneycomb.hpp

Bridge flow isn't necessary; the pattern is fully supported on the lines that matter for structural stability.
2025-09-09 11:08:17 +08:00
Rodrigo
f7e546e78c Fisher koch Infill optimization (#10428)
* Fisher koch optimization
2025-09-09 11:02:45 +08:00
Shuwn Hsu
9ab2092fd7 Updated part of the Traditional Chinese translation (#10526)
* update OrcaSlicer_zh_TW.po

* add monitor-filee

* Updated part of the Traditional Chinese translation.

* Updated part of the Traditional Chinese translation.
2025-09-09 11:01:28 +08:00
Overture3D Filament
c219600a17 Add Official overture preset (#10631)
* add overture preset

* Fix PLA pro profile missing issus

* fixed profile lib indexing order issus

* Merge branch 'main' into main

* Merge branch 'main' into main
2025-09-09 10:57:58 +08:00
Ian Bassi
4faaa5e6ee Wiki Update 12 - Others (#10452)
* Update others_settings_brim.md

* Improved brim

* brim wiki

* Update others_settings_brim.md

* Skirt

* Icons to settings sections

* Create Built-in-placeholders-variables.md

* Update others_settings_g_code_output.md

* Update others_settings_notes.md

* Update others_settings_post_processing_scripts.md

* special mode

* Fuzzy skin

* Image fix

* PA update

* Update pressure-advance-calib.md

* Phishing report link in README

* pa wiki link

* Esthetic -> Aesthetic
2025-09-09 10:52:40 +08:00
SoftFever
78eb3b464f Fix the bug where FillRectilinear generates an unoptimized toolpath. Ensure that fill_surface_by_lines is used when multiline is 1, as it provides optimized traversal. 2025-09-08 00:17:53 +08:00
HYzd766
783f533a15 [Profiles] Enable Arc fitting for QIDI plus4 and Q2 printers (#10618)
* New Machine

This update introduces new consumables and a new model, Q2

* Delete HATCHBOX PLA @Qidi - 副本.json

* The arc fitting for QIDI plus4 and Q2 has been initiated
2025-09-04 00:13:54 +08:00
Evintos
bb75f93500 [Profiles] Optimize Phrozen Arco 0.4 nozzle.json start up gcode (#10600)
Update Phrozen Arco 0.4 nozzle.json start up gcode

Changes m109 S200 in machine_start_gcode to allow printer to properly utilize filament profile temperatures. With original code, the temperature will be stuck at 200c despite filament profile having different first layer and other layer temperatures.
2025-09-04 00:12:38 +08:00
Hugo Costa
8e6d69dc9f [Profiles] Optimize profiles for BLOCKS RF50 printer (#10597)
* Update BLOCKS RF50 profiles

* Fix z_hop_types value attribution

* Fix: invalid z_hop_types parameter: slope
2025-09-04 00:11:28 +08:00
FlyingbearOfficial
6d0933d27c [Profile] Fix start_gcode for FlyingBear machines (#10593)
* Update FlyingBear S1 0.4 nozzle.json

* Update 0.16mm Optimal @FlyingBear Reborn3.json

* Update 0.16mm Optimal @FlyingBear S1.json

* Update fdm_process_common.json

* Update fdm_klipper_common.json

* Update fdm_machine_common.json

* Update fdm_klipper_common.json

* Update fdm_machine_common.json

* Update fdm_process_common.json

* Update fdm_process_common_S1.json

fix some parameters

* Update fdm_process_common.json

* Update FlyingBear S1 0.4 nozzle.json

* Update 0.08mm Extra Fine @FlyingBear S1.json

* Update 0.12mm Fine @FlyingBear S1.json

* Update 0.16mm Optimal @FlyingBear S1.json

* Update 0.20mm Standard @FlyingBear S1.json

* Update 0.24mm Draft @FlyingBear S1.json

* Update 0.08mm Extra Fine @FlyingBear Reborn3.json

* Update 0.12mm Fine @FlyingBear Reborn3.json

* Update 0.16mm Optimal @FlyingBear Reborn3.json

* Update 0.20mm Standard @FlyingBear Reborn3.json

* Update 0.24mm Draft @FlyingBear Reborn3.json

* Update FlyingBear S1 0.4 nozzle.json

* Update fdm_process_common_S1.json

* Update fdm_process_common.json

* Update 0.08mm Extra Fine @FlyingBear S1.json

* Update 0.12mm Fine @FlyingBear S1.json

* Update 0.16mm Optimal @FlyingBear S1.json

* Update 0.08mm Extra Fine @FlyingBear Reborn3.json

* Update 0.12mm Fine @FlyingBear Reborn3.json

* Update 0.16mm Optimal @FlyingBear Reborn3.json

* Update FlyingBear S1 0.4 nozzle.json

fix zhop type

* Update fdm_machine_common.json

fix zhop type

* Update fdm_process_common_S1.json

* Update fdm_process_common.json

* Update FlyingBear Generic PLA.json

* Update FlyingBear PLA @S1.json

* Update Other PLA @S1.json

* Update fdm_filament_pla @S1.json

* Update fdm_filament_pla_Hyper @S1.json

* Update fdm_filament_pla_other @S1.json

* Update fdm_filament_pla_Hyper_other @S1.json

* Update fdm_filament_pla.json

* Update fdm_filament_pla_Hyper.json

* Update fdm_process_common_S1.json

* Update fdm_process_common.json

* Update fdm_machine_common.json

* Update fdm_klipper_common.json

* Update 0.08mm Extra Fine @FlyingBear S1.json

* Update 0.08mm Extra Fine @FlyingBear Reborn3.json

* Update 0.08mm Extra Fine @FlyingBear S1.json

* Update 0.08mm Extra Fine @FlyingBear Reborn3.json

* Update 0.12mm Fine @FlyingBear Reborn3.json

* Update 0.12mm Fine @FlyingBear S1.json

* Update 0.16mm Optimal @FlyingBear S1.json

* Update 0.16mm Optimal @FlyingBear Reborn3.json

* Update fdm_filament_pla.json

* Update fdm_filament_pla_Hyper.json

* Update fdm_filament_abs.json

* Update fdm_filament_pc.json

* Update fdm_filament_pet.json

* Update fdm_filament_pa.json

* Update fdm_filament_tpu.json

* Update fdm_filament_abs @S1.json

* Update fdm_filament_abs_other @S1.json

* Update fdm_filament_pa @S1.json

* Update fdm_filament_pa_other @S1.json

* Update fdm_filament_pc @S1.json

* Update fdm_filament_pc_other @S1.json

* Update fdm_filament_pet @S1.json

* Update fdm_filament_pet_other @S1.json

* Update fdm_filament_pla @S1.json

* Update fdm_filament_pla_other @S1.json

* Update fdm_filament_pla_Hyper @S1.json

* Update fdm_filament_pla_Hyper_other @S1.json

* Update fdm_filament_tpu @S1.json

* Update fdm_filament_tpu_other @S1.json

* Update fdm_filament_tpu.json

* Update FlyingBear PETG @S1.json

* Update Other PETG @S1.json

* Update Other PETG @S1.json

* Update FlyingBear PETG @S1.json

* Update FlyingBear Generic PETG.json

* Update fdm_filament_pet.json

* Update fdm_filament_pet @S1.json

* Update fdm_filament_pet_other @S1.json

* Update FlyingBear Generic PLA.json

* Update FlyingBear PLA @S1.json

* Update Other PLA @S1.json

* Update FlyingBear S1 0.4 nozzle.json
2025-09-04 00:02:05 +08:00
yw4z
38ed01f61f gCode Legend Fixes / Improvements (#10501)
* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

* Update GCodeViewer.cpp

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-09-04 00:00:26 +08:00
SoftFever
31869bfbd1 [Feature] Add a new feature that allow user to insert extra solid infills (#10611)
* refactor Infill rotation template

* clean up comments

* set default solid_infill_rotate_template to empty

* Fix an issue that infill_direction solid_infill_direction not working as expected

* Add Extra Solid Infill Feature
Introduced a new feature to insert extra solid infills at specific layers for enhanced strength in 3D prints.

* fix doc error

* fix image name

* support "#K" for Explicit Layer List

* update wiki
2025-09-03 22:16:31 +08:00
SoftFever
266bfeb9e2 Refactor infill rotation (#10587)
* refactor Infill rotation template

* clean up comments

* set default solid_infill_rotate_template to empty

* Fix an issue that infill_direction solid_infill_direction not working as expected

* update based on feedback
2025-09-02 22:53:56 +08:00
dependabot[bot]
b100915eba Bump tj-actions/changed-files from 44 to 46 (#10604)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 44 to 46.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v46)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '46'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:52:20 +08:00
dependabot[bot]
2ba6f9a5e4 Bump takanome-dev/assign-issue-action from 2.2 to 2.3 (#10606)
Bumps [takanome-dev/assign-issue-action](https://github.com/takanome-dev/assign-issue-action) from 2.2 to 2.3.
- [Release notes](https://github.com/takanome-dev/assign-issue-action/releases)
- [Commits](https://github.com/takanome-dev/assign-issue-action/compare/v2.2...v2.3)

---
updated-dependencies:
- dependency-name: takanome-dev/assign-issue-action
  dependency-version: '2.3'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:51:49 +08:00
dependabot[bot]
719c1687e2 Bump actions/checkout from 4 to 5 (#10605)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:51:21 +08:00
frawg
756129fff2 Fix Anycubic Kobra 2 Neo Machine Profile (#10548)
* Updated machine start and end gcodes

* fix: Update Kobra 2 Neo profile for improved compatibility

- Switch gcode_flavor from marlin to marlin2
- Enable relative E distances for better extrusion control
- Add M420 S1 to start gcode to enable bed leveling mesh
- Add G92 E0 before layer changes to reset extruder position
- Fix end gcode formatting and add M83 for consistent relative mode
- Adjust purge line start position from Y3 to X10 Y5

* fix: Typo in end machine gcode

---------

Co-authored-by: frawg <>
2025-08-30 13:22:10 +08:00
Simone
6e1856cb55 Update Italian translation (#10554)
* Update Italian translation

* my bad, i forgot quotes
2025-08-30 12:56:05 +08:00
GlauTech
a8b7522f9d Update TURKISH translations (V2.3.1-alpha) (#10568) 2025-08-30 12:55:54 +08:00
HYzd766
510f0c3242 [Profile] Add Qidi Q2 (#10539)
* New Machine

This update introduces new consumables and a new model, Q2

* Delete HATCHBOX PLA @Qidi - 副本.json
2025-08-30 12:54:49 +08:00
Byeon Ho cheol.
90a6c53ad5 Feat/profiles cubicon xceler i (#10373)
* profiles(Cubicon):
add xCeler-I 0.4 nozzle printer profile
add Cubicon 0.4 nozzle filament profile

* Fixed missed profile name.

* removed default filament colors.

* Cover image size changed.

---------

Co-authored-by: cubi-sw <hcbyeon@hyvision.co.kr>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-08-26 23:22:16 +08:00
Nanashi
fa4161eaae Correct OrcaSlicer_profile_validator path (again) (#10512)
* Correct OrcaSlicer_profile_validator path (again)
2025-08-26 23:15:31 +08:00
xxxvodnikxxx
4e1952057c Cs cz updates (#10492)
* Update OrcaSlicer_cs.po

* Update Czech localization file with new strings and corrections

* Update OrcaSlicer_cs.po

* possible fix- double quotes

* added comma at endline

* formatting fix- multiline translation

* Update OrcaSlicer_cs.po

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-08-26 23:13:57 +08:00
Alexandre Folle de Menezes
0ba336647c Fix misc issues with the translated strings (#10400)
* Spell check "part selectiont" and "printetrs"

* Remove translation of "°"

* Fix the abbreviation of Watts

* Fix capitalization issues

* Fix punctuation issues

* Fix spacing issues

* Adding more missing periods
2025-08-26 22:39:14 +08:00
coryrc
ca46e06966 Add Assign Issue workflow (#10408)
Allow users to assign issues to themselves.

I don't know if its comments (i.e. unassigning) affects orca bot's
inactivity and stale. Probably. I didn't see a way for actions/stale
to exempt particular comments. This is set for 30 days and stale for
90 days, so if people are using this the stale timing can jump up to
120 days.
2025-08-26 22:35:05 +08:00
SoftFever
f063e87f06 Revert "Show axis on selected plate" (#10530)
Revert "Show axis on selected plate (#9419)"

This reverts commit 8b78fe98aa.
2025-08-26 22:15:49 +08:00
SoftFever
71fd381c3c Fix tests build errors on Mac 2025-08-25 19:19:31 +08:00
yw4z
4c3081d654 Fix scaling on bed and extruder icons in BBL > Device tab (#10416)
Update StatusPanel.cpp
2025-08-25 01:30:44 +08:00
Nanashi
89b9eb0ebe Correct OrcaSlicer_profile_validator path (#10510)
* Correct OrcaSlicer_profile_validator path

* Update build_orca.yml
2025-08-25 01:26:30 +08:00
Rodrigo
6b34eb5322 Fix netfab model repair service in github compilation (#10507)
* Update build_deps.yml

* Update build_orca.yml

* Revert "Update build_deps.yml"

This reverts commit 9e2350c6fb.
2025-08-24 21:16:06 +08:00
SoftFever
b16a6052cb Feature/re enable tests (#10503)
* re-enable tests

* Add comprehensive testing guide for OrcaSlicer in CLAUDE.md

* fix build errors on Win

* fix appimage errors
2025-08-24 20:58:18 +08:00
niklasb
586921fa4d GCodeViewer will now always show the estimations (#10333)
Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-08-24 20:13:34 +08:00
coryrc
09034d87b7 Run shellcheck on build_linux.sh and add it to workflows (#10317)
* Shellcheck on build_linux.sh and tiny refactor

`shellcheck -e SC1090 build_linux.sh` and fixed the issues.

Also fixed the usage command to return an error, simplify directory
creation to use `mkdir -p`, and made printing of the cmake commands
consistent instead of having three different ways of doing it.

* Reorder functions in more pleasing way

* Add shellcheck to workflows

This is the beginning of adding some safety nets for making
changes. Currently it just runs shellcheck against `build_linux.sh`.

You can see it working at
https://github.com/coryrc/OrcaSlicer/actions/workflows/shellcheck.yml
I forked and tested it running in PRs and against pushes to HEAD.

* Rerun shellcheck

Missed quotes on the merge
2025-08-24 19:26:14 +08:00
Pierre Poissinger
7dfce56fbb Imported Artillery M1 Pro profiles from ArtilleryStudio (#10383)
* Imported Artillery M1 Pro profiles from ArtilleryStudio

* Removed duplicate overhang_fan_speed - keeping 90 as other profiles

* Replace by octo/klipper as it seems Artillery made a custom host_type on ArtilleryStudio...

* Changed sparse_infill_pattern to gyroid for M1 profile, as suggested
2025-08-24 00:42:20 +08:00
Grantland Chew
311f651d12 Update Ender-3 V3 KE processes to use percentage based line widths (#10392)
* Update Ender-3 V3 KE processes
2025-08-24 00:36:36 +08:00
yw4z
8b78fe98aa Show axis on selected plate (#9419)
* Update 3DBed.cpp

* Update 3DBed.cpp

* Merge branch 'main' into axis-on-selected
2025-08-24 00:31:28 +08:00
Vovodroid
5fa35342fd Add stl, step, etc. to recent list (#9481)
* Add stl, step, etc. to recent list

* Make configurable

* Merge branch 'main' into recent-files-pr
2025-08-24 00:24:30 +08:00
Ian Bassi
5ebb490a8d Wiki Update 11 - Strength (#10369)
* Create Patterns specific wiki

* Fix typos in installation instructions

Corrected the winget flag from --exact to -e and removed an extraneous backtick from the Mac xattr command in the README installation instructions.

* Improve README formatting and clarity

* Calibration Flow Ratio Yolo Archimedean cords

Co-Authored-By: MxBrnr <142743732+MxBrnr@users.noreply.github.com>

* redirection/tab.cpp section

* Missing Frequent

* remove auto-cooling

* remove thumbnails

* seam pointers

* walls

* infill

* Image standarization

* Fix broken internal links

* Add reference note to Arachne wall generator docs

* OrcaSlicer std

* PrusaSlicer std

* 2d-lateral xlsx

* vertical patterns

* Redirections fix

* Update speed_settings_overhang_speed.md

* Fix to action

* FlowRate

Co-Authored-By: MxBrnr <142743732+MxBrnr@users.noreply.github.com>

* Top Bottom Shells

* advanced strength

* Action fix

* Update How-to-wiki.md

* Home.md icons and reorganize sections

* Home Icons fix

* Update cornering-calib.md

* Update strength_settings_infill.md

* Update Auxiliary-fan.md

Co-Authored-By: Fisheye_3D <78997080+fisheye3d@users.noreply.github.com>

* Add warning about wiki maintenance status
2025-08-23 23:43:45 +08:00
yw4z
099dbb4046 Fix: Reset object settings not working for plate's Skirt Start Angle and Other Layers Sequence (#10482)
* init
2025-08-23 23:19:00 +08:00
Ian Bassi
15a835af20 Missing permissions validate-documentation.yml (#10495)
* Add permissions to documentation validation workflow
2025-08-23 23:01:53 +08:00
Brandon Wees
bd6ccbd451 feat: use "nightly" instead of version code for nightly builds (#10444)
* feat: use "nightly" instead of version code for nightly builds
2025-08-22 22:44:30 +08:00
Ian Bassi
e56d4cc1b9 Fix IS & JD test (#10481)
Fix IS + JD test
2025-08-22 22:30:59 +08:00
Heiko Liebscher
77bfddd0e1 fix more de translation (#10489)
fix more
2025-08-22 22:27:16 +08:00
Ian Bassi
4b48ba1004 Wiki Validation Workflow Action (#10447)
Wiki Action
2025-08-22 22:23:59 +08:00
Heiko Liebscher
bdfae96095 Fix de translation (#10487)
fix some german translations
2025-08-22 21:18:53 +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
GlauTech
3808f7eb28 Update TURKISH translations (V2.3.1-alpha) (#10440)
* Valmet filament pla derivative filaments have been added.

Valmet filament pla derivative filaments have been added.

* Update TURKISH translations (V2.3.1-alpha)

* Update TURKISH translations (V2.3.1-alpha)

* Update TURKISH translations (V2.3.1-alpha)
2025-08-21 22:12:04 +08:00
Alexandre Folle de Menezes
1263b2ed48 Update the pt-BR translation (#10395)
Update pt-BR translation
2025-08-21 22:11:32 +08:00
Azi
4981b0b3e4 Fix: export printer config skipping currently selected preset (#10380)
* Fix: export printer config skipping currently selected preset
2025-08-21 22:10:22 +08:00
Noisyfox
684f5b44ee Fix crash when opening AMS humidity popup (#10472) 2025-08-21 00:18:17 +08:00
8420 changed files with 223314 additions and 194657 deletions

View File

@@ -24,6 +24,7 @@ install_*
build_*/
!build_linux.sh
SVG
Dockerfile
DockerBuild.sh
DockerRun.sh
scripts/Dockerfile
scripts/DockerBuild.sh
scripts/DockerRun.sh
scripts/.dockerignore

24
.github/workflows/assign.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Assign Issue
on:
schedule:
- cron: 0 0 * * *
issue_comment:
types: [created]
workflow_dispatch:
jobs:
assign:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Assign the user or unassign stale assignments
uses: takanome-dev/assign-issue-action@v2.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
maintainers: 'noisyfox,softfever'
days_until_unassign: 30
block_assignment: false
reminder_days: 7
max_assignments: 12

View File

@@ -13,7 +13,7 @@ on:
- 'localization/**'
- 'resources/**'
- ".github/workflows/build_*.yml"
- 'flatpak/**'
- 'scripts/flatpak/**'
pull_request:
branches:
@@ -28,7 +28,7 @@ on:
- 'build_linux.sh'
- 'build_release_vs2022.bat'
- 'build_release_macos.sh'
- 'flatpak/**'
- 'scripts/flatpak/**'
workflow_dispatch: # allows for manual dispatch
inputs:
@@ -87,7 +87,7 @@ jobs:
- name: "Remove unneeded stuff to free disk space"
run:
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Get the version and date
run: |
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
@@ -103,7 +103,7 @@ jobs:
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
with:
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
manifest-path: scripts/flatpak/io.github.softfever.OrcaSlicer.yml
cache: true
arch: ${{ matrix.variant.arch }}
upload-artifact: false
@@ -119,6 +119,6 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
asset_name: OrcaSlicer-Linux-flatpak_nightly_${{ matrix.variant.arch }}.flatpak
asset_content_type: application/octet-stream
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted

View File

@@ -23,7 +23,7 @@ jobs:
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: 'true'

View File

@@ -31,7 +31,7 @@ jobs:
# Setup the environment
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: 'true'

View File

@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: 'true'
@@ -186,7 +186,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
asset_name: OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
asset_name: OrcaSlicer_Mac_universal_nightly.dmg
asset_content_type: application/octet-stream
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
@@ -197,7 +197,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
asset_name: OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
asset_name: OrcaSlicer_profile_validator_Mac_universal_nightly.dmg
asset_content_type: application/octet-stream
max_releases: 1
@@ -217,7 +217,7 @@ jobs:
working-directory: ${{ github.workspace }}
env:
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
WindowsSDKVersion: '10.0.22000.0\'
WindowsSDKVersion: '10.0.26100.0\'
run: .\build_release_vs2022.bat slicer
- name: Create installer Win
@@ -273,7 +273,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip
asset_name: OrcaSlicer_Windows_${{ env.ver }}_portable.zip
asset_name: OrcaSlicer_Windows_nightly_portable.zip
asset_content_type: application/x-zip-compressed
max_releases: 1
@@ -284,7 +284,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/build/OrcaSlicer_Windows_Installer_${{ env.ver }}.exe
asset_name: OrcaSlicer_Windows_Installer_${{ env.ver }}.exe
asset_name: OrcaSlicer_Windows_Installer_nightly.exe
asset_content_type: application/x-msdownload
max_releases: 1
@@ -295,7 +295,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/build/src/Release/OrcaSlicer_profile_validator.exe
asset_name: OrcaSlicer_profile_validator_Windows_${{ env.ver }}.exe
asset_name: OrcaSlicer_profile_validator_Windows_nightly.exe
asset_content_type: application/x-msdownload
max_releases: 1
@@ -336,7 +336,7 @@ jobs:
- name: Build orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}/build/src
working-directory: ${{ github.workspace }}/build/src/Release
shell: bash
run: |
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1
@@ -360,7 +360,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_profile_validator_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
path: './build/src/OrcaSlicer_profile_validator'
path: './build/src/Release/OrcaSlicer_profile_validator'
- name: Deploy Ubuntu release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
@@ -371,7 +371,7 @@ jobs:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_nightly.AppImage
asset_content_type: application/octet-stream
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
- name: Deploy Ubuntu release
@@ -391,8 +391,8 @@ jobs:
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ./build/src/OrcaSlicer_profile_validator
asset_name: OrcaSlicer_profile_validator_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}
asset_path: ./build/src/Release/OrcaSlicer_profile_validator
asset_name: OrcaSlicer_profile_validator_Linux${{ env.ubuntu-ver-str }}_nightly
asset_content_type: application/octet-stream
max_releases: 1

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install gettext
run: |

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Run extra JSON check
run: |

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 1

View File

@@ -26,7 +26,7 @@ jobs:
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 1

View File

@@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
# 1. Clone the current wiki master branch to a folder named `tmp_wiki`
- name: Pull content from wiki

38
.github/workflows/shellcheck.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
on:
push:
paths:
- build_linux.sh
pull_request:
paths:
- build_linux.sh
workflow_dispatch: # allows for manual dispatch
name: "Shellcheck"
permissions: {}
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: Cache shellcheck download
id: cache-shellcheck-v0_11
uses: actions/cache@v4
with:
path: ~/shellcheck
key: ${{ runner.os }}-shellcheck-v0_11
- name: Download shellcheck
if: steps.cache-shellcheck-v0_11.outputs.cache-hit != 'true'
shell: bash
env:
INPUT_VERSION: "v0.11.0"
run: |
curl -L#o ~/sc.tar.xz "https://github.com/koalaman/shellcheck/releases/download/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.linux.x86_64.tar.xz"
tar -xvf ~/sc.tar.xz -C ~
mv ~/shellcheck-"${INPUT_VERSION}"/shellcheck ~/shellcheck
- uses: actions/checkout@v5
- name: Shellcheck build_linux.sh
run: ~/shellcheck -e SC1090 build_linux.sh

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
@@ -24,7 +24,7 @@ jobs:
- name: Update translation catalog
run: |
./run_gettext.sh --full
./scripts/run_gettext.sh --full
git add localization/i18n/*
- name: Commit translation catalog updates

View File

@@ -0,0 +1,335 @@
name: Validate Documentation
on:
pull_request:
paths:
- 'src/slic3r/GUI/Tab.cpp'
- 'doc/**/*.md'
workflow_dispatch:
permissions:
contents: read
pull-requests: write
issues: write
jobs:
validate:
runs-on: windows-latest
name: Check Documentation
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
with:
files: |
src/slic3r/GUI/Tab.cpp
doc/**/*.md
- name: Run validation
if: steps.changed-files.outputs.any_changed == 'true'
shell: pwsh
run: |
# Helper Functions
function Normalize-Fragment($fragment) {
return $fragment.ToLower().Trim() -replace '[^a-z0-9\s-]', '' -replace ' ', '-' -replace '^-+|-+$', ''
}
function Add-BrokenReference($sourceFile, $line, $target, $issue, $type) {
return @{
SourceFile = $sourceFile
Line = $line
Target = $target
Issue = $issue
Type = $type
}
}
function Validate-Fragment($fragment, $availableAnchors, $sourceFile, $line, $target, $type) {
$cleanFragment = $fragment.StartsWith('#') ? $fragment.Substring(1) : $fragment
$normalizedFragment = Normalize-Fragment $cleanFragment
if ($availableAnchors -notcontains $normalizedFragment) {
return Add-BrokenReference $sourceFile $line $target "Fragment does not exist" $type
}
return $null
}
# Initialize
$tabFile = Join-Path $PWD "src/slic3r/GUI/Tab.cpp"
$docDir = Join-Path $PWD 'doc'
$brokenReferences = @()
$docIndex = @{}
Write-Host "Validating documentation..." -ForegroundColor Blue
# Validate paths
$hasTabFile = Test-Path $tabFile
if (-not $hasTabFile) { Write-Host "::warning::Tab.cpp file not found at: $tabFile" }
if (-not (Test-Path $docDir)) { Write-Host "::error::doc folder does not exist"; exit 1 }
# Build documentation index
$mdFiles = Get-ChildItem -Path $docDir -Filter *.md -Recurse -File -ErrorAction SilentlyContinue
foreach ($mdFile in $mdFiles) {
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($mdFile.Name)
$relPath = (Resolve-Path $mdFile.FullName).Path.Substring($docDir.Length).TrimStart('\', '/')
$content = Get-Content -Path $mdFile.FullName -Encoding UTF8 -Raw
$lines = Get-Content -Path $mdFile.FullName -Encoding UTF8
# Extract anchors
$anchors = @()
$anchors += [regex]::Matches($content, '(?i)<a\s+[^>]*(?:name|id)\s*=\s*[`"'']([^`"'']+)[`"'']') |
ForEach-Object { $_.Groups[1].Value.ToLower() }
$anchors += [regex]::Matches($content, '(?m)^#+\s+(.+)$') |
ForEach-Object { Normalize-Fragment $_.Groups[1].Value.Trim() }
# Parse links
$links = @()
$inCodeFence = $false
for ($i = 0; $i -lt $lines.Count; $i++) {
$line = $lines[$i]
if ($line.TrimStart() -match '^(```|~~~)') {
$inCodeFence = -not $inCodeFence
continue
}
if ($inCodeFence) { continue }
$lineForParsing = [regex]::Replace($line, '`[^`]*`', '')
foreach ($linkMatch in [regex]::Matches($lineForParsing, '(?<!!)[^\]]*\]\(([^)]+)\)')) {
$destRaw = $linkMatch.Groups[1].Value.Trim()
# Handle internal fragments
if ($destRaw.StartsWith('#')) {
$fragment = $destRaw.Substring(1)
if ($fragment.Contains('#')) {
$brokenReferences += Add-BrokenReference $relPath ($i + 1) $destRaw "Internal link must use only one #." "Link"
} else {
$validationResult = Validate-Fragment $fragment $anchors $relPath ($i + 1) $destRaw "Link"
if ($validationResult) { $brokenReferences += $validationResult }
}
continue
}
# Skip external URLs
if ($destRaw -match '^(?:https?:|mailto:|data:|#|\\)') { continue }
# Check for double ##
if ($destRaw.Contains('##')) {
$brokenReferences += Add-BrokenReference $relPath ($i + 1) $destRaw "Use single # for fragments." "Link"
continue
}
# Parse file and fragment
$destParts = $destRaw -split '#', 2
$destNoFragment = $destParts[0]
$fragment = ($destParts.Length -gt 1) ? $destParts[1] : $null
if ($destNoFragment) {
$leaf = ($destNoFragment -split '[\\/]')[-1]
if ($leaf) {
$targetBase = $leaf.ToLower().EndsWith('.md') ? $leaf.Substring(0, $leaf.Length - 3) : $leaf
$targetBase = $targetBase.Trim()
if ($targetBase) {
$linkInfo = @{
TargetBase = $targetBase
Fragment = $fragment
Line = $i + 1
SourceFile = $relPath
}
$links += $linkInfo
}
}
}
}
}
$docIndex[$baseName] = @{ Anchors = $anchors; Links = $links }
}
# Parse Tab.cpp references
if ($hasTabFile) {
$regex = 'optgroup->append_single_option_line\s*\(\s*(?:"([^"]+)"|([^,]+?))\s*,\s*"([^"]+)"\s*\)'
$lines = Get-Content -Path $tabFile -Encoding UTF8
for ($i = 0; $i -lt $lines.Count; $i++) {
foreach ($match in [regex]::Matches($lines[$i], $regex)) {
$arg2Full = $match.Groups[3].Value.Trim()
if ($arg2Full.Contains('##')) {
$brokenReferences += Add-BrokenReference "Tab.cpp" ($i + 1) $arg2Full "Use single # for fragments." "Link"
continue
}
$arg2Parts = $arg2Full -split '#', 2
$docBase = $arg2Parts[0].Trim()
$fragment = ($arg2Parts.Length -gt 1) ? $arg2Parts[1].Trim() : $null
if (-not $docIndex.ContainsKey($docBase)) {
$brokenReferences += Add-BrokenReference "Tab.cpp" ($i + 1) $docBase "File does not exist" "Link"
} elseif ($fragment) {
$validationResult = Validate-Fragment $fragment $docIndex[$docBase].Anchors "Tab.cpp" ($i + 1) "$docBase#$fragment" "Link"
if ($validationResult) { $brokenReferences += $validationResult }
}
}
}
}
# Validate markdown links
foreach ($baseName in $docIndex.Keys) {
foreach ($link in $docIndex[$baseName].Links) {
if (-not $docIndex.ContainsKey($link.TargetBase)) {
$brokenReferences += Add-BrokenReference $link.SourceFile $link.Line "$($link.TargetBase).md" "File does not exist" "Link"
} elseif ($link.Fragment) {
$validationResult = Validate-Fragment $link.Fragment $docIndex[$link.TargetBase].Anchors $link.SourceFile $link.Line "$($link.TargetBase)#$($link.Fragment)" "Link"
if ($validationResult) { $brokenReferences += $validationResult }
}
}
}
# Validate images
Write-Host "Validating images..." -ForegroundColor Blue
$expectedUrlPattern = '^https://github\.com/SoftFever/OrcaSlicer/blob/main/([^?]+)\?raw=true$'
foreach ($file in $mdFiles) {
$lines = Get-Content $file.FullName -Encoding UTF8
$relPath = (Resolve-Path $file.FullName).Path.Substring($docDir.Length).TrimStart('\', '/')
$inCodeFence = $false
for ($lineNumber = 0; $lineNumber -lt $lines.Count; $lineNumber++) {
$line = $lines[$lineNumber]
if ($line.TrimStart() -match '^(```|~~~)') {
$inCodeFence = -not $inCodeFence
continue
}
if ($inCodeFence) { continue }
$lineForParsing = [regex]::Replace($line, '`[^`]*`', '')
# Process markdown and HTML images
$imagePatterns = @(
@{ Pattern = "!\[([^\]]*)\]\(([^)]+)\)"; Type = "Markdown"; AltGroup = 1; UrlGroup = 2 }
@{ Pattern = '<img\s+[^>]*>'; Type = "HTML"; AltGroup = -1; UrlGroup = -1 }
)
foreach ($pattern in $imagePatterns) {
foreach ($match in [regex]::Matches($lineForParsing, $pattern.Pattern)) {
$altText = ""
$url = ""
if ($pattern.Type -eq "Markdown") {
$altText = $match.Groups[$pattern.AltGroup].Value
$url = $match.Groups[$pattern.UrlGroup].Value
} else {
# Extract from HTML
$imgTag = $match.Value
if ($imgTag -match 'alt\s*=\s*[`"'']([^`"'']*)[`"'']') { $altText = $matches[1] }
if ($imgTag -match 'src\s*=\s*[`"'']([^`"'']*)[`"'']') { $url = $matches[1] }
}
if (-not $altText.Trim() -and $url) {
$brokenReferences += Add-BrokenReference $relPath ($lineNumber + 1) $match.Value "[$($pattern.Type)] Missing alt text for image" "Image"
} elseif ($url -and $altText) {
# Validate URL format and file existence
if ($url -match $expectedUrlPattern) {
$relativePathInUrl = $matches[1]
$fileNameFromUrl = [System.IO.Path]::GetFileNameWithoutExtension($relativePathInUrl)
if ($altText -ne $fileNameFromUrl) {
$brokenReferences += Add-BrokenReference $relPath ($lineNumber + 1) $match.Value "[$($pattern.Type)] Alt text `"$altText`" ≠ filename `"$fileNameFromUrl`"" "Image"
}
$expectedImagePath = Join-Path $PWD ($relativePathInUrl -replace "/", "\")
if (-not (Test-Path $expectedImagePath)) {
$brokenReferences += Add-BrokenReference $relPath ($lineNumber + 1) $match.Value "[$($pattern.Type)] Image not found at path: $relativePathInUrl" "Image"
}
} else {
$urlIssues = @()
if (-not $url.StartsWith('https://github.com/SoftFever/OrcaSlicer/blob/main/')) { $urlIssues += "URL must start with expected prefix" }
if (-not $url.EndsWith('?raw=true')) { $urlIssues += "URL must end with '?raw=true'" }
if ($url -match '^https?://(?!github\.com/SoftFever/OrcaSlicer)') { $urlIssues += "External URLs not allowed" }
$issueText = "[$($pattern.Type)] URL format issues: " + ($urlIssues -join '; ')
$brokenReferences += Add-BrokenReference $relPath ($lineNumber + 1) $match.Value $issueText "Image"
}
}
}
}
}
}
# Report results
$linkErrors = $brokenReferences | Where-Object { $_.Type -eq "Link" }
$imageErrors = $brokenReferences | Where-Object { $_.Type -eq "Image" }
if ($brokenReferences.Count -gt 0) {
Write-Host "::error::Documentation validation failed"
# Build error summary for PR comment
$errorSummary = ""
# Report link errors
if ($linkErrors) {
Write-Host "::group::🔗 Link Validation Errors"
$errorSummary += "## 🔗 Link Validation Errors`n`n"
$linkErrors | Group-Object SourceFile | ForEach-Object {
Write-Host "📄 $($_.Name):" -ForegroundColor Yellow
$errorSummary += "**📄 doc/$($_.Name):**`n"
$_.Group | Sort-Object Line | ForEach-Object {
Write-Host " Line $($_.Line): $($_.Target) - $($_.Issue)" -ForegroundColor Red
Write-Host "::error file=doc/$($_.SourceFile),line=$($_.Line)::$($_.Target) - $($_.Issue)"
$errorSummary += "- Line $($_.Line): ``$($_.Target)`` - $($_.Issue)`n"
}
$errorSummary += "`n"
}
Write-Host "::endgroup::"
}
# Report image errors
if ($imageErrors) {
Write-Host "::group::🖼️ Image Validation Errors"
$errorSummary += "## 🖼️ Image Validation Errors`n`n"
$imageErrors | Group-Object SourceFile | ForEach-Object {
Write-Host "📄 $($_.Name):" -ForegroundColor Yellow
$errorSummary += "**📄 doc/$($_.Name):**`n"
$_.Group | Sort-Object Line | ForEach-Object {
Write-Host " Line $($_.Line): $($_.Issue)" -ForegroundColor Red
Write-Host "::error file=doc/$($_.SourceFile),line=$($_.Line)::$($_.Issue)"
$errorSummary += "- Line $($_.Line): $($_.Issue)`n"
}
$errorSummary += "`n"
}
Write-Host "::endgroup::"
}
# Export error summary for PR comment
Add-Content -Path $env:GITHUB_ENV -Value "VALIDATION_ERRORS<<EOF"
Add-Content -Path $env:GITHUB_ENV -Value $errorSummary
Add-Content -Path $env:GITHUB_ENV -Value "EOF"
exit 1
} else {
Write-Host "::notice::All documentation is valid!"
exit 0
}
- name: Comment on PR
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const validationErrors = process.env.VALIDATION_ERRORS || '';
const body = `❌ **Documentation validation failed**
${validationErrors || 'Please check the workflow logs for details about the validation errors.'}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})

2
.gitignore vendored
View File

@@ -17,6 +17,7 @@ xs/assertlib*
local-lib
/src/TAGS
/.vscode/
/.vscode
build-linux/*
deps/build*/*
**/.DS_Store
@@ -35,3 +36,4 @@ src/OrcaSlicer-doc/
**/.flatpak-builder/
resources/profiles/user/default
*.code-workspace
deps_src/build/

132
Build.PL
View File

@@ -1,132 +0,0 @@
#!/usr/bin/perl
print "This script is currently used for installing Perl dependenices for running\n";
print "the libslic3r unit / integration tests through Perl prove.\n";
print "If you don't plan to run the unit / integration tests, you don't need to\n";
print "install these dependencies to build and run OrcaSlicer.\n";
use strict;
use warnings;
use Config;
use File::Spec;
my %prereqs = qw(
Devel::CheckLib 0
ExtUtils::MakeMaker 6.80
ExtUtils::ParseXS 3.22
ExtUtils::XSpp 0
ExtUtils::XSpp::Cmd 0
ExtUtils::CppGuess 0
ExtUtils::Typemaps 0
ExtUtils::Typemaps::Basic 0
File::Basename 0
File::Spec 0
Getopt::Long 0
Module::Build::WithXSpp 0.14
Moo 1.003001
POSIX 0
Scalar::Util 0
Test::More 0
IO::Scalar 0
Time::HiRes 0
);
my %recommends = qw(
Class::XSAccessor 0
Test::Harness 0
);
my $sudo = grep { $_ eq '--sudo' } @ARGV;
my $nolocal = grep { $_ eq '--nolocal' } @ARGV;
my @missing_prereqs = ();
if ($ENV{SLIC3R_NO_AUTO}) {
foreach my $module (sort keys %prereqs) {
my $version = $prereqs{$module};
next if eval "use $module $version; 1";
push @missing_prereqs, $module if exists $prereqs{$module};
print "Missing prerequisite $module $version\n";
}
foreach my $module (sort keys %recommends) {
my $version = $recommends{$module};
next if eval "use $module $version; 1";
print "Missing optional $module $version\n";
}
} else {
my @try = (
$ENV{CPANM} // (),
File::Spec->catfile($Config{sitebin}, 'cpanm'),
File::Spec->catfile($Config{installscript}, 'cpanm'),
);
my $cpanm;
foreach my $path (@try) {
if (-e $path) { # don't use -x because it fails on Windows
$cpanm = $path;
last;
}
}
if (!$cpanm) {
if ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {
$cpanm = 'cpanm';
}
}
die <<'EOF'
cpanm was not found. Please install it before running this script.
There are several ways to install cpanm, try one of these:
apt-get install cpanminus
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
cpan App::cpanminus
If it is installed in a non-standard location you can do:
CPANM=/path/to/cpanm perl Build.PL
EOF
if !$cpanm;
my @cpanm_args = ();
push @cpanm_args, "--sudo" if $sudo;
# install local::lib without --local-lib otherwise it's not usable afterwards
if (!eval "use local::lib qw(local-lib); 1") {
my $res = system $cpanm, @cpanm_args, 'local::lib';
warn "Warning: local::lib is required. You might need to run the `cpanm --sudo local::lib` command in order to install it.\n"
if $res != 0;
}
push @cpanm_args, ('--local-lib', 'local-lib') if ! $nolocal;
# make sure our cpanm is updated (old ones don't support the ~ syntax)
system $cpanm, @cpanm_args, 'App::cpanminus';
my %modules = (%prereqs, %recommends);
foreach my $module (sort keys %modules) {
my $version = $modules{$module};
my @cmd = ($cpanm, @cpanm_args);
# temporary workaround for upstream bug in test
push @cmd, '--notest'
if $module =~ /^(?:OpenGL|Test::Harness)$/;
push @cmd, "$module~$version";
my $res = system @cmd;
if ($res != 0) {
if (exists $prereqs{$module}) {
push @missing_prereqs, $module;
} else {
printf "Don't worry, this module is optional.\n";
}
}
}
}
print "\n";
print "In the next step, you need to build the OrcaSlicer C++ library.\n";
print "1) Create a build directory and change to it\n";
print "2) run cmake .. -DCMAKE_BUILD_TYPE=Release\n";
print "3) run make\n";
print "4) to execute the automatic tests, run ctest --verbose\n";
__END__

251
CLAUDE.md
View File

@@ -8,6 +8,23 @@ OrcaSlicer is an open-source 3D slicer application forked from Bambu Studio, bui
## Build Commands
### Building on Windows
```bash
# Build everything
build_release_vs2022.bat
# Build with debug symbols
build_release_vs2022.bat debug
# Build only dependencies
build_release_vs2022.bat deps
# Build only slicer (after deps are built)
build_release_vs2022.bat slicer
```
### Building on macOS
```bash
# Build everything (dependencies and slicer)
@@ -23,94 +40,218 @@ OrcaSlicer is an open-source 3D slicer application forked from Bambu Studio, bui
./build_release_macos.sh -x
# Build for specific architecture
./build_release_macos.sh -a arm64 # or x86_64
./build_release_macos.sh -a arm64 # or x86_64 or universal
# Build for specific macOS version target
./build_release_macos.sh -t 11.3
```
### Building on Linux
```bash
# Build everything
./build_linux.sh
# First time setup - install system dependencies
./build_linux.sh -u
# Check system resources first (build requires 10GB+ RAM and disk)
./build_linux.sh -r # skip resource checks
# Build dependencies and slicer
./build_linux.sh -dsi
# Build everything (alternative)
./build_linux.sh -dsi
# Individual options:
./build_linux.sh -d # dependencies only
./build_linux.sh -s # slicer only
./build_linux.sh -i # build AppImage
# Performance and debug options:
./build_linux.sh -j N # limit to N cores
./build_linux.sh -1 # single core build
./build_linux.sh -b # debug build
./build_linux.sh -c # clean build
./build_linux.sh -r # skip RAM/disk checks
./build_linux.sh -l # use Clang instead of GCC
```
### Build System
- Uses CMake with minimum version 3.13
- Uses CMake with minimum version 3.13 (maximum 3.31.x on Windows)
- Primary build directory: `build/`
- Dependencies are built in `deps/build/`
- The build process is split into dependency building and main application building
- Windows builds use Visual Studio generators
- macOS builds use Xcode by default, Ninja with -x flag
- Linux builds use Ninja generator
### Testing
Tests are located in the `tests/` directory and can be run via CMake/CTest after building.
Tests are located in the `tests/` directory and use the Catch2 testing framework. Test structure:
- `tests/libslic3r/` - Core library tests (21 test files)
- Geometry processing, algorithms, file formats (STL, 3MF, AMF)
- Polygon operations, clipper utilities, Voronoi diagrams
- `tests/fff_print/` - Fused Filament Fabrication tests (12 test files)
- Slicing algorithms, G-code generation, print mechanics
- Fill patterns, extrusion, support material
- `tests/sla_print/` - Stereolithography tests (4 test files)
- SLA-specific printing algorithms, support generation
- `tests/libnest2d/` - 2D nesting algorithm tests
- `tests/slic3rutils/` - Utility function tests
- `tests/sandboxes/` - Experimental/sandbox test code
Run all tests after building:
```bash
cd build && ctest
```
Run tests with verbose output:
```bash
cd build && ctest --output-on-failure
```
Run individual test suites:
```bash
# From build directory
./tests/libslic3r/libslic3r_tests
./tests/fff_print/fff_print_tests
./tests/sla_print/sla_print_tests
```
## Architecture
### Core Libraries
- **libslic3r/**: Core slicing engine and algorithms
- Contains the main slicing logic, geometry processing, G-code generation
- Platform-independent slicing functionality
- **libslic3r/**: Core slicing engine and algorithms (platform-independent)
- Main slicing logic, geometry processing, G-code generation
- Key classes: Print, PrintObject, Layer, GCode, Config
- Modular design with specialized subdirectories:
- `GCode/` - G-code generation, cooling, pressure equalization, thumbnails
- `Fill/` - Infill pattern implementations (gyroid, honeycomb, lightning, etc.)
- `Support/` - Tree supports and traditional support generation
- `Geometry/` - Advanced geometry operations, Voronoi diagrams, medial axis
- `Format/` - File I/O for 3MF, AMF, STL, OBJ, STEP formats
- `SLA/` - SLA-specific print processing and support generation
- `Arachne/` - Advanced wall generation using skeletal trapezoidation
- **src/slic3r/**: Main application framework
- GUI application entry points and main loops
- Integration between libslic3r and the GUI
- **src/slic3r/**: Main application framework and GUI
- GUI application built with wxWidgets
- Integration between libslic3r core and user interface
- Located in `src/slic3r/GUI/` (not shown in this directory but exists)
### GUI Components
- Built with wxWidgets framework
- Located primarily in `src/slic3r/GUI/`
- Main application class: `GUI_App`
- Uses OpenGL for 3D visualization
### Key Algorithmic Components
- **Arachne Wall Generation**: Variable-width perimeter generation using skeletal trapezoidation
- **Tree Supports**: Organic support generation algorithm
- **Lightning Infill**: Sparse infill optimization for internal structures
- **Adaptive Slicing**: Variable layer height based on geometry
- **Multi-material**: Multi-extruder and soluble support processing
- **G-code Post-processing**: Cooling, fan control, pressure advance, conflict checking
### Key Modules
- **3MF Format Support**: `src/libslic3r/Format/3mf.cpp` - 3MF file format reading/writing
- **G-code Processing**: `src/libslic3r/GCode/` - G-code generation and processing
- **Geometry**: `src/libslic3r/Geometry.cpp` - 2D/3D geometry operations
- **Print Configuration**: `src/libslic3r/PrintConfig.cpp` - Print settings and presets
- **Model Handling**: `src/libslic3r/Model.cpp` - 3D model representation and manipulation
### File Format Support
- **3MF/BBS_3MF**: Native format with extensions for multi-material and metadata
- **STL**: Standard tessellation language for 3D models
- **AMF**: Additive Manufacturing Format with color/material support
- **OBJ**: Wavefront OBJ with material definitions
- **STEP**: CAD format support for precise geometry
- **G-code**: Output format with extensive post-processing capabilities
### External Dependencies
- **Clipper**: 2D polygon clipping operations
- **libigl**: Geometry processing library
- **OpenVDB**: Voxel data structures (optional)
- **TBB**: Threading Building Blocks for parallelization
- **wxWidgets**: Cross-platform GUI toolkit
- **OpenGL**: 3D graphics rendering
- **Clipper2**: Advanced 2D polygon clipping and offsetting
- **libigl**: Computational geometry library for mesh operations
- **TBB**: Intel Threading Building Blocks for parallelization
- **wxWidgets**: Cross-platform GUI framework
- **OpenGL**: 3D graphics rendering and visualization
- **CGAL**: Computational Geometry Algorithms Library (selective use)
- **OpenVDB**: Volumetric data structures for advanced operations
- **Eigen**: Linear algebra library for mathematical operations
## File Organization
### Configuration and Profiles
- `resources/profiles/`: Printer and material profiles organized by manufacturer
- `resources/printers/`: Printer-specific configurations and G-code templates
### Resources and Configuration
- `resources/profiles/` - Printer and material profiles organized by manufacturer
- `resources/printers/` - Printer-specific configurations and G-code templates
- `resources/images/` - UI icons, logos, calibration images
- `resources/calib/` - Calibration test patterns and data
- `resources/handy_models/` - Built-in test models (benchy, calibration cubes)
### Internationalization
- `localization/i18n/`: Translation files
- `resources/i18n/`: Runtime language resources
### Internationalization and Localization
- `localization/i18n/` - Source translation files (.pot, .po)
- `resources/i18n/` - Runtime language resources
- Translation managed via `scripts/run_gettext.sh` / `scripts/run_gettext.bat`
### Platform-Specific Code
- Platform abstractions in `src/libslic3r/Platform.cpp`
- macOS-specific utilities in `src/libslic3r/MacUtils.mm`
- `src/libslic3r/Platform.cpp` - Platform abstractions and utilities
- `src/libslic3r/MacUtils.mm` - macOS-specific utilities (Objective-C++)
- Windows-specific build scripts and configurations
- Linux distribution support scripts in `scripts/linux.d/`
### Build and Development Tools
- `cmake/modules/` - Custom CMake find modules and utilities
- `scripts/` - Python utilities for profile generation and validation
- `tools/` - Windows build tools (gettext utilities)
- `deps/` - External dependency build configurations
## Development Workflow
### Code Style
- C++17 standard
- Use existing patterns found in libslic3r for consistency
- Follow existing naming conventions (PascalCase for classes, snake_case for functions)
### Code Style and Standards
- **C++17 standard** with selective C++20 features
- **Naming conventions**: PascalCase for classes, snake_case for functions/variables
- **Header guards**: Use `#pragma once`
- **Memory management**: Prefer smart pointers, RAII patterns
- **Thread safety**: Use TBB for parallelization, be mindful of shared state
### Common Tasks
- **Adding new print settings**: Extend `PrintConfig.cpp` and related GUI components
- **Modifying slicing algorithms**: Work in `libslic3r/` core modules
- **GUI changes**: Modify components in `src/slic3r/GUI/`
- **Adding printer support**: Add profiles in `resources/profiles/`
### Common Development Tasks
### Dependencies Management
Dependencies are managed through CMake and built separately from the main application. The `deps/` directory contains dependency build configurations.
#### Adding New Print Settings
1. Define setting in `PrintConfig.cpp` with proper bounds and defaults
2. Add UI controls in appropriate GUI components
3. Update serialization in config save/load
4. Add tooltips and help text for user guidance
5. Test with different printer profiles
## Important Notes
#### Modifying Slicing Algorithms
1. Core algorithms live in `libslic3r/` subdirectories
2. Performance-critical code should be profiled and optimized
3. Consider multi-threading implications (TBB integration)
4. Validate changes don't break existing profiles
5. Add regression tests where appropriate
- The codebase is large and complex - use search tools to navigate effectively
- Many algorithms are performance-critical - consider computational complexity
- The project maintains backward compatibility with various file formats
- Cross-platform compatibility is important (Windows, macOS, Linux)
- The GUI uses a custom theming system supporting light/dark modes
#### GUI Development
1. GUI code resides in `src/slic3r/GUI/` (not visible in current tree)
2. Use existing wxWidgets patterns and custom controls
3. Support both light and dark themes
4. Consider DPI scaling on high-resolution displays
5. Maintain cross-platform compatibility
#### Adding Printer Support
1. Create JSON profile in `resources/profiles/[manufacturer].json`
2. Add printer-specific start/end G-code templates
3. Configure build volume, capabilities, and material compatibility
4. Test thoroughly with actual hardware when possible
5. Follow existing profile structure and naming conventions
### Dependencies and Build System
- **CMake-based** with separate dependency building phase
- **Dependencies** built once in `deps/build/`, then linked to main application
- **Cross-platform** considerations important for all changes
- **Resource files** embedded at build time, platform-specific handling
### Performance Considerations
- **Slicing algorithms** are CPU-intensive, profile before optimizing
- **Memory usage** can be substantial with complex models
- **Multi-threading** extensively used via TBB
- **File I/O** optimized for large 3MF files with embedded textures
- **Real-time preview** requires efficient mesh processing
## Important Development Notes
### Codebase Navigation
- Use search tools extensively - codebase has 500k+ lines
- Key entry points: `src/OrcaSlicer.cpp` for application startup
- Core slicing: `libslic3r/Print.cpp` orchestrates the slicing pipeline
- Configuration: `PrintConfig.cpp` defines all print/printer/material settings
### Compatibility and Stability
- **Backward compatibility** maintained for project files and profiles
- **Cross-platform** support essential (Windows/macOS/Linux)
- **File format** changes require careful version handling
- **Profile migrations** needed when settings change significantly
### Quality and Testing
- **Regression testing** important due to algorithm complexity
- **Performance benchmarks** help catch performance regressions
- **Memory leak** detection important for long-running GUI application
- **Cross-platform** testing required before releases

View File

@@ -134,13 +134,13 @@ endif ()
# Proposal for C++ unit tests and sandboxes
option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF)
option(SLIC3R_BUILD_TESTS "Build unit tests" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
option(ORCA_TOOLS "Build Orca tools" OFF)
if (IS_CROSS_COMPILE)
message("Detected cross compilation setup. Tests and encoding checks will be forcedly disabled!")
set(SLIC3R_PERL_XS OFF CACHE BOOL "" FORCE)
set(SLIC3R_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
endif ()
# Print out the SLIC3R_* cache options
@@ -412,7 +412,7 @@ message(STATUS "LIBDIR_BIN: ${LIBDIR_BIN}")
# For the bundled boost libraries (boost::nowide)
include_directories(SYSTEM ${LIBDIR})
# For generated header files
include_directories(SYSTEM ${LIBDIR_BIN}/platform)
include_directories(SYSTEM ${LIBDIR_BIN}/dev-utils/platform)
# For ligigl
include_directories(SYSTEM ${LIBDIR}/libigl)
@@ -534,6 +534,7 @@ find_package(TBB REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
find_package(Freetype REQUIRED)
add_library(libcurl INTERFACE)
@@ -796,6 +797,7 @@ endfunction()
# libslic3r, OrcaSlicer GUI and the OrcaSlicer executable.
add_subdirectory(deps_src)
add_subdirectory(src)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT OrcaSlicer_app_gui)
@@ -812,18 +814,13 @@ if(SLIC3R_BUILD_SANDBOXES)
add_subdirectory(sandboxes)
endif()
if(SLIC3R_BUILD_TESTS)
if(BUILD_TESTS)
add_subdirectory(tests)
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 USE_SOURCE_PERMISSIONS @ONLY)
endif()
option(BUILD_BBS_TEST_TOOLS "Build bbs test tools" OFF)
if(BUILD_BBS_TEST_TOOLS)
add_subdirectory(bbs_test_tools)
configure_file(${LIBDIR}/dev-utils/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh USE_SOURCE_PERMISSIONS @ONLY)
endif()
@@ -839,7 +836,7 @@ elseif (SLIC3R_FHS)
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
PATTERN "*/udev" EXCLUDE
)
install(FILES src/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES src/dev-utils/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
foreach(SIZE 32 128 192)
install(FILES ${SLIC3R_RESOURCES_DIR}/images/OrcaSlicer_${SIZE}px.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME OrcaSlicer.png
@@ -848,12 +845,12 @@ elseif (SLIC3R_FHS)
elseif (CMAKE_MACOSX_BUNDLE)
# install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/OrcaSlicer.app/Contents/resources")
else ()
install(FILES src/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
install(FILES src/dev-utils/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
endif ()
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION ".")
configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fhs.hpp)
configure_file(${LIBDIR}/dev-utils/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/dev-utils/platform/unix/fhs.hpp)
set (CPACK_PACKAGE_NAME "OrcaSlicer")
set (CPACK_PACKAGE_VENDOR "SoftFever")

Binary file not shown.

View File

@@ -32,15 +32,13 @@ Optimize your prints with ultra-fast slicing, intelligent support generation, an
<strong>⚠️ CAUTION:</strong><br><br>
There are several clickbait and malicious websites pretending to be Official OrcaSlicer. These sites may redirect you to dangerous downloads or contain misleading information.
<br><br>
If you come across any of these in search results, please report them as unsafe or spam to help keep the community secure.
If you come across any of these in search results, please <a href="https://safebrowsing.google.com/safebrowsing/report_phish/?">report them as unsafe or phishing</a> to help keep the community secure.
</td>
</tr>
</table>
</div>
# Main features
- **[Advanced Calibration Tools](https://github.com/SoftFever/OrcaSlicer/wiki/Calibration)**
@@ -48,7 +46,7 @@ If you come across any of these in search results, please report them as unsafe
- **[Precise Wall](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_precision#precise-wall) and [Seam Control](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_seam)**
Adjust outer wall spacing and apply scarf seams to enhance print accuracy.
- **[Sandwich Mode](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_wall_and_surfaces#innerouterinner) and [Polyholes](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_precision#polyholes) Support**
Use varied infill patterns and accurate hole shapes for improved clarity.
Use varied infill [patterns](https://github.com/SoftFever/OrcaSlicer/wiki/strength_settings_patterns) and accurate hole shapes for improved clarity.
- **[Overhang](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_overhangs) and [Support Optimization](https://github.com/SoftFever/OrcaSlicer/wiki#support-settings)**
Modify geometry for printable overhangs with precise support placement.
- **[Granular Controls](https://github.com/SoftFever/OrcaSlicer/wiki#process-settings) and Customization**
@@ -77,16 +75,19 @@ Please note that the wiki is a work in progress. We appreciate your patience as
# Download
## Stable Release
📥 **[Download the Latest Stable Release](https://github.com/SoftFever/OrcaSlicer/releases/latest)**
Visit our GitHub Releases page for the latest stable version of Orca Slicer, recommended for most users.
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.
## Nightly Builds
🌙 **[Download the Latest Nightly Build](https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds)**
Explore the latest developments in Orca Slicer with our nightly builds. Feedback on these versions is highly appreciated.
🌙 **[Download the Latest Nightly Build](https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds)**
Explore the latest developments in OrcaSlicer with our nightly builds. Feedback on these versions is highly appreciated.
# How to install
## Windows
Download the **Windows Installer exe** for your preferred version from the [releases page](https://github.com/SoftFever/OrcaSlicer/releases).
- *For convenience there is also a portable build available.*
@@ -102,15 +103,18 @@ Download the **Windows Installer exe** for your preferred version from the [rel
- This file may already be available on your computer if you've installed visual studio. Check the following location: `%VCINSTALLDIR%Redist\MSVC\v142`
</details>
Windows Package Manager:
Windows Package Manager
```shell
winget install --id=SoftFever.OrcaSlicer --exact
winget install --id=SoftFever.OrcaSlicer -e
```
## Mac:
## Mac
1. Download the DMG for your computer: `arm64` version for Apple Silicon and `x86_64` for Intel CPU.
2. Drag OrcaSlicer.app to Application folder.
3. *If you want to run a build from a PR, you also need to follow the instructions below:*
<details>
<summary>Quarantine</summary>
@@ -120,27 +124,33 @@ winget install --id=SoftFever.OrcaSlicer --exact
- Option 2:
Execute this command in terminal:
```shell
xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app`
xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app
```
- Option 3:
- Step 1: open the app, a warning window will pop up
![mac_cant_open](./SoftFever_doc/mac_cant_open.png)
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
![mac_security_setting](./SoftFever_doc/mac_security_setting.png)
</details>
## Linux (Ubuntu):
## Linux (Ubuntu)
1. If you run into trouble executing it, try this command in the terminal:
`chmod +x /path_to_appimage/OrcaSlicer_Linux.AppImage`
# How to Compile
All updated build instructions for Windows, macOS, and Linux are now available on the official [OrcaSlicer Wiki - How to build](https://github.com/SoftFever/OrcaSlicer/wiki/How-to-build) page.
Please refer to the wiki to ensure you're following the latest and most accurate steps for your platform.
# Klipper Note:
# Klipper Note
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
```gcode
# Enable object exclusion
[exclude_object]
@@ -151,11 +161,13 @@ resolution: 0.1
```
# Supports
**Orca Slicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
**OrcaSlicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
Thank you! :)
## Sponsors:
<table>
<tr>
<td>
@@ -172,31 +184,29 @@ Thank you! :)
</table>
## Backers:
**Ko-fi supporters** ☕: [Backers list](https://github.com/user-attachments/files/16147016/Supporters_638561417699952499.csv)
## Support me
<a href="https://github.com/sponsors/SoftFever"><img src="https://img.shields.io/badge/GitHub%20Sponsors-30363D?style=flat&logo=GitHub-Sponsors&logoColor=EA4AAA" height="50"></a>
<a href="https://ko-fi.com/G2G5IP3CP"><img src="https://img.shields.io/badge/Support_me_on_Ko--fi-FF5E5B?style=flat&logo=ko-fi&logoColor=white" height="50"></a>
<a href="https://paypal.me/softfever3d"><img src="https://img.shields.io/badge/PayPal-003087?style=flat&logo=paypal&logoColor=fff" height="50"></a>
## Some background
OrcaSlicer was originally forked from Bambu Studio, it was previously known as BambuStudio-SoftFever.
[Bambu Studio](https://github.com/bambulab/BambuStudio) is forked from [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer) by Prusa Research, which is from [Slic3r](https://github.com/Slic3r/Slic3r) by Alessandro Ranellucci and the RepRap community.
Orca Slicer incorporates a lot of features from [SuperSlicer](https://github.com/supermerill/SuperSlicer) by @supermerill
Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr).
OrcaSlicer incorporates a lot of features from [SuperSlicer](https://github.com/supermerill/SuperSlicer) by @supermerill
OrcaSlicer's logo is designed by community member Justin Levine (@freejstnalxndr).
# License
**Orca Slicer** is licensed under the GNU Affero General Public License, version 3. Orca Slicer is based on Bambu Studio by BambuLab.
**Bambu Studio** is licensed under the GNU Affero General Public License, version 3. Bambu Studio is based on PrusaSlicer by PrusaResearch.
**PrusaSlicer** is licensed under the GNU Affero General Public License, version 3. PrusaSlicer is owned by Prusa Research. PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci.
**Slic3r** is licensed under the GNU Affero General Public License, version 3. Slic3r was created by Alessandro Ranellucci with the help of many other contributors.
The GNU Affero General Public License, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
Orca Slicer includes a pressure advance calibration pattern test adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
The Bambu networking plugin is based on non-free libraries from BambuLab. It is optional to the Orca Slicer and provides extended functionalities for Bambulab printer users.
- **OrcaSlicer** is licensed under the GNU Affero General Public License, version 3. OrcaSlicer is based on Bambu Studio by BambuLab.
- **Bambu Studio** is licensed under the GNU Affero General Public License, version 3. Bambu Studio is based on PrusaSlicer by PrusaResearch.
- **PrusaSlicer** is licensed under the GNU Affero General Public License, version 3. PrusaSlicer is owned by Prusa Research. PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci.
- **Slic3r** is licensed under the GNU Affero General Public License, version 3. Slic3r was created by Alessandro Ranellucci with the help of many other contributors.
- The **GNU Affero General Public License**, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
- OrcaSlicer includes a **pressure advance calibration pattern test** adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
- The **Bambu networking plugin** is based on non-free libraries from BambuLab. It is optional to the OrcaSlicer and provides extended functionalities for Bambulab printer users.

341
build_flatpak.sh Executable file
View File

@@ -0,0 +1,341 @@
#!/bin/bash
# OrcaSlicer Flatpak Build Script
# This script builds and packages OrcaSlicer as a Flatpak package locally
# Based on the GitHub Actions workflow in .github/workflows/build_all.yml
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Default values
ARCH=$(uname -m)
BUILD_DIR="build_flatpak"
CLEANUP=false
INSTALL_RUNTIME=false
JOBS=$(nproc)
FORCE_CLEAN=false
ENABLE_CCACHE=false
CACHE_DIR=".flatpak-builder"
# Help function
show_help() {
echo "Usage: $0 [OPTIONS]"
echo ""
echo "Build OrcaSlicer as a Flatpak package"
echo ""
echo "Options:"
echo " -a, --arch ARCH Target architecture (x86_64, aarch64) [default: $ARCH]"
echo " -d, --build-dir DIR Build directory [default: $BUILD_DIR]"
echo " -j, --jobs JOBS Number of parallel build jobs for flatpak-builder and modules [default: $JOBS]"
echo " -c, --cleanup Clean build directory before building"
echo " -f, --force-clean Force clean build (disables caching)"
echo " --ccache Enable ccache for faster rebuilds (requires ccache in SDK)"
echo " --cache-dir DIR Flatpak builder cache directory [default: $CACHE_DIR]"
echo " -i, --install-runtime Install required Flatpak runtime and SDK"
echo " -h, --help Show this help message"
echo ""
echo "Examples:"
echo " $0 # Build for current architecture with caching enabled"
echo " $0 -f # Force clean build (no caching)"
echo " $0 --ccache -j 8 # Use ccache and 8 parallel jobs for faster builds"
echo " $0 -a x86_64 -c # Build for x86_64 and cleanup first"
echo " $0 -i -j 16 --ccache # Install runtime, build with 16 jobs and ccache"
}
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case $1 in
-a|--arch)
ARCH="$2"
shift 2
;;
-d|--build-dir)
BUILD_DIR="$2"
shift 2
;;
-j|--jobs)
JOBS="$2"
shift 2
;;
-c|--cleanup)
CLEANUP=true
shift
;;
-f|--force-clean)
FORCE_CLEAN=true
shift
;;
--ccache)
ENABLE_CCACHE=true
shift
;;
--cache-dir)
CACHE_DIR="$2"
shift 2
;;
-i|--install-runtime)
INSTALL_RUNTIME=true
shift
;;
-h|--help)
show_help
exit 0
;;
*)
echo -e "${RED}Error: Unknown option $1${NC}"
show_help
exit 1
;;
esac
done
# Validate architecture
if [[ "$ARCH" != "x86_64" && "$ARCH" != "aarch64" ]]; then
echo -e "${RED}Error: Unsupported architecture '$ARCH'. Supported: x86_64, aarch64${NC}"
exit 1
fi
# Validate jobs parameter
if ! [[ "$JOBS" =~ ^[1-9][0-9]*$ ]]; then
echo -e "${RED}Error: Jobs must be a positive integer, got '$JOBS'${NC}"
exit 1
fi
echo -e "${BLUE}OrcaSlicer Flatpak Build Script${NC}"
echo -e "${BLUE}================================${NC}"
echo -e "Architecture: ${GREEN}$ARCH${NC}"
echo -e "Build directory: ${GREEN}$BUILD_DIR${NC}"
echo -e "Cache directory: ${GREEN}$CACHE_DIR${NC}"
echo -e "Parallel jobs: ${GREEN}$JOBS${NC}"
if [[ "$FORCE_CLEAN" == true ]]; then
echo -e "Cache mode: ${RED}DISABLED (force clean)${NC}"
else
echo -e "Cache mode: ${GREEN}ENABLED${NC}"
fi
if [[ "$ENABLE_CCACHE" == true ]]; then
echo -e "Ccache: ${GREEN}ENABLED${NC}"
else
echo -e "Ccache: ${YELLOW}DISABLED${NC}"
fi
echo ""
# Check available disk space (flatpak builds need several GB)
AVAILABLE_SPACE=$(df . | awk 'NR==2 {print $4}')
REQUIRED_SPACE=$((5 * 1024 * 1024)) # 5GB in KB
if [[ $AVAILABLE_SPACE -lt $REQUIRED_SPACE ]]; then
echo -e "${YELLOW}Warning: Low disk space detected.${NC}"
echo -e "Available: $(( AVAILABLE_SPACE / 1024 / 1024 ))GB, Recommended: 5GB+"
echo -e "Continue anyway? (y/N)"
read -r response
if [[ ! "$response" =~ ^[Yy]$ ]]; then
echo "Build cancelled by user"
exit 1
fi
fi
# Check if flatpak is installed
if ! command -v flatpak &> /dev/null; then
echo -e "${RED}Error: Flatpak is not installed. Please install it first.${NC}"
echo "On Ubuntu/Debian: sudo apt install flatpak"
echo "On Fedora: sudo dnf install flatpak"
echo "On Arch: sudo pacman -S flatpak"
exit 1
fi
# Check if flatpak-builder is installed
if ! command -v flatpak-builder &> /dev/null; then
echo -e "${RED}Error: flatpak-builder is not installed. Please install it first.${NC}"
echo "On Ubuntu/Debian: sudo apt install flatpak-builder"
echo "On Fedora: sudo dnf install flatpak-builder"
echo "On Arch: sudo pacman -S flatpak-builder"
exit 1
fi
# Check additional build dependencies
echo -e "${YELLOW}Checking build dependencies...${NC}"
MISSING_DEPS=()
if ! command -v cmake &> /dev/null; then
MISSING_DEPS+=("cmake")
fi
if ! command -v ninja &> /dev/null && ! command -v make &> /dev/null; then
MISSING_DEPS+=("ninja or make")
fi
if ! command -v pkg-config &> /dev/null; then
MISSING_DEPS+=("pkg-config")
fi
if [ ${#MISSING_DEPS[@]} -ne 0 ]; then
echo -e "${RED}Error: Missing required build dependencies: ${MISSING_DEPS[*]}${NC}"
echo "On Ubuntu/Debian: sudo apt install cmake ninja-build pkg-config"
echo "On Fedora: sudo dnf install cmake ninja-build pkgconfig"
exit 1
fi
echo -e "${GREEN}All required dependencies found${NC}"
# Install runtime and SDK if requested
if [[ "$INSTALL_RUNTIME" == true ]]; then
echo -e "${YELLOW}Installing GNOME runtime and SDK...${NC}"
flatpak install --user -y flathub org.gnome.Platform//47
flatpak install --user -y flathub org.gnome.Sdk//47
fi
# Check if required runtime is available
if ! flatpak info --user org.gnome.Platform//47 &> /dev/null; then
echo -e "${RED}Error: GNOME Platform 47 runtime is not installed.${NC}"
echo "Run with -i flag to install it automatically, or install manually:"
echo "flatpak install --user flathub org.gnome.Platform//47"
exit 1
fi
if ! flatpak info --user org.gnome.Sdk//47 &> /dev/null; then
echo -e "${RED}Error: GNOME SDK 47 is not installed.${NC}"
echo "Run with -i flag to install it automatically, or install manually:"
echo "flatpak install --user flathub org.gnome.Sdk//47"
exit 1
fi
# Get version information
echo -e "${YELLOW}Getting version information...${NC}"
if [[ -f "version.inc" ]]; then
VER_PURE=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
VER="V$VER_PURE"
DATE=$(date +'%Y%m%d')
echo -e "Version: ${GREEN}$VER${NC}"
echo -e "Date: ${GREEN}$DATE${NC}"
else
echo -e "${RED}Error: version.inc not found${NC}"
exit 1
fi
# Cleanup build directory if requested
if [[ "$CLEANUP" == true ]]; then
echo -e "${YELLOW}Cleaning up flatpak-specific build directories...${NC}"
rm -rf deps/build_flatpak build_flatpak
echo -e "${YELLOW}Cleaning up flatpak build directories...${NC}"
rm -rf "$BUILD_DIR"
# Only clean cache if force-clean is enabled
if [[ "$FORCE_CLEAN" == true ]]; then
echo -e "${YELLOW}Cleaning up flatpak build cache...${NC}"
rm -rf "$CACHE_DIR"
else
echo -e "${BLUE}Preserving build cache at: $CACHE_DIR${NC}"
fi
echo -e "${BLUE}Note: Host build directories (deps/build, build) are preserved${NC}"
fi
# Create build directory
mkdir -p "$BUILD_DIR"
rm -rf "$BUILD_DIR/build-dir"
# Check if flatpak manifest exists
if [[ ! -f "./scripts/flatpak/io.github.softfever.OrcaSlicer.yml" ]]; then
echo -e "${RED}Error: Flatpak manifest not found at scripts/flatpak/io.github.softfever.OrcaSlicer.yml${NC}"
exit 1
fi
# Build the Flatpak
echo -e "${YELLOW}Building Flatpak package...${NC}"
echo -e "This may take a while (30+ minutes depending on your system)..."
echo ""
BUNDLE_NAME="OrcaSlicer-Linux-flatpak_${VER}_${ARCH}.flatpak"
# Remove any existing bundle
rm -f "$BUNDLE_NAME"
# Create necessary directories inside repo
mkdir -p "$BUILD_DIR/cache" "$BUILD_DIR/flatpak-builder"
# Set environment variables to match GitHub Actions
export FLATPAK_BUILDER_N_JOBS=$JOBS
echo -e "${BLUE}Running flatpak-builder...${NC}"
echo -e "Using $JOBS parallel jobs for flatpak-builder and $FLATPAK_BUILDER_N_JOBS for module builds"
# Check flatpak-builder version to determine available options
FLATPAK_BUILDER_VERSION=$(flatpak-builder --version 2>/dev/null | head -1 | awk '{print $2}' || echo "unknown")
echo -e "flatpak-builder version: $FLATPAK_BUILDER_VERSION"
# Build command with caching support
BUILDER_ARGS=(
--arch="$ARCH"
--user
--install-deps-from=flathub
--repo="$BUILD_DIR/repo"
--verbose
--state-dir="$CACHE_DIR"
--jobs="$JOBS"
)
# Add force-clean only if explicitly requested (disables caching)
if [[ "$FORCE_CLEAN" == true ]]; then
BUILDER_ARGS+=(--force-clean)
echo -e "${YELLOW}Using --force-clean (caching disabled)${NC}"
else
echo -e "${GREEN}Using build cache for faster rebuilds${NC}"
fi
# Add ccache if enabled
if [[ "$ENABLE_CCACHE" == true ]]; then
BUILDER_ARGS+=(--ccache)
echo -e "${GREEN}Using ccache for compiler caching${NC}"
fi
if ! flatpak-builder \
"${BUILDER_ARGS[@]}" \
"$BUILD_DIR/build-dir" \
scripts/flatpak/io.github.softfever.OrcaSlicer.yml; then
echo -e "${RED}Error: flatpak-builder failed${NC}"
echo -e "${YELLOW}Check the build log above for details${NC}"
exit 1
fi
# Create bundle
echo -e "${YELLOW}Creating Flatpak bundle...${NC}"
if ! flatpak build-bundle \
"$BUILD_DIR/repo" \
"$BUNDLE_NAME" \
io.github.softfever.OrcaSlicer \
--arch="$ARCH"; then
echo -e "${RED}Error: Failed to create Flatpak bundle${NC}"
exit 1
fi
# Success message
echo ""
echo -e "${GREEN}✓ Flatpak build completed successfully!${NC}"
echo -e "Bundle created: ${GREEN}$BUNDLE_NAME${NC}"
echo -e "Size: ${GREEN}$(du -h "$BUNDLE_NAME" | cut -f1)${NC}"
if [[ "$FORCE_CLEAN" != true ]]; then
echo -e "Build cache: ${GREEN}$CACHE_DIR${NC} (preserved for faster future builds)"
fi
echo ""
echo -e "${BLUE}To install the Flatpak:${NC}"
echo -e "flatpak install --user $BUNDLE_NAME"
echo ""
echo -e "${BLUE}To run OrcaSlicer:${NC}"
echo -e "flatpak run io.github.softfever.OrcaSlicer"
echo ""
echo -e "${BLUE}To uninstall:${NC}"
echo -e "flatpak uninstall --user io.github.softfever.OrcaSlicer"
echo ""
if [[ "$FORCE_CLEAN" != true ]]; then
echo -e "${BLUE}Cache Management:${NC}"
echo -e "• Subsequent builds will be faster thanks to caching"
echo -e "• To force a clean build: $0 -f"
echo -e "• To clean cache manually: rm -rf $CACHE_DIR"
fi

View File

@@ -1,36 +1,13 @@
#!/usr/bin/env bash
SCRIPT_NAME=$(basename "$0")
SCRIPT_PATH=$(dirname $(readlink -f ${0}))
pushd ${SCRIPT_PATH} > /dev/null
set -e # Exit immediately if a command exits with a non-zero status.
function check_available_memory_and_disk() {
FREE_MEM_GB=$(free --gibi --total | grep 'Mem' | rev | cut --delimiter=" " --fields=1 | rev)
MIN_MEM_GB=10
SCRIPT_NAME=$(basename "$0")
SCRIPT_PATH=$(dirname "$(readlink -f "${0}")")
FREE_DISK_KB=$(df --block-size=1K . | tail -1 | awk '{print $4}')
MIN_DISK_KB=$((10 * 1024 * 1024))
if [[ ${FREE_MEM_GB} -le ${MIN_MEM_GB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least ${MIN_MEM_GB}G of 'available' mem (system has only ${FREE_MEM_GB}G available)"
echo && free --human && echo
echo "Invoke with -r to skip RAM and disk checks."
exit 2
fi
if [[ ${FREE_DISK_KB} -le ${MIN_DISK_KB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least $(echo ${MIN_DISK_KB} |awk '{ printf "%.1fG\n", $1/1024/1024; }') (system has only $(echo ${FREE_DISK_KB} | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
echo && df --human-readable . && echo
echo "Invoke with -r to skip ram and disk checks."
exit 1
fi
}
pushd "${SCRIPT_PATH}" > /dev/null
function usage() {
echo "Usage: ./${SCRIPT_NAME} [-1][-b][-c][-d][-h][-i][-j N][-p][-r][-s][-u][-l]"
echo "Usage: ./${SCRIPT_NAME} [-1][-b][-c][-d][-h][-i][-j N][-p][-r][-s][-t][-u][-l][-L]"
echo " -1: limit builds to one core (where possible)"
echo " -j N: limit builds to N cores (where possible)"
echo " -b: build in debug mode"
@@ -42,16 +19,19 @@ function usage() {
echo " -p: boost ccache hit rate by disabling precompiled headers (default: ON)"
echo " -r: skip RAM and disk checks (low RAM compiling)"
echo " -s: build the Orca Slicer (optional)"
echo " -t: build tests (optional)"
echo " -u: install system dependencies (asks for sudo password; build prerequisite)"
echo " -l: use Clang instead of GCC (default: GCC)"
echo " -L: use ld.lld as linker (if available)"
echo "For a first use, you want to './${SCRIPT_NAME} -u'"
echo " and then './${SCRIPT_NAME} -dsi'"
echo "To build with tests: './${SCRIPT_NAME} -st' or './${SCRIPT_NAME} -dst'"
}
SLIC3R_PRECOMPILED_HEADERS="ON"
unset name
while getopts ":1j:bcCdhiprsul" opt ; do
while getopts ":1j:bcCdhiprstulL" opt ; do
case ${opt} in
1 )
export CMAKE_BUILD_PARALLEL_LEVEL=1
@@ -72,7 +52,7 @@ while getopts ":1j:bcCdhiprsul" opt ; do
BUILD_DEPS="1"
;;
h ) usage
exit 0
exit 1
;;
i )
BUILD_IMAGE="1"
@@ -86,20 +66,52 @@ while getopts ":1j:bcCdhiprsul" opt ; do
s )
BUILD_ORCA="1"
;;
t )
BUILD_TESTS="1"
;;
u )
UPDATE_LIB="1"
export UPDATE_LIB="1"
;;
l )
USE_CLANG="1"
;;
L )
USE_LLD="1"
;;
* )
echo "Unknown argument '${opt}', aborting."
exit 1
;;
esac
done
if [ ${OPTIND} -eq 1 ] ; then
usage
exit 0
exit 1
fi
function check_available_memory_and_disk() {
FREE_MEM_GB=$(free --gibi --total | grep 'Mem' | rev | cut --delimiter=" " --fields=1 | rev)
MIN_MEM_GB=10
FREE_DISK_KB=$(df --block-size=1K . | tail -1 | awk '{print $4}')
MIN_DISK_KB=$((10 * 1024 * 1024))
if [[ ${FREE_MEM_GB} -le ${MIN_MEM_GB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least ${MIN_MEM_GB}G of 'available' mem (system has only ${FREE_MEM_GB}G available)"
echo && free --human && echo
echo "Invoke with -r to skip RAM and disk checks."
exit 2
fi
if [[ ${FREE_DISK_KB} -le ${MIN_DISK_KB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least $(echo "${MIN_DISK_KB}" |awk '{ printf "%.1fG\n", $1/1024/1024; }') (system has only $(echo "${FREE_DISK_KB}" | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
echo && df --human-readable . && echo
echo "Invoke with -r to skip ram and disk checks."
exit 1
fi
}
# cmake 4.x compatibility workaround
export CMAKE_POLICY_VERSION_MINIMUM=3.5
@@ -115,13 +127,13 @@ elif [[ "${DISTRIBUTION_LIKE}" == *"arch"* ]] ; then
DISTRIBUTION="arch"
fi
if [ ! -f ./linux.d/${DISTRIBUTION} ] ; then
echo "Your distribution \"${DISTRIBUTION}\" is not supported by system-dependency scripts in ./linux.d/"
if [ ! -f "./scripts/linux.d/${DISTRIBUTION}" ] ; then
echo "Your distribution \"${DISTRIBUTION}\" is not supported by system-dependency scripts in ./scripts/linux.d/"
echo "Please resolve dependencies manually and contribute a script for your distribution to upstream."
exit 1
else
echo "resolving system dependencies for distribution \"${DISTRIBUTION}\" ..."
source ./linux.d/${DISTRIBUTION}
source "./scripts/linux.d/${DISTRIBUTION}"
fi
echo "FOUND_GTK3=${FOUND_GTK3}"
@@ -139,7 +151,7 @@ echo "Changing date in version..."
echo "done"
if ! [[ -n "${SKIP_RAM_CHECK}" ]] ; then
if [[ -z "${SKIP_RAM_CHECK}" ]] ; then
check_available_memory_and_disk
fi
@@ -148,6 +160,18 @@ if [[ -n "${USE_CLANG}" ]] ; then
export CMAKE_C_CXX_COMPILER_CLANG="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
fi
# Configure use of ld.lld as the linker when requested
export CMAKE_LLD_LINKER_ARGS=""
if [[ -n "${USE_LLD}" ]] ; then
if command -v ld.lld >/dev/null 2>&1 ; then
LLD_BIN=$(command -v ld.lld)
export CMAKE_LLD_LINKER_ARGS="-DCMAKE_LINKER=${LLD_BIN} -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld"
else
echo "Error: ld.lld not found. Please install the 'lld' package (e.g., sudo apt install lld) or omit -L."
exit 1
fi
fi
if [[ -n "${BUILD_DEPS}" ]] ; then
echo "Configuring dependencies..."
BUILD_ARGS="${DEPS_EXTRA_BUILD_ARGS} -DDEP_WX_GTK3=ON"
@@ -155,29 +179,28 @@ if [[ -n "${BUILD_DEPS}" ]] ; then
then
rm -fr deps/build
fi
if [ ! -d "deps/build" ]
then
mkdir deps/build
fi
mkdir -p deps/build
if [[ -n "${BUILD_DEBUG}" ]] ; then
# build deps with debug and release else cmake will not find required sources
if [ ! -d "deps/build/release" ] ; then
mkdir deps/build/release
fi
cmake ${CMAKE_C_CXX_COMPILER_CLANG} -S deps -B deps/build/release -DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} -G Ninja -DDESTDIR="${SCRIPT_PATH}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${SCRIPT_PATH}/deps/DL_CACHE" ${COLORED_OUTPUT} ${BUILD_ARGS}
mkdir -p deps/build/release
CMAKE_CMD="cmake ${CMAKE_C_CXX_COMPILER_CLANG} ${CMAKE_LLD_LINKER_ARGS} -S deps -B deps/build/release -DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} -G Ninja -DDESTDIR=${SCRIPT_PATH}/deps/build/destdir -DDEP_DOWNLOAD_DIR=${SCRIPT_PATH}/deps/DL_CACHE ${COLORED_OUTPUT} ${BUILD_ARGS}"
echo "${CMAKE_CMD}"
${CMAKE_CMD}
cmake --build deps/build/release
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
fi
echo "cmake -S deps -B deps/build ${CMAKE_C_CXX_COMPILER_CLANG} -G Ninja ${BUILD_ARGS}"
cmake -S deps -B deps/build ${CMAKE_C_CXX_COMPILER_CLANG} -G Ninja ${COLORED_OUTPUT} ${BUILD_ARGS}
# If this isn't in one quote, then empty variables can add two single quotes and mess up argument parsing for cmake.
CMAKE_CMD="cmake -S deps -B deps/build ${CMAKE_C_CXX_COMPILER_CLANG} ${CMAKE_LLD_LINKER_ARGS} -G Ninja ${COLORED_OUTPUT} ${BUILD_ARGS}"
echo "${CMAKE_CMD}"
${CMAKE_CMD}
cmake --build deps/build
fi
if [[ -n "${BUILD_ORCA}" ]] ; then
echo "Configuring OrcaSlicer..."
if [[ -n "${CLEAN_BUILD}" ]] ; then
rm --force --recursive build
rm -fr build
fi
BUILD_ARGS="${ORCA_EXTRA_BUILD_ARGS}"
if [[ -n "${FOUND_GTK3_DEV}" ]] ; then
@@ -188,22 +211,34 @@ if [[ -n "${BUILD_ORCA}" ]] ; then
else
BUILD_ARGS="${BUILD_ARGS} -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0"
fi
if [[ -n "${BUILD_TESTS}" ]] ; then
BUILD_ARGS="${BUILD_ARGS} -DBUILD_TESTS=ON"
fi
CMAKE_CMD="cmake -S . -B build ${CMAKE_C_CXX_COMPILER_CLANG} -G Ninja \
echo "Configuring OrcaSlicer..."
cmake -S . -B build ${CMAKE_C_CXX_COMPILER_CLANG} ${CMAKE_LLD_LINKER_ARGS} -G "Ninja Multi-Config" \
-DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} \
-DCMAKE_PREFIX_PATH="${SCRIPT_PATH}/deps/build/destdir/usr/local" \
-DCMAKE_PREFIX_PATH=${SCRIPT_PATH}/deps/build/destdir/usr/local \
-DSLIC3R_STATIC=1 \
-DORCA_TOOLS=ON \
${COLORED_OUTPUT} \
${BUILD_ARGS}"
echo -e "${CMAKE_CMD}"
${BUILD_ARGS}
echo "${CMAKE_CMD}"
${CMAKE_CMD}
echo "done"
echo "Building OrcaSlicer ..."
cmake --build build --target OrcaSlicer
if [[ -n "${BUILD_DEBUG}" ]] ; then
cmake --build build --config Debug --target OrcaSlicer
else
cmake --build build --config Release --target OrcaSlicer
fi
echo "Building OrcaSlicer_profile_validator .."
cmake --build build --target OrcaSlicer_profile_validator
./run_gettext.sh
if [[ -n "${BUILD_DEBUG}" ]] ; then
cmake --build build --config Debug --target OrcaSlicer_profile_validator
else
cmake --build build --config Release --target OrcaSlicer_profile_validator
fi
./scripts/run_gettext.sh
echo "done"
fi

View File

@@ -45,6 +45,6 @@ echo cmake .. -G "Visual Studio 16 2019" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAK
cmake .. -G "Visual Studio 16 2019" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=%build_type% -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake --build . --config %build_type% --target ALL_BUILD -- -m
cd ..
call run_gettext.bat
call scripts/run_gettext.bat
cd %build_dir%
cmake --build . --target install --config %build_type%

View File

@@ -189,7 +189,7 @@ function build_slicer() {
echo "Verify localization with gettext..."
(
cd "$PROJECT_DIR"
./run_gettext.sh
./scripts/run_gettext.sh
)
echo "Fix macOS app package..."

View File

@@ -62,6 +62,6 @@ cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DORCA_TOOL
cmake --build . --config %build_type% --target ALL_BUILD -- -m
@echo off
cd ..
call run_gettext.bat
call scripts/run_gettext.bat
cd %build_dir%
cmake --build . --target install --config %build_type%

View File

@@ -123,7 +123,7 @@ if (OPENVDB_FIND_MODULE_PATH)
endif ()
# ###########################################################################
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.13)
# Monitoring <PackageName>_ROOT variables
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)

View File

@@ -18,7 +18,7 @@ else ()
endif ()
# Note: The flatpak build builds wxwidgets separately due to CI size constraints.
# ANY CHANGES MADE IN HERE MUST ALSO BE REFLECTED IN `flatpak/io.github.SoftFever.OrcaSlicer.yml`.
# ANY CHANGES MADE IN HERE MUST ALSO BE REFLECTED IN `scripts/flatpak/io.github.SoftFever.OrcaSlicer.yml`.
# ** THIS INCLUDES BUILD ARGS. **
# ...if you can find a way around this size limitation, be my guest.

35
deps_src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.13)
project(deps_src)
# Include all dependency subdirectories
# Header-only libraries (INTERFACE)
add_subdirectory(agg)
add_subdirectory(ankerl)
add_subdirectory(fast_float)
add_subdirectory(nanosvg)
add_subdirectory(nlohmann)
add_subdirectory(spline) # Header-only spline library
add_subdirectory(stb_dxt) # Header-only STB DXT compression library
# Static libraries
add_subdirectory(Shiny)
add_subdirectory(admesh)
add_subdirectory(clipper)
add_subdirectory(expat)
add_subdirectory(glu-libtess)
add_subdirectory(hidapi)
add_subdirectory(hints) # Hints library with utility executable
add_subdirectory(imgui)
add_subdirectory(imguizmo)
add_subdirectory(libigl)
add_subdirectory(libnest2d)
add_subdirectory(mcut)
add_subdirectory(miniz)
add_subdirectory(minilzo)
add_subdirectory(qhull)
add_subdirectory(qoi)
add_subdirectory(semver) # Semver static library
# Eigen header-only library
add_subdirectory(eigen)

View File

@@ -0,0 +1,119 @@
# CMake Interfaces for deps_src Libraries
This document describes how to use the CMake interface libraries created for the subdirectories in `deps_src/`.
## Available Libraries
### 1. **semver** (Static Library)
- **Type**: Static library
- **Target**: `semver` or `semver::semver`
- **Headers**: `semver.h`
- **Usage**:
```cmake
target_link_libraries(your_target PRIVATE semver)
# or
target_link_libraries(your_target PRIVATE semver::semver)
```
### 2. **hints** (Interface Library)
- **Type**: Interface library (header-only)
- **Target**: `hints`
- **Utility**: `hintsToPot` executable
- **Usage**:
```cmake
target_link_libraries(your_target PRIVATE hints)
```
### 3. **spline** (Interface Library)
- **Type**: Interface library (header-only)
- **Target**: `spline` or `spline::spline`
- **Headers**: `spline.h`
- **Usage**:
```cmake
target_link_libraries(your_target PRIVATE spline)
# or
target_link_libraries(your_target PRIVATE spline::spline)
```
### 4. **stb_dxt** (Interface Library)
- **Type**: Interface library (header-only)
- **Target**: `stb_dxt` or `stb_dxt::stb_dxt`
- **Headers**: `stb_dxt.h`
- **Usage**:
```cmake
target_link_libraries(your_target PRIVATE stb_dxt)
# or
target_link_libraries(your_target PRIVATE stb_dxt::stb_dxt)
```
## How to Use in Your Project
### From within the OrcaSlicer src/ directory:
1. **In your CMakeLists.txt**, simply link the library:
```cmake
add_executable(my_app main.cpp)
target_link_libraries(my_app
PRIVATE
semver::semver # For version parsing
spline::spline # For spline interpolation
stb_dxt::stb_dxt # For DXT texture compression
hints # For hints functionality
)
```
2. **In your C++ code**, include the headers:
```cpp
// For semver
#include <semver.h>
// For spline
#include <spline.h>
// For stb_dxt
#include <stb_dxt.h>
// Use the libraries as documented in their respective headers
```
## Benefits of This Approach
1. **Modern CMake**: Uses target-based CMake with proper INTERFACE/PUBLIC/PRIVATE visibility
2. **Proper Include Paths**: Automatically sets up include directories
3. **Namespace Aliases**: Provides namespaced aliases (e.g., `spline::spline`) for clarity
4. **Position Independent Code**: Static libraries are built with `-fPIC` for compatibility
5. **Install Support**: Libraries can be installed and used by external projects
6. **Build/Install Interface**: Separates build-time and install-time include paths
## Example Integration
Here's a complete example of using these libraries in a new component:
```cmake
# In src/mycomponent/CMakeLists.txt
add_library(mycomponent STATIC
mycomponent.cpp
mycomponent.h
)
target_link_libraries(mycomponent
PUBLIC
semver::semver # Version handling is part of public API
PRIVATE
spline::spline # Used internally for interpolation
stb_dxt::stb_dxt # Used internally for texture compression
)
target_include_directories(mycomponent
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
```
## Notes
- All header-only libraries use the INTERFACE library type, which means they don't produce any binaries
- The `semver` library produces a static library that will be linked into your target
- The `hints` project also produces a `hintsToPot` executable utility
- All libraries require at least C++11 (some require C++17)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.13)
project(Shiny)
add_library(Shiny STATIC
@@ -23,3 +23,7 @@ add_library(Shiny STATIC
ShinyZone.c
ShinyZone.h
)
target_include_directories(Shiny PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.13)
project(admesh)
add_library(admesh STATIC
connect.cpp
normals.cpp
shared.cpp
stl.h
stl_io.cpp
stlinit.cpp
util.cpp
)
target_include_directories(admesh PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
)
target_link_libraries(admesh
PRIVATE boost_headeronly
PUBLIC eigen
)

View File

@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.13)
project(agg)
add_library(agg INTERFACE)
target_include_directories(agg INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(agg INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/agg_array.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_basics.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_bezier_arc.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_clip_liang_barsky.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_color_gray.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_color_rgba.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_config.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_conv_transform.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_gamma_functions.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_gamma_lut.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_math.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_path_storage.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_pixfmt_base.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_pixfmt_gray.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_pixfmt_rgb.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_rasterizer_cells_aa.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_rasterizer_scanline_aa.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_rasterizer_scanline_aa_nogamma.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_rasterizer_sl_clip.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_renderer_base.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_renderer_scanline.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_rendering_buffer.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_scanline_p.h
${CMAKE_CURRENT_SOURCE_DIR}/agg_trans_affine.h
)

View File

@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.13)
project(ankerl)
add_library(ankerl INTERFACE)
target_include_directories(ankerl INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_sources(ankerl INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/unordered_dense.h
)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.13)
project(clipper)
add_library(clipper STATIC
@@ -9,4 +9,11 @@ add_library(clipper STATIC
clipper_z.hpp
)
target_link_libraries(clipper TBB::tbb TBB::tbbmalloc)
target_include_directories(clipper PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries(clipper
PUBLIC eigen
PRIVATE TBB::tbb TBB::tbbmalloc
)

View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.13)
project(eigen)
add_library(eigen INTERFACE)
target_include_directories(eigen INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
# Eigen is header-only, so we only need to specify the include directory
# The headers are in the Eigen/ subdirectory structure

Some files were not shown because too many files have changed in this diff Show More