mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-18 23:08:25 -05:00
Compare commits
104
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2d10a0b57 | ||
|
|
d1b6ebcd06 | ||
|
|
37c5fcd908 | ||
|
|
cde79fc655 | ||
|
|
eba242953b | ||
|
|
7edeb8b277 | ||
|
|
15037283e7 | ||
|
|
504b89af03 | ||
|
|
fc6258e2b7 | ||
|
|
54e741705d | ||
|
|
a186e8e8d7 | ||
|
|
614f93053a | ||
|
|
32ca697e9e | ||
|
|
4d7699b628 | ||
|
|
f020480900 | ||
|
|
c59255a605 | ||
|
|
43df6fc427 | ||
|
|
5d2aaddbee | ||
|
|
d55f016568 | ||
|
|
c5b8f1ee40 | ||
|
|
d1e9a761d2 | ||
|
|
cd9081b16d | ||
|
|
b483dff617 | ||
|
|
23ee1daac0 | ||
|
|
3877f15b68 | ||
|
|
b22a40598f | ||
|
|
0f17a2c45c | ||
|
|
b56cefc4b7 | ||
|
|
e5243be866 | ||
|
|
f27381533c | ||
|
|
7aa3ce8a4d | ||
|
|
fa6a73ec5e | ||
|
|
fbecc5860d | ||
|
|
c228ab2da1 | ||
|
|
75ed995b00 | ||
|
|
94cc5465f1 | ||
|
|
c3521b4d25 | ||
|
|
1f09fbc1ef | ||
|
|
1e87666487 | ||
|
|
5cee8ed086 | ||
|
|
71c7944eab | ||
|
|
3c0c36d11c | ||
|
|
2f2018f9ee | ||
|
|
d76524f03f | ||
|
|
466aa76642 | ||
|
|
d2eb007d57 | ||
|
|
4f50fdc94e | ||
|
|
5e9570c946 | ||
|
|
f9973bc2c5 | ||
|
|
e3d55b3c5b | ||
|
|
13e8189b80 | ||
|
|
88a29dc7e2 | ||
|
|
914425e526 | ||
|
|
0eef794824 | ||
|
|
d6c6e0785e | ||
|
|
f7e546e78c | ||
|
|
9ab2092fd7 | ||
|
|
c219600a17 | ||
|
|
4faaa5e6ee | ||
|
|
78eb3b464f | ||
|
|
783f533a15 | ||
|
|
bb75f93500 | ||
|
|
8e6d69dc9f | ||
|
|
6d0933d27c | ||
|
|
38ed01f61f | ||
|
|
31869bfbd1 | ||
|
|
266bfeb9e2 | ||
|
|
b100915eba | ||
|
|
2ba6f9a5e4 | ||
|
|
719c1687e2 | ||
|
|
756129fff2 | ||
|
|
6e1856cb55 | ||
|
|
a8b7522f9d | ||
|
|
510f0c3242 | ||
|
|
90a6c53ad5 | ||
|
|
fa4161eaae | ||
|
|
4e1952057c | ||
|
|
0ba336647c | ||
|
|
ca46e06966 | ||
|
|
f063e87f06 | ||
|
|
71fd381c3c | ||
|
|
4c3081d654 | ||
|
|
89b9eb0ebe | ||
|
|
6b34eb5322 | ||
|
|
b16a6052cb | ||
|
|
586921fa4d | ||
|
|
09034d87b7 | ||
|
|
7dfce56fbb | ||
|
|
311f651d12 | ||
|
|
8b78fe98aa | ||
|
|
5fa35342fd | ||
|
|
5ebb490a8d | ||
|
|
099dbb4046 | ||
|
|
15a835af20 | ||
|
|
bd6ccbd451 | ||
|
|
e56d4cc1b9 | ||
|
|
77bfddd0e1 | ||
|
|
4b48ba1004 | ||
|
|
bdfae96095 | ||
|
|
883607e1d4 | ||
|
|
3808f7eb28 | ||
|
|
1263b2ed48 | ||
|
|
4981b0b3e4 | ||
|
|
684f5b44ee |
No files matched your search
+4
-3
@@ -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
|
||||
@@ -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
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
- 'localization/**'
|
||||
- 'resources/**'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'flatpak/**'
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -28,7 +28,10 @@ on:
|
||||
- 'build_linux.sh'
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
- 'flatpak/**'
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
schedule:
|
||||
- cron: '35 7 * * *' # run once a day near midnight US Pacific time
|
||||
|
||||
workflow_dispatch: # allows for manual dispatch
|
||||
inputs:
|
||||
@@ -60,6 +63,7 @@ jobs:
|
||||
os: ${{ matrix.os }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
force-build: ${{ github.event_name == 'schedule' }}
|
||||
secrets: inherit
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
@@ -87,7 +91,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 +107,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 +123,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
|
||||
@@ -12,6 +12,9 @@ on:
|
||||
build-deps-only:
|
||||
required: false
|
||||
type: boolean
|
||||
force-build:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
check_cache: # determines if there is a cache and outputs variables used in caching process
|
||||
@@ -23,7 +26,7 @@ jobs:
|
||||
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
@@ -56,4 +59,5 @@ jobs:
|
||||
os: ${{ inputs.os }}
|
||||
arch: ${{ inputs.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only }}
|
||||
force-build: ${{ inputs.force-build }}
|
||||
secrets: inherit
|
||||
@@ -19,11 +19,14 @@ on:
|
||||
build-deps-only:
|
||||
required: false
|
||||
type: boolean
|
||||
force-build:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build_deps:
|
||||
name: Build Deps
|
||||
if: inputs.build-deps-only || inputs.valid-cache != true
|
||||
if: inputs.build-deps-only || inputs.force-build || inputs.valid-cache != true
|
||||
runs-on: ${{ inputs.os }}
|
||||
env:
|
||||
date:
|
||||
@@ -31,7 +34,7 @@ jobs:
|
||||
|
||||
# Setup the environment
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
@@ -139,7 +142,7 @@ jobs:
|
||||
build_orca:
|
||||
name: Build OrcaSlicer
|
||||
needs: [build_deps]
|
||||
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success()) }}
|
||||
if: ${{ !cancelled() && !inputs.build-deps-only && inputs.force-build || (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success()) }}
|
||||
uses: ./.github/workflows/build_orca.yml
|
||||
with:
|
||||
cache-key: ${{ inputs.cache-key }}
|
||||
|
||||
@@ -22,10 +22,11 @@ jobs:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
@@ -124,16 +125,20 @@ jobs:
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app
|
||||
fi
|
||||
|
||||
# Create main OrcaSlicer DMG
|
||||
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
# Create main OrcaSlicer DMG without the profile validator helper
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
@@ -153,14 +158,18 @@ jobs:
|
||||
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
@@ -186,7 +195,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 +206,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 +226,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 +282,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 +293,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 +304,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
|
||||
|
||||
@@ -317,7 +326,7 @@ jobs:
|
||||
- name: Install dependencies from build_linux.sh
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
shell: bash
|
||||
run: sudo ./build_linux.sh -ur
|
||||
run: sudo env "ORCA_UPDATER_SIG_KEY=$ORCA_UPDATER_SIG_KEY" ./build_linux.sh -ur
|
||||
|
||||
- name: Fix permissions
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
@@ -336,7 +345,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 +369,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 +380,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 +400,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
|
||||
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.sh'
|
||||
- 'scripts/linux.d/*'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.sh'
|
||||
- 'scripts/linux.d/*'
|
||||
schedule:
|
||||
- cron: '55 7 * * *' # run once a day near midnight US Pacific time
|
||||
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
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Shellcheck scripts
|
||||
run: 'find . -not -name \*.md \( -path ./scripts/linux.d/\* -o -name \*.sh \) -print0 | xargs -0 ~/shellcheck'
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
@@ -1,6 +1,8 @@
|
||||
Build
|
||||
Build.bat
|
||||
/build*/
|
||||
CMakeLists.txt.user
|
||||
**/CMakeLists.txt.autosave
|
||||
deps/build*
|
||||
MYMETA.json
|
||||
MYMETA.yml
|
||||
@@ -17,6 +19,7 @@ xs/assertlib*
|
||||
local-lib
|
||||
/src/TAGS
|
||||
/.vscode/
|
||||
/.vscode
|
||||
build-linux/*
|
||||
deps/build*/*
|
||||
**/.DS_Store
|
||||
@@ -35,3 +38,4 @@ src/OrcaSlicer-doc/
|
||||
**/.flatpak-builder/
|
||||
resources/profiles/user/default
|
||||
*.code-workspace
|
||||
deps_src/build/
|
||||
@@ -0,0 +1,23 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
OrcaSlicer’s C++17 sources live in `src/`, split by feature modules and platform adapters. User assets, icons, and printer presets are in `resources/`; translations stay in `localization/`. Tests sit in `tests/`, grouped by domain (`libslic3r/`, `sla_print/`, etc.) with fixtures under `tests/data/`. CMake helpers reside in `cmake/`, and longer references in `doc/` and `SoftFever_doc/`. Automation scripts belong in `scripts/` and `tools/`. Treat everything in `deps/` and `deps_src/` as vendored snapshots—do not modify without mirroring upstream tags.
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
Use out-of-source builds:
|
||||
- `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release` configures dependencies and generates build files.
|
||||
- `cmake --build build --target OrcaSlicer --config Release` compiles the app; add `--parallel` to speed up.
|
||||
- `cmake --build build --target tests` then `ctest --test-dir build --output-on-failure` runs automated suites.
|
||||
Platform helpers such as `build_linux.sh`, `build_release_macos.sh`, and `build_release_vs2022.bat` wrap the same flow with toolchain flags. Use `build_release_macos.sh -sx` when reproducing macOS build issues, and `scripts/DockerBuild.sh` for reproducible container builds.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
`.clang-format` enforces 4-space indents, a 140-column limit, aligned initializers, and brace wrapping for classes and functions. Run `clang-format -i <file>` before committing; the CMake `clang-format` target is available when LLVM tools are on your PATH. Prefer `CamelCase` for classes, `snake_case` for functions and locals, and `SCREAMING_CASE` for constants, matching conventions in `src/`. Keep headers self-contained and align include order with the IWYU pragmas.
|
||||
|
||||
## Testing Guidelines
|
||||
Unit tests rely on Catch2 (`tests/catch2/`). Name specs after the component under test—for example `tests/libslic3r/TestPlanarHole.cpp`—and tag long-running cases so `ctest -L fast` remains useful. Cover new algorithms with deterministic fixtures or sample G-code stored in `tests/data/`. Document manual printer validation or regression slicer checks in your PR when automated coverage is insufficient.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
The history favors concise, sentence-style subject lines with optional issue references, e.g., `Fix grid lines origin for multiple plates (#10724)`. Squash fixups locally before opening a PR. Complete `.github/pull_request_template.md`, include reproduction steps or screenshots for UI changes, and mention impacted presets or translations. Link issues via `Closes #NNNN` when applicable, and call out dependency bumps or profile migrations for maintainer review.
|
||||
|
||||
## Security & Configuration Tips
|
||||
Follow `SECURITY.md` for vulnerability reporting. Keep API tokens and printer credentials out of tracked configs; use `sandboxes/` for experimental settings. When touching third-party code in `deps_src/`, record the upstream commit or release in your PR description and run the relevant platform build script to confirm integration.
|
||||
@@ -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__
|
||||
@@ -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
|
||||
+10
-13
@@ -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.
@@ -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
|
||||

|
||||
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
|
||||
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
|
||||

|
||||
</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.
|
||||
Executable
+341
@@ -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
|
||||
+115
-66
@@ -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,14 @@ 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}
|
||||
# shellcheck source=/dev/null
|
||||
source "./scripts/linux.d/${DISTRIBUTION}"
|
||||
fi
|
||||
|
||||
echo "FOUND_GTK3=${FOUND_GTK3}"
|
||||
@@ -139,71 +152,107 @@ 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
|
||||
|
||||
export CMAKE_C_CXX_COMPILER_CLANG=""
|
||||
export CMAKE_C_CXX_COMPILER_CLANG=()
|
||||
if [[ -n "${USE_CLANG}" ]] ; then
|
||||
export CMAKE_C_CXX_COMPILER_CLANG="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
|
||||
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"
|
||||
read -r -a BUILD_ARGS <<< "${DEPS_EXTRA_BUILD_ARGS}"
|
||||
BUILD_ARGS+=(-DDEP_WX_GTK3=ON)
|
||||
if [[ -n "${CLEAN_BUILD}" ]]
|
||||
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
|
||||
set -x
|
||||
cmake -S deps -B deps/build/release "${CMAKE_C_CXX_COMPILER_CLANG[@]}" "${CMAKE_LLD_LINKER_ARGS[@]}" -G Ninja \
|
||||
-DSLIC3R_PCH="${SLIC3R_PRECOMPILED_HEADERS}" \
|
||||
-DDESTDIR="${SCRIPT_PATH}/deps/build/destdir" \
|
||||
-DDEP_DOWNLOAD_DIR="${SCRIPT_PATH}/deps/DL_CACHE" \
|
||||
"${COLORED_OUTPUT}" \
|
||||
"${BUILD_ARGS[@]}"
|
||||
set +x
|
||||
cmake --build deps/build/release
|
||||
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
|
||||
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}
|
||||
set -x
|
||||
cmake -S deps -B deps/build "${CMAKE_C_CXX_COMPILER_CLANG[@]}" "${CMAKE_LLD_LINKER_ARGS[@]}" -G Ninja \
|
||||
-DSLIC3R_PCH="${SLIC3R_PRECOMPILED_HEADERS}" \
|
||||
-DDESTDIR="${SCRIPT_PATH}/deps/build/destdir" \
|
||||
-DDEP_DOWNLOAD_DIR="${SCRIPT_PATH}/deps/DL_CACHE" \
|
||||
"${COLORED_OUTPUT}" \
|
||||
"${BUILD_ARGS[@]}"
|
||||
set +x
|
||||
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}"
|
||||
read -r -a BUILD_ARGS <<< "${ORCA_EXTRA_BUILD_ARGS}"
|
||||
if [[ -n "${FOUND_GTK3_DEV}" ]] ; then
|
||||
BUILD_ARGS="${BUILD_ARGS} -DSLIC3R_GTK=3"
|
||||
BUILD_ARGS+=(-DSLIC3R_GTK=3)
|
||||
fi
|
||||
if [[ -n "${BUILD_DEBUG}" ]] ; then
|
||||
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug -DBBL_INTERNAL_TESTING=1"
|
||||
BUILD_ARGS+=(-DCMAKE_BUILD_TYPE=Debug -DBBL_INTERNAL_TESTING=1)
|
||||
else
|
||||
BUILD_ARGS="${BUILD_ARGS} -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0"
|
||||
BUILD_ARGS+=(-DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0)
|
||||
fi
|
||||
if [[ -n "${BUILD_TESTS}" ]] ; then
|
||||
BUILD_ARGS+=(-DBUILD_TESTS=ON)
|
||||
fi
|
||||
if [[ -n "${ORCA_UPDATER_SIG_KEY}" ]] ; then
|
||||
BUILD_ARGS+=(-DORCA_UPDATER_SIG_KEY="${ORCA_UPDATER_SIG_KEY}")
|
||||
fi
|
||||
|
||||
CMAKE_CMD="cmake -S . -B build ${CMAKE_C_CXX_COMPILER_CLANG} -G Ninja \
|
||||
-DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} \
|
||||
-DCMAKE_PREFIX_PATH="${SCRIPT_PATH}/deps/build/destdir/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DORCA_TOOLS=ON \
|
||||
${COLORED_OUTPUT} \
|
||||
${BUILD_ARGS}"
|
||||
echo -e "${CMAKE_CMD}"
|
||||
${CMAKE_CMD}
|
||||
echo "Configuring OrcaSlicer..."
|
||||
set -x
|
||||
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" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DORCA_TOOLS=ON \
|
||||
"${COLORED_OUTPUT}" \
|
||||
"${BUILD_ARGS[@]}"
|
||||
set +x
|
||||
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
|
||||
|
||||
|
||||
+4
-2
@@ -24,6 +24,8 @@ cd deps
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
set DEPS=%CD%/OrcaSlicer_dep
|
||||
set "SIG_FLAG="
|
||||
if defined ORCA_UPDATER_SIG_KEY set "SIG_FLAG=-DORCA_UPDATER_SIG_KEY=%ORCA_UPDATER_SIG_KEY%"
|
||||
if "%1"=="slicer" (
|
||||
GOTO :slicer
|
||||
)
|
||||
@@ -42,9 +44,9 @@ mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
|
||||
echo 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%
|
||||
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 .. -G "Visual Studio 16 2019" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 %SIG_FLAG% -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%
|
||||
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
while getopts ":dpa:snt:xbc:h" opt; do
|
||||
while getopts ":dpa:snt:xbc:1h" opt; do
|
||||
case "${opt}" in
|
||||
d )
|
||||
export BUILD_TARGET="deps"
|
||||
@@ -174,6 +174,7 @@ function build_slicer() {
|
||||
-G "${SLICER_CMAKE_GENERATOR}" \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DORCA_TOOLS=ON \
|
||||
${ORCA_UPDATER_SIG_KEY:+-DORCA_UPDATER_SIG_KEY="$ORCA_UPDATER_SIG_KEY"} \
|
||||
-DCMAKE_PREFIX_PATH="$DEPS/usr/local" \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
|
||||
@@ -189,7 +190,7 @@ function build_slicer() {
|
||||
echo "Verify localization with gettext..."
|
||||
(
|
||||
cd "$PROJECT_DIR"
|
||||
./run_gettext.sh
|
||||
./scripts/run_gettext.sh
|
||||
)
|
||||
|
||||
echo "Fix macOS app package..."
|
||||
|
||||
@@ -38,6 +38,8 @@ cd deps
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
set DEPS=%CD%/OrcaSlicer_dep
|
||||
set "SIG_FLAG="
|
||||
if defined ORCA_UPDATER_SIG_KEY set "SIG_FLAG=-DORCA_UPDATER_SIG_KEY=%ORCA_UPDATER_SIG_KEY%"
|
||||
|
||||
if "%1"=="slicer" (
|
||||
GOTO :slicer
|
||||
@@ -58,10 +60,10 @@ mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
|
||||
echo on
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DORCA_TOOLS=ON -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=%build_type% -DWIN10SDK_PATH="%WindowsSdkDir%Include\%WindowsSDKVersion%\"
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=%build_type% -DWIN10SDK_PATH="%WindowsSdkDir%Include\%WindowsSDKVersion%\"
|
||||
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%
|
||||
@@ -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)
|
||||
|
||||
Vendored
+1
-1
@@ -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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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,8 @@ add_library(Shiny STATIC
|
||||
ShinyZone.c
|
||||
ShinyZone.h
|
||||
)
|
||||
|
||||
target_include_directories(Shiny SYSTEM
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,23 @@
|
||||
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 SYSTEM
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
)
|
||||
|
||||
target_link_libraries(admesh
|
||||
PRIVATE boost_headeronly
|
||||
PUBLIC eigen
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,36 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(agg)
|
||||
|
||||
add_library(agg INTERFACE)
|
||||
|
||||
target_include_directories(agg SYSTEM
|
||||
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
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(ankerl)
|
||||
|
||||
add_library(ankerl INTERFACE)
|
||||
|
||||
target_include_directories(ankerl SYSTEM
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(ankerl INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unordered_dense.h
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
@@ -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,12 @@ add_library(clipper STATIC
|
||||
clipper_z.hpp
|
||||
)
|
||||
|
||||
target_link_libraries(clipper TBB::tbb TBB::tbbmalloc)
|
||||
target_include_directories(clipper SYSTEM
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(clipper
|
||||
PUBLIC eigen
|
||||
PRIVATE TBB::tbb TBB::tbbmalloc
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(eigen)
|
||||
|
||||
add_library(eigen INTERFACE)
|
||||
|
||||
target_include_directories(eigen SYSTEM
|
||||
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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 8427 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user