Compare commits
82 Commits
v2.3.0
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a42aed683 | ||
|
|
989fab03c0 | ||
|
|
ffe91cc718 | ||
|
|
1a6a1b4964 | ||
|
|
90cfdbf37c | ||
|
|
40f678006d | ||
|
|
3cda86827f | ||
|
|
9e8efa510d | ||
|
|
8a03dd1b09 | ||
|
|
9f6f40ac96 | ||
|
|
51cd5a2237 | ||
|
|
0ca6822406 | ||
|
|
cf0d5de649 | ||
|
|
6902098b37 | ||
|
|
ea760432ae | ||
|
|
cb537a42b1 | ||
|
|
65ac5cebf6 | ||
|
|
002208fc8c | ||
|
|
77b6225060 | ||
|
|
08d938b8e7 | ||
|
|
54ab738323 | ||
|
|
b2ce4c1880 | ||
|
|
6b1c1a6b6b | ||
|
|
b624aa0580 | ||
|
|
cc593f99f8 | ||
|
|
1e0b5b5c68 | ||
|
|
9d26cbf80f | ||
|
|
89f23b76be | ||
|
|
38087db380 | ||
|
|
d165b6b2c5 | ||
|
|
766d1a4fca | ||
|
|
b62ce6095d | ||
|
|
7b43991a36 | ||
|
|
90c88a4c41 | ||
|
|
0a223c5f0e | ||
|
|
2f4549441b | ||
|
|
bf8deb95cd | ||
|
|
bd23b9c5b7 | ||
|
|
7ddaa8d383 | ||
|
|
2511360495 | ||
|
|
ef8e4e4bfb | ||
|
|
2ca195f6e1 | ||
|
|
f8de5891f9 | ||
|
|
3da54f39da | ||
|
|
08577429ac | ||
|
|
5a14fa2581 | ||
|
|
b4633dc863 | ||
|
|
fbea2072f9 | ||
|
|
0d49816796 | ||
|
|
696778e8e2 | ||
|
|
9b1f7ed928 | ||
|
|
3364fc4d4c | ||
|
|
a5f1bf7fa8 | ||
|
|
781b187e40 | ||
|
|
8e49fa1ade | ||
|
|
3607d805c7 | ||
|
|
b46f46f47d | ||
|
|
08b1447276 | ||
|
|
bd700071f2 | ||
|
|
9208767b18 | ||
|
|
3537bd29ae | ||
|
|
90aa9b1268 | ||
|
|
7101f5ba53 | ||
|
|
f92cce494a | ||
|
|
a9c0e3a1c5 | ||
|
|
6060777dd0 | ||
|
|
08ba3af15d | ||
|
|
1a9332f91f | ||
|
|
3f9fa08c92 | ||
|
|
bc76677e51 | ||
|
|
cd029a3727 | ||
|
|
f82b50f521 | ||
|
|
8396fc0622 | ||
|
|
e1c9915d49 | ||
|
|
0de3b0352d | ||
|
|
5b3b064954 | ||
|
|
485e1ccc49 | ||
|
|
fedd2bd1d0 | ||
|
|
2436988e4d | ||
|
|
38b22fcee6 | ||
|
|
0b0fd2f518 | ||
|
|
0fa5100933 |
@@ -1,2 +0,0 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE}
|
||||
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"name": "OrcaSlicer",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
"PLATFORM": "linux/amd64",
|
||||
"BASE_IMAGE": "mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04"
|
||||
},
|
||||
"options": ["--platform=linux/amd64"]
|
||||
},
|
||||
"runArgs": ["--env-file", "/tmp/devcontainer.env"],
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/desktop-lite:1": {
|
||||
"password": "orca"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"cmake.configureArgs": [
|
||||
"-DSLIC3R_GTK=3",
|
||||
"-DBBL_RELEASE_TO_PUBLIC=1",
|
||||
"-DBBL_INTERNAL_TESTING=0",
|
||||
"-DSLIC3R_STATIC=1",
|
||||
"-DCMAKE_PREFIX_PATH=${workspaceFolder}/deps/build/destdir/usr/local"
|
||||
],
|
||||
"cmake.buildToolArgs": [
|
||||
"-l${containerEnv:CORES}"
|
||||
]
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"forwardPorts": [6080],
|
||||
"portsAttributes": {
|
||||
"6080": {
|
||||
"label": "VNC web client (noVNC)",
|
||||
"onAutoForward": "silent"
|
||||
}
|
||||
},
|
||||
"otherPortsAttributes": {
|
||||
"onAutoForward": "ignore"
|
||||
},
|
||||
|
||||
"initializeCommand": {
|
||||
"Setup Temporary Env File": "echo \"CORES=`nproc --all`\" > /tmp/devcontainer.env"
|
||||
},
|
||||
"onCreateCommand": {
|
||||
"Set postCreate executable flag": "chmod +x .devcontainer/postCreate.sh"
|
||||
},
|
||||
"postCreateCommand": "sudo .devcontainer/postCreate.sh"
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Update and upgrade all system packages
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
echo "-----------------------------------------"
|
||||
echo "Running BuildLinux.sh with update flag..."
|
||||
echo "-----------------------------------------"
|
||||
./BuildLinux.sh -u
|
||||
|
||||
echo "------------------------------"
|
||||
echo "Installing missing packages..."
|
||||
echo "------------------------------"
|
||||
apt install -y libgl1-mesa-dev m4 autoconf libtool
|
||||
0
.gitattributes
vendored
1
.github/FUNDING.yml
vendored
@@ -1,3 +1,2 @@
|
||||
github: SoftFever
|
||||
ko_fi: SoftFever
|
||||
custom: https://paypal.me/softfever3d
|
||||
|
||||
55
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,58 +1,36 @@
|
||||
name: 🐞 Bug Report
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
labels: ["bug"]
|
||||
labels: bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Thank you for using Orca Slicer and wanting to report a bug.**
|
||||
|
||||
Please note that this is not the place to make feature requests or ask for help.
|
||||
For this, please use the [Feature request](https://github.com/SoftFever/OrcaSlicer/issues/new?assignees=&labels=&projects=&template=feature_request.yml) issue type or you can discuss your idea on our [Discord server](https://discord.gg/P4VE9UY9gJ) with others.
|
||||
|
||||
Before filing, please check if the issue already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this problem?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: OrcaSlicer Version
|
||||
description: Which version of Orca Slicer are you running? You can see the full version in `Help` -> `About Orca Slicer`.
|
||||
placeholder: e.g. 1.9.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os_type
|
||||
attributes:
|
||||
label: "Operating System (OS)"
|
||||
description: "What OSes are you are experiencing issues on?"
|
||||
multiple: true
|
||||
options:
|
||||
- Linux
|
||||
- macOS
|
||||
- Windows
|
||||
placeholder: e.g. 1.6.6
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os_version
|
||||
id: os_info
|
||||
attributes:
|
||||
label: "OS Version"
|
||||
description: "What OS version does this relate to?"
|
||||
placeholder: "i.e. OS: Windows 7/8/10/11 ..., Ubuntu 22.04/Fedora 36 ..., macOS 10.15/11.1/12.3 ..."
|
||||
label: OS version
|
||||
description: Which OS version are you using?
|
||||
placeholder: |
|
||||
OS: Windows 7/8/10/11 ... , Ubuntu 22.04/Fedora 36 ... , macOS 10.15/11.1/12.3 ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: system_info
|
||||
attributes:
|
||||
label: Additional system information
|
||||
description: For the performance issue, please also show the CPU, Memory information; For the 3D Rendering issue, please also show the Display Card information.
|
||||
description: For the performance issue, please also show the CPU、Memory information; For the 3D Rendering issue, please also show the Display Card information.
|
||||
placeholder: |
|
||||
CPU: 11th gen Intel r core tm i7-1185g7/AMD Ryzen 7 6800h/...
|
||||
CPU: 11th gen intel r core tm i7-1185g7/amd ryzen 7 6800h/...
|
||||
Memory: 32/16 GB...
|
||||
Display Card: NVIDIA Quadro P400/...
|
||||
validations:
|
||||
@@ -72,8 +50,8 @@ body:
|
||||
description: Please described the detailed steps to reproduce this issue
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
@@ -122,12 +100,3 @@ body:
|
||||
options:
|
||||
- label: Log file
|
||||
- label: Project file
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Screenshots? References? Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Community Support (Discord channel)
|
||||
url: https://discord.gg/P4VE9UY9gJ
|
||||
about: Please ask and answer support "how do I?"questions here.
|
||||
- name: Discussion Forum
|
||||
url: https://github.com/SoftFever/OrcaSlicer/discussions
|
||||
about: Please raise ideas and feature suggestions here.
|
||||
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Which printers will be beneficial to this feature**
|
||||
E.g. Voron/Klipper based printer/etc...
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
66
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,66 +0,0 @@
|
||||
name: 🚀 Feature Request / Enhancement
|
||||
description: Suggest an improvement to make Orca Slicer even better!
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
|
||||
If your idea is still at the formulation stage, or you're not sure it would
|
||||
be useful to many users, you can raise it as a discussion topic under [Ideas](https://github.com/SoftFever/OrcaSlicer/discussions/categories/ideas)
|
||||
or you can raise it on the [Discord server](https://discord.gg/P4VE9UY9gJ).
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this feature request?
|
||||
description: |
|
||||
Please search to see if an issue already exists for a feature, or perhaps one similar.
|
||||
You can then comment and react so that we know know much interest there is in the feature request.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: A clear and concise description of what the problem is.
|
||||
placeholder: I'm always frustrated when [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Which printers will be beneficial to this feature?
|
||||
description: Select affected printer firmware type.
|
||||
multiple: true
|
||||
options:
|
||||
- Klipper
|
||||
- Marlin
|
||||
- Others
|
||||
- All
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
placeholder: It should do [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
placeholder: |
|
||||
1. [...]
|
||||
2. [...]
|
||||
3. [...]
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: |
|
||||
Add any other context, diagrams, illustations or screenshots about the feature request here.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
18
.github/dependabot.yml
vendored
@@ -1,18 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Only care about major updates to github actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
ignore: # Only suggest major updates for built-in actions
|
||||
- dependency-name: "github/*"
|
||||
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
|
||||
- dependency-name: "actions/*"
|
||||
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
|
||||
# Docker dependencies
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
# no support for c/cpp
|
||||
21
.github/pull_request_template.md
vendored
@@ -1,21 +0,0 @@
|
||||
# Description
|
||||
|
||||
<!--
|
||||
> Please provide a summary of the changes made in this PR. Include details such as:
|
||||
> * What issue does this PR address or fix?
|
||||
> * What new features or enhancements does this PR introduce?
|
||||
> * Are there any breaking changes or dependencies that need to be considered?
|
||||
-->
|
||||
|
||||
# Screenshots/Recordings/Graphs
|
||||
|
||||
<!--
|
||||
> Please attach relevant screenshots to showcase the UI changes.
|
||||
> Please attach images that can help explain the changes.
|
||||
-->
|
||||
|
||||
## Tests
|
||||
|
||||
<!--
|
||||
> Please describe the tests that you have conducted to verify the changes made in this PR.
|
||||
-->
|
||||
71
.github/workflows/build_all.yml
vendored
@@ -24,9 +24,6 @@ on:
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'BuildLinux.sh'
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
|
||||
workflow_dispatch: # allows for manual dispatch
|
||||
inputs:
|
||||
@@ -48,76 +45,14 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-24.04
|
||||
- os: windows-latest
|
||||
- os: macos-14
|
||||
- os: macos-12
|
||||
arch: x86_64
|
||||
- os: macos-14
|
||||
- os: macos-12
|
||||
arch: arm64
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ matrix.os }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-46
|
||||
options: --privileged
|
||||
volumes:
|
||||
- /usr/local/lib/android:/usr/local/lib/android
|
||||
- /usr/share/dotnet:/usr/share/dotnet
|
||||
- /opt/ghc:/opt/ghc1
|
||||
- /usr/local/share/boost:/usr/local/share/boost1
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.variant.runner }}
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
steps:
|
||||
- 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
|
||||
- name: Get the version and date
|
||||
run: |
|
||||
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
ver="PR-${{ github.event.number }}"
|
||||
else
|
||||
ver=V$ver_pure
|
||||
fi
|
||||
echo "ver=$ver" >> $GITHUB_ENV
|
||||
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
- 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
|
||||
cache: true
|
||||
arch: ${{ matrix.variant.arch }}
|
||||
upload-artifact: false
|
||||
- name: Upload artifacts Flatpak
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
path: '/__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak'
|
||||
- name: Deploy Flatpak to nightly release
|
||||
if: ${{github.ref == 'refs/heads/main'}}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
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_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
|
||||
secrets: inherit
|
||||
14
.github/workflows/build_check_cache.yml
vendored
@@ -23,24 +23,22 @@ jobs:
|
||||
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: 'true'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: set outputs
|
||||
id: set_outputs
|
||||
env:
|
||||
underscore-arch: ${{ inputs.os == 'macos-14' && '_' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing
|
||||
dash-arch: ${{ inputs.os == 'macos-14' && '-' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing
|
||||
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-14') && 'OrcaSlicer_dep' || 'destdir' }}
|
||||
underscore-arch: ${{ inputs.os == 'macos-12' && '_' || ''}}${{ inputs.os == 'macos-12' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing
|
||||
dash-arch: ${{ inputs.os == 'macos-12' && '-' || ''}}${{ inputs.os == 'macos-12' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing
|
||||
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-12') && 'OrcaSlicer_dep' || 'destdir' }}
|
||||
output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
||||
run: |
|
||||
echo cache-key=${{ inputs.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
|
||||
echo cache-key=${{ runner.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
|
||||
echo cache-path=${{ github.workspace }}/deps/build${{ env.underscore-arch }}/${{ env.dep-folder-name }}${{ env.underscore-arch }} >> ${{ env.output-cmd }}
|
||||
|
||||
- name: load cache
|
||||
id: cache_deps
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||
key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||
|
||||
67
.github/workflows/build_deps.yml
vendored
@@ -28,79 +28,67 @@ jobs:
|
||||
env:
|
||||
date:
|
||||
steps:
|
||||
|
||||
|
||||
# Setup the environment
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: load cached deps
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ inputs.cache-path }}
|
||||
key: ${{ inputs.cache-key }}
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
|
||||
|
||||
- name: setup dev on Windows
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Get the date on Ubuntu and macOS
|
||||
if: inputs.os != 'windows-latest'
|
||||
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
|
||||
- name: Get the date on Windows
|
||||
if: inputs.os == 'windows-latest'
|
||||
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
shell: pwsh
|
||||
|
||||
|
||||
|
||||
# Build Dependencies
|
||||
- name: Build on Windows
|
||||
if: inputs.os == 'windows-latest'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
choco install strawberryperl
|
||||
mkdir ${{ github.workspace }}/deps/build
|
||||
mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
||||
.\build_release_vs2022.bat deps
|
||||
.\build_release_vs2022.bat pack
|
||||
cd ${{ github.workspace }}/deps/build
|
||||
|
||||
- name: Build on Mac ${{ inputs.arch }}
|
||||
if: inputs.os == 'macos-14'
|
||||
if: inputs.os == 'macos-12'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
brew install automake texinfo ninja libtool
|
||||
brew install cmake git gettext automake texinfo
|
||||
brew list
|
||||
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
|
||||
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
|
||||
brew uninstall --ignore-dependencies zstd
|
||||
./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 -1
|
||||
./build_release_macos.sh -dp -a ${{ inputs.arch }} -t 10.15
|
||||
brew install zstd
|
||||
|
||||
|
||||
- name: Install Ubuntu Build Dependencies
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
- name: Build on Ubuntu
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
|
||||
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
|
||||
run: |
|
||||
${{ env.apt-cmd }} update
|
||||
${{ env.apt-cmd }} install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
|
||||
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
|
||||
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \
|
||||
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.0-dev \
|
||||
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
|
||||
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo
|
||||
|
||||
- name: Build on Ubuntu
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/deps/build
|
||||
mkdir -p ${{ github.workspace }}/deps/build/destdir
|
||||
sudo ./BuildLinux.sh -ur
|
||||
@@ -108,32 +96,30 @@ jobs:
|
||||
./BuildLinux.sh -dr
|
||||
cd deps/build
|
||||
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
|
||||
|
||||
|
||||
|
||||
|
||||
# Upload Artifacts
|
||||
- name: Upload Mac ${{ inputs.arch }} artifacts
|
||||
if: inputs.os == 'macos-14'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: inputs.os == 'macos-12'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
|
||||
path: ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep*.tar.gz
|
||||
|
||||
- name: Upload Windows artifacts
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_dep_win64_${{ env.date }}
|
||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
|
||||
|
||||
- name: Upload Ubuntu artifacts
|
||||
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
|
||||
env:
|
||||
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
|
||||
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
|
||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
|
||||
|
||||
|
||||
build_orca:
|
||||
name: Build OrcaSlicer
|
||||
needs: [build_deps]
|
||||
@@ -145,3 +131,4 @@ jobs:
|
||||
os: ${{ inputs.os }}
|
||||
arch: ${{ inputs.arch }}
|
||||
secrets: inherit
|
||||
|
||||
|
||||
185
.github/workflows/build_orca.yml
vendored
@@ -21,36 +21,23 @@ jobs:
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: 'true'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: load cached deps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ inputs.cache-path }}
|
||||
key: ${{ inputs.cache-key }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
|
||||
|
||||
- name: Get the version and date on Ubuntu and macOS
|
||||
if: inputs.os != 'windows-latest'
|
||||
run: |
|
||||
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
ver="PR-${{ github.event.number }}"
|
||||
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
||||
ver="nightly$(date +'%y%m%d')"
|
||||
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
ver="PR${{ github.event.number }}"
|
||||
else
|
||||
ver=V$ver_pure
|
||||
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
ver=V$ver
|
||||
fi
|
||||
echo "ver=$ver" >> $GITHUB_ENV
|
||||
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
@@ -61,8 +48,10 @@ jobs:
|
||||
$ref = "${{ github.ref }}"
|
||||
$eventName = "${{ github.event_name }}"
|
||||
$prNumber = "${{ github.event.number }}"
|
||||
|
||||
if ($eventName -eq 'pull_request') {
|
||||
|
||||
if ($ref -eq 'refs/heads/main') {
|
||||
$ver = "nightly" + $date.Substring(2)
|
||||
} elseif ($eventName -eq 'pull_request') {
|
||||
$ver = "PR" + $prNumber
|
||||
} else {
|
||||
$versionContent = Get-Content version.inc -Raw
|
||||
@@ -71,38 +60,37 @@ jobs:
|
||||
}
|
||||
$ver = "V$ver"
|
||||
}
|
||||
|
||||
|
||||
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "date=$date" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "date: ${{ env.date }} version: ${{ env.ver }}"
|
||||
shell: pwsh
|
||||
|
||||
|
||||
- name: load cached deps
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ inputs.cache-path }}
|
||||
key: ${{ inputs.cache-key }}
|
||||
|
||||
# Mac
|
||||
- name: Install tools mac
|
||||
if: inputs.os == 'macos-14'
|
||||
if: inputs.os == 'macos-12'
|
||||
run: |
|
||||
brew install ninja libtool
|
||||
brew install cmake git gettext tree
|
||||
brew list
|
||||
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}
|
||||
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}}
|
||||
|
||||
- name: Free disk space
|
||||
if: inputs.os == 'macos-14'
|
||||
run: |
|
||||
df -hI /dev/disk3s1s1
|
||||
sudo find /Applications -maxdepth 1 -type d -name "Xcode_*.app" ! -name "Xcode_15.4.app" -exec rm -rf {} +
|
||||
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
|
||||
df -hI /dev/disk3s1s1
|
||||
tree ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}}
|
||||
|
||||
- name: Build slicer mac
|
||||
if: inputs.os == 'macos-14'
|
||||
if: inputs.os == 'macos-12'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
./build_release_macos.sh -s -n -x -a ${{inputs.arch}} -t 10.15 -1
|
||||
./build_release_macos.sh -s -n -a ${{inputs.arch}} -t 10.15
|
||||
|
||||
# Thanks to RaySajuuk, it's working now
|
||||
- name: Sign app and notary
|
||||
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-14'
|
||||
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-12'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
@@ -128,34 +116,23 @@ jobs:
|
||||
xcrun stapler staple OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
|
||||
|
||||
- name: Create DMG without notary
|
||||
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14'
|
||||
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-12'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
|
||||
|
||||
- name: Upload artifacts mac
|
||||
if: inputs.os == 'macos-14'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: inputs.os == 'macos-12'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
|
||||
|
||||
- name: Deploy Mac release
|
||||
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
|
||||
asset_name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.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
|
||||
|
||||
# Windows
|
||||
- name: setup MSVC
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Install nsis
|
||||
if: inputs.os == 'windows-latest'
|
||||
@@ -166,9 +143,6 @@ jobs:
|
||||
- name: Build slicer Win
|
||||
if: inputs.os == 'windows-latest'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
WindowsSDKVersion: '10.0.22000.0\'
|
||||
run: .\build_release_vs2022.bat slicer
|
||||
|
||||
- name: Create installer Win
|
||||
@@ -188,124 +162,59 @@ jobs:
|
||||
working-directory: ${{ github.workspace }}/build/src/Release
|
||||
shell: cmd
|
||||
run: '"C:/Program Files/7-Zip/7z.exe" a -m0=lzma2 -mx9 Debug_PDB_${{ env.ver }}_for_developers_only.7z *.pdb'
|
||||
|
||||
|
||||
- name: Upload artifacts Win zip
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}_portable
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip
|
||||
|
||||
- name: Upload artifacts Win installer
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer*.exe
|
||||
|
||||
- name: Upload artifacts Win PDB
|
||||
if: inputs.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: PDB
|
||||
path: ${{ github.workspace }}/build/src/Release/Debug_PDB_${{ env.ver }}_for_developers_only.7z
|
||||
|
||||
- name: Deploy Windows release portable
|
||||
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
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_content_type: application/x-zip-compressed
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy Windows release installer
|
||||
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
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_content_type: application/x-msdownload
|
||||
max_releases: 1
|
||||
|
||||
# Ubuntu
|
||||
- name: Install dependencies
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
env:
|
||||
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
|
||||
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
|
||||
libfuse2-pkg: ${{ (inputs.os == 'ubuntu-20.04' && 'libfuse2') || (inputs.os == 'ubuntu-24.04' && 'libfuse2t64') || '' }}
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
run: |
|
||||
${{ env.apt-cmd }} update
|
||||
${{ env.apt-cmd }} install -y autoconf build-essential cmake curl eglexternalplatform-dev \
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
|
||||
extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \
|
||||
libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \
|
||||
libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
|
||||
libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }}
|
||||
libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget
|
||||
|
||||
- name: Install dependencies from BuildLinux.sh
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
shell: bash
|
||||
run: sudo ./BuildLinux.sh -ur
|
||||
|
||||
- name: Fix permissions
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
shell: bash
|
||||
run: sudo chown $USER -R ./
|
||||
|
||||
- name: Build slicer
|
||||
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
shell: bash
|
||||
env:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
run: |
|
||||
./BuildLinux.sh -isr
|
||||
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
|
||||
- name: Build orca_custom_preset_tests
|
||||
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
|
||||
working-directory: ${{ github.workspace }}/build/src
|
||||
shell: bash
|
||||
run: |
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1
|
||||
cd ${{ github.workspace }}/resources/profiles
|
||||
zip -r orca_custom_preset_tests.zip user/
|
||||
|
||||
chmod +x ./build/OrcaSlicer_ubu64.AppImage
|
||||
|
||||
- name: Upload artifacts Ubuntu
|
||||
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
|
||||
env:
|
||||
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
if: inputs.os == 'ubuntu-20.04'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||
path: './build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
|
||||
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||
env:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
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_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 orca_custom_preset_tests
|
||||
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/resources/profiles/orca_custom_preset_tests.zip
|
||||
asset_name: orca_custom_preset_tests.zip
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1
|
||||
name: OrcaSlicer_Linux_${{ env.ver }}
|
||||
path: './build/OrcaSlicer_ubu64.AppImage'
|
||||
|
||||
2
.github/workflows/check_locale.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install gettext
|
||||
run: |
|
||||
|
||||
51
.github/workflows/check_profiles.yml
vendored
@@ -1,51 +0,0 @@
|
||||
name: Check profiles
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'resources/profiles/**'
|
||||
- ".github/workflows/check_profiles.yml"
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
|
||||
|
||||
jobs:
|
||||
check_translation:
|
||||
name: Check profiles
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run extra JSON check
|
||||
run: |
|
||||
python3 ./scripts/orca_extra_profile_check.py
|
||||
|
||||
# download
|
||||
- name: Download
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
curl -LJO https://github.com/SoftFever/Orca_tools/releases/download/1/OrcaSlicer_profile_validator
|
||||
chmod +x ./OrcaSlicer_profile_validator
|
||||
|
||||
# validate profiles
|
||||
- name: validate system profiles
|
||||
run: |
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2
|
||||
|
||||
- name: validate custom presets
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
curl -LJO https://github.com/SoftFever/OrcaSlicer/releases/download/nightly-builds/orca_custom_preset_tests.zip
|
||||
unzip ./orca_custom_preset_tests.zip -d ${{ github.workspace }}/resources/profiles
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2
|
||||
|
||||
|
||||
|
||||
|
||||
67
.github/workflows/orca_bot.yml
vendored
@@ -2,72 +2,25 @@ name: Orca bot
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write # only for delete-branch option
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
# PAT for GitHub API authentication
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Max number of operations per run
|
||||
operations-per-run: 1000
|
||||
# Order to get issues/PRs
|
||||
ascending: true
|
||||
|
||||
# ISSUES
|
||||
# Do not auto-close an issue if it is assigned to a milestone
|
||||
exempt-all-issue-milestones: true
|
||||
# Exempt all issues with assignees from stale
|
||||
exempt-all-issue-assignees: true
|
||||
# Exempt feature requests
|
||||
exempt-issue-labels: "enhancement"
|
||||
# Idle number of days before marking issues stale
|
||||
days-before-issue-stale: 90
|
||||
# Idle number of days before marking issues close
|
||||
days-before-issue-close: 7
|
||||
# Label to apply on staled issues
|
||||
operations-per-run: 1000
|
||||
stale-issue-label: "stale"
|
||||
# Issue close reason
|
||||
close-issue-reason: not_planned
|
||||
# Remove stale label from issues on updates
|
||||
remove-issue-stale-when-updated: true
|
||||
# Issue stale message
|
||||
stale-issue-message: "Orca bot: this issue is stale because it has been open for 90 days with no activity."
|
||||
# Issue closure message
|
||||
close-issue-message: "Orca bot: This issue was closed because it has been inactive for 7 days since being marked as stale."
|
||||
|
||||
# PRs
|
||||
# Do not auto-close a PR if it is assigned to a milestone
|
||||
exempt-all-pr-milestones: true
|
||||
# Exempt all PRs with assignees from stale
|
||||
exempt-all-pr-assignees: true
|
||||
# Skip the stale action for draft PRs
|
||||
exempt-draft-pr: true
|
||||
# Idle number of days before marking PRs stale
|
||||
ascending: true
|
||||
stale-issue-message: "GitHub bot: this issue is stale because it has been open for 90 days with no activity."
|
||||
close-issue-message: "GitHub bot: This issue was closed because it has been inactive for 7 days since being marked as stale."
|
||||
days-before-pr-stale: -1
|
||||
# Idle number of days before marking PRs close
|
||||
days-before-pr-close: -1
|
||||
# Label to apply on staled PRs
|
||||
stale-pr-label: "stale"
|
||||
# Label to apply on closed PRs
|
||||
close-pr-label: not_planned
|
||||
# Remove stale label from PRs on updates
|
||||
remove-pr-stale-when-updated: true
|
||||
# PR stale message
|
||||
stale-pr-message: "Orca bot: this PR is stale because it has been open for XX days with no activity."
|
||||
# PR closure message
|
||||
close-pr-message: "Orca bot: This PR was closed because it has been inactive for X days since being marked as stale."
|
||||
# Delete branch after closing a stale PR
|
||||
delete-branch: true
|
||||
remove-issue-stale-when-updated: true
|
||||
remove-pr-stale-when-updated: true
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
11
.github/workflows/publish_docs_to_wiki.yml
vendored
@@ -8,13 +8,6 @@ on:
|
||||
branches:
|
||||
- main # This can be changed to any branch of your preference
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
|
||||
env:
|
||||
USER_TOKEN: ${{ secrets.GH_WIKI_PAT }} # This is the repository secret personal access token
|
||||
USER_NAME: ${{ vars.BOT_USER_NAME }} # Enter the username of your (bot) account
|
||||
@@ -27,14 +20,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 1. Clone the current wiki master branch to a folder named `tmp_wiki`
|
||||
- name: Pull content from wiki
|
||||
run: |
|
||||
git config --global user.name "$USER_NAME"
|
||||
git config --global user.email "$USER_NAME"@users.noreply.github.com
|
||||
git clone https://"$USER_TOKEN"@github.com/SoftFever/"$REPOSITORY_NAME".wiki.git tmp_wiki
|
||||
git clone https://"$USER_TOKEN"@github.com/"$OWNER"/"$REPOSITORY_NAME".wiki.git tmp_wiki
|
||||
# 4. Synchronize differences between `doc` & `tmp_wiki`
|
||||
# 5. Push new Wiki content
|
||||
- name: Push main repo content to wiki
|
||||
|
||||
38
.github/workflows/update-translation.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: Update Translation Catalog
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: 0 0 * * 1
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_translation:
|
||||
name: Update translation
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install gettext
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gettext
|
||||
|
||||
- name: Update translation catalog
|
||||
run: |
|
||||
./run_gettext.sh --full
|
||||
git add localization/i18n/*
|
||||
|
||||
- name: Commit translation catalog updates
|
||||
uses: qoomon/actions--create-commit@v1
|
||||
id: commit
|
||||
with:
|
||||
message: Update translation catalog
|
||||
skip-empty: true
|
||||
|
||||
- name: Push changes
|
||||
run: git push
|
||||
5
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
Build
|
||||
Build.bat
|
||||
/build*/
|
||||
deps/build*
|
||||
deps/build
|
||||
MYMETA.json
|
||||
MYMETA.yml
|
||||
_build
|
||||
@@ -32,6 +32,3 @@ src/OrcaSlicer-doc/
|
||||
**/filament_full/
|
||||
/deps/DL_CACHE/
|
||||
/deps/DL_CACHE
|
||||
**/.flatpak-builder/
|
||||
resources/profiles/user/default
|
||||
*.code-workspace
|
||||
|
||||
256
BuildLinux.sh
@@ -1,11 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
export ROOT=$(dirname $(readlink -f ${0}))
|
||||
export ROOT=`pwd`
|
||||
export NCORES=`nproc --all`
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=${NCORES}
|
||||
FOUND_GTK2=$(dpkg -l libgtk* | grep gtk2)
|
||||
FOUND_GTK3=$(dpkg -l libgtk* | grep gtk-3)
|
||||
|
||||
set -e # exit on first error
|
||||
|
||||
function check_available_memory_and_disk() {
|
||||
FREE_MEM_GB=$(free -g -t | grep 'Mem' | rev | cut -d" " -f1 | rev)
|
||||
FREE_MEM_GB=$(free -g -t | grep 'Mem:' | rev | cut -d" " -f1 | rev)
|
||||
MIN_MEM_GB=10
|
||||
|
||||
FREE_DISK_KB=$(df -k . | tail -1 | awk '{print $4}')
|
||||
@@ -17,178 +21,232 @@ function check_available_memory_and_disk() {
|
||||
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; }') (systen has only $(echo ${FREE_DISK_KB} | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
|
||||
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; }') (systen has only $(echo ${FREE_DISK_KB} | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
|
||||
echo && df -h . && echo
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function usage() {
|
||||
echo "Usage: ./BuildLinux.sh [-1][-b][-c][-d][-i][-r][-s][-u]"
|
||||
echo " -1: limit builds to 1 core (where possible)"
|
||||
echo " -b: build in debug mode"
|
||||
echo " -c: force a clean build"
|
||||
echo " -d: build deps (optional)"
|
||||
echo " -h: this help output"
|
||||
echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]"
|
||||
echo " -i: Generate appimage (optional)"
|
||||
echo " -r: skip ram and disk checks (low ram compiling)"
|
||||
echo " -g: force gtk2 build"
|
||||
echo " -b: build in debug mode"
|
||||
echo " -d: build deps (optional)"
|
||||
echo " -s: build orca-slicer (optional)"
|
||||
echo " -u: update and build dependencies (optional and need sudo)"
|
||||
echo " -u: only update clock & dependency packets (optional and need sudo)"
|
||||
echo " -r: skip free ram check (low ram compiling)"
|
||||
echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'"
|
||||
echo " and then './BuildLinux.sh -dsi'"
|
||||
}
|
||||
|
||||
unset name
|
||||
while getopts ":1bcdghirsu" opt; do
|
||||
while getopts ":dsiuhgbr" opt; do
|
||||
case ${opt} in
|
||||
1 )
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=1
|
||||
;;
|
||||
b )
|
||||
BUILD_DEBUG="1"
|
||||
;;
|
||||
c )
|
||||
CLEAN_BUILD=1
|
||||
;;
|
||||
d )
|
||||
BUILD_DEPS="1"
|
||||
;;
|
||||
h ) usage
|
||||
exit 0
|
||||
u )
|
||||
UPDATE_LIB="1"
|
||||
;;
|
||||
i )
|
||||
BUILD_IMAGE="1"
|
||||
;;
|
||||
r )
|
||||
SKIP_RAM_CHECK="1"
|
||||
;;
|
||||
d )
|
||||
BUILD_DEPS="1"
|
||||
;;
|
||||
s )
|
||||
BUILD_ORCA="1"
|
||||
;;
|
||||
u )
|
||||
UPDATE_LIB="1"
|
||||
b )
|
||||
BUILD_DEBUG="1"
|
||||
;;
|
||||
g )
|
||||
FOUND_GTK3=""
|
||||
;;
|
||||
r )
|
||||
SKIP_RAM_CHECK="1"
|
||||
;;
|
||||
h ) usage
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ${OPTIND} -eq 1 ]
|
||||
if [ $OPTIND -eq 1 ]
|
||||
then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
|
||||
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
|
||||
# Check for direct distribution match to Ubuntu/Debian
|
||||
if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]; then
|
||||
DISTRIBUTION="debian"
|
||||
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
|
||||
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
|
||||
DISTRIBUTION="debian"
|
||||
# Addtional Dev packages for OrcaSlicer
|
||||
export REQUIRED_DEV_PACKAGES="libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules texinfo"
|
||||
# libwebkit2gtk-4.1-dev ??
|
||||
export DEV_PACKAGES_COUNT=$(echo ${REQUIRED_DEV_PACKAGES} | wc -w)
|
||||
if [ $(dpkg --get-selections | grep -E "$(echo ${REQUIRED_DEV_PACKAGES} | tr ' ' '|')" | wc -l) -lt ${DEV_PACKAGES_COUNT} ]; then
|
||||
sudo apt install -y ${REQUIRED_DEV_PACKAGES} git cmake wget file gettext
|
||||
fi
|
||||
if [ ! -f ./linux.d/${DISTRIBUTION} ]
|
||||
then
|
||||
echo "Your distribution does not appear to be currently supported by these build scripts"
|
||||
exit 1
|
||||
fi
|
||||
source ./linux.d/${DISTRIBUTION}
|
||||
|
||||
echo "FOUND_GTK3=${FOUND_GTK3}"
|
||||
if [[ -z "${FOUND_GTK3_DEV}" ]]
|
||||
#FIXME: require root for -u option
|
||||
if [[ -n "$UPDATE_LIB" ]]
|
||||
then
|
||||
echo -n -e "Updating linux ...\n"
|
||||
# hwclock -s # DeftDawg: Why does SuperSlicer want to do this?
|
||||
apt update
|
||||
if [[ -z "$FOUND_GTK3" ]]
|
||||
then
|
||||
echo -e "\nInstalling: libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n"
|
||||
apt install -y libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git
|
||||
else
|
||||
echo -e "\nFind libgtk-3, installing: libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n"
|
||||
apt install -y libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git
|
||||
fi
|
||||
# for ubuntu 22+ and 23+:
|
||||
ubu_major_version="$(grep VERSION_ID /etc/os-release | cut -d "=" -f 2 | cut -d "." -f 1 | tr -d /\"/)"
|
||||
if [ $ubu_major_version == "22" ] || [ $ubu_major_version == "23" ]
|
||||
then
|
||||
apt install -y curl libfuse-dev libssl-dev libcurl4-openssl-dev m4
|
||||
fi
|
||||
if [[ -n "$BUILD_DEBUG" ]]
|
||||
then
|
||||
echo -e "\nInstalling: libssl-dev libcurl4-openssl-dev\n"
|
||||
apt install -y libssl-dev libcurl4-openssl-dev
|
||||
fi
|
||||
echo -e "done\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FOUND_GTK2_DEV=$(dpkg -l libgtk* | grep gtk2.0-dev || echo '')
|
||||
FOUND_GTK3_DEV=$(dpkg -l libgtk* | grep gtk-3-dev || echo '')
|
||||
echo "FOUND_GTK2=$FOUND_GTK2)"
|
||||
if [[ -z "$FOUND_GTK2_DEV" ]]
|
||||
then
|
||||
if [[ -z "$FOUND_GTK3_DEV" ]]
|
||||
then
|
||||
echo "Error, you must install the dependencies before."
|
||||
echo "Use option -u with sudo"
|
||||
exit 1
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Changing date in version..."
|
||||
echo "[1/9] Updating submodules..."
|
||||
{
|
||||
# update submodule profiles
|
||||
pushd resources/profiles
|
||||
git submodule update --init
|
||||
popd
|
||||
}
|
||||
|
||||
echo "[2/9] Changing date in version..."
|
||||
{
|
||||
# change date in version
|
||||
sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc
|
||||
}
|
||||
echo "done"
|
||||
|
||||
|
||||
if ! [[ -n "${SKIP_RAM_CHECK}" ]]
|
||||
# mkdir in deps
|
||||
if [ ! -d "deps/build" ]
|
||||
then
|
||||
check_available_memory_and_disk
|
||||
mkdir deps/build
|
||||
fi
|
||||
|
||||
if [[ -n "${BUILD_DEPS}" ]]
|
||||
if ! [[ -n "$SKIP_RAM_CHECK" ]]
|
||||
then
|
||||
echo "Configuring dependencies..."
|
||||
BUILD_ARGS="-DDEP_WX_GTK3=ON"
|
||||
if [[ -n "${CLEAN_BUILD}" ]]
|
||||
check_available_memory_and_disk
|
||||
fi
|
||||
|
||||
if [[ -n "$BUILD_DEPS" ]]
|
||||
then
|
||||
echo "[3/9] Configuring dependencies..."
|
||||
BUILD_ARGS=""
|
||||
if [[ -n "$FOUND_GTK3_DEV" ]]
|
||||
then
|
||||
rm -fr deps/build
|
||||
BUILD_ARGS="-DDEP_WX_GTK3=ON"
|
||||
fi
|
||||
if [ ! -d "deps/build" ]
|
||||
if [[ -n "$BUILD_DEBUG" ]]
|
||||
then
|
||||
mkdir deps/build
|
||||
fi
|
||||
if [[ -n "${BUILD_DEBUG}" ]]
|
||||
then
|
||||
# have to build deps with debug & release or the cmake won't find everything it needs
|
||||
if [ ! -d "deps/build/release" ]
|
||||
then
|
||||
mkdir deps/build/release
|
||||
fi
|
||||
cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="${PWD}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${PWD}/deps/DL_CACHE" ${BUILD_ARGS}
|
||||
cmake --build deps/build/release
|
||||
# have to build deps with debug & release or the cmake won't find evrything it needs
|
||||
mkdir deps/build/release
|
||||
pushd deps/build/release
|
||||
cmake ../.. -DDESTDIR="../destdir" $BUILD_ARGS
|
||||
make -j$NCORES
|
||||
popd
|
||||
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
|
||||
fi
|
||||
|
||||
# cmake deps
|
||||
pushd deps/build
|
||||
cmake .. $BUILD_ARGS
|
||||
echo "done"
|
||||
|
||||
# make deps
|
||||
echo "[4/9] Building dependencies..."
|
||||
make deps -j$NCORES
|
||||
echo "done"
|
||||
|
||||
echo "cmake -S deps -B deps/build -G Ninja ${BUILD_ARGS}"
|
||||
cmake -S deps -B deps/build -G Ninja ${BUILD_ARGS}
|
||||
cmake --build deps/build
|
||||
# rename wxscintilla # TODO: DeftDawg: Does OrcaSlicer need this?
|
||||
# echo "[5/9] Renaming wxscintilla library..."
|
||||
# pushd destdir/usr/local/lib
|
||||
# if [[ -z "$FOUND_GTK3_DEV" ]]
|
||||
# then
|
||||
# cp libwxscintilla-3.1.a libwx_gtk2u_scintilla-3.1.a
|
||||
# else
|
||||
# cp libwxscintilla-3.1.a libwx_gtk3u_scintilla-3.1.a
|
||||
# fi
|
||||
# popd
|
||||
# echo "done"
|
||||
|
||||
# FIXME: only clean deps if compiling succeeds; otherwise reruns waste tonnes of time!
|
||||
# clean deps
|
||||
# echo "[6/9] Cleaning dependencies..."
|
||||
# rm -rf dep_*
|
||||
popd
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
|
||||
if [[ -n "${BUILD_ORCA}" ]]
|
||||
# Create main "build" directory
|
||||
if [ ! -d "build" ]
|
||||
then
|
||||
echo "Configuring OrcaSlicer..."
|
||||
if [[ -n "${CLEAN_BUILD}" ]]
|
||||
then
|
||||
rm -fr build
|
||||
fi
|
||||
mkdir build
|
||||
fi
|
||||
|
||||
if [[ -n "$BUILD_ORCA" ]]
|
||||
then
|
||||
echo "[7/9] Configuring Slic3r..."
|
||||
BUILD_ARGS=""
|
||||
if [[ -n "${FOUND_GTK3_DEV}" ]]
|
||||
if [[ -n "$FOUND_GTK3_DEV" ]]
|
||||
then
|
||||
BUILD_ARGS="-DSLIC3R_GTK=3"
|
||||
fi
|
||||
if [[ -n "${BUILD_DEBUG}" ]]
|
||||
if [[ -n "$BUILD_DEBUG" ]]
|
||||
then
|
||||
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug -DBBL_INTERNAL_TESTING=1"
|
||||
else
|
||||
BUILD_ARGS="${BUILD_ARGS} -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0"
|
||||
fi
|
||||
echo -e "cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS}"
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DORCA_TOOLS=ON \
|
||||
${BUILD_ARGS}
|
||||
echo "done"
|
||||
echo "Building OrcaSlicer ..."
|
||||
cmake --build build --target OrcaSlicer
|
||||
echo "Building OrcaSlicer_profile_validator .."
|
||||
cmake --build build --target OrcaSlicer_profile_validator
|
||||
|
||||
# cmake
|
||||
pushd build
|
||||
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS}
|
||||
echo "done"
|
||||
|
||||
# make Slic3r
|
||||
echo "[8/9] Building Slic3r..."
|
||||
make -j$NCORES OrcaSlicer # Slic3r
|
||||
popd
|
||||
./run_gettext.sh
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
if [[ -e ${ROOT}/build/src/BuildLinuxImage.sh ]]; then
|
||||
if [[ -e $ROOT/build/src/BuildLinuxImage.sh ]]; then
|
||||
# Give proper permissions to script
|
||||
chmod 755 ${ROOT}/build/src/BuildLinuxImage.sh
|
||||
chmod 755 $ROOT/build/src/BuildLinuxImage.sh
|
||||
|
||||
echo "[9/9] Generating Linux app..."
|
||||
pushd build
|
||||
if [[ -n "${BUILD_IMAGE}" ]]
|
||||
if [[ -n "$BUILD_IMAGE" ]]
|
||||
then
|
||||
${ROOT}/build/src/BuildLinuxImage.sh -i
|
||||
$ROOT/build/src/BuildLinuxImage.sh -i
|
||||
else
|
||||
${ROOT}/build/src/BuildLinuxImage.sh
|
||||
$ROOT/build/src/BuildLinuxImage.sh
|
||||
fi
|
||||
popd
|
||||
echo "done"
|
||||
|
||||
@@ -22,18 +22,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
# Check current Git commit hash
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
add_definitions("-DGIT_COMMIT_HASH=\"${GIT_COMMIT_HASH}\"")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{SLIC3R_STATIC})
|
||||
set(SLIC3R_STATIC_INITIAL $ENV{SLIC3R_STATIC})
|
||||
else()
|
||||
@@ -81,7 +69,6 @@ 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(ORCA_TOOLS "Build Orca tools" OFF)
|
||||
|
||||
if (IS_CROSS_COMPILE)
|
||||
message("Detected cross compilation setup. Tests and encoding checks will be forcedly disabled!")
|
||||
@@ -133,9 +120,6 @@ if (MSVC)
|
||||
# C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data. An integer type is converted to a smaller integer type.
|
||||
# C4267: The compiler detected a conversion from size_t to a smaller type.
|
||||
add_compile_options(/wd4244 /wd4267)
|
||||
# Disable warnings on comparison of unsigned and signed
|
||||
# C4018: signed/unsigned mismatch
|
||||
add_compile_options(/wd4018)
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 15)
|
||||
@@ -264,22 +248,6 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
|
||||
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
|
||||
add_compile_options(-Werror=return-type)
|
||||
|
||||
# Since some portions of code are just commented out or put under conditional compilation, there are
|
||||
# a bunch of warning related to unused functions and variables. Suppress those warnings to not pollute
|
||||
# compilers diagnostics output with warnings we not going to look at
|
||||
add_compile_options(-Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-label -Wno-unused-local-typedefs)
|
||||
|
||||
# Ignore signed/unsigned comparison warnings
|
||||
add_compile_options(-Wno-sign-compare)
|
||||
|
||||
# The mismatch of tabs and spaces throughout the project can sometimes
|
||||
# cause this warning to appear even though the indentation is fine.
|
||||
# Some includes also cause the warning
|
||||
add_compile_options(-Wno-misleading-indentation)
|
||||
|
||||
# Disable warning if enum value does not have a corresponding case in switch statement
|
||||
add_compile_options(-Wno-switch)
|
||||
|
||||
# removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
|
||||
# https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
||||
@@ -293,31 +261,14 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
|
||||
add_compile_options(-Wno-deprecated-declarations)
|
||||
endif()
|
||||
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang") AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 15)
|
||||
add_compile_options(-Wno-error=enum-constexpr-conversion)
|
||||
endif()
|
||||
|
||||
#GCC generates loads of -Wunknown-pragmas when compiling igl. The fix is not easy due to a bug in gcc, see
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 or
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
|
||||
# We will turn the warning of for GCC for now:
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# GCC generates loads of -Wunknown-pragmas when compiling igl. The fix is not easy due to a bug in gcc, see
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 or
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
|
||||
# We will turn the warning of for GCC for now:
|
||||
add_compile_options(-Wno-unknown-pragmas)
|
||||
endif()
|
||||
|
||||
# Bit of a hack for flatpak building: compress the debug info with zstd to save space in CI
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0)
|
||||
add_compile_options(-gz=zstd)
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=template-id-cdtor" )
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (SLIC3R_ASAN)
|
||||
@@ -330,8 +281,6 @@ if (SLIC3R_ASAN)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
|
||||
else()
|
||||
add_compile_definitions(_DISABLE_STRING_ANNOTATION=1 _DISABLE_VECTOR_ANNOTATION=1)
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
@@ -423,14 +372,14 @@ if(SLIC3R_STATIC)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
# Use boost libraries linked statically to the C++ runtime.
|
||||
# set(Boost_USE_STATIC_RUNTIME ON)
|
||||
else()
|
||||
add_definitions(-DBOOST_LOG_DYN_LINK)
|
||||
endif()
|
||||
#set(Boost_DEBUG ON)
|
||||
# set(Boost_COMPILER "-mgw81")
|
||||
# boost::process was introduced first in version 1.64.0,
|
||||
# boost::beast::detail::base64 was introduced first in version 1.66.0
|
||||
find_package(Boost 1.66 REQUIRED COMPONENTS system filesystem thread log log_setup locale regex chrono atomic date_time iostreams program_options)
|
||||
set(MINIMUM_BOOST_VERSION "1.66.0")
|
||||
set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
|
||||
|
||||
add_library(boost_libs INTERFACE)
|
||||
add_library(boost_headeronly INTERFACE)
|
||||
@@ -456,8 +405,28 @@ function(slic3r_remap_configs targets from_Cfg to_Cfg)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
target_include_directories(boost_headeronly INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_link_libraries(boost_libs INTERFACE boost_headeronly ${Boost_LIBRARIES})
|
||||
if(TARGET Boost::system)
|
||||
message(STATUS "Boost::boost exists")
|
||||
target_link_libraries(boost_headeronly INTERFACE Boost::boost)
|
||||
|
||||
# Only from cmake 3.12
|
||||
# list(TRANSFORM _boost_components PREPEND Boost:: OUTPUT_VARIABLE _boost_targets)
|
||||
set(_boost_targets "")
|
||||
foreach(comp ${_boost_components})
|
||||
list(APPEND _boost_targets "Boost::${comp}")
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(boost_libs INTERFACE
|
||||
boost_headeronly # includes the custom compile definitions as well
|
||||
${_boost_targets}
|
||||
)
|
||||
slic3r_remap_configs("${_boost_targets}" RelWithDebInfo Release)
|
||||
else()
|
||||
target_include_directories(boost_headeronly INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_link_libraries(boost_libs INTERFACE boost_headeronly ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# Find and configure intel-tbb
|
||||
if(SLIC3R_STATIC)
|
||||
@@ -803,7 +772,7 @@ set (CPACK_PACKAGE_VENDOR "SoftFever")
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR "${ORCA_VERSION_MAJOR}")
|
||||
set (CPACK_PACKAGE_VERSION_MINOR "${ORCA_VERSION_MINOR}")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "${ORCA_VERSION_PATCH}")
|
||||
set (CPACK_PACKAGE_FILE_NAME "OrcaSlicer_Windows_Installer_V${SoftFever_VERSION}")
|
||||
set (CPACK_PACKAGE_FILE_NAME "OrcaSlicer_Windows_Installer_${SoftFever_VERSION}")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Orca Slicer is an open source slicer for FDM printers")
|
||||
set (CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/SoftFever/OrcaSlicer")
|
||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
PROJECT_ROOT=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
||||
|
||||
set -x
|
||||
# Wishlist hint: For developers, creating a Docker Compose
|
||||
# setup with persistent volumes for the build & deps directories
|
||||
# would speed up recompile times significantly. For end users,
|
||||
# the simplicity of a single Docker image and a one-time compilation
|
||||
# seems better.
|
||||
docker build -t orcaslicer \
|
||||
--build-arg USER=$USER \
|
||||
--build-arg UID=$(id -u) \
|
||||
--build-arg GID=$(id -g) \
|
||||
--build-arg NCORES=$NCORES \
|
||||
$PROJECT_ROOT
|
||||
29
DockerRun.sh
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
# Just in case, here's some other things that might help:
|
||||
# Force the container's hostname to be the same as your workstation
|
||||
# -h $HOSTNAME \
|
||||
# If there's problems with the X display, try this
|
||||
# -v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
# If you get an error like "Authorization required, but no authorization protocol specified," run line 9 in your terminal before rerunning this program
|
||||
# xhost +local:docker
|
||||
docker run \
|
||||
`# Use the hosts networking. Printer wifi and also dbus communication` \
|
||||
--net=host \
|
||||
`# Some X installs will not have permissions to talk to sockets for shared memory` \
|
||||
--ipc host \
|
||||
`# Run as your workstations username to keep permissions the same` \
|
||||
-u $USER \
|
||||
`# Bind mount your home directory into the container for loading/saving files` \
|
||||
-v $HOME:/home/$USER \
|
||||
`# Pass the X display number to the container` \
|
||||
-e DISPLAY=$DISPLAY \
|
||||
`# It seems that libGL and dbus things need privileged mode` \
|
||||
--privileged=true \
|
||||
`# Attach tty for running orca slicer with command line things` \
|
||||
-ti \
|
||||
`# Clean up after yourself` \
|
||||
--rm \
|
||||
`# Pass all parameters from this script to the orca slicer ENTRYPOINT binary` \
|
||||
orcaslicer $*
|
||||
|
||||
95
Dockerfile
@@ -1,95 +0,0 @@
|
||||
FROM docker.io/ubuntu:24.04
|
||||
LABEL maintainer "DeftDawg <DeftDawg@gmail.com>"
|
||||
|
||||
# Disable interactive package configuration
|
||||
RUN apt-get update && \
|
||||
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
|
||||
# Add a deb-src
|
||||
RUN echo deb-src http://archive.ubuntu.com/ubuntu \
|
||||
$(cat /etc/*release | grep VERSION_CODENAME | cut -d= -f2) main universe>> /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
autoconf \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
eglexternalplatform-dev \
|
||||
extra-cmake-modules \
|
||||
file \
|
||||
git \
|
||||
gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-libav \
|
||||
libcairo2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdbus-1-dev \
|
||||
libglew-dev \
|
||||
libglu1-mesa-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgstreamer1.0-dev \
|
||||
libgstreamerd-3-dev \
|
||||
libgstreamer-plugins-base1.0-dev \
|
||||
libgstreamer-plugins-good1.0-dev \
|
||||
libgtk-3-dev \
|
||||
libgtk-3-dev \
|
||||
libosmesa6-dev \
|
||||
libsecret-1-dev \
|
||||
libsoup2.4-dev \
|
||||
libssl3 \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libudev-dev \
|
||||
libwayland-dev \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
libxkbcommon-dev \
|
||||
locales \
|
||||
locales-all \
|
||||
m4 \
|
||||
pkgconf \
|
||||
sudo \
|
||||
wayland-protocols \
|
||||
wget
|
||||
|
||||
# Change your locale here if you want. See the output
|
||||
# of `locale -a` to pick the correct string formatting.
|
||||
ENV LC_ALL=en_US.utf8
|
||||
RUN locale-gen $LC_ALL
|
||||
|
||||
# Set this so that Orca Slicer doesn't complain about
|
||||
# the CA cert path on every startup
|
||||
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
COPY ./ OrcaSlicer
|
||||
|
||||
WORKDIR OrcaSlicer
|
||||
|
||||
# These can run together, but we run them seperate for podman caching
|
||||
# Update System dependencies
|
||||
RUN ./BuildLinux.sh -u
|
||||
|
||||
# Build dependencies in ./deps
|
||||
RUN ./BuildLinux.sh -dr
|
||||
|
||||
# Build slic3r
|
||||
RUN ./BuildLinux.sh -sr
|
||||
|
||||
# Build AppImage
|
||||
ENV container podman
|
||||
RUN ./BuildLinux.sh -ir
|
||||
|
||||
# It's easier to run Orca Slicer as the same username,
|
||||
# UID and GID as your workstation. Since we bind mount
|
||||
# your home directory into the container, it's handy
|
||||
# to keep permissions the same. Just in case, defaults
|
||||
# are root.
|
||||
SHELL ["/bin/bash", "-l", "-c"]
|
||||
ARG USER=root
|
||||
ARG UID=0
|
||||
ARG GID=0
|
||||
RUN [[ "$UID" != "0" ]] \
|
||||
&& groupadd -f -g $GID $USER \
|
||||
&& useradd -u $UID -g $GID $USER
|
||||
|
||||
# Using an entrypoint instead of CMD because the binary
|
||||
# accepts several command line arguments.
|
||||
ENTRYPOINT ["/OrcaSlicer/build/package/bin/orca-slicer"]
|
||||
138
README.md
@@ -1,70 +1,41 @@
|
||||
|
||||
<h1> <p "font-size:200px;"><img align="left" src="https://github.com/SoftFever/OrcaSlicer/blob/main/resources/images/OrcaSlicer.ico" width="100"> Orca Slicer</p> </h1>
|
||||
|
||||
[](https://github.com/SoftFever/OrcaSlicer/actions/workflows/build_all.yml)
|
||||
<br>Orca Slicer is an open source slicer for FDM printers.
|
||||
|
||||
|
||||
Join our Discord community here:<br>
|
||||
<a href="https://discord.gg/P4VE9UY9gJ"><img src="https://img.shields.io/static/v1?message=Discord&logo=discord&label=&color=7289DA&logoColor=white&labelColor=&style=for-the-badge" height="35" alt="discord logo"/> </a>
|
||||
|
||||
<h3>🚨🚨🚨Important Security Alert🚨🚨🚨</h3>
|
||||
|
||||
The only official platforms for OrcaSlicer are **our GitHub project page**, <a href="https://www.orcaslicer.com/">**orcaslicer.com**</a>, and the <a href="https://discord.gg/P4VE9UY9gJ">**official Discord channel**</a>.
|
||||
|
||||
Please be aware that "**orcaslicer.net**", "**orcaslicer.co**" or "**orca-slicer.com**" are NOT an official website for OrcaSlicer and may be potentially malicious. These sites appear to use AI-generated content, lacking genuine context and seems to exist solely to profit from advertisements. Worse, it may redirect download links to harmful sources. For your safety, avoid downloading OrcaSlicer from this site as the links may be compromised.
|
||||
|
||||
If you see the above sites in your searches, report them as spam or unsafe to the search engine. This small action will assist everyone.
|
||||
|
||||
We deeply value our OrcaSlicer community and appreciate all the social groups that support us. However, it is crucial to address the risk posed by any group that falsely claims to be official or misleads its members. If you encounter such a group or are part of one, please assist by encouraging the group owner to add a clear disclaimer or by alerting its members.
|
||||
|
||||
|
||||
|
||||
Thank you for your vigilance and support in keeping our community safe!
|
||||
# Orca Slicer
|
||||
Orca Slicer is an open source slicer for FDM printers.
|
||||
You can download Orca Slicer here: [github releases page](https://github.com/SoftFever/OrcaSlicer/releases/).
|
||||
 Join community: [OrcaSlicer Official Discord Server](https://discord.gg/P4VE9UY9gJ)
|
||||
|
||||
# Main features
|
||||
- Auto-calibration for all printers
|
||||
- Sandwich (inner-outer-inner) mode - An improved version of the `External Perimeters First` mode
|
||||
- Auto calibrations for all printers
|
||||
- Sandwich(inner-outer-inner) mode - an improved version of the `External perimeters first` mode
|
||||
- [Precise wall](https://github.com/SoftFever/OrcaSlicer/wiki/Precise-wall)
|
||||
- Polyholes conversion support: [SuperSlicer Wiki: Polyholes](https://github.com/supermerill/SuperSlicer/wiki/Polyholes)
|
||||
- Polyholes conversion support [SuperSlicer Wiki: Polyholes](https://github.com/supermerill/SuperSlicer/wiki/Polyholes)
|
||||
- Klipper support
|
||||
- More granular controls
|
||||
- Additional features can be found in the [change notes](https://github.com/SoftFever/OrcaSlicer/releases/)
|
||||
|
||||
# Wiki
|
||||
The wiki below aims to provide a detailed explanation of the slicer settings, including how to maximize their use and how to calibrate and set up your printer.
|
||||
|
||||
Please note that the wiki is a work in progress. We appreciate your patience as we continue to develop and improve it!
|
||||
|
||||
**[Access the wiki here](https://github.com/SoftFever/OrcaSlicer/wiki)**
|
||||
|
||||
# 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.
|
||||
|
||||
### 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.
|
||||
- More features can be found in [change notes](https://github.com/SoftFever/OrcaSlicer/releases/)
|
||||
|
||||
### Some background
|
||||
OrcaSlicer is fork of Bambu Studio
|
||||
It was previously known as BambuStudio-SoftFever
|
||||
Bambu Studio 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 by @supermerill
|
||||
Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr)
|
||||
|
||||
# How to install
|
||||
**Windows**:
|
||||
1. Download the installer for your preferred version from the [releases page](https://github.com/SoftFever/OrcaSlicer/releases).
|
||||
- *For convenience there is also a portable build available.*
|
||||
- *If you have troubles to run the build, you might need to install following runtimes:*
|
||||
- [MicrosoftEdgeWebView2RuntimeInstallerX64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/MicrosoftEdgeWebView2RuntimeInstallerX64.exe)
|
||||
- [MicrosoftEdgeWebView2RuntimeInstallerX64](https://github.com/SoftFever/BambuStudio-SoftFever/releases/download/v1.0.10-sf2/MicrosoftEdgeWebView2RuntimeInstallerX64.exe)
|
||||
- [Details of this runtime](https://aka.ms/webview2)
|
||||
- [Alternative Download Link Hosted by Microsoft](https://go.microsoft.com/fwlink/p/?LinkId=2124703)
|
||||
- [vcredist2019_x64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/vcredist2019_x64.exe)
|
||||
- [vcredist2019_x64](https://github.com/SoftFever/BambuStudio-SoftFever/releases/download/v1.0.10-sf2/vcredist2019_x64.exe)
|
||||
- [Alternative Download Link Hosted by Microsoft](https://aka.ms/vs/17/release/vc_redist.x64.exe)
|
||||
- This file may already be available on your computer if you've installed visual studio. Check the following location: `%VCINSTALLDIR%Redist\MSVC\v142`
|
||||
|
||||
**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:*
|
||||
3. *If you want to run a build from a PR, you also need following instructions below*
|
||||
<details quarantine>
|
||||
- Option 1 (You only need to do this once. After that the app can be opened normally.):
|
||||
- Step 1: Hold _cmd_ and right click the app, from the context menu choose **Open**.
|
||||
@@ -82,44 +53,27 @@ Explore the latest developments in Orca Slicer with our nightly builds. Feedback
|
||||

|
||||
</details>
|
||||
|
||||
**Linux (Ubuntu)**:
|
||||
1. If you run into trouble executing it, try this command in the terminal:
|
||||
`chmod +x /path_to_appimage/OrcaSlicer_Linux.AppImage`
|
||||
**Linux(Ubuntu)**:
|
||||
1. If you run into trouble to execute it, try this command in terminal:
|
||||
`chmod +x /path_to_appimage/OrcaSlicer_ubu64.AppImage`
|
||||
|
||||
# How to compile
|
||||
- Windows 64-bit
|
||||
- Tools needed: Visual Studio 2019, Cmake, git, git-lfs, Strawberry Perl.
|
||||
- Tools needed: Visual Studio 2019, Cmake, git, Strawberry Perl.
|
||||
- You will require cmake version 3.14 or later, which is available [on their website](https://cmake.org/download/).
|
||||
- Strawberry Perl is [available on their GitHub repository](https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/).
|
||||
- Strawberry Perl is [available on their github repository](https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/).
|
||||
- Run `build_release.bat` in `x64 Native Tools Command Prompt for VS 2019`
|
||||
- Note: Don't forget to run `git lfs pull` after cloning the repository to download tools on Windows
|
||||
|
||||
- Mac 64-bit
|
||||
- Tools needed: Xcode, Cmake, git, gettext, libtool, automake, autoconf, texinfo
|
||||
- You can install most of them by running `brew install cmake gettext libtool automake autoconf texinfo`
|
||||
- run `build_release_macos.sh`
|
||||
- To build and debug in Xcode:
|
||||
- run `Xcode.app`
|
||||
- open ``build_`arch`/OrcaSlicer.Xcodeproj``
|
||||
- menu bar: Product => Scheme => OrcaSlicer
|
||||
- menu bar: Product => Scheme => Edit Scheme...
|
||||
- Run => Info tab => Build Configuration: `RelWithDebInfo`
|
||||
- Run => Options tab => Document Versions: uncheck `Allow debugging when browsing versions`
|
||||
- menu bar: Product => Run
|
||||
|
||||
- Linux (All Distros)
|
||||
- Docker
|
||||
- Dependencies: Docker [Installation Instructions](https://www.docker.com/get-started/), git
|
||||
- clone this repository `git clone https://github.com/SoftFever/OrcaSlicer`
|
||||
- run `cd OrcaSlicer`
|
||||
- run `./DockerBuild.sh`
|
||||
- To run OrcaSlicer:
|
||||
- run `./DockerRun.sh`
|
||||
- For most common errors, open `DockerRun.sh` and read the comments.
|
||||
- Ubuntu
|
||||
- Dependencies **Will be auto installed with the shell script**: `libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo`
|
||||
- run 'sudo ./BuildLinux.sh -u'
|
||||
- run './BuildLinux.sh -dsir'
|
||||
- Ubuntu
|
||||
- Dependencies **Will be auto installed with the shell script**: `libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo`
|
||||
- run 'sudo ./BuildLinux.sh -u'
|
||||
- run './BuildLinux.sh -dsir'
|
||||
|
||||
|
||||
# Note:
|
||||
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
|
||||
@@ -133,7 +87,7 @@ resolution: 0.1
|
||||
```
|
||||
|
||||
# Supports
|
||||
**Orca Slicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
|
||||
**Orca Slicer** 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! :)
|
||||
|
||||
@@ -141,36 +95,28 @@ Thank you! :)
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://qidi3d.com/">
|
||||
<img src="SoftFever_doc\sponsor_logos\QIDI.png" alt="QIDI" width="96" height="">
|
||||
<a href="https://peopoly.net/">
|
||||
<img src="SoftFever_doc\sponsor_logos\peopoly-standard-logo.png" alt="Peopoly" width="64" height="">
|
||||
</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://bigtree-tech.com/">
|
||||
<img src="SoftFever_doc\sponsor_logos\BigTreeTech.png" alt="BIGTREE TECH" width="96" height="">
|
||||
<a href="https://qidi3d.com/">
|
||||
<img src="SoftFever_doc\sponsor_logos\QIDI.png" alt="QIDI" width="64" height="">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</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/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86" width="130"></a>
|
||||
|
||||
<a href="https://ko-fi.com/G2G5IP3CP"><img src="https://ko-fi.com/img/githubbutton_sm.svg" width="200"></a>
|
||||
|
||||
[](https://paypal.me/softfever3d)
|
||||
|
||||
|
||||
## Some background
|
||||
OrcaSlicer is originally forked from Bambu Studio, it was previously known as BambuStudio-SoftFever.
|
||||
|
||||
Bambu Studio 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 by @supermerill
|
||||
Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr)
|
||||
Ko-fi supporters: [Backers list](https://github.com/SoftFever/OrcaSlicer/wiki/OrcaSlicer-backers-%E2%80%90-28-Oct-2023)
|
||||
|
||||
Support me
|
||||
[](https://ko-fi.com/G2G5IP3CP)
|
||||
|
||||
# License
|
||||
Orca Slicer is licensed under the GNU Affero General Public License, version 3. Orca Slicer is based on Bambu Studio by BambuLab.
|
||||
@@ -185,5 +131,5 @@ The GNU Affero General Public License, version 3 ensures that if you use any par
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
|
||||
1
Readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
Init Version
|
||||
47
SECURITY.md
@@ -1,47 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
At OrcaSlicer, we are committed to maintaining the security of our ecosystem. Our policy is to ensure that we do not introduce vulnerabilities and that any security issues are addressed promptly and responsibly. We appreciate your help in improving the security of OrcaSlicer and thank you for your responsible disclosure.
|
||||
Reporting Security Bugs
|
||||
|
||||
## To report a security bug, please follow these guidelines:
|
||||
|
||||
* Email Security Bugs:
|
||||
Send an email to the lead maintainer at softfeverever@gmail.com.
|
||||
Include the word "SECURITY" in the subject line of your email.
|
||||
|
||||
* Response Times:
|
||||
The lead maintainer will acknowledge receipt of your email within one week (7 days).
|
||||
A detailed response will follow within 48 hours, outlining the next steps for handling your report.
|
||||
After the initial reply, the security team will keep you informed about the progress toward a fix and any announcements.
|
||||
|
||||
* Information and Collaboration:
|
||||
We may request additional information or guidance as we work on addressing the issue.
|
||||
|
||||
* Handling the Report:
|
||||
OrcaSlicer will confirm the problem and determine the affected versions.
|
||||
We will audit the code to find any similar issues and prepare fixes for all releases still under maintenance.
|
||||
Fixes will be released as quickly as possible.
|
||||
|
||||
* Third-Party Modules:
|
||||
Report security issues in third-party modules to the respective maintainer of those modules.
|
||||
|
||||
## Security Disclosure Guidelines
|
||||
|
||||
When disclosing a vulnerability, please follow these steps to ensure your report is clear and actionable:
|
||||
|
||||
* Provide Detailed Information:
|
||||
Scope: Clearly define the scope of the vulnerability.
|
||||
Potential Impact: Let us know who could be affected by this exploit.
|
||||
Reproduction Steps: Document detailed steps to reproduce the vulnerability.
|
||||
|
||||
Reference OWASP Guidelines:
|
||||
Follow the <a href="https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html">OWASP Vulnerability Disclosure Cheat Sheet</a> for best practices in vulnerability disclosure.
|
||||
|
||||
## Security Recommendations
|
||||
|
||||
To enhance security when using OrcaSlicer, we recommend following these steps:
|
||||
|
||||
* SEE SOMETHING: If you notice anything suspicious or have concerns, please report it.
|
||||
* SAY SOMETHING: If you have any doubts or need assistance, do not hesitate to contact us.
|
||||
|
||||
### Thank you for your commitment to the security of OrcaSlicer. Your efforts help us maintain a safe and reliable ecosystem.
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 62 KiB |
BIN
SoftFever_doc/sponsor_logos/peopoly-standard-logo.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
@@ -1,50 +1,26 @@
|
||||
set WP=%CD%
|
||||
|
||||
set debug=OFF
|
||||
set debuginfo=OFF
|
||||
if "%1"=="debug" set debug=ON
|
||||
if "%2"=="debug" set debug=ON
|
||||
if "%1"=="debuginfo" set debuginfo=ON
|
||||
if "%2"=="debuginfo" set debuginfo=ON
|
||||
if "%debug%"=="ON" (
|
||||
set build_type=Debug
|
||||
set build_dir=build-dbg
|
||||
) else (
|
||||
if "%debuginfo%"=="ON" (
|
||||
set build_type=RelWithDebInfo
|
||||
set build_dir=build-dbginfo
|
||||
) else (
|
||||
set build_type=Release
|
||||
set build_dir=build
|
||||
)
|
||||
)
|
||||
echo build type set to %build_type%
|
||||
|
||||
cd deps
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
mkdir build
|
||||
cd build
|
||||
set DEPS=%CD%/OrcaSlicer_dep
|
||||
if "%1"=="slicer" (
|
||||
GOTO :slicer
|
||||
)
|
||||
echo "building deps.."
|
||||
|
||||
echo cmake ../ -G "Visual Studio 16 2019" -A x64 -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=%build_type% -DDEP_DEBUG=%debug% -DORCA_INCLUDE_DEBUG_INFO=%debuginfo%
|
||||
cmake ../ -G "Visual Studio 16 2019" -A x64 -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=%build_type% -DDEP_DEBUG=%debug% -DORCA_INCLUDE_DEBUG_INFO=%debuginfo%
|
||||
cmake --build . --config %build_type% --target deps -- -m
|
||||
cmake ../ -G "Visual Studio 16 2019" -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release --target deps -- -m
|
||||
|
||||
if "%1"=="deps" exit /b 0
|
||||
|
||||
:slicer
|
||||
echo "building Orca Slicer..."
|
||||
cd %WP%
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
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 --build . --config %build_type% --target ALL_BUILD -- -m
|
||||
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
|
||||
cmake --build . --config Release --target ALL_BUILD -- -m
|
||||
cd ..
|
||||
call run_gettext.bat
|
||||
cd %build_dir%
|
||||
cmake --build . --target install --config %build_type%
|
||||
cd build
|
||||
cmake --build . --target install --config Release
|
||||
@@ -1,10 +1,7 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
while getopts ":dpa:snt:xbc:hu" opt; do
|
||||
case "${opt}" in
|
||||
while getopts ":a:sdpt:hn" opt; do
|
||||
case ${opt} in
|
||||
d )
|
||||
export BUILD_TARGET="deps"
|
||||
;;
|
||||
@@ -23,88 +20,25 @@ while getopts ":dpa:snt:xbc:hu" opt; do
|
||||
t )
|
||||
export OSX_DEPLOYMENT_TARGET="$OPTARG"
|
||||
;;
|
||||
x )
|
||||
export SLICER_CMAKE_GENERATOR="Ninja"
|
||||
export SLICER_BUILD_TARGET="all"
|
||||
export DEPS_CMAKE_GENERATOR="Ninja"
|
||||
;;
|
||||
b )
|
||||
export BUILD_ONLY="1"
|
||||
;;
|
||||
c )
|
||||
export BUILD_CONFIG="$OPTARG"
|
||||
;;
|
||||
1 )
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=1
|
||||
;;
|
||||
u )
|
||||
export BUILD_UNIVERSAL="1"
|
||||
;;
|
||||
h ) echo "Usage: ./build_release_macos.sh [-d]"
|
||||
echo " -d: Build deps only"
|
||||
echo " -a: Set ARCHITECTURE (arm64 or x86_64)"
|
||||
echo " -s: Build slicer only"
|
||||
echo " -n: Nightly build"
|
||||
echo " -t: Specify minimum version of the target platform, default is 11.3"
|
||||
echo " -x: Use Ninja CMake generator, default is Xcode"
|
||||
echo " -b: Build without reconfiguring CMake"
|
||||
echo " -c: Set CMake build configuration, default is Release"
|
||||
echo " -u: Build universal binary (both arm64 and x86_64)"
|
||||
echo " -1: Use single job for building"
|
||||
exit 0
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Set defaults
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
if [ "1." == "$BUILD_UNIVERSAL". ]; then
|
||||
ARCH="universal"
|
||||
else
|
||||
ARCH="$(uname -m)"
|
||||
fi
|
||||
export ARCH
|
||||
if [ -z "$ARCH" ]
|
||||
then
|
||||
export ARCH=$(uname -m)
|
||||
fi
|
||||
|
||||
if [ "1." == "$BUILD_UNIVERSAL". ]; then
|
||||
echo "Universal build enabled - will create a combined arm64/x86_64 binary"
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_CONFIG" ]; then
|
||||
export BUILD_CONFIG="Release"
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_TARGET" ]; then
|
||||
export BUILD_TARGET="all"
|
||||
fi
|
||||
|
||||
if [ -z "$SLICER_CMAKE_GENERATOR" ]; then
|
||||
export SLICER_CMAKE_GENERATOR="Xcode"
|
||||
fi
|
||||
|
||||
if [ -z "$SLICER_BUILD_TARGET" ]; then
|
||||
export SLICER_BUILD_TARGET="ALL_BUILD"
|
||||
fi
|
||||
|
||||
if [ -z "$DEPS_CMAKE_GENERATOR" ]; then
|
||||
export DEPS_CMAKE_GENERATOR="Unix Makefiles"
|
||||
fi
|
||||
|
||||
if [ -z "$OSX_DEPLOYMENT_TARGET" ]; then
|
||||
export OSX_DEPLOYMENT_TARGET="11.3"
|
||||
fi
|
||||
|
||||
echo "Build params:"
|
||||
echo " - ARCH: $ARCH"
|
||||
echo " - BUILD_CONFIG: $BUILD_CONFIG"
|
||||
echo " - BUILD_TARGET: $BUILD_TARGET"
|
||||
echo " - CMAKE_GENERATOR: $SLICER_CMAKE_GENERATOR for Slicer, $DEPS_CMAKE_GENERATOR for deps"
|
||||
echo " - OSX_DEPLOYMENT_TARGET: $OSX_DEPLOYMENT_TARGET"
|
||||
echo
|
||||
|
||||
echo "Arch: $ARCH"
|
||||
echo "BUILD_TARGET: $BUILD_TARGET"
|
||||
echo "OSX_DEPLOYMENT_TARGET: $OSX_DEPLOYMENT_TARGET"
|
||||
# if which -s brew; then
|
||||
# brew --prefix libiconv
|
||||
# brew --prefix zstd
|
||||
@@ -118,177 +52,57 @@ echo
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
|
||||
DEPS_DIR="$PROJECT_DIR/deps"
|
||||
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
|
||||
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
|
||||
|
||||
# Fix for Multi-config generators
|
||||
if [ "$SLICER_CMAKE_GENERATOR" == "Xcode" ]; then
|
||||
export BUILD_DIR_CONFIG_SUBDIR="/$BUILD_CONFIG"
|
||||
else
|
||||
export BUILD_DIR_CONFIG_SUBDIR=""
|
||||
WD="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd $WD/deps
|
||||
mkdir -p build_$ARCH
|
||||
cd build_$ARCH
|
||||
DEPS=$PWD/OrcaSlicer_dep_$ARCH
|
||||
mkdir -p $DEPS
|
||||
if [ "slicer." != $BUILD_TARGET. ];
|
||||
then
|
||||
echo "building deps..."
|
||||
echo "cmake ../ -DDESTDIR=$DEPS -DOPENSSL_ARCH=darwin64-${ARCH}-cc -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}"
|
||||
cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-${ARCH}-cc" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}
|
||||
cmake --build . --config Release --target deps
|
||||
if [ "1." == "$PACK_DEPS". ];
|
||||
then
|
||||
tar -zcvf OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz OrcaSlicer_dep_$ARCH
|
||||
fi
|
||||
fi
|
||||
|
||||
function build_deps() {
|
||||
echo "Building deps..."
|
||||
(
|
||||
set -x
|
||||
mkdir -p "$DEPS"
|
||||
cd "$DEPS_BUILD_DIR"
|
||||
if [ "1." != "$BUILD_ONLY". ]; then
|
||||
cmake .. \
|
||||
-G "${DEPS_CMAKE_GENERATOR}" \
|
||||
-DDESTDIR="$DEPS" \
|
||||
-DOPENSSL_ARCH="darwin64-${ARCH}-cc" \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING="${ARCH}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
|
||||
fi
|
||||
cmake --build . --config "$BUILD_CONFIG" --target deps
|
||||
)
|
||||
}
|
||||
|
||||
function pack_deps() {
|
||||
echo "Packing deps..."
|
||||
(
|
||||
set -x
|
||||
mkdir -p "$DEPS"
|
||||
cd "$DEPS_BUILD_DIR"
|
||||
tar -zcvf "OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz" "OrcaSlicer_dep_$ARCH"
|
||||
)
|
||||
}
|
||||
|
||||
function build_slicer() {
|
||||
echo "Building slicer..."
|
||||
(
|
||||
set -x
|
||||
mkdir -p "$PROJECT_BUILD_DIR"
|
||||
cd "$PROJECT_BUILD_DIR"
|
||||
if [ "1." != "$BUILD_ONLY". ]; then
|
||||
cmake .. \
|
||||
-G "${SLICER_CMAKE_GENERATOR}" \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DCMAKE_PREFIX_PATH="$DEPS/usr/local" \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
|
||||
-DCMAKE_MACOSX_RPATH=ON \
|
||||
-DCMAKE_INSTALL_RPATH="${DEPS}/usr/local" \
|
||||
-DCMAKE_MACOSX_BUNDLE=ON \
|
||||
-DCMAKE_OSX_ARCHITECTURES="${ARCH}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
|
||||
fi
|
||||
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
|
||||
)
|
||||
|
||||
echo "Verify localization with gettext..."
|
||||
(
|
||||
cd "$PROJECT_DIR"
|
||||
./run_gettext.sh
|
||||
)
|
||||
|
||||
echo "Fix macOS app package..."
|
||||
(
|
||||
cd "$PROJECT_BUILD_DIR"
|
||||
mkdir -p OrcaSlicer
|
||||
cd OrcaSlicer
|
||||
# remove previously built app
|
||||
rm -rf ./OrcaSlicer.app
|
||||
# fully copy newly built app
|
||||
cp -pR "../src$BUILD_DIR_CONFIG_SUBDIR/OrcaSlicer.app" ./OrcaSlicer.app
|
||||
# fix resources
|
||||
resources_path=$(readlink ./OrcaSlicer.app/Contents/Resources)
|
||||
rm ./OrcaSlicer.app/Contents/Resources
|
||||
cp -R "$resources_path" ./OrcaSlicer.app/Contents/Resources
|
||||
# delete .DS_Store file
|
||||
find ./OrcaSlicer.app/ -name '.DS_Store' -delete
|
||||
)
|
||||
|
||||
# extract version
|
||||
# export ver=$(grep '^#define SoftFever_VERSION' ../src/libslic3r/libslic3r_version.h | cut -d ' ' -f3)
|
||||
# ver="_V${ver//\"}"
|
||||
# echo $PWD
|
||||
# if [ "1." != "$NIGHTLY_BUILD". ];
|
||||
# then
|
||||
# ver=${ver}_dev
|
||||
# fi
|
||||
|
||||
# zip -FSr OrcaSlicer${ver}_Mac_${ARCH}.zip OrcaSlicer.app
|
||||
}
|
||||
|
||||
function build_universal() {
|
||||
echo "Building universal binary..."
|
||||
# Save current ARCH
|
||||
ORIGINAL_ARCH="$ARCH"
|
||||
|
||||
# Build x86_64
|
||||
ARCH="x86_64"
|
||||
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
|
||||
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
|
||||
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
|
||||
build_deps
|
||||
build_slicer
|
||||
|
||||
# Build arm64
|
||||
ARCH="arm64"
|
||||
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
|
||||
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
|
||||
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
|
||||
build_deps
|
||||
build_slicer
|
||||
|
||||
# Restore original ARCH
|
||||
ARCH="$ORIGINAL_ARCH"
|
||||
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
|
||||
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
|
||||
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
|
||||
|
||||
# Create universal binary
|
||||
echo "Creating universal binary..."
|
||||
PROJECT_BUILD_DIR="$PROJECT_DIR/build_Universal"
|
||||
mkdir -p "$PROJECT_BUILD_DIR/OrcaSlicer"
|
||||
UNIVERSAL_APP="$PROJECT_BUILD_DIR/OrcaSlicer/Universal_OrcaSlicer.app"
|
||||
rm -rf "$UNIVERSAL_APP"
|
||||
cp -R "$PROJECT_DIR/build_x86_64/OrcaSlicer/OrcaSlicer.app" "$UNIVERSAL_APP"
|
||||
|
||||
# Get the binary path inside the .app bundle
|
||||
BINARY_PATH="Contents/MacOS/OrcaSlicer"
|
||||
|
||||
# Create universal binary using lipo
|
||||
lipo -create \
|
||||
"$PROJECT_DIR/build_x86_64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
|
||||
"$PROJECT_DIR/build_arm64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
|
||||
-output "$UNIVERSAL_APP/$BINARY_PATH"
|
||||
|
||||
echo "Universal binary created at $UNIVERSAL_APP"
|
||||
}
|
||||
|
||||
case "${BUILD_TARGET}" in
|
||||
all)
|
||||
if [ "1." == "$BUILD_UNIVERSAL". ]; then
|
||||
build_universal
|
||||
else
|
||||
build_deps
|
||||
build_slicer
|
||||
fi
|
||||
;;
|
||||
deps)
|
||||
build_deps
|
||||
;;
|
||||
slicer)
|
||||
if [ "1." == "$BUILD_UNIVERSAL". ]; then
|
||||
build_universal
|
||||
else
|
||||
build_slicer
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unknown target: $BUILD_TARGET. Available targets: deps, slicer, all."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "1." == "$PACK_DEPS". ]; then
|
||||
pack_deps
|
||||
if [ "deps." == "$BUILD_TARGET". ];
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd $WD
|
||||
mkdir -p build_$ARCH
|
||||
cd build_$ARCH
|
||||
echo "building slicer..."
|
||||
cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON -DCMAKE_OSX_ARCHITECTURES=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}
|
||||
cmake --build . --config Release --target ALL_BUILD
|
||||
cd ..
|
||||
./run_gettext.sh
|
||||
cd build_$ARCH
|
||||
mkdir -p OrcaSlicer
|
||||
cd OrcaSlicer
|
||||
rm -r ./OrcaSlicer.app
|
||||
cp -pR ../src/Release/OrcaSlicer.app ./OrcaSlicer.app
|
||||
resources_path=$(readlink ./OrcaSlicer.app/Contents/Resources)
|
||||
rm ./OrcaSlicer.app/Contents/Resources
|
||||
cp -R $resources_path ./OrcaSlicer.app/Contents/Resources
|
||||
# delete .DS_Store file
|
||||
find ./OrcaSlicer.app/ -name '.DS_Store' -delete
|
||||
# extract version
|
||||
# export ver=$(grep '^#define SoftFever_VERSION' ../src/libslic3r/libslic3r_version.h | cut -d ' ' -f3)
|
||||
# ver="_V${ver//\"}"
|
||||
# echo $PWD
|
||||
# if [ "1." != "$NIGHTLY_BUILD". ];
|
||||
# then
|
||||
# ver=${ver}_dev
|
||||
# fi
|
||||
|
||||
|
||||
# zip -FSr OrcaSlicer${ver}_Mac_${ARCH}.zip OrcaSlicer.app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@REM OrcaSlicer build script for Windows
|
||||
@REM OcarSlicer build script for Windows
|
||||
@echo off
|
||||
set WP=%CD%
|
||||
|
||||
@@ -13,30 +13,10 @@ if "%1"=="pack" (
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
set debug=OFF
|
||||
set debuginfo=OFF
|
||||
if "%1"=="debug" set debug=ON
|
||||
if "%2"=="debug" set debug=ON
|
||||
if "%1"=="debuginfo" set debuginfo=ON
|
||||
if "%2"=="debuginfo" set debuginfo=ON
|
||||
if "%debug%"=="ON" (
|
||||
set build_type=Debug
|
||||
set build_dir=build-dbg
|
||||
) else (
|
||||
if "%debuginfo%"=="ON" (
|
||||
set build_type=RelWithDebInfo
|
||||
set build_dir=build-dbginfo
|
||||
) else (
|
||||
set build_type=Release
|
||||
set build_dir=build
|
||||
)
|
||||
)
|
||||
echo build type set to %build_type%
|
||||
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
cd deps
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
mkdir build
|
||||
cd build
|
||||
set DEPS=%CD%/OrcaSlicer_dep
|
||||
|
||||
if "%1"=="slicer" (
|
||||
@@ -44,24 +24,22 @@ if "%1"=="slicer" (
|
||||
)
|
||||
echo "building deps.."
|
||||
|
||||
echo on
|
||||
cmake ../ -G "Visual Studio 17 2022" -A x64 -DDESTDIR="%DEPS%" -DCMAKE_BUILD_TYPE=%build_type% -DDEP_DEBUG=%debug% -DORCA_INCLUDE_DEBUG_INFO=%debuginfo%
|
||||
cmake --build . --config %build_type% --target deps -- -m
|
||||
@echo off
|
||||
|
||||
cmake ../ -G "Visual Studio 17 2022" -A x64 -DDESTDIR="%CD%/OrcaSlicer_dep" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --config Release --target deps -- -m
|
||||
|
||||
if "%1"=="deps" exit /b 0
|
||||
|
||||
:slicer
|
||||
echo "building Orca Slicer..."
|
||||
cd %WP%
|
||||
mkdir %build_dir%
|
||||
cd %build_dir%
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo on
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -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
|
||||
echo cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.22000.0"
|
||||
cmake --build . --config Release --target ALL_BUILD -- -m
|
||||
cd ..
|
||||
call run_gettext.bat
|
||||
cd %build_dir%
|
||||
cmake --build . --target install --config %build_type%
|
||||
cd build
|
||||
cmake --build . --target install --config Release
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
find_path(LIBNOISE_INCLUDE_DIR libnoise/noise.h)
|
||||
find_library(LIBNOISE_LIBRARY NAMES libnoise libnoise_static liblibnoise_static)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(libnoise DEFAULT_MSG
|
||||
LIBNOISE_LIBRARY
|
||||
LIBNOISE_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(libnoise_FOUND)
|
||||
add_library(noise::noise STATIC IMPORTED)
|
||||
set_target_properties(noise::noise PROPERTIES
|
||||
IMPORTED_LOCATION "${LIBNOISE_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBNOISE_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
@@ -26,27 +26,6 @@
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>ATSApplicationFontsPath</key>
|
||||
<string>fonts/</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>OrcaSlicer Downloads</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>orcaslicer</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>BambuStudio Downloads</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>bambustudioopen</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -56,7 +35,7 @@
|
||||
<string>STL</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>images/stl.icns</string>
|
||||
<string>stl.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>STL</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
@@ -73,7 +52,7 @@
|
||||
<string>OBJ</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>images/OrcaSlicer.icns</string>
|
||||
<string>OrcaSlicer.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>STL</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
@@ -90,7 +69,7 @@
|
||||
<string>AMF</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>images/OrcaSlicer.icns</string>
|
||||
<string>OrcaSlicer.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>AMF</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
@@ -107,7 +86,7 @@
|
||||
<string>3MF</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>images/OrcaSlicer.icns</string>
|
||||
<string>OrcaSlicer.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>3MF</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
@@ -124,7 +103,7 @@
|
||||
<string>GCODE</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>images/gcode.icns</string>
|
||||
<string>gcode.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>GCODE</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
|
||||
164
deps/CMakeLists.txt
vendored
@@ -30,10 +30,6 @@ if (APPLE)
|
||||
|
||||
endif ()
|
||||
|
||||
if(POLICY CMP0135) # DOWNLOAD_EXTRACT_TIMESTAMP
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
|
||||
project(OrcaSlicer-deps)
|
||||
|
||||
include(ExternalProject)
|
||||
@@ -46,20 +42,15 @@ endif ()
|
||||
|
||||
set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination directory")
|
||||
set(DEP_DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/../DL_CACHE CACHE PATH "Path for downloaded source packages.")
|
||||
set(FLATPAK FALSE CACHE BOOL "Toggles various build settings for flatpak, like /usr/local in DESTDIR or not building wxwidgets")
|
||||
if (NOT FLATPAK)
|
||||
set(DESTDIR "${DESTDIR}/usr/local/")
|
||||
endif()
|
||||
|
||||
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
if (_is_multi)
|
||||
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" OFF)
|
||||
option(ORCA_INCLUDE_DEBUG_INFO "Includes debug information in a release build (like RelWithDebInfo) in a way that works with multi-configuration generators and incompatible dependencies. DEP_DEBUG option takes priority over this." OFF)
|
||||
endif ()
|
||||
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" OFF)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF)
|
||||
else()
|
||||
if(POLICY CMP0135) # DOWNLOAD_EXTRACT_TIMESTAMP
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(IS_CROSS_COMPILE FALSE)
|
||||
@@ -88,7 +79,7 @@ endif ()
|
||||
# option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF)
|
||||
|
||||
message(STATUS "OrcaSlicer deps DESTDIR: ${DESTDIR}")
|
||||
message(STATUS "OrcaSlicer download dir for source packages: ${DEP_DOWNLOAD_DIR}")
|
||||
message(STATUS "OrcaSlicer dowload dir for source packages: ${DEP_DOWNLOAD_DIR}")
|
||||
message(STATUS "OrcaSlicer deps debug build: ${DEP_DEBUG}")
|
||||
|
||||
find_package(Git REQUIRED)
|
||||
@@ -96,6 +87,8 @@ find_package(Git REQUIRED)
|
||||
# The default command line for patching. Only works for newer
|
||||
set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespace=fix)
|
||||
|
||||
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
if (NOT _is_multi AND NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
message(STATUS "Forcing CMAKE_BUILD_TYPE to Release as it was not specified.")
|
||||
@@ -106,11 +99,7 @@ function(orcaslicer_add_cmake_project projectname)
|
||||
|
||||
set(_configs_line -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
|
||||
if (_is_multi OR MSVC)
|
||||
if (ORCA_INCLUDE_DEBUG_INFO AND NOT DEP_DEBUG)
|
||||
set(_configs_line "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO} -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
else ()
|
||||
set(_configs_line "")
|
||||
endif ()
|
||||
set(_configs_line "")
|
||||
endif ()
|
||||
|
||||
set(_gen "")
|
||||
@@ -124,13 +113,13 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||
ExternalProject_Add(
|
||||
dep_${projectname}
|
||||
EXCLUDE_FROM_ALL ON
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
INSTALL_DIR ${DESTDIR}/usr/local
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||
${_gen}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
|
||||
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
|
||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}/usr/local
|
||||
-DCMAKE_DEBUG_POSTFIX:STRING=d
|
||||
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
|
||||
@@ -144,49 +133,16 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
)
|
||||
elseif(FLATPAK)
|
||||
# the only reason this is here is because of the HACK at the bottom for ci
|
||||
#
|
||||
# note for future devs: shared libs may actually create a size reduction
|
||||
# but orcaslicer_deps tends to get really funny regarding linking after that (notably boost)
|
||||
# so, as much as I would like to use that, it's not happening
|
||||
ExternalProject_Add(
|
||||
dep_${projectname}
|
||||
EXCLUDE_FROM_ALL ON
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||
${_gen}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
||||
-DCMAKE_MODULE_PATH:STRING=${PROJECT_SOURCE_DIR}/../cmake/modules
|
||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
||||
-DCMAKE_DEBUG_POSTFIX:STRING=d
|
||||
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
${_cmake_osx_arch}
|
||||
"${_configs_line}"
|
||||
${DEP_CMAKE_OPTS}
|
||||
${P_ARGS_CMAKE_ARGS}
|
||||
${P_ARGS_UNPARSED_ARGUMENTS}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
# HACK: save space after each compile job, because CI
|
||||
# reasoning: cmake changes directory after this command, so just keep only the folders
|
||||
# so that it can navigate out
|
||||
COMMAND find "${CMAKE_BINARY_DIR}/dep_${projectname}-prefix/" -type f -delete
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(
|
||||
dep_${projectname}
|
||||
EXCLUDE_FROM_ALL ON
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
INSTALL_DIR ${DESTDIR}/usr/local
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||
${_gen}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
|
||||
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR}/usr/local
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
${_cmake_osx_arch}
|
||||
"${_configs_line}"
|
||||
@@ -194,7 +150,7 @@ else()
|
||||
${P_ARGS_CMAKE_ARGS}
|
||||
${P_ARGS_UNPARSED_ARGUMENTS}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
)
|
||||
|
||||
endif()
|
||||
@@ -240,20 +196,6 @@ else()
|
||||
include("deps-linux.cmake")
|
||||
endif()
|
||||
|
||||
if(FLATPAK)
|
||||
# flatpak bundles some deps with the layer, so attempt to find them first
|
||||
# also, yes, this reduces CI by not needing to vendor certain deps
|
||||
find_package(ZLIB)
|
||||
find_package(PNG)
|
||||
find_package(EXPAT)
|
||||
find_package(CURL)
|
||||
find_package(JPEG)
|
||||
find_package(TIFF)
|
||||
find_package(Freetype)
|
||||
find_package(OpenSSL 1.1...<3.2)
|
||||
find_package(CURL)
|
||||
endif()
|
||||
|
||||
set(ZLIB_PKG "")
|
||||
if (NOT ZLIB_FOUND)
|
||||
include(ZLIB/ZLIB.cmake)
|
||||
@@ -265,7 +207,6 @@ if (NOT PNG_FOUND)
|
||||
set(PNG_PKG dep_PNG)
|
||||
endif ()
|
||||
set(EXPAT_PKG "")
|
||||
find_package(EXPAT)
|
||||
if (NOT EXPAT_FOUND)
|
||||
include(EXPAT/EXPAT.cmake)
|
||||
set(EXPAT_PKG dep_EXPAT)
|
||||
@@ -278,7 +219,6 @@ include(Boost/Boost.cmake)
|
||||
include(Cereal/Cereal.cmake)
|
||||
include(Qhull/Qhull.cmake)
|
||||
include(GLEW/GLEW.cmake)
|
||||
|
||||
include(GLFW/GLFW.cmake)
|
||||
include(OpenCSG/OpenCSG.cmake)
|
||||
|
||||
@@ -293,89 +233,36 @@ include(MPFR/MPFR.cmake)
|
||||
include(CGAL/CGAL.cmake)
|
||||
|
||||
include(NLopt/NLopt.cmake)
|
||||
include(libnoise/libnoise.cmake)
|
||||
|
||||
include(OpenSSL/OpenSSL.cmake)
|
||||
|
||||
# I *think* 1.1 is used for *just* md5 hashing?
|
||||
# 3.1 has everything in the right place, but the md5 funcs used are deprecated
|
||||
# a grep across the repo shows it is used for other things
|
||||
# TODO: update openssl and everything that uses <openssl/md5.h>
|
||||
set(OPENSSL_PKG "")
|
||||
if(NOT OPENSSL_FOUND)
|
||||
include(OpenSSL/OpenSSL.cmake)
|
||||
set(OPENSSL_PKG dep_OpenSSL)
|
||||
endif()
|
||||
|
||||
# we don't want to load a "wrong" openssl when loading curl
|
||||
# so, just don't even bother
|
||||
# ...i think this is how it works? change if wrong
|
||||
set(CURL_PKG "")
|
||||
if (NOT OPENSSL_FOUND OR NOT CURL_FOUND)
|
||||
if (NOT CURL_FOUND)
|
||||
include(CURL/CURL.cmake)
|
||||
set(CURL_PKG dep_CURL)
|
||||
endif ()
|
||||
|
||||
set(JPEG_PKG "")
|
||||
if (NOT JPEG_FOUND)
|
||||
include(JPEG/JPEG.cmake)
|
||||
set(JPEG_PKG dep_JPEG)
|
||||
endif()
|
||||
|
||||
set(TIFF_PKG "")
|
||||
if (NOT TIFF_FOUND)
|
||||
include(TIFF/TIFF.cmake)
|
||||
set(TIFF_PKG "dep_TIFF")
|
||||
endif()
|
||||
|
||||
# flatpak builds wxwidgets separately
|
||||
set(WXWIDGETS_PKG "")
|
||||
if (NOT FLATPAK)
|
||||
include(wxWidgets/wxWidgets.cmake)
|
||||
set(WXWIDGETS_PKG "dep_wxWidgets")
|
||||
endif()
|
||||
|
||||
set(FREETYPE_PKG "")
|
||||
if(NOT FREETYPE_FOUND)
|
||||
include(FREETYPE/FREETYPE.cmake)
|
||||
set(FREETYPE_PKG "dep_FREETYPE")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --is-inside-work-tree
|
||||
RESULT_VARIABLE REV_PARSE_RESULT
|
||||
OUTPUT_VARIABLE REV_PARSE_OUTPUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Will output "true" and have a 0 return code if within a git repo
|
||||
if((REV_PARSE_RESULT EQUAL 0) AND (REV_PARSE_OUTPUT STREQUAL "true"))
|
||||
set(IN_GIT_REPO TRUE)
|
||||
# Find relative path from root to source used for adjusting patch command
|
||||
file(RELATIVE_PATH BINARY_DIR_REL ${CMAKE_SOURCE_DIR}/.. ${CMAKE_BINARY_DIR})
|
||||
endif ()
|
||||
|
||||
include(JPEG/JPEG.cmake)
|
||||
include(TIFF/TIFF.cmake)
|
||||
include(wxWidgets/wxWidgets.cmake)
|
||||
include(OCCT/OCCT.cmake)
|
||||
include(OpenCV/OpenCV.cmake)
|
||||
include(FREETYPE/FREETYPE.cmake)
|
||||
|
||||
set(_dep_list
|
||||
dep_Boost
|
||||
dep_TBB
|
||||
${OPENSSL_PKG}
|
||||
${CURL_PKG}
|
||||
${WXWIDGETS_PKG}
|
||||
dep_wxWidgets
|
||||
dep_Cereal
|
||||
dep_NLopt
|
||||
dep_OpenVDB
|
||||
dep_OpenCSG
|
||||
dep_OpenCV
|
||||
dep_CGAL
|
||||
dep_OpenSSL
|
||||
dep_GLFW
|
||||
dep_OCCT
|
||||
${FREETYPE_PKG}
|
||||
${PNG_PKG}
|
||||
${ZLIB_PKG}
|
||||
${EXPAT_PKG}
|
||||
dep_libnoise
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
@@ -387,6 +274,9 @@ else()
|
||||
#list(APPEND _dep_list "dep_libigl")
|
||||
endif()
|
||||
|
||||
list(APPEND _dep_list "dep_OCCT")
|
||||
list(APPEND _dep_list "dep_FREETYPE")
|
||||
|
||||
add_custom_target(deps ALL DEPENDS ${_dep_list})
|
||||
|
||||
# Note: I'm not using any of the LOG_xxx options in ExternalProject_Add() commands
|
||||
|
||||
7
deps/CURL/CURL.cmake
vendored
@@ -72,10 +72,9 @@ orcaslicer_add_cmake_project(CURL
|
||||
${_curl_platform_flags}
|
||||
)
|
||||
|
||||
if(NOT OPENSSL_FOUND)
|
||||
# (openssl may or may not be built)
|
||||
add_dependencies(dep_CURL ${OPENSSL_PKG})
|
||||
endif()
|
||||
# if (APPLE OR (CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||
add_dependencies(dep_CURL dep_OpenSSL)
|
||||
# endif ()
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_CURL)
|
||||
|
||||
17
deps/GMP/GMP.cmake
vendored
@@ -1,16 +1,17 @@
|
||||
|
||||
set(_srcdir ${CMAKE_CURRENT_LIST_DIR}/gmp)
|
||||
set(_dstdir ${DESTDIR}/usr/local)
|
||||
|
||||
if (MSVC)
|
||||
set(_output ${DESTDIR}/include/gmp.h
|
||||
${DESTDIR}/lib/libgmp-10.lib
|
||||
${DESTDIR}/bin/libgmp-10.dll)
|
||||
set(_output ${_dstdir}/include/gmp.h
|
||||
${_dstdir}/lib/libgmp-10.lib
|
||||
${_dstdir}/bin/libgmp-10.dll)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_output}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/gmp.h ${DESTDIR}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.lib ${DESTDIR}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.dll ${DESTDIR}/bin/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/gmp.h ${_dstdir}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.lib ${_dstdir}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.dll ${_dstdir}/bin/
|
||||
)
|
||||
|
||||
add_custom_target(dep_GMP SOURCES ${_output})
|
||||
@@ -60,8 +61,8 @@ else ()
|
||||
URL_HASH SHA256=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/GMP
|
||||
BUILD_IN_SOURCE ON
|
||||
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}" ${_gmp_build_tgt}
|
||||
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
|
||||
BUILD_COMMAND make -j
|
||||
INSTALL_COMMAND make install
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
19
deps/MPFR/MPFR.cmake
vendored
@@ -1,17 +1,18 @@
|
||||
set(_srcdir ${CMAKE_CURRENT_LIST_DIR}/mpfr)
|
||||
set(_dstdir ${DESTDIR}/usr/local)
|
||||
|
||||
if (MSVC)
|
||||
set(_output ${DESTDIR}/include/mpfr.h
|
||||
${DESTDIR}/include/mpf2mpfr.h
|
||||
${DESTDIR}/lib/libmpfr-4.lib
|
||||
${DESTDIR}/bin/libmpfr-4.dll)
|
||||
set(_output ${_dstdir}/include/mpfr.h
|
||||
${_dstdir}/include/mpf2mpfr.h
|
||||
${_dstdir}/lib/libmpfr-4.lib
|
||||
${_dstdir}/bin/libmpfr-4.dll)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_output}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpfr.h ${DESTDIR}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpf2mpfr.h ${DESTDIR}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.lib ${DESTDIR}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.dll ${DESTDIR}/bin/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpfr.h ${_dstdir}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/include/mpf2mpfr.h ${_dstdir}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.lib ${_dstdir}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libmpfr-4.dll ${_dstdir}/bin/
|
||||
)
|
||||
|
||||
add_custom_target(dep_MPFR SOURCES ${_output})
|
||||
@@ -30,7 +31,7 @@ else ()
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/MPFR
|
||||
BUILD_IN_SOURCE ON
|
||||
CONFIGURE_COMMAND autoreconf -f -i &&
|
||||
env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --prefix=${DESTDIR} --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR} ${_gmp_build_tgt}
|
||||
env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
|
||||
BUILD_COMMAND make -j
|
||||
INSTALL_COMMAND make install
|
||||
DEPENDS dep_GMP
|
||||
|
||||
13
deps/OCCT/OCCT.cmake
vendored
@@ -4,17 +4,17 @@ else()
|
||||
set(library_build_type "Static")
|
||||
endif()
|
||||
|
||||
if (IN_GIT_REPO)
|
||||
set(OCCT_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_OCCT-prefix/src/dep_OCCT)
|
||||
endif ()
|
||||
|
||||
# get relative path of CMAKE_BINARY_DIR against root source directory
|
||||
file(RELATIVE_PATH BINARY_DIR_REL ${CMAKE_SOURCE_DIR}/.. ${CMAKE_BINARY_DIR})
|
||||
|
||||
orcaslicer_add_cmake_project(OCCT
|
||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip
|
||||
URL_HASH SHA256=28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc
|
||||
#PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch
|
||||
PATCH_COMMAND git apply ${OCCT_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch
|
||||
PATCH_COMMAND git apply --directory ${BINARY_DIR_REL}/dep_OCCT-prefix/src/dep_OCCT --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-OCCT-fix.patch
|
||||
#DEPENDS dep_Boost
|
||||
DEPENDS ${FREETYPE_PKG}
|
||||
#DEPENDS dep_FREETYPE
|
||||
CMAKE_ARGS
|
||||
-DBUILD_LIBRARY_TYPE=${library_build_type}
|
||||
-DUSE_TK=OFF
|
||||
@@ -22,7 +22,6 @@ orcaslicer_add_cmake_project(OCCT
|
||||
#-DUSE_FREETYPE=OFF
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_VTK=OFF
|
||||
-DBUILD_DOC_Overview=OFF
|
||||
-DBUILD_MODULE_ApplicationFramework=OFF
|
||||
#-DBUILD_MODULE_DataExchange=OFF
|
||||
-DBUILD_MODULE_Draw=OFF
|
||||
@@ -32,4 +31,4 @@ orcaslicer_add_cmake_project(OCCT
|
||||
-DBUILD_MODULE_Visualization=OFF
|
||||
)
|
||||
|
||||
# add_dependencies(dep_OCCT ${FREETYPE_PKG})
|
||||
add_dependencies(dep_OCCT dep_FREETYPE)
|
||||
|
||||
52
deps/OpenCV/0001-vs2022.patch
vendored
@@ -1,52 +0,0 @@
|
||||
From 6fb3f6333150a777e835fc7c48e49750591bf7fe Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Buch <bebuch@users.noreply.github.com>
|
||||
Date: Thu, 23 May 2024 16:05:19 +0200
|
||||
Subject: [PATCH] Support VS 2022 17.1x.y
|
||||
|
||||
With 17.10.0 the MSVC toolset was set to 19.40.x which breaks the compatibility test in the OpenCV's CMake Config files.
|
||||
---
|
||||
cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
index b0f254ebe8..62e36272f3 100644
|
||||
--- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
+++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
@@ -137,7 +137,7 @@ elseif(MSVC)
|
||||
set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version
|
||||
endif()
|
||||
endif()
|
||||
- elseif(MSVC_VERSION MATCHES "^193[0-9]$")
|
||||
+ elseif(MSVC_VERSION MATCHES "^19[34][0-9]$")
|
||||
set(OpenCV_RUNTIME vc17)
|
||||
check_one_config(has_VS2022)
|
||||
if(NOT has_VS2022)
|
||||
--
|
||||
2.45.2.windows.1
|
||||
|
||||
From f85818ba6f9031c450475a7453dee0acce31a881 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Buch <bebuch@users.noreply.github.com>
|
||||
Date: Fri, 24 May 2024 11:10:09 +0200
|
||||
Subject: [PATCH] Support VS 2022 17.1x.y in OpenCVDetectCXXCompiler.cmake
|
||||
|
||||
With 17.10.0 the MSVC toolset was set to 19.40.x which breaks the compatibility test in the OpenCV's CMake Config files.
|
||||
---
|
||||
cmake/OpenCVDetectCXXCompiler.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
index 1743aca11f..448afd46ea 100644
|
||||
--- a/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
+++ b/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
@@ -176,7 +176,7 @@ elseif(MSVC)
|
||||
set(OpenCV_RUNTIME vc15)
|
||||
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
|
||||
set(OpenCV_RUNTIME vc16)
|
||||
- elseif(MSVC_VERSION MATCHES "^193[0-9]$")
|
||||
+ elseif(MSVC_VERSION MATCHES "^19[34][0-9]$")
|
||||
set(OpenCV_RUNTIME vc17)
|
||||
else()
|
||||
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
|
||||
--
|
||||
2.45.2.windows.1
|
||||
|
||||
77
deps/OpenCV/OpenCV.cmake
vendored
@@ -1,77 +0,0 @@
|
||||
if (MSVC)
|
||||
set(_use_IPP "-DWITH_IPP=ON")
|
||||
else ()
|
||||
set(_use_IPP "-DWITH_IPP=OFF")
|
||||
endif ()
|
||||
|
||||
if (IN_GIT_REPO)
|
||||
set(OpenCV_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_OpenCV-prefix/src/dep_OpenCV)
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(OpenCV
|
||||
URL https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
|
||||
URL_HASH SHA256=1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
|
||||
PATCH_COMMAND git apply ${OpenCV_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-vs2022.patch
|
||||
CMAKE_ARGS
|
||||
-DBUILD_SHARED_LIBS=0
|
||||
-DBUILD_PERE_TESTS=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_opencv_python_tests=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_JASPER=OFF
|
||||
-DBUILD_JAVA=OFF
|
||||
-DBUILD_JPEG=ON
|
||||
-DBUILD_APPS_LIST=version
|
||||
-DBUILD_opencv_apps=OFF
|
||||
-DBUILD_opencv_java=OFF
|
||||
-DBUILD_OPENEXR=OFF
|
||||
-DBUILD_PNG=ON
|
||||
-DBUILD_TBB=OFF
|
||||
-DBUILD_WEBP=OFF
|
||||
-DBUILD_ZLIB=OFF
|
||||
-DWITH_1394=OFF
|
||||
-DWITH_CUDA=OFF
|
||||
-DWITH_EIGEN=OFF
|
||||
${_use_IPP}
|
||||
-DWITH_ITT=OFF
|
||||
-DWITH_FFMPEG=OFF
|
||||
-DWITH_GPHOTO2=OFF
|
||||
-DWITH_GSTREAMER=OFF
|
||||
-DOPENCV_GAPI_GSTREAMER=OFF
|
||||
-DWITH_GTK_2_X=OFF
|
||||
-DWITH_JASPER=OFF
|
||||
-DWITH_LAPACK=OFF
|
||||
-DWITH_MATLAB=OFF
|
||||
-DWITH_MFX=OFF
|
||||
-DWITH_DIRECTX=OFF
|
||||
-DWITH_DIRECTML=OFF
|
||||
-DWITH_OPENCL=OFF
|
||||
-DWITH_OPENCL_D3D11_NV=OFF
|
||||
-DWITH_OPENCLAMDBLAS=OFF
|
||||
-DWITH_OPENCLAMDFFT=OFF
|
||||
-DWITH_OPENEXR=OFF
|
||||
-DWITH_OPENJPEG=OFF
|
||||
-DWITH_QUIRC=OFF
|
||||
-DWITH_VTK=OFF
|
||||
-DWITH_WEBP=OFF
|
||||
-DENABLE_PRECOMPILED_HEADERS=OFF
|
||||
-DINSTALL_TESTS=OFF
|
||||
-DINSTALL_C_EXAMPLES=OFF
|
||||
-DINSTALL_PYTHON_EXAMPLES=OFF
|
||||
-DOPENCV_GENERATE_SETUPVARS=OFF
|
||||
-DOPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT=OFF
|
||||
-DBUILD_opencv_python2=OFF
|
||||
-DBUILD_opencv_python3=OFF
|
||||
-DWITH_OPENVINO=OFF
|
||||
-DWITH_INF_ENGINE=OFF
|
||||
-DWITH_NGRAPH=OFF
|
||||
-DBUILD_WITH_STATIC_CRT=OFF#set /MDd /MD
|
||||
-DBUILD_LIST=core,imgcodecs,imgproc,world
|
||||
-DBUILD_opencv_highgui=OFF
|
||||
-DWITH_ADE=OFF
|
||||
-DBUILD_opencv_world=ON
|
||||
-DWITH_PROTOBUF=OFF
|
||||
-DWITH_WIN32UI=OFF
|
||||
-DHAVE_WIN32UI=FALSE
|
||||
)
|
||||
|
||||
6
deps/OpenEXR/OpenEXR.cmake
vendored
@@ -15,11 +15,11 @@ if (APPLE AND IS_CROSS_COMPILE)
|
||||
EXCLUDE_FROM_ALL ON
|
||||
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
||||
URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
INSTALL_DIR ${DESTDIR}/usr/local
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenEXR
|
||||
${_openxr_list_sep}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
@@ -54,4 +54,4 @@ endif()
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_OpenEXR)
|
||||
endif ()
|
||||
endif ()
|
||||
6
deps/OpenSSL/OpenSSL.cmake
vendored
@@ -46,8 +46,8 @@ ExternalProject_Add(dep_OpenSSL
|
||||
# URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL
|
||||
CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch}
|
||||
"--openssldir=${DESTDIR}"
|
||||
"--prefix=${DESTDIR}"
|
||||
"--openssldir=${DESTDIR}/usr/local"
|
||||
"--prefix=${DESTDIR}/usr/local"
|
||||
${_cross_comp_prefix_line}
|
||||
no-shared
|
||||
no-asm
|
||||
@@ -61,6 +61,6 @@ ExternalProject_Add(dep_OpenSSL
|
||||
ExternalProject_Add_Step(dep_OpenSSL install_cmake_files
|
||||
DEPENDEES install
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory openssl "${DESTDIR}${CMAKE_INSTALL_LIBDIR}/cmake/openssl"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory openssl "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/openssl"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
|
||||
79
deps/TBB/GNU.cmake
vendored
@@ -1,79 +0,0 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if (MINGW)
|
||||
set(TBB_LINK_DEF_FILE_FLAG "")
|
||||
set(TBB_DEF_FILE_PREFIX "")
|
||||
elseif (APPLE)
|
||||
set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)
|
||||
set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})
|
||||
|
||||
# For correct ucontext.h structures layout
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -D_XOPEN_SOURCE)
|
||||
else()
|
||||
set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)
|
||||
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
|
||||
endif()
|
||||
|
||||
# Add -Wno-error=stringop-overflow to fix GCC 12+ build as suggested on https://github.com/oneapi-src/oneTBB/issues/843#issuecomment-1152646035
|
||||
set(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror> -Wfatal-errors -Wno-error=stringop-overflow)
|
||||
set(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)
|
||||
|
||||
# Depfile options (e.g. -MD) are inserted automatically in some cases.
|
||||
# Don't add -MMD to avoid conflicts in such cases.
|
||||
if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)
|
||||
set(TBB_MMD_FLAG -MMD)
|
||||
endif()
|
||||
|
||||
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)
|
||||
endif()
|
||||
|
||||
if (NOT MINGW)
|
||||
set(TBB_COMMON_LINK_LIBS dl)
|
||||
endif()
|
||||
|
||||
# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
|
||||
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
||||
tbb_remove_compile_flag(-Werror)
|
||||
endif()
|
||||
|
||||
if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
|
||||
# gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
|
||||
set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)
|
||||
endif()
|
||||
|
||||
# Workaround for heavy tests and too many symbols in debug (rellocation truncated to fit: R_MIPS_CALL16)
|
||||
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips")
|
||||
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -DTBB_TEST_LOW_WORKLOAD $<$<CONFIG:DEBUG>:-mxgot>)
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
list(APPEND TBB_COMMON_COMPILE_FLAGS -U__STRICT_ANSI__)
|
||||
endif()
|
||||
|
||||
# For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.
|
||||
if (NOT TBB_SANITIZE MATCHES "thread")
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
||||
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
||||
endif()
|
||||
|
||||
# Disable lto flag
|
||||
set(TBB_IPO_COMPILE_FLAGS "")
|
||||
set(TBB_IPO_LINK_FLAGS "")
|
||||
|
||||
# TBB malloc settings
|
||||
set(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)
|
||||
set(TBB_OPENMP_FLAG -fopenmp)
|
||||
8
deps/TBB/TBB.cmake
vendored
@@ -1,14 +1,8 @@
|
||||
if (FLATPAK)
|
||||
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/GNU.cmake ./cmake/compilers/GNU.cmake)
|
||||
else()
|
||||
set(_patch_command "")
|
||||
endif()
|
||||
|
||||
orcaslicer_add_cmake_project(
|
||||
TBB
|
||||
URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip"
|
||||
URL_HASH SHA256=83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
|
||||
PATCH_COMMAND ${_patch_command}
|
||||
#PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-TBB-GCC13.patch
|
||||
CMAKE_ARGS
|
||||
-DTBB_BUILD_SHARED=OFF
|
||||
-DTBB_BUILD_TESTS=OFF
|
||||
|
||||
1
deps/TIFF/TIFF.cmake
vendored
@@ -11,7 +11,6 @@ if (APPLE)
|
||||
-Dwebp:BOOL=OFF
|
||||
-Djbig:BOOL=OFF
|
||||
-Dzstd:BOOL=OFF
|
||||
-Dlibdeflate:BOOL=OFF
|
||||
-Dpixarlog:BOOL=OFF
|
||||
)
|
||||
else()
|
||||
|
||||
4
deps/deps-windows.cmake
vendored
@@ -15,8 +15,8 @@ elseif (MSVC_VERSION LESS 1930)
|
||||
# 1920-1929 = VS 16.0 (v142 toolset)
|
||||
set(DEP_VS_VER "16")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.2")
|
||||
elseif (MSVC_VERSION LESS 1950)
|
||||
# 1930-1949 = VS 17.0 (v143 toolset)
|
||||
elseif (MSVC_VERSION LESS 1940)
|
||||
# 1930-1939 = VS 17.0 (v143 toolset)
|
||||
set(DEP_VS_VER "17")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.3")
|
||||
else ()
|
||||
|
||||
4
deps/libnoise/libnoise.cmake
vendored
@@ -1,4 +0,0 @@
|
||||
orcaslicer_add_cmake_project(libnoise
|
||||
URL https://github.com/SoftFever/Orca-deps-libnoise/archive/refs/tags/1.0.zip
|
||||
URL_HASH SHA256=96ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6
|
||||
)
|
||||
683
deps/wxWidgets/0001-patch-v3.2.1-for-OrcaSlicer.patch
vendored
Normal file
@@ -0,0 +1,683 @@
|
||||
From f4fef135f0a58ca2916c45cd539923ab096935b6 Mon Sep 17 00:00:00 2001
|
||||
From: Ocraftyone <Ocraftyone@users.noreply.github.com>
|
||||
Date: Thu, 30 Nov 2023 03:25:54 -0500
|
||||
Subject: [PATCH] patch v3.2.1 for OrcaSlicer
|
||||
|
||||
---
|
||||
build/cmake/lib/webview/CMakeLists.txt | 4 +-
|
||||
include/wx/fontutil.h | 15 +++++++-
|
||||
include/wx/gdicmn.h | 3 ++
|
||||
include/wx/generic/grid.h | 4 +-
|
||||
include/wx/msw/font.h | 2 +-
|
||||
include/wx/msw/tooltip.h | 4 +-
|
||||
include/wx/osx/app.h | 2 +-
|
||||
src/common/combocmn.cpp | 11 +++++-
|
||||
src/common/datavcmn.cpp | 6 ++-
|
||||
src/common/dcbufcmn.cpp | 6 +++
|
||||
src/common/gdicmn.cpp | 14 +++++++
|
||||
src/common/image.cpp | 6 +--
|
||||
src/generic/grid.cpp | 50 ++++++++++++++++++++-----
|
||||
src/msw/bmpcbox.cpp | 9 ++++-
|
||||
src/msw/font.cpp | 14 +++----
|
||||
src/msw/menuitem.cpp | 2 +
|
||||
src/msw/window.cpp | 52 +++++++++++++++++---------
|
||||
src/osx/cocoa/dataview.mm | 26 +++++++++++--
|
||||
src/osx/cocoa/settings.mm | 6 +--
|
||||
src/osx/cocoa/window.mm | 4 ++
|
||||
20 files changed, 184 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/build/cmake/lib/webview/CMakeLists.txt b/build/cmake/lib/webview/CMakeLists.txt
|
||||
index 085381d785..62146abc04 100644
|
||||
--- a/build/cmake/lib/webview/CMakeLists.txt
|
||||
+++ b/build/cmake/lib/webview/CMakeLists.txt
|
||||
@@ -46,9 +46,9 @@ if(APPLE)
|
||||
elseif(WXMSW)
|
||||
if(wxUSE_WEBVIEW_EDGE)
|
||||
# Update the following variables if updating WebView2 SDK
|
||||
- set(WEBVIEW2_VERSION "1.0.705.50")
|
||||
+ set(WEBVIEW2_VERSION "1.0.1418.22")
|
||||
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
|
||||
- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d")
|
||||
+ set(WEBVIEW2_SHA256 "51d2ef56196e2a9d768a6843385bcb9c6baf9ed34b2603ddb074fb4995543a99")
|
||||
|
||||
set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}")
|
||||
|
||||
diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h
|
||||
index 30529db8ce..e6a12366d5 100644
|
||||
--- a/include/wx/fontutil.h
|
||||
+++ b/include/wx/fontutil.h
|
||||
@@ -294,7 +294,11 @@ public:
|
||||
wxFontEncoding GetEncoding() const;
|
||||
|
||||
void SetPointSize(int pointsize);
|
||||
- void SetFractionalPointSize(double pointsize);
|
||||
+ void SetFractionalPointSize(double pointsize
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ );
|
||||
void SetPixelSize(const wxSize& pixelSize);
|
||||
void SetStyle(wxFontStyle style);
|
||||
void SetNumericWeight(int weight);
|
||||
@@ -307,12 +311,19 @@ public:
|
||||
|
||||
// Helper used in many ports: use the normal font size if the input is
|
||||
// negative, as we handle -1 as meaning this for compatibility.
|
||||
- void SetSizeOrDefault(double size)
|
||||
+ void SetSizeOrDefault(double size
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
SetFractionalPointSize
|
||||
(
|
||||
size < 0 ? wxNORMAL_FONT->GetFractionalPointSize()
|
||||
: size
|
||||
+#if defined(__WXMSW__)
|
||||
+ ,window
|
||||
+#endif
|
||||
);
|
||||
}
|
||||
|
||||
diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h
|
||||
index 2f5f8ee99f..39e9317d40 100644
|
||||
--- a/include/wx/gdicmn.h
|
||||
+++ b/include/wx/gdicmn.h
|
||||
@@ -38,6 +38,7 @@ class WXDLLIMPEXP_FWD_CORE wxRegion;
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPoint;
|
||||
+class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// constants
|
||||
@@ -1106,7 +1107,9 @@ extern int WXDLLIMPEXP_CORE wxDisplayDepth();
|
||||
|
||||
// get the display size
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height);
|
||||
+extern void WXDLLIMPEXP_CORE wxDisplaySize(const wxWindow *window, int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize();
|
||||
+extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize(const wxWindow *window);
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySizeMM(int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM();
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI();
|
||||
diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h
|
||||
index 1bd58bbf04..903cb81319 100644
|
||||
--- a/include/wx/generic/grid.h
|
||||
+++ b/include/wx/generic/grid.h
|
||||
@@ -3029,9 +3029,11 @@ private:
|
||||
// Update the width/height of the column/row being drag-resized.
|
||||
// Should be only called when m_dragRowOrCol != -1, i.e. dragging is
|
||||
// actually in progress.
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow);
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode);
|
||||
|
||||
// process different clicks on grid cells
|
||||
void DoGridCellLeftDown(wxMouseEvent& event,
|
||||
diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h
|
||||
index 0f9768b44e..094d774918 100644
|
||||
--- a/include/wx/msw/font.h
|
||||
+++ b/include/wx/msw/font.h
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
- wxFont(const wxFontInfo& info);
|
||||
+ wxFont(const wxFontInfo& info, const wxWindow *window = nullptr);
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h
|
||||
index 4c3be08cec..96fb378d01 100644
|
||||
--- a/include/wx/msw/tooltip.h
|
||||
+++ b/include/wx/msw/tooltip.h
|
||||
@@ -91,10 +91,10 @@ private:
|
||||
// the one and only one tooltip control we use - never access it directly
|
||||
// but use GetToolTipCtrl() which will create it when needed
|
||||
static WXHWND ms_hwndTT;
|
||||
-
|
||||
+public:
|
||||
// create the tooltip ctrl if it doesn't exist yet and return its HWND
|
||||
static WXHWND GetToolTipCtrl();
|
||||
-
|
||||
+private:
|
||||
// to be used in wxModule for deleting tooltip ctrl window when exiting mainloop
|
||||
static void DeleteToolTipCtrl();
|
||||
|
||||
diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h
|
||||
index 317a0ca96f..58014ec1d4 100644
|
||||
--- a/include/wx/osx/app.h
|
||||
+++ b/include/wx/osx/app.h
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
|
||||
public:
|
||||
bool OSXInitWasCalled() { return m_inited; }
|
||||
- void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
+ virtual void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
|
||||
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
|
||||
#endif
|
||||
diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp
|
||||
index 80408c6677..aa07caebdc 100644
|
||||
--- a/src/common/combocmn.cpp
|
||||
+++ b/src/common/combocmn.cpp
|
||||
@@ -2061,6 +2061,9 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
SetFocus();
|
||||
|
||||
+ //int displayIdx = wxDisplay::GetFromWindow(this);
|
||||
+ //wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
||||
+
|
||||
// Space above and below
|
||||
int screenHeight;
|
||||
wxPoint scrPos;
|
||||
@@ -2183,9 +2186,13 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
int showFlags = CanDeferShow;
|
||||
|
||||
- if ( spaceBelow < szp.y )
|
||||
+ int anchorSideVertical = m_anchorSide & (wxUP | wxDOWN);
|
||||
+ if (// Pop up as asked for by the library user.
|
||||
+ (anchorSideVertical & wxUP) ||
|
||||
+ // Automatic: Pop up if it does not fit down.
|
||||
+ (anchorSideVertical == 0 && spaceBelow < szp.y ))
|
||||
{
|
||||
- popupY = scrPos.y - szp.y;
|
||||
+ popupY = scrPos.y - szp.y + displayRect.GetTop();
|
||||
showFlags |= ShowAbove;
|
||||
}
|
||||
|
||||
diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp
|
||||
index 0a1e43ad51..6c492aedab 100644
|
||||
--- a/src/common/datavcmn.cpp
|
||||
+++ b/src/common/datavcmn.cpp
|
||||
@@ -1334,7 +1334,11 @@ wxDataViewItem wxDataViewCtrlBase::GetSelection() const
|
||||
|
||||
wxDataViewItemArray selections;
|
||||
GetSelections(selections);
|
||||
- return selections[0];
|
||||
+ // BBS
|
||||
+ if (!selections.empty())
|
||||
+ return selections[0];
|
||||
+ else
|
||||
+ return wxDataViewItem(0);
|
||||
}
|
||||
|
||||
namespace
|
||||
diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp
|
||||
index 9b1c1f3159..ef5865ed4b 100644
|
||||
--- a/src/common/dcbufcmn.cpp
|
||||
+++ b/src/common/dcbufcmn.cpp
|
||||
@@ -83,9 +83,15 @@ private:
|
||||
const double scale = dc ? dc->GetContentScaleFactor() : 1.0;
|
||||
wxBitmap* const buffer = new wxBitmap;
|
||||
|
||||
+#if __WXMSW__
|
||||
+ // we must always return a valid bitmap but creating a bitmap of
|
||||
+ // size 0 would fail, so create a 1*1 bitmap in this case
|
||||
+ buffer->Create(wxMax(w, 1), wxMax(h, 1), 24);
|
||||
+#else
|
||||
// we must always return a valid bitmap but creating a bitmap of
|
||||
// size 0 would fail, so create a 1*1 bitmap in this case
|
||||
buffer->CreateWithDIPSize(wxMax(w, 1), wxMax(h, 1), scale);
|
||||
+#endif
|
||||
|
||||
return buffer;
|
||||
}
|
||||
diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp
|
||||
index db8a01f961..162c1ce2dc 100644
|
||||
--- a/src/common/gdicmn.cpp
|
||||
+++ b/src/common/gdicmn.cpp
|
||||
@@ -863,11 +863,25 @@ void wxDisplaySize(int *width, int *height)
|
||||
*height = size.y;
|
||||
}
|
||||
|
||||
+void wxDisplaySize(const wxWindow *window, int *width, int *height)
|
||||
+{
|
||||
+ const wxSize size = wxGetDisplaySize(window);
|
||||
+ if ( width )
|
||||
+ *width = size.x;
|
||||
+ if ( height )
|
||||
+ *height = size.y;
|
||||
+}
|
||||
+
|
||||
wxSize wxGetDisplaySize()
|
||||
{
|
||||
return wxDisplay().GetGeometry().GetSize();
|
||||
}
|
||||
|
||||
+wxSize wxGetDisplaySize(const wxWindow *window)
|
||||
+{
|
||||
+ return window ? wxDisplay(window).GetGeometry().GetSize() : wxDisplay().GetGeometry().GetSize();
|
||||
+}
|
||||
+
|
||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
const wxRect rect = wxGetClientDisplayRect();
|
||||
diff --git a/src/common/image.cpp b/src/common/image.cpp
|
||||
index 19fe34ec91..a449b60930 100644
|
||||
--- a/src/common/image.cpp
|
||||
+++ b/src/common/image.cpp
|
||||
@@ -390,11 +390,11 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const
|
||||
unsigned char red = pixel[0] ;
|
||||
unsigned char green = pixel[1] ;
|
||||
unsigned char blue = pixel[2] ;
|
||||
- unsigned char alpha = 255 ;
|
||||
- if ( source_alpha )
|
||||
- alpha = *(source_alpha + y_offset + x * xFactor + x1) ;
|
||||
if ( !hasMask || red != maskRed || green != maskGreen || blue != maskBlue )
|
||||
{
|
||||
+ unsigned char alpha = 255 ;
|
||||
+ if ( source_alpha )
|
||||
+ alpha = *(source_alpha + y_offset + x * xFactor + x1) ;
|
||||
if ( alpha > 0 )
|
||||
{
|
||||
avgRed += red ;
|
||||
diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp
|
||||
index ed3d988994..d71cda122d 100644
|
||||
--- a/src/generic/grid.cpp
|
||||
+++ b/src/generic/grid.cpp
|
||||
@@ -4068,7 +4068,8 @@ void wxGrid::ProcessRowColLabelMouseEvent( const wxGridOperations &oper, wxMouse
|
||||
{
|
||||
if ( m_cursorMode == oper.GetCursorModeResize() )
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), oper, gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), oper, gridWindow, m_cursorMode);
|
||||
}
|
||||
else if ( m_cursorMode == oper.GetCursorModeSelect() && line >=0 )
|
||||
{
|
||||
@@ -4691,12 +4692,14 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_ROW:
|
||||
if ( m_dragRowOrCol != -1 )
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
break;
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_COL:
|
||||
if ( m_dragRowOrCol != -1 )
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4791,6 +4794,8 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event,
|
||||
case wxGridSelectCells:
|
||||
case wxGridSelectRowsOrColumns:
|
||||
// nothing to do in these cases
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(coords.GetRow(), coords.GetCol(), coords.GetRow(), coords.GetCol(), event);
|
||||
break;
|
||||
|
||||
case wxGridSelectRows:
|
||||
@@ -5049,9 +5054,11 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG
|
||||
}
|
||||
}
|
||||
|
||||
+//BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow)
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode)
|
||||
{
|
||||
wxCHECK_RET( m_dragRowOrCol != -1,
|
||||
"shouldn't be called when not drag resizing" );
|
||||
@@ -5064,10 +5071,28 @@ void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
// orthogonal direction.
|
||||
const int linePos = oper.Dual().Select(logicalPos);
|
||||
|
||||
- const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
- oper.SetLineSize(this, m_dragRowOrCol,
|
||||
+ //BBS: add logic for resize multiplexed cols
|
||||
+ if (mode == WXGRID_CURSOR_RESIZE_COL) {
|
||||
+ int col_to_resize = m_dragRowOrCol;
|
||||
+ int num_rows, num_cols;
|
||||
+ this->GetCellSize(0, m_dragRowOrCol, &num_rows, &num_cols);
|
||||
+ if (num_cols < 1)
|
||||
+ col_to_resize = m_dragRowOrCol - 1;
|
||||
+
|
||||
+ const int lineEnd = oper.GetLineEndPos(this, m_dragRowOrCol);
|
||||
+ const int lineSize = oper.GetLineSize(this, col_to_resize);
|
||||
+ int size = linePos - lineEnd + lineSize;
|
||||
+ oper.SetLineSize(this, col_to_resize,
|
||||
+ wxMax(size,
|
||||
+ oper.GetMinimalLineSize(this, col_to_resize)));
|
||||
+ }
|
||||
+ else {
|
||||
+ const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
+
|
||||
+ oper.SetLineSize(this, m_dragRowOrCol,
|
||||
wxMax(linePos - lineStart,
|
||||
oper.GetMinimalLineSize(this, m_dragRowOrCol)));
|
||||
+ }
|
||||
|
||||
// TODO: generate RESIZING event, see #10754, if the size has changed.
|
||||
}
|
||||
@@ -5090,7 +5115,8 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
||||
|
||||
void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, event);
|
||||
|
||||
@@ -5099,7 +5125,8 @@ void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWin
|
||||
|
||||
void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_COL_SIZE, m_dragRowOrCol, event);
|
||||
|
||||
@@ -5113,9 +5140,10 @@ void wxGrid::DoHeaderStartDragResizeCol(int col)
|
||||
|
||||
void wxGrid::DoHeaderDragResizeCol(int width)
|
||||
{
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
DoGridDragResize(GetPositionForResizeEvent(width),
|
||||
wxGridColumnOperations(),
|
||||
- m_gridWin);
|
||||
+ m_gridWin, WXGRID_CURSOR_RESIZE_COL);
|
||||
}
|
||||
|
||||
void wxGrid::DoHeaderEndDragResizeCol(int width)
|
||||
@@ -6013,6 +6041,10 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
DisableCellEditControl();
|
||||
|
||||
MoveCursorDown( event.ShiftDown() );
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ event);
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp
|
||||
index 011bd4f534..17e7f18740 100644
|
||||
--- a/src/msw/bmpcbox.cpp
|
||||
+++ b/src/msw/bmpcbox.cpp
|
||||
@@ -156,13 +156,20 @@ void wxBitmapComboBox::RecreateControl()
|
||||
|
||||
wxComboBox::DoClear();
|
||||
|
||||
- HWND hwnd = GetHwnd();
|
||||
+ WNDPROC wndproc_edit = nullptr;
|
||||
+ WinStruct<COMBOBOXINFO> combobox_info;
|
||||
+ HWND hwnd = GetHwnd();
|
||||
+if (::GetComboBoxInfo(hwnd, &combobox_info))
|
||||
+ wndproc_edit = (WNDPROC)wxGetWindowProc(combobox_info.hwndItem);
|
||||
DissociateHandle();
|
||||
::DestroyWindow(hwnd);
|
||||
|
||||
if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) )
|
||||
return;
|
||||
|
||||
+if (::GetComboBoxInfo(GetHwnd(), &combobox_info))
|
||||
+ wxSetWindowProc(combobox_info.hwndItem, wndproc_edit);
|
||||
+
|
||||
// initialize the controls contents
|
||||
for ( i = 0; i < numItems; i++ )
|
||||
{
|
||||
diff --git a/src/msw/font.cpp b/src/msw/font.cpp
|
||||
index 434876939c..91d4603018 100644
|
||||
--- a/src/msw/font.cpp
|
||||
+++ b/src/msw/font.cpp
|
||||
@@ -54,7 +54,7 @@ static const int PITCH_MASK = FIXED_PITCH | VARIABLE_PITCH;
|
||||
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
- wxFontRefData(const wxFontInfo& info = wxFontInfo());
|
||||
+ wxFontRefData(const wxFontInfo& info = wxFontInfo(), const wxWindow* window = nullptr);
|
||||
|
||||
wxFontRefData(const wxNativeFontInfo& info, WXHFONT hFont = 0)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ protected:
|
||||
// wxFontRefData
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
-wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
+wxFontRefData::wxFontRefData(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
m_hFont = NULL;
|
||||
|
||||
@@ -335,7 +335,7 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
}
|
||||
else
|
||||
{
|
||||
- m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize());
|
||||
+ m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize(), window);
|
||||
}
|
||||
|
||||
SetStyle(info.GetStyle());
|
||||
@@ -518,12 +518,12 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
|
||||
return wxGetFontEncFromCharSet(lf.lfCharSet);
|
||||
}
|
||||
|
||||
-void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew)
|
||||
+void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew, const wxWindow *window)
|
||||
{
|
||||
// We don't have the correct DPI to use here, so use that of the
|
||||
// primary screen and rely on WXAdjustToPPI() changing it later if
|
||||
// necessary.
|
||||
- const int ppi = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
+ const int ppi = window ? window->GetDPI().GetY() : ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
lf.lfHeight = GetLogFontHeightAtPPI(pointSizeNew, ppi);
|
||||
|
||||
pointSize = pointSizeNew;
|
||||
@@ -812,9 +812,9 @@ wxFont::wxFont(const wxString& fontdesc)
|
||||
(void)Create(info);
|
||||
}
|
||||
|
||||
-wxFont::wxFont(const wxFontInfo& info)
|
||||
+wxFont::wxFont(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
- m_refData = new wxFontRefData(info);
|
||||
+ m_refData = new wxFontRefData(info, window);
|
||||
}
|
||||
|
||||
bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
|
||||
diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp
|
||||
index 0bd017a36a..3b98bf1678 100644
|
||||
--- a/src/msw/menuitem.cpp
|
||||
+++ b/src/msw/menuitem.cpp
|
||||
@@ -368,6 +368,8 @@ void MenuDrawData::Init(wxWindow const* window)
|
||||
// native menu uses small top margin for separator
|
||||
if ( SeparatorMargin.cyTopHeight >= 2 )
|
||||
SeparatorMargin.cyTopHeight -= 2;
|
||||
+
|
||||
+ SeparatorSize.cy = 0;
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_UXTHEME
|
||||
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
|
||||
index c529a4fa3b..7e547c64df 100644
|
||||
--- a/src/msw/window.cpp
|
||||
+++ b/src/msw/window.cpp
|
||||
@@ -4809,33 +4809,49 @@ static wxSize GetWindowDPI(HWND hwnd)
|
||||
}
|
||||
|
||||
/*extern*/
|
||||
-int wxGetSystemMetrics(int nIndex, const wxWindow* window)
|
||||
+int wxGetSystemMetrics(int nIndex, const wxWindow* win)
|
||||
{
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
- if ( !window )
|
||||
- window = wxApp::GetMainTopWindow();
|
||||
+ const wxWindow* window = (!win && wxTheApp) ? wxTheApp->GetTopWindow() : win;
|
||||
|
||||
- if ( window )
|
||||
+ if (window)
|
||||
{
|
||||
- typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
- static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
- static bool s_initDone = false;
|
||||
-
|
||||
- if ( !s_initDone )
|
||||
- {
|
||||
- wxLoadedDLL dllUser32("user32.dll");
|
||||
- wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
- s_initDone = true;
|
||||
+#if 1
|
||||
+ if (window->GetHWND() && (nIndex == SM_CXSCREEN || nIndex == SM_CYSCREEN)) {
|
||||
+ HDC hdc = GetDC(window->GetHWND());
|
||||
+#if 0
|
||||
+ double dim = GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES);
|
||||
+ ReleaseDC(window->GetHWND(), hdc);
|
||||
+ wxSize dpi = window->GetDPI();
|
||||
+ dim *= 96.0 / (nIndex == SM_CXSCREEN ? dpi.x : dpi.y);
|
||||
+ return int(dim + 0.5);
|
||||
+#else
|
||||
+ return int(GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES));
|
||||
+#endif
|
||||
}
|
||||
-
|
||||
- if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ else
|
||||
+#endif
|
||||
{
|
||||
- const int dpi = window->GetDPI().y;
|
||||
- return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
+ static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
+ static bool s_initDone = false;
|
||||
+
|
||||
+ if ( !s_initDone )
|
||||
+ {
|
||||
+ wxLoadedDLL dllUser32("user32.dll");
|
||||
+ wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
+ s_initDone = true;
|
||||
+ }
|
||||
+
|
||||
+ if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ {
|
||||
+ const int dpi = window->GetDPI().y;
|
||||
+ return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#else
|
||||
- wxUnusedVar(window);
|
||||
+ wxUnusedVar(win);
|
||||
#endif // wxUSE_DYNLIB_CLASS
|
||||
|
||||
return ::GetSystemMetrics(nIndex);
|
||||
diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm
|
||||
index f188e61089..7b867002d1 100644
|
||||
--- a/src/osx/cocoa/dataview.mm
|
||||
+++ b/src/osx/cocoa/dataview.mm
|
||||
@@ -1604,6 +1604,15 @@ outlineView:(NSOutlineView*)outlineView
|
||||
}
|
||||
}
|
||||
|
||||
+//FIXME Vojtech: This is a workaround to get at least the "mouse move" events at the wxDataViewControl,
|
||||
+// so we can show the tooltips. The "mouse move" events are being send only if the wxDataViewControl
|
||||
+// has focus, which is a limitation of wxWidgets. We may grab focus on "mouse entry" though.
|
||||
+- (void)mouseMoved:(NSEvent *)event
|
||||
+{
|
||||
+if (! implementation->DoHandleMouseEvent(event))
|
||||
+ [super mouseMoved:event];
|
||||
+}
|
||||
+
|
||||
//
|
||||
// contextual menus
|
||||
//
|
||||
@@ -2006,7 +2015,8 @@ void wxCocoaDataViewControl::keyEvent(WX_NSEvent event, WXWidget slf, void *_cmd
|
||||
if ( !dvc->GetEventHandler()->ProcessEvent(eventDV) )
|
||||
wxWidgetCocoaImpl::keyEvent(event, slf, _cmd);
|
||||
}
|
||||
- else
|
||||
+ //FIXME Vojtech's hack to get the accelerators assigned to the wxDataViewControl working.
|
||||
+ else if (! DoHandleKeyEvent(event))
|
||||
{
|
||||
wxWidgetCocoaImpl::keyEvent(event, slf, _cmd); // all other keys
|
||||
}
|
||||
@@ -2540,12 +2550,22 @@ void wxCocoaDataViewControl::DoSetIndent(int indent)
|
||||
|
||||
void wxCocoaDataViewControl::HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const
|
||||
{
|
||||
- NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),point);
|
||||
+ NSTableHeaderView *headerView = [m_OutlineView headerView];
|
||||
+ if (headerView && point.y < headerView.visibleRect.size.height) {
|
||||
+ // The point is inside the header area.
|
||||
+ columnPtr = NULL;
|
||||
+ item = wxDataViewItem();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Convert from the window coordinates to the virtual scrolled view coordinates.
|
||||
+ NSScrollView *scrollView = [m_OutlineView enclosingScrollView];
|
||||
+ const NSRect &visibleRect = scrollView.contentView.visibleRect;
|
||||
+ NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),
|
||||
+ wxPoint(point.x + visibleRect.origin.x, point.y + visibleRect.origin.y));
|
||||
|
||||
int indexColumn;
|
||||
int indexRow;
|
||||
|
||||
-
|
||||
indexColumn = [m_OutlineView columnAtPoint:nativePoint];
|
||||
indexRow = [m_OutlineView rowAtPoint: nativePoint];
|
||||
if ((indexColumn >= 0) && (indexRow >= 0))
|
||||
diff --git a/src/osx/cocoa/settings.mm b/src/osx/cocoa/settings.mm
|
||||
index c819deeb0c..dc3c3b0b53 100644
|
||||
--- a/src/osx/cocoa/settings.mm
|
||||
+++ b/src/osx/cocoa/settings.mm
|
||||
@@ -222,7 +222,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Get a system metric, e.g. scrollbar size
|
||||
-int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUNUSED(win))
|
||||
+int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* win)
|
||||
{
|
||||
int value;
|
||||
|
||||
@@ -257,11 +257,11 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUN
|
||||
// TODO case wxSYS_WINDOWMIN_Y:
|
||||
|
||||
case wxSYS_SCREEN_X:
|
||||
- wxDisplaySize(&value, NULL);
|
||||
+ wxDisplaySize(win, &value, NULL);
|
||||
return value;
|
||||
|
||||
case wxSYS_SCREEN_Y:
|
||||
- wxDisplaySize(NULL, &value);
|
||||
+ wxDisplaySize(win, NULL, &value);
|
||||
return value;
|
||||
|
||||
// TODO case wxSYS_FRAMESIZE_X:
|
||||
diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm
|
||||
index 635ea286d4..42ae67e27a 100644
|
||||
--- a/src/osx/cocoa/window.mm
|
||||
+++ b/src/osx/cocoa/window.mm
|
||||
@@ -191,6 +191,9 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const
|
||||
- (BOOL)isEnabled;
|
||||
- (void)setEnabled:(BOOL)flag;
|
||||
|
||||
+- (BOOL)clipsToBounds;
|
||||
+- (void)setClipsToBounds:(BOOL)clipsToBounds;
|
||||
+
|
||||
- (void)setImage:(NSImage *)image;
|
||||
- (void)setControlSize:(NSControlSize)size;
|
||||
|
||||
@@ -2559,6 +2562,7 @@ wxWidgetImpl( peer, flags )
|
||||
if ( m_osxView )
|
||||
CFRetain(m_osxView);
|
||||
[m_osxView release];
|
||||
+ m_osxView.clipsToBounds = YES;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.42.0.windows.2
|
||||
|
||||
743
deps/wxWidgets/0001-wx-3.1.5-patch-for-Orca.patch
vendored
Normal file
@@ -0,0 +1,743 @@
|
||||
From 5e82980ed1762338794d06b3f9f22fa10e050622 Mon Sep 17 00:00:00 2001
|
||||
From: SoftFever <softfeverever@gmail.com>
|
||||
Date: Sat, 23 Dec 2023 20:08:41 +0800
|
||||
Subject: [PATCH] wx 3.1.5 patch for Orca
|
||||
|
||||
---
|
||||
build/cmake/init.cmake | 4 ++
|
||||
build/cmake/lib/webview/CMakeLists.txt | 4 +-
|
||||
include/wx/fontutil.h | 15 +++++++-
|
||||
include/wx/gdicmn.h | 3 ++
|
||||
include/wx/generic/grid.h | 4 +-
|
||||
include/wx/msw/font.h | 2 +-
|
||||
include/wx/msw/tooltip.h | 4 +-
|
||||
include/wx/osx/app.h | 2 +-
|
||||
src/common/combocmn.cpp | 13 +++++--
|
||||
src/common/datavcmn.cpp | 6 ++-
|
||||
src/common/dcbufcmn.cpp | 8 +++-
|
||||
src/common/gdicmn.cpp | 14 +++++++
|
||||
src/common/image.cpp | 6 +--
|
||||
src/common/intl.cpp | 7 ++++
|
||||
src/generic/grid.cpp | 53 +++++++++++++++++++++-----
|
||||
src/msw/bmpcbox.cpp | 9 ++++-
|
||||
src/msw/font.cpp | 14 +++----
|
||||
src/msw/menuitem.cpp | 2 +
|
||||
src/msw/window.cpp | 52 ++++++++++++++++---------
|
||||
src/osx/cocoa/dataview.mm | 26 +++++++++++--
|
||||
src/osx/cocoa/settings.mm | 6 +--
|
||||
src/osx/cocoa/window.mm | 4 ++
|
||||
22 files changed, 199 insertions(+), 59 deletions(-)
|
||||
|
||||
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
|
||||
index 0bc4f934b9..479431a69c 100644
|
||||
--- a/build/cmake/init.cmake
|
||||
+++ b/build/cmake/init.cmake
|
||||
@@ -413,7 +413,11 @@ if(wxUSE_GUI)
|
||||
else()
|
||||
find_package(OpenGL)
|
||||
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
|
||||
+ if(UNIX AND NOT APPLE)
|
||||
+ set(OPENGL_LIBRARIES OpenGL EGL)
|
||||
+ else()
|
||||
set(OPENGL_LIBRARIES OpenGL::OpenGL OpenGL::EGL)
|
||||
+ endif()
|
||||
find_package(WAYLANDEGL)
|
||||
if(WAYLANDEGL_FOUND AND wxHAVE_GDK_WAYLAND)
|
||||
list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES})
|
||||
diff --git a/build/cmake/lib/webview/CMakeLists.txt b/build/cmake/lib/webview/CMakeLists.txt
|
||||
index cc3298ff33..aa103ae474 100644
|
||||
--- a/build/cmake/lib/webview/CMakeLists.txt
|
||||
+++ b/build/cmake/lib/webview/CMakeLists.txt
|
||||
@@ -56,9 +56,9 @@ if(APPLE)
|
||||
elseif(WXMSW)
|
||||
if(wxUSE_WEBVIEW_EDGE)
|
||||
# Update the following variables if updating WebView2 SDK
|
||||
- set(WEBVIEW2_VERSION "1.0.705.50")
|
||||
+ set(WEBVIEW2_VERSION "1.0.1418.22")
|
||||
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
|
||||
- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d")
|
||||
+ set(WEBVIEW2_SHA256 "51d2ef56196e2a9d768a6843385bcb9c6baf9ed34b2603ddb074fb4995543a99")
|
||||
|
||||
set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}")
|
||||
|
||||
diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h
|
||||
index 09ad8c8ef3..c228e167d7 100644
|
||||
--- a/include/wx/fontutil.h
|
||||
+++ b/include/wx/fontutil.h
|
||||
@@ -294,7 +294,11 @@ public:
|
||||
wxFontEncoding GetEncoding() const;
|
||||
|
||||
void SetPointSize(int pointsize);
|
||||
- void SetFractionalPointSize(double pointsize);
|
||||
+ void SetFractionalPointSize(double pointsize
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ );
|
||||
void SetPixelSize(const wxSize& pixelSize);
|
||||
void SetStyle(wxFontStyle style);
|
||||
void SetNumericWeight(int weight);
|
||||
@@ -307,12 +311,19 @@ public:
|
||||
|
||||
// Helper used in many ports: use the normal font size if the input is
|
||||
// negative, as we handle -1 as meaning this for compatibility.
|
||||
- void SetSizeOrDefault(double size)
|
||||
+ void SetSizeOrDefault(double size
|
||||
+#if defined(__WXMSW__)
|
||||
+ , const wxWindow *window = nullptr
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
SetFractionalPointSize
|
||||
(
|
||||
size < 0 ? wxNORMAL_FONT->GetFractionalPointSize()
|
||||
: size
|
||||
+#if defined(__WXMSW__)
|
||||
+ ,window
|
||||
+#endif
|
||||
);
|
||||
}
|
||||
|
||||
diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h
|
||||
index e29a77627c..dc48cf9451 100644
|
||||
--- a/include/wx/gdicmn.h
|
||||
+++ b/include/wx/gdicmn.h
|
||||
@@ -38,6 +38,7 @@ class WXDLLIMPEXP_FWD_CORE wxRegion;
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPoint;
|
||||
+class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// constants
|
||||
@@ -1092,7 +1093,9 @@ extern int WXDLLIMPEXP_CORE wxDisplayDepth();
|
||||
|
||||
// get the display size
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height);
|
||||
+extern void WXDLLIMPEXP_CORE wxDisplaySize(const wxWindow *window, int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize();
|
||||
+extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize(const wxWindow *window);
|
||||
extern void WXDLLIMPEXP_CORE wxDisplaySizeMM(int *width, int *height);
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM();
|
||||
extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI();
|
||||
diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h
|
||||
index d7a3890764..e4dee51d5a 100644
|
||||
--- a/include/wx/generic/grid.h
|
||||
+++ b/include/wx/generic/grid.h
|
||||
@@ -2951,9 +2951,11 @@ private:
|
||||
wxGridWindow* gridWindow);
|
||||
|
||||
// Update the width/height of the column/row being drag-resized.
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow);
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode);
|
||||
|
||||
// process different clicks on grid cells
|
||||
void DoGridCellLeftDown(wxMouseEvent& event,
|
||||
diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h
|
||||
index 0f9768b44e..094d774918 100644
|
||||
--- a/include/wx/msw/font.h
|
||||
+++ b/include/wx/msw/font.h
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
- wxFont(const wxFontInfo& info);
|
||||
+ wxFont(const wxFontInfo& info, const wxWindow *window = nullptr);
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h
|
||||
index 4c3be08cec..96fb378d01 100644
|
||||
--- a/include/wx/msw/tooltip.h
|
||||
+++ b/include/wx/msw/tooltip.h
|
||||
@@ -91,10 +91,10 @@ private:
|
||||
// the one and only one tooltip control we use - never access it directly
|
||||
// but use GetToolTipCtrl() which will create it when needed
|
||||
static WXHWND ms_hwndTT;
|
||||
-
|
||||
+public:
|
||||
// create the tooltip ctrl if it doesn't exist yet and return its HWND
|
||||
static WXHWND GetToolTipCtrl();
|
||||
-
|
||||
+private:
|
||||
// to be used in wxModule for deleting tooltip ctrl window when exiting mainloop
|
||||
static void DeleteToolTipCtrl();
|
||||
|
||||
diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h
|
||||
index 317a0ca96f..58014ec1d4 100644
|
||||
--- a/include/wx/osx/app.h
|
||||
+++ b/include/wx/osx/app.h
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
|
||||
public:
|
||||
bool OSXInitWasCalled() { return m_inited; }
|
||||
- void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
+ virtual void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
|
||||
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
|
||||
#endif
|
||||
diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp
|
||||
index b61aac35bf..7cfc97d2f8 100644
|
||||
--- a/src/common/combocmn.cpp
|
||||
+++ b/src/common/combocmn.cpp
|
||||
@@ -2141,7 +2141,7 @@ void wxComboCtrlBase::CreatePopup()
|
||||
#if !USES_GENERICTLW
|
||||
m_winPopup = new wxComboPopupWindowBase2( this, wxNO_BORDER );
|
||||
#else
|
||||
- int tlwFlags = wxNO_BORDER;
|
||||
+ int tlwFlags = wxNO_BORDER | wxSTAY_ON_TOP;
|
||||
#ifdef wxCC_GENERIC_TLW_IS_FRAME
|
||||
tlwFlags |= wxFRAME_NO_TASKBAR;
|
||||
#endif
|
||||
@@ -2285,6 +2285,9 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
SetFocus();
|
||||
|
||||
+ //int displayIdx = wxDisplay::GetFromWindow(this);
|
||||
+ //wxRect displayRect = wxDisplay(displayIdx != wxNOT_FOUND ? displayIdx : 0u).GetGeometry();
|
||||
+
|
||||
// Space above and below
|
||||
int screenHeight;
|
||||
wxPoint scrPos;
|
||||
@@ -2407,9 +2410,13 @@ void wxComboCtrlBase::ShowPopup()
|
||||
|
||||
int showFlags = CanDeferShow;
|
||||
|
||||
- if ( spaceBelow < szp.y )
|
||||
+ int anchorSideVertical = m_anchorSide & (wxUP | wxDOWN);
|
||||
+ if (// Pop up as asked for by the library user.
|
||||
+ (anchorSideVertical & wxUP) ||
|
||||
+ // Automatic: Pop up if it does not fit down.
|
||||
+ (anchorSideVertical == 0 && spaceBelow < szp.y ))
|
||||
{
|
||||
- popupY = scrPos.y - szp.y;
|
||||
+ popupY = scrPos.y - szp.y + displayRect.GetTop();
|
||||
showFlags |= ShowAbove;
|
||||
}
|
||||
|
||||
diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp
|
||||
index 1f5fd4d66b..14ea2f8ef1 100644
|
||||
--- a/src/common/datavcmn.cpp
|
||||
+++ b/src/common/datavcmn.cpp
|
||||
@@ -1322,7 +1322,11 @@ wxDataViewItem wxDataViewCtrlBase::GetSelection() const
|
||||
|
||||
wxDataViewItemArray selections;
|
||||
GetSelections(selections);
|
||||
- return selections[0];
|
||||
+ // BBS
|
||||
+ if (!selections.empty())
|
||||
+ return selections[0];
|
||||
+ else
|
||||
+ return wxDataViewItem(0);
|
||||
}
|
||||
|
||||
namespace
|
||||
diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp
|
||||
index 74958fce10..59844f4526 100644
|
||||
--- a/src/common/dcbufcmn.cpp
|
||||
+++ b/src/common/dcbufcmn.cpp
|
||||
@@ -82,9 +82,15 @@ private:
|
||||
const double scale = dc ? dc->GetContentScaleFactor() : 1.0;
|
||||
wxBitmap* const buffer = new wxBitmap;
|
||||
|
||||
+#if __WXMSW__
|
||||
// we must always return a valid bitmap but creating a bitmap of
|
||||
// size 0 would fail, so create a 1*1 bitmap in this case
|
||||
- buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale);
|
||||
+ buffer->Create(wxMax(w, 1), wxMax(h, 1), 24);
|
||||
+#else
|
||||
+ // we must always return a valid bitmap but creating a bitmap of
|
||||
+ // size 0 would fail, so create a 1*1 bitmap in this case
|
||||
+ buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale);
|
||||
+#endif
|
||||
|
||||
return buffer;
|
||||
}
|
||||
diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp
|
||||
index 20442bbc73..bc2c35bee6 100644
|
||||
--- a/src/common/gdicmn.cpp
|
||||
+++ b/src/common/gdicmn.cpp
|
||||
@@ -863,11 +863,25 @@ void wxDisplaySize(int *width, int *height)
|
||||
*height = size.y;
|
||||
}
|
||||
|
||||
+void wxDisplaySize(const wxWindow *window, int *width, int *height)
|
||||
+{
|
||||
+ const wxSize size = wxGetDisplaySize(window);
|
||||
+ if ( width )
|
||||
+ *width = size.x;
|
||||
+ if ( height )
|
||||
+ *height = size.y;
|
||||
+}
|
||||
+
|
||||
wxSize wxGetDisplaySize()
|
||||
{
|
||||
return wxDisplay().GetGeometry().GetSize();
|
||||
}
|
||||
|
||||
+wxSize wxGetDisplaySize(const wxWindow *window)
|
||||
+{
|
||||
+ return window ? wxDisplay(window).GetGeometry().GetSize() : wxDisplay().GetGeometry().GetSize();
|
||||
+}
|
||||
+
|
||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
const wxRect rect = wxGetClientDisplayRect();
|
||||
diff --git a/src/common/image.cpp b/src/common/image.cpp
|
||||
index 78fe5b82a3..46db8722ce 100644
|
||||
--- a/src/common/image.cpp
|
||||
+++ b/src/common/image.cpp
|
||||
@@ -383,11 +383,11 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const
|
||||
unsigned char red = pixel[0] ;
|
||||
unsigned char green = pixel[1] ;
|
||||
unsigned char blue = pixel[2] ;
|
||||
- unsigned char alpha = 255 ;
|
||||
- if ( source_alpha )
|
||||
- alpha = *(source_alpha + y_offset + x * xFactor + x1) ;
|
||||
if ( !hasMask || red != maskRed || green != maskGreen || blue != maskBlue )
|
||||
{
|
||||
+ unsigned char alpha = 255 ;
|
||||
+ if ( source_alpha )
|
||||
+ alpha = *(source_alpha + y_offset + x * xFactor + x1) ;
|
||||
if ( alpha > 0 )
|
||||
{
|
||||
avgRed += red ;
|
||||
diff --git a/src/common/intl.cpp b/src/common/intl.cpp
|
||||
index 0b0d8798f4..294f542b1f 100644
|
||||
--- a/src/common/intl.cpp
|
||||
+++ b/src/common/intl.cpp
|
||||
@@ -1628,6 +1628,12 @@ GetInfoFromLCID(LCID lcid,
|
||||
{
|
||||
str = buf;
|
||||
|
||||
+//FIXME Vojtech: We forcefully set the locales for a decimal point to "C", but this
|
||||
+// is not possible for the Win32 locales, therefore there is a discrepancy.
|
||||
+// It looks like we live with the discrepancy for at least half a year, so we will
|
||||
+// suppress the assert until we fix Slic3r to properly switch to "C" locales just
|
||||
+// for file import / export.
|
||||
+#if 0
|
||||
// As we get our decimal point separator from Win32 and not the
|
||||
// CRT there is a possibility of mismatch between them and this
|
||||
// can easily happen if the user code called setlocale()
|
||||
@@ -1641,6 +1647,7 @@ GetInfoFromLCID(LCID lcid,
|
||||
"Decimal separator mismatch -- did you use setlocale()?"
|
||||
"If so, use wxLocale to change the locale instead."
|
||||
);
|
||||
+#endif
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp
|
||||
index 41fd4524cf..f4a15cb839 100644
|
||||
--- a/src/generic/grid.cpp
|
||||
+++ b/src/generic/grid.cpp
|
||||
@@ -3824,7 +3824,8 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event, wxGridRowLabelWindo
|
||||
{
|
||||
case WXGRID_CURSOR_RESIZE_ROW:
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4166,7 +4167,8 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindo
|
||||
switch ( m_cursorMode )
|
||||
{
|
||||
case WXGRID_CURSOR_RESIZE_COL:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
break;
|
||||
|
||||
case WXGRID_CURSOR_SELECT_COL:
|
||||
@@ -4708,11 +4710,13 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
||||
return DoGridCellDrag(event, coords, isFirstDrag);
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_ROW:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
break;
|
||||
|
||||
case WXGRID_CURSOR_RESIZE_COL:
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4803,6 +4807,8 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event,
|
||||
case wxGridSelectCells:
|
||||
case wxGridSelectRowsOrColumns:
|
||||
// nothing to do in these cases
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(coords.GetRow(), coords.GetCol(), coords.GetRow(), coords.GetCol(), event);
|
||||
break;
|
||||
|
||||
case wxGridSelectRows:
|
||||
@@ -5044,9 +5050,11 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG
|
||||
}
|
||||
}
|
||||
|
||||
+//BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
const wxGridOperations& oper,
|
||||
- wxGridWindow* gridWindow)
|
||||
+ wxGridWindow* gridWindow,
|
||||
+ CursorMode mode)
|
||||
{
|
||||
// Get the logical position from the physical one we're passed.
|
||||
const wxPoint
|
||||
@@ -5056,10 +5064,28 @@ void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||
// orthogonal direction.
|
||||
const int linePos = oper.Dual().Select(logicalPos);
|
||||
|
||||
- const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
- oper.SetLineSize(this, m_dragRowOrCol,
|
||||
+ //BBS: add logic for resize multiplexed cols
|
||||
+ if (mode == WXGRID_CURSOR_RESIZE_COL) {
|
||||
+ int col_to_resize = m_dragRowOrCol;
|
||||
+ int num_rows, num_cols;
|
||||
+ this->GetCellSize(0, m_dragRowOrCol, &num_rows, &num_cols);
|
||||
+ if (num_cols < 1)
|
||||
+ col_to_resize = m_dragRowOrCol - 1;
|
||||
+
|
||||
+ const int lineEnd = oper.GetLineEndPos(this, m_dragRowOrCol);
|
||||
+ const int lineSize = oper.GetLineSize(this, col_to_resize);
|
||||
+ int size = linePos - lineEnd + lineSize;
|
||||
+ oper.SetLineSize(this, col_to_resize,
|
||||
+ wxMax(size,
|
||||
+ oper.GetMinimalLineSize(this, col_to_resize)));
|
||||
+ }
|
||||
+ else {
|
||||
+ const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||
+
|
||||
+ oper.SetLineSize(this, m_dragRowOrCol,
|
||||
wxMax(linePos - lineStart,
|
||||
oper.GetMinimalLineSize(this, m_dragRowOrCol)));
|
||||
+ }
|
||||
|
||||
// TODO: generate RESIZING event, see #10754, if the size has changed.
|
||||
}
|
||||
@@ -5082,7 +5108,8 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
||||
|
||||
void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event);
|
||||
|
||||
@@ -5091,7 +5118,8 @@ void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWin
|
||||
|
||||
void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||
{
|
||||
- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL);
|
||||
|
||||
SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event);
|
||||
|
||||
@@ -5105,9 +5133,10 @@ void wxGrid::DoHeaderStartDragResizeCol(int col)
|
||||
|
||||
void wxGrid::DoHeaderDragResizeCol(int width)
|
||||
{
|
||||
+ //BBS: add cursor mode for DoGridDragResize's paremeters
|
||||
DoGridDragResize(GetPositionForResizeEvent(width),
|
||||
wxGridColumnOperations(),
|
||||
- m_gridWin);
|
||||
+ m_gridWin, WXGRID_CURSOR_RESIZE_COL);
|
||||
}
|
||||
|
||||
void wxGrid::DoHeaderEndDragResizeCol(int width)
|
||||
@@ -5891,6 +5920,10 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
DisableCellEditControl();
|
||||
|
||||
MoveCursorDown( event.ShiftDown() );
|
||||
+ //BBS: select this cell when first click
|
||||
+ m_selection->SelectBlock(m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(),
|
||||
+ event);
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp
|
||||
index 0a2d167ad7..0aeba45ea9 100644
|
||||
--- a/src/msw/bmpcbox.cpp
|
||||
+++ b/src/msw/bmpcbox.cpp
|
||||
@@ -156,13 +156,20 @@ void wxBitmapComboBox::RecreateControl()
|
||||
|
||||
wxComboBox::DoClear();
|
||||
|
||||
- HWND hwnd = GetHwnd();
|
||||
+ WNDPROC wndproc_edit = nullptr;
|
||||
+ WinStruct<COMBOBOXINFO> combobox_info;
|
||||
+ HWND hwnd = GetHwnd();
|
||||
+if (::GetComboBoxInfo(hwnd, &combobox_info))
|
||||
+ wndproc_edit = (WNDPROC)wxGetWindowProc(combobox_info.hwndItem);
|
||||
DissociateHandle();
|
||||
::DestroyWindow(hwnd);
|
||||
|
||||
if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) )
|
||||
return;
|
||||
|
||||
+if (::GetComboBoxInfo(GetHwnd(), &combobox_info))
|
||||
+ wxSetWindowProc(combobox_info.hwndItem, wndproc_edit);
|
||||
+
|
||||
// initialize the controls contents
|
||||
for ( i = 0; i < numItems; i++ )
|
||||
{
|
||||
diff --git a/src/msw/font.cpp b/src/msw/font.cpp
|
||||
index 0bd240d79f..d38b1b00f5 100644
|
||||
--- a/src/msw/font.cpp
|
||||
+++ b/src/msw/font.cpp
|
||||
@@ -54,7 +54,7 @@ static const int PITCH_MASK = FIXED_PITCH | VARIABLE_PITCH;
|
||||
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
- wxFontRefData(const wxFontInfo& info = wxFontInfo());
|
||||
+ wxFontRefData(const wxFontInfo& info = wxFontInfo(), const wxWindow* window = nullptr);
|
||||
|
||||
wxFontRefData(const wxNativeFontInfo& info, WXHFONT hFont = 0)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ protected:
|
||||
// wxFontRefData
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
-wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
+wxFontRefData::wxFontRefData(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
m_hFont = NULL;
|
||||
|
||||
@@ -335,7 +335,7 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info)
|
||||
}
|
||||
else
|
||||
{
|
||||
- m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize());
|
||||
+ m_nativeFontInfo.SetSizeOrDefault(info.GetFractionalPointSize(), window);
|
||||
}
|
||||
|
||||
SetStyle(info.GetStyle());
|
||||
@@ -518,12 +518,12 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
|
||||
return wxGetFontEncFromCharSet(lf.lfCharSet);
|
||||
}
|
||||
|
||||
-void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew)
|
||||
+void wxNativeFontInfo::SetFractionalPointSize(double pointSizeNew, const wxWindow *window)
|
||||
{
|
||||
// We don't have the correct DPI to use here, so use that of the
|
||||
// primary screen and rely on WXAdjustToPPI() changing it later if
|
||||
// necessary.
|
||||
- const int ppi = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
+ const int ppi = window ? window->GetDPI().GetY() : ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY);
|
||||
lf.lfHeight = GetLogFontHeightAtPPI(pointSizeNew, ppi);
|
||||
|
||||
pointSize = pointSizeNew;
|
||||
@@ -812,9 +812,9 @@ wxFont::wxFont(const wxString& fontdesc)
|
||||
(void)Create(info);
|
||||
}
|
||||
|
||||
-wxFont::wxFont(const wxFontInfo& info)
|
||||
+wxFont::wxFont(const wxFontInfo& info, const wxWindow *window)
|
||||
{
|
||||
- m_refData = new wxFontRefData(info);
|
||||
+ m_refData = new wxFontRefData(info, window);
|
||||
}
|
||||
|
||||
bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
|
||||
diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp
|
||||
index 9bb397d472..30af7154a7 100644
|
||||
--- a/src/msw/menuitem.cpp
|
||||
+++ b/src/msw/menuitem.cpp
|
||||
@@ -368,6 +368,8 @@ void MenuDrawData::Init(wxWindow const* window)
|
||||
// native menu uses small top margin for separator
|
||||
if ( SeparatorMargin.cyTopHeight >= 2 )
|
||||
SeparatorMargin.cyTopHeight -= 2;
|
||||
+
|
||||
+ SeparatorSize.cy = 0;
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_UXTHEME
|
||||
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
|
||||
index eadc2f5700..f64fea4446 100644
|
||||
--- a/src/msw/window.cpp
|
||||
+++ b/src/msw/window.cpp
|
||||
@@ -4773,33 +4773,49 @@ static wxSize GetWindowDPI(HWND hwnd)
|
||||
}
|
||||
|
||||
/*extern*/
|
||||
-int wxGetSystemMetrics(int nIndex, const wxWindow* window)
|
||||
+int wxGetSystemMetrics(int nIndex, const wxWindow* win)
|
||||
{
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
- if ( !window )
|
||||
- window = wxApp::GetMainTopWindow();
|
||||
+ const wxWindow* window = (!win && wxTheApp) ? wxTheApp->GetTopWindow() : win;
|
||||
|
||||
- if ( window )
|
||||
+ if (window)
|
||||
{
|
||||
- typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
- static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
- static bool s_initDone = false;
|
||||
-
|
||||
- if ( !s_initDone )
|
||||
- {
|
||||
- wxLoadedDLL dllUser32("user32.dll");
|
||||
- wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
- s_initDone = true;
|
||||
+#if 1
|
||||
+ if (window->GetHWND() && (nIndex == SM_CXSCREEN || nIndex == SM_CYSCREEN)) {
|
||||
+ HDC hdc = GetDC(window->GetHWND());
|
||||
+#if 0
|
||||
+ double dim = GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES);
|
||||
+ ReleaseDC(window->GetHWND(), hdc);
|
||||
+ wxSize dpi = window->GetDPI();
|
||||
+ dim *= 96.0 / (nIndex == SM_CXSCREEN ? dpi.x : dpi.y);
|
||||
+ return int(dim + 0.5);
|
||||
+#else
|
||||
+ return int(GetDeviceCaps(hdc, nIndex == SM_CXSCREEN ? HORZRES : VERTRES));
|
||||
+#endif
|
||||
}
|
||||
-
|
||||
- if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ else
|
||||
+#endif
|
||||
{
|
||||
- const int dpi = window->GetDPI().y;
|
||||
- return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi);
|
||||
+ static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL;
|
||||
+ static bool s_initDone = false;
|
||||
+
|
||||
+ if ( !s_initDone )
|
||||
+ {
|
||||
+ wxLoadedDLL dllUser32("user32.dll");
|
||||
+ wxDL_INIT_FUNC(s_pfn, GetSystemMetricsForDpi, dllUser32);
|
||||
+ s_initDone = true;
|
||||
+ }
|
||||
+
|
||||
+ if ( s_pfnGetSystemMetricsForDpi )
|
||||
+ {
|
||||
+ const int dpi = window->GetDPI().y;
|
||||
+ return s_pfnGetSystemMetricsForDpi(nIndex, (UINT)dpi);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#else
|
||||
- wxUnusedVar(window);
|
||||
+ wxUnusedVar(win);
|
||||
#endif // wxUSE_DYNLIB_CLASS
|
||||
|
||||
return ::GetSystemMetrics(nIndex);
|
||||
diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm
|
||||
index 6ff0cc3088..4943f3ea38 100644
|
||||
--- a/src/osx/cocoa/dataview.mm
|
||||
+++ b/src/osx/cocoa/dataview.mm
|
||||
@@ -1734,12 +1734,22 @@ outlineView:(NSOutlineView*)outlineView
|
||||
if ( !dvc->GetEventHandler()->ProcessEvent(eventDV) )
|
||||
[super keyDown:event];
|
||||
}
|
||||
- else
|
||||
+ //FIXME Vojtech's hack to get the accelerators assigned to the wxDataViewControl working.
|
||||
+ else if (! implementation->DoHandleKeyEvent(event))
|
||||
{
|
||||
[super keyDown:event]; // all other keys
|
||||
}
|
||||
}
|
||||
|
||||
+//FIXME Vojtech: This is a workaround to get at least the "mouse move" events at the wxDataViewControl,
|
||||
+// so we can show the tooltips. The "mouse move" events are being send only if the wxDataViewControl
|
||||
+// has focus, which is a limitation of wxWidgets. We may grab focus on "mouse entry" though.
|
||||
+- (void)mouseMoved:(NSEvent *)event
|
||||
+{
|
||||
+if (! implementation->DoHandleMouseEvent(event))
|
||||
+ [super mouseMoved:event];
|
||||
+}
|
||||
+
|
||||
//
|
||||
// contextual menus
|
||||
//
|
||||
@@ -2672,12 +2682,22 @@ void wxCocoaDataViewControl::DoSetIndent(int indent)
|
||||
|
||||
void wxCocoaDataViewControl::HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const
|
||||
{
|
||||
- NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),point);
|
||||
+ NSTableHeaderView *headerView = [m_OutlineView headerView];
|
||||
+ if (headerView && point.y < headerView.visibleRect.size.height) {
|
||||
+ // The point is inside the header area.
|
||||
+ columnPtr = NULL;
|
||||
+ item = wxDataViewItem();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Convert from the window coordinates to the virtual scrolled view coordinates.
|
||||
+ NSScrollView *scrollView = [m_OutlineView enclosingScrollView];
|
||||
+ const NSRect &visibleRect = scrollView.contentView.visibleRect;
|
||||
+ NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),
|
||||
+ wxPoint(point.x + visibleRect.origin.x, point.y + visibleRect.origin.y));
|
||||
|
||||
int indexColumn;
|
||||
int indexRow;
|
||||
|
||||
-
|
||||
indexColumn = [m_OutlineView columnAtPoint:nativePoint];
|
||||
indexRow = [m_OutlineView rowAtPoint: nativePoint];
|
||||
if ((indexColumn >= 0) && (indexRow >= 0))
|
||||
diff --git a/src/osx/cocoa/settings.mm b/src/osx/cocoa/settings.mm
|
||||
index de5f52860c..a9581174a4 100644
|
||||
--- a/src/osx/cocoa/settings.mm
|
||||
+++ b/src/osx/cocoa/settings.mm
|
||||
@@ -224,7 +224,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Get a system metric, e.g. scrollbar size
|
||||
-int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUNUSED(win))
|
||||
+int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* win)
|
||||
{
|
||||
int value;
|
||||
|
||||
@@ -259,11 +259,11 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUN
|
||||
// TODO case wxSYS_WINDOWMIN_Y:
|
||||
|
||||
case wxSYS_SCREEN_X:
|
||||
- wxDisplaySize(&value, NULL);
|
||||
+ wxDisplaySize(win, &value, NULL);
|
||||
return value;
|
||||
|
||||
case wxSYS_SCREEN_Y:
|
||||
- wxDisplaySize(NULL, &value);
|
||||
+ wxDisplaySize(win, NULL, &value);
|
||||
return value;
|
||||
|
||||
// TODO case wxSYS_FRAMESIZE_X:
|
||||
diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm
|
||||
index b322e582c5..79de567333 100644
|
||||
--- a/src/osx/cocoa/window.mm
|
||||
+++ b/src/osx/cocoa/window.mm
|
||||
@@ -190,6 +190,9 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const
|
||||
- (BOOL)isEnabled;
|
||||
- (void)setEnabled:(BOOL)flag;
|
||||
|
||||
+- (BOOL)clipsToBounds;
|
||||
+- (void)setClipsToBounds:(BOOL)clipsToBounds;
|
||||
+
|
||||
- (void)setImage:(NSImage *)image;
|
||||
- (void)setControlSize:(NSControlSize)size;
|
||||
|
||||
@@ -2505,6 +2508,7 @@ wxWidgetImpl( peer, flags )
|
||||
if ( m_osxView )
|
||||
CFRetain(m_osxView);
|
||||
[m_osxView release];
|
||||
+ m_osxView.clipsToBounds = YES;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.41.0.windows.2
|
||||
|
||||
33
deps/wxWidgets/wxWidgets.cmake
vendored
@@ -1,13 +1,12 @@
|
||||
set(_wx_git_tag v3.1.5)
|
||||
|
||||
set(_wx_toolkit "")
|
||||
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=1")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=1")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_gtk_ver 2)
|
||||
|
||||
if (DEP_WX_GTK3)
|
||||
set(_gtk_ver 3)
|
||||
endif ()
|
||||
|
||||
set(_wx_toolkit "-DwxBUILD_TOOLKIT=gtk${_gtk_ver}")
|
||||
endif()
|
||||
|
||||
@@ -17,16 +16,22 @@ else ()
|
||||
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=OFF")
|
||||
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`.
|
||||
# ** THIS INCLUDES BUILD ARGS. **
|
||||
# ...if you can find a way around this size limitation, be my guest.
|
||||
if (MSVC)
|
||||
set(_patch_cmd if not exist WXWIDGETS_PATCHED ( "${GIT_EXECUTABLE}" apply --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-wx-3.1.5-patch-for-Orca.patch && type nul > WXWIDGETS_PATCHED ) )
|
||||
else ()
|
||||
set(_patch_cmd test -f WXWIDGETS_PATCHED || ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wx-3.1.5-patch-for-Orca.patch && touch WXWIDGETS_PATCHED)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-wx-3.1.5-patch-for-Orca.patch)
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(
|
||||
wxWidgets
|
||||
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
|
||||
GIT_SHALLOW ON
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
|
||||
GIT_REPOSITORY "https://github.com/wxWidgets/wxWidgets"
|
||||
GIT_TAG ${_wx_git_tag}
|
||||
PATCH_COMMAND ${_patch_cmd}
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
|
||||
CMAKE_ARGS
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
@@ -39,7 +44,6 @@ orcaslicer_add_cmake_project(
|
||||
-DwxUSE_UNICODE=ON
|
||||
${_wx_private_font}
|
||||
-DwxUSE_OPENGL=ON
|
||||
-DwxUSE_WEBREQUEST=ON
|
||||
-DwxUSE_WEBVIEW=ON
|
||||
${_wx_edge}
|
||||
-DwxUSE_WEBVIEW_IE=OFF
|
||||
@@ -53,10 +57,9 @@ orcaslicer_add_cmake_project(
|
||||
-DwxUSE_ZLIB=sys
|
||||
-DwxUSE_LIBJPEG=sys
|
||||
-DwxUSE_LIBTIFF=sys
|
||||
-DwxUSE_NANOSVG=OFF
|
||||
-DwxUSE_EXPAT=sys
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_wxWidgets)
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -1,6 +1,6 @@
|
||||
OrcaSlicer use `M106 P2` command to control auxiliary cooling fan.
|
||||
|
||||
If you are using Klipper, you can define a `M106` macro to control the both normal part cooling fan and auxiliary fan and exhaust fan.
|
||||
If you are using Klipper, you can define a `M106` macro to control the both normal part cooling fan and auxiliary fan and exhuast fan.
|
||||
Below is a reference configuration for Klipper.
|
||||
*Note: Don't forget to change the pin name to the actual pin name you are using in the configuration*
|
||||
|
||||
|
||||
@@ -10,20 +10,12 @@
|
||||
1. [Max Volumetric speed](#Max-Volumetric-speed)
|
||||
2. [VFA]
|
||||
|
||||
> [!IMPORTANT]
|
||||
> After completing the calibration process, remember to create a new project in order to exit the calibration mode.
|
||||
|
||||
> [!TIP]
|
||||
> @ItsDeidara has made a webpage to help with the calculation. Check it out if those equations give you a headache [here](https://orcalibrate.com/).
|
||||
|
||||
**NOTE**: After completing the calibration process, remember to create a new project in order to exit the calibration mode.
|
||||
# Flow rate
|
||||
> [!WARNING]
|
||||
> For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option.
|
||||
>
|
||||
> 
|
||||
|
||||

|
||||
|
||||
##### *NOTE: For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option.*
|
||||

|
||||
----------------------------------------
|
||||

|
||||
Calibrating the flow rate involves a two-step process.
|
||||
Steps
|
||||
1. Select the printer, filament, and process you would like to use for the test.
|
||||
@@ -33,25 +25,18 @@ Steps
|
||||

|
||||

|
||||
|
||||
5. Update the flow ratio in the filament settings using the following equation: `FlowRatio_old*(100 + modifier)/100`. If your previous flow ratio was `0.98` and you selected the block with a flow rate modifier of `+5`, the new value should be calculated as follows: `0.98x(100+5)/100 = 1.029`.** Remember** to save the filament profile.
|
||||
5. Update the flow ratio in the filament settings using the following equation: `FlowRatio_old*(100 + modifier)/100`. If your previous flow ratio was `0.98` and you selected the block with a flow rate modifier of `+5`, the new value should be calculated as follows: `0.98x(100+5)/100 = 1.029`. ** Remember** to save the filament profile.
|
||||
6. Perform the `Pass 2` calibration. This process is similar to `Pass 1`, but a new project with ten blocks will be generated. The flow rate modifiers for this project will range from `-9 to 0`.
|
||||
7. Repeat steps 4. and 5. In this case, if your previous flow ratio was 1.029 and you selected the block with a flow rate modifier of -6, the new value should be calculated as follows: `1.029x(100-6)/100 = 0.96726`. **Remember** to save the filament profile.
|
||||
|
||||
7. Repeat steps 4 and 5. In this case, if your previous flow ratio was 1.029 and you selected the block with a flow rate modifier of -6, the new value should be calculated as follows: `1.029x(100-6)/100 = 0.96726`. ** Remember ** to save the filament profile.
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Pressure Advance
|
||||
|
||||
Orca Slicer includes three approaches for calibrating the pressure advance value. Each method has its own advantages and disadvantages. It is important to note that each method has two versions: one for a direct drive extruder and one for a Bowden extruder. Make sure to select the appropriate version for your test.
|
||||
|
||||
> [!WARNING]
|
||||
> For Marlin: Linear advance must be enabled in firmware (M900). **Not all printers have it enabled by default.**
|
||||
|
||||
> [!WARNING]
|
||||
> For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option when printings.
|
||||
>
|
||||
> 
|
||||
Orca Slicer includes three approaches for calibrating the pressure advance value. Each method has its own advantages and disadvantages. It is important to note that each method has two versions: one for a direct drive extruder and one for a Bowden extruder. Make sure to select the appropriate version for your test.
|
||||
##### *NOTE: For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option when printings.*
|
||||

|
||||
|
||||
### Line method
|
||||
|
||||
@@ -73,20 +58,11 @@ The pattern method is adapted from [Andrew Ellis' pattern method generator](http
|
||||
|
||||
[Instructions for using and reading the pattern method](https://ellis3dp.com/Print-Tuning-Guide/articles/pressure_linear_advance/pattern_method.html) are provided in [Ellis' Print Tuning Guide](https://ellis3dp.com/Print-Tuning-Guide/), with only a few Orca Slicer differences to note.
|
||||
|
||||
Test configuration window allow user to generate one or more tests in a single projects. Multiple tests will be placed on each plate with extra plates added if needed.
|
||||
First and foremost, when you initiate the test, you'll only see a small rectangular prism on the plate. This object serves a few purposes:
|
||||
|
||||
1. Single test \
|
||||

|
||||
2. Batch mode testing (multiple tests on a sinle plate) \
|
||||

|
||||
|
||||
Once test generated, one or more small rectangular prisms could be found on the plate, one for each test case. This object serves a few purposes:
|
||||
|
||||
1. The test pattern itself is added in as custom G-Code at each layer, same as you could do by hand actually. The rectangular prism gives us the layers in which to insert that G-Code. This also means that **you'll see the full test pattern when you move to the Preview pane**:
|
||||

|
||||
1. The test pattern itself is added in as custom G-Code at each layer, same as you could do by hand actually. The rectangular prism gives us the layers in which to insert that G-Code. This also means that **you'll see the full test pattern when you move to the Preview pane**
|
||||
2. The prism acts as a handle, enabling you to move the test pattern wherever you'd like on the plate by moving the prism
|
||||
3. Each test object is pre-configured with target parameters which are reflected in the objects name. However, test parameters may be adjusted for each prism individually by referring to the object list pane:
|
||||

|
||||
3. The filament selected for the prism is also used for the test pattern
|
||||
|
||||
Next, Ellis' generator provided the ability to adjust specific printer, filament, and print profile settings. You can make these same changes in Orca Slicer by adjusting the settings in the Prepare pane as you would with any other print. When you initiate the calibration test, Ellis' default settings are applied. A few things to note about these settings:
|
||||
|
||||
@@ -102,7 +78,7 @@ The PA value for this test will be increased by 0.002 for every 1 mm increase in
|
||||
Steps:
|
||||
1. Select the printer, filament, and process you would like to use for the test.
|
||||
2. Examine each corner of the print and mark the height that yields the best overall result.
|
||||
3. I selected a height of 8 mm for this case, so the pressure advance value should be calculated as `PressureAdvanceStart+(PressureAdvanceStep x measured)` example: `0+(0.002 x 8) = 0.016`.
|
||||
3. I selected a height of 8 mm for this case, so the pressure advance value should be calculated as `0.002x8 = 0.016`.
|
||||

|
||||
|
||||

|
||||
@@ -149,8 +125,7 @@ You can also return to OrcaSlicer in the "Preview" tab, make sure the color sche
|
||||
|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> You may also choose to conservatively reduce the flow by 5-10% to ensure print quality.
|
||||
#### *NOTE You may also choose to conservatively reduce the flow by 5-10% to ensure print quality.*
|
||||
|
||||
***
|
||||
*Credits:*
|
||||
@@ -159,4 +134,4 @@ You can also return to OrcaSlicer in the "Preview" tab, make sure the color sche
|
||||
- *The PA Tower method is inspired by [Klipper](https://www.klipper3d.org/Pressure_Advance.html)*
|
||||
- *The temp tower model is remixed from [Smart compact temperature calibration tower](https://www.thingiverse.com/thing:2729076)
|
||||
- *The max flowrate test was inspired by Stefan(CNC Kitchen), and the model used in the test is a remix of his [Extrusion Test Structure](https://www.printables.com/model/342075-extrusion-test-structure).
|
||||
- *ChatGPT* ;)
|
||||
- *chapgpt* ;)
|
||||
|
||||
42
doc/Home.md
@@ -1,39 +1,7 @@
|
||||
# Welcome to the OrcaSlicer WIKI!
|
||||
Welcome to the OrcaSlicer WIKI!
|
||||
|
||||
Orca slicer is a powerful open source slicer for FFF (FDM) 3D Printers. This wiki page aims to provide an detailed explanation of the slicer settings, how to get the most out of them as well as how to calibrate and setup your printer.
|
||||
We have divided it roughly into the following pages:
|
||||
|
||||
The Wiki is work in progress so bear with us while we get it up and running!
|
||||
|
||||
## Print Settings, Tips and Tricks (Work In Progress)
|
||||
The below sections provide a detailed settings explanation as well as tips and tricks in setting these for optimal print results.
|
||||
|
||||
### Quality Settings
|
||||
- [Layer Height Settings](quality_settings_layer_height)
|
||||
- [Line Width Settings](quality_settings_line_width)
|
||||
- [Seam Settings](quality_settings_seam)
|
||||
- [Precise wall](Precise-wall)
|
||||
|
||||
### Speed Settings
|
||||
- [Extrusion rate smoothing](extrusion-rate-smoothing)
|
||||
|
||||
### Multi material
|
||||
- [Single Extruder Multimaterial](semm)
|
||||
|
||||
### Printer Settings:
|
||||
- [Air filtration/Exhaust fan handling](air-filtration)
|
||||
- [Auxiliary fan handling](Auxiliary-fan)
|
||||
- [Chamber temperature control](chamber-temperature)
|
||||
- [Adaptive Bed Mesh](adaptive-bed-mesh)
|
||||
- [Using different bed types in Orca](bed-types)
|
||||
- [Pellet Printers (pellet flow coefficient)](pellet-flow-coefficient)
|
||||
|
||||
## Printer Calibration
|
||||
The guide below takes you through the key calibration tests in Orca - flow rate, pressure advance, print temperature, retraction, tolerances and maximum volumetric speed
|
||||
- [Calibration Guide](./Calibration)
|
||||
- [Adaptive Pressure Advance Guide](adaptive-pressure-advance)
|
||||
|
||||
## Developer Section
|
||||
- [How to build Orca Slicer](./How-to-build)
|
||||
- [Localization and translation guide](Localization_guide)
|
||||
- [Developer Reference](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/Home.md)
|
||||
- [How to create profiles](./How-to-create-profiles)
|
||||
* [Calibration](wiki/Calibration)
|
||||
* [Print settings](wiki/Print-settings)
|
||||
* [How to build Orca Slicer](wiki/How-to-build)
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
# Guide: Develop Profiles for OrcaSlicer
|
||||
|
||||
## Introduction
|
||||
This guide will help you develop profiles for OrcaSlicer.
|
||||
|
||||
## High-level Overview
|
||||
OrcaSlicer uses JSON files to store profiles. There are four types of profiles:
|
||||
1. Printer model (type `machine_model`). Example: `Orca 3D Fuse1.json`
|
||||
2. Printer variant (type `machine`). Example: `Orca 3D Fuse1 0.2 nozzle.json`
|
||||
3. Filament (type `filament`). Example: `Generic PLA @Orca 3D Fuse1@.json`
|
||||
4. Process (type `process`). Example: `0.10mm Standard @Orca 3D Fuse1 0.2.json`
|
||||
|
||||
Additionally, there is an overall meta file for each vendor (`Orca 3D.json`).
|
||||
|
||||
For easier understanding, let's consider a scenario with a printer manufacturer called `Orca 3D`. The manufacturer offers one printer model called `Fuse 1`, which supports 0.2/0.4/0.6/0.8mm nozzles and common market filaments.
|
||||
|
||||
In this case:
|
||||
- Vendor profile: `Orca 3D`
|
||||
- Printer profile: `Orca 3D Fuse1`
|
||||
- Printer variant profile: `Orca 3D Fuse1 0.4 nozzle`
|
||||
- Filament profile: `Generic PLA @Orca 3D Fuse1@`
|
||||
- Process profile: `0.20mm Standard @Orca 3D Fuse1 0.4`
|
||||
|
||||
The profile name should be same as the filename without the `.json` extension in principal.
|
||||
Naming conventions:
|
||||
1. Vendor profile: `vendor_name.json`
|
||||
2. Printer profile: `vendor_name` + `printer_name` + `.json`
|
||||
3. Printer variant profile: `vendor_name` + `printer_variant_name` + `.json` (where `printer_variant_name` typically includes `printer_name` + `nozzle_diameter`)
|
||||
4. Filament profile: `filament_vendor_name` + `filament_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json`
|
||||
5. Process profile: `layer_height` + `preset_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json` (`preset_name` typically includes "standard," "fine," "fast," "draft," etc.)
|
||||
|
||||
|
||||
A typical file structure for a vendor:
|
||||
```
|
||||
resources\profiles\
|
||||
- Orca 3D.json
|
||||
- Orca 3D\
|
||||
- machine\
|
||||
- Orca 3D Fuse1.json
|
||||
- Orca 3D Fuse1 0.2 nozzle.json
|
||||
- Orca 3D Fuse1 0.4 nozzle.json
|
||||
- process\
|
||||
- 0.10mm Standard @Orca 3D Fuse1 0.2.json
|
||||
- 0.20mm Standard @Orca 3D Fuse1 0.4.json
|
||||
- filament\
|
||||
- Generic PLA @Orca 3D Fuse1@.json
|
||||
```
|
||||
|
||||
|
||||
**NOTE 1**: Use short vendor names in filenames to avoid excessive length.
|
||||
**NOTE 2**: Filament profiles are **optional**. Create them only if the vendor has specifically tuned profiles for the given printer. See [Filament profiles](#filament-profiles) for details.
|
||||
|
||||
## Filament Profiles
|
||||
OrcaSlicer features a global filament library called `OrcaFilamentLibrary`, which is automatically available for all printers. It includes generic filaments like `Generic PLA @System` and `Generic ABS @System` etc.
|
||||
|
||||
Printer vendors can override specific filaments in the global library for certain printer models by creating new filament profiles.
|
||||
|
||||
Relationship diagram:
|
||||
```mermaid
|
||||
graph TD;
|
||||
OrcaFilamentLibrary-->Orca_3D_filament;
|
||||
OrcaFilamentLibrary-->Vendor_A_filament;
|
||||
OrcaFilamentLibrary-->Vendor_B_filament;
|
||||
```
|
||||
|
||||
**NOTE**: Create new filament profiles only if you have truly specifically tuned the filament for the given printer. Otherwise, use the global library. The global library has a better chance to receive optimizations and updates from OrcaSlicer contributors, which will benefit users of all printers.
|
||||
|
||||
### Adding Filament Profiles to the Global Library
|
||||
In this section, we will discuss how to add a new filament profile into the global library.
|
||||
If you want to add a new generic profile into the global library, you need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
|
||||
The following sample JSON file shows how to create a new generic filament profile `Generic PLA-GF @System` in the global library.
|
||||
|
||||
1. The first step is to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. The file name should be `Generic PLA-GF @System.json`. Please note that we leave the `compatible_printers` field empty so that it is available for all printers.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFL99",
|
||||
"setting_id": "GFSA05",
|
||||
"name": "Generic PLA-GF @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"filament_type": ["PLA-GF"],
|
||||
"filament_flow_ratio": [
|
||||
"0.96"
|
||||
],
|
||||
"compatible_printers": []
|
||||
}
|
||||
```
|
||||
|
||||
2. Register the profile in `resources\profiles\OrcaFilamentLibrary.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "OrcaFilamentLibrary",
|
||||
"version": "02.02.00.04",
|
||||
"force_update": "0",
|
||||
"description": "Orca Filament Library",
|
||||
"filament_list": [
|
||||
// ...
|
||||
{
|
||||
"name": "Generic PLA-GF @System",
|
||||
"sub_path": "filament/Generic PLA-GF @System.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
3. The last step is to validate the newly added filament profiles. You can run OrcaSlicer to verify if the filament you just added is available and usable. You can also use the [Orca profile validator](https://github.com/SoftFever/Orca_tools/releases/tag/1) tool to help debug any errors. **NOTE**: You need to delete the `%appdata%/OrcaSlicer/system` folder to force OrcaSlicer to reload your lastest changes.
|
||||
|
||||
The process is the same if you want to add a new brand filament profile into the global library. You need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament\brand_name` folder. The only difference is that you should put the file into the brand's own subfolder.`resources\profiles\OrcaFilamentLibrary\filament\brand_name`.
|
||||
|
||||
### Adding Filament Profiles to Printer Vendor Library
|
||||
In this section, we will discuss how to add a new filament profile for a certain vendor.
|
||||
If you want to add a new filament profile, whether it's a brand new profile or a specialized version of a global filament profile for a given printer, you need to create a new file in the `resources\profiles\vendor_name\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
|
||||
Below is a sample JSON file showing how to create a specialized `Generic ABS` filament profile for the ToolChanger printer.
|
||||
Please note that here we must leave the compatible_printers field non-empty, unlike in the global library.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "filament",
|
||||
"setting_id": "GFB99_MTC_0",
|
||||
"name": "Generic ABS @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "Generic ABS @System",
|
||||
"filament_cooling_final_speed": [
|
||||
"3.5"
|
||||
],
|
||||
"filament_cooling_initial_speed": [
|
||||
"10"
|
||||
],
|
||||
"filament_cooling_moves": [
|
||||
"2"
|
||||
],
|
||||
"filament_load_time": [
|
||||
"10.5"
|
||||
],
|
||||
"filament_loading_speed": [
|
||||
"10"
|
||||
],
|
||||
"filament_loading_speed_start": [
|
||||
"50"
|
||||
],
|
||||
"filament_multitool_ramming": [
|
||||
"1"
|
||||
],
|
||||
"filament_multitool_ramming_flow": [
|
||||
"40"
|
||||
],
|
||||
"filament_stamping_distance": [
|
||||
"45"
|
||||
],
|
||||
"filament_stamping_loading_speed": [
|
||||
"29"
|
||||
],
|
||||
"filament_unload_time": [
|
||||
"8.5"
|
||||
],
|
||||
"filament_unloading_speed": [
|
||||
"100"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyToolChanger 0.4 nozzle",
|
||||
"MyToolChanger 0.2 nozzle",
|
||||
"MyToolChanger 0.6 nozzle",
|
||||
"MyToolChanger 0.8 nozzle"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Process Profiles
|
||||
WIP...
|
||||
|
||||
## Printer Profiles
|
||||
WIP...
|
||||
|
||||
## Printer Variant Profiles
|
||||
WIP...
|
||||
@@ -1,8 +1,5 @@
|
||||
WIP...
|
||||
|
||||
### Scarf joint seam
|
||||
WIP...
|
||||
|
||||
### Seam gap
|
||||

|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Adaptive Bed Mesh Support
|
||||
Orca Slicer introduces comprehensive support for adaptive bed meshing across a variety of firmware, including Marlin, Klipper, and RepRapFirmware (RRF).
|
||||
This feature allows users to seamlessly integrate adaptive bed mesh commands within the Machine Start G-code.
|
||||
The implementation is designed to be straightforward, requiring no additional plugins or alterations to firmware settings, thereby enhancing user experience and print quality directly from Orca Slicer.
|
||||
|
||||
|
||||

|
||||
|
||||
## Settings in Orca Slicer:
|
||||
`Bed mesh min`: This option sets the min point for the allowed bed mesh area. Due to the probe's XY offset, most printers are unable to probe the entire bed. To ensure the probe point does not go outside the bed area, the minimum and maximum points of the bed mesh should be set appropriately. OrcaSlicer ensures that adaptive_bed_mesh_min/adaptive_bed_mesh_max values do not exceed these min/max points. This information can usually be obtained from your printer manufacturer. The default setting is (-99999, -99999), which means there are no limits, thus allowing probing across the entire bed.
|
||||
|
||||
`Bed mesh max`: This option sets the max point for the allowed bed mesh area. Due to the probe's XY offset, most printers are unable to probe the entire bed. To ensure the probe point does not go outside the bed area, the minimum and maximum points of the bed mesh should be set appropriately. OrcaSlicer ensures that adaptive_bed_mesh_min/adaptive_bed_mesh_max values do not exceed these min/max points. This information can usually be obtained from your printer manufacturer. The default setting is (99999, 99999), which means there are no limits, thus allowing probing across the entire bed.
|
||||
|
||||
`Probe point distance`: This option sets the preferred distance between probe points (grid size) for the X and Y directions, with the default being 50mm for both X and Y.
|
||||
|
||||
`Mesh margin`: This option determines the additional distance by which the adaptive bed mesh area should be expanded in the XY directions. Note for Klipper users: Orca Slicer will adjust adaptive bed mesh area according to the margin. It is recommended to set the margin to 0 in Klipper config or pass 0 when calling BED_MESH_CALIBRATE command(please refer to the example below).
|
||||
|
||||
## Available g-code variables for Adaptive Bed Mesh Command
|
||||
`bed_mesh_probe_count`: Represents the probe count in the X and Y directions. This value is calculated based on the size of the adaptive bed mesh area and the distance between probe points.
|
||||
|
||||
`adaptive_bed_mesh_min`: Specifies the minimum coordinates of the adaptive bed mesh area, defining the starting point of the mesh.
|
||||
|
||||
`adaptive_bed_mesh_max`: Determines the maximum coordinates of the adaptive bed mesh area, indicating the endpoint of the mesh.
|
||||
|
||||
`ALGORITHM`: Identifies the algorithm used for adaptive bed mesh interpolation. This variable is useful for Klipper users. If bed_mesh_probe_count is less than 4, the algorithm is set to `lagrange`. Otherwise, it is set to `bicubic`.
|
||||
|
||||
## Example of Adaptive Bed Mesh usage in Orca Slicer:
|
||||
|
||||
### Marlin:
|
||||
```
|
||||
; Marlin don't support speicify the probe count yet, so we only specify the probe area
|
||||
G29 L{adaptive_bed_mesh_min[0]} R{adaptive_bed_mesh_max[0]} F{adaptive_bed_mesh_min[1]} B{adaptive_bed_mesh_max[1]} T V4
|
||||
```
|
||||
### Klipper:
|
||||
```
|
||||
; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally
|
||||
; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic
|
||||
BED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0
|
||||
```
|
||||
### RRF:
|
||||
```
|
||||
M557 X{adaptive_bed_mesh_min[0]}:{adaptive_bed_mesh_max[0]} Y{adaptive_bed_mesh_min[1]}:{adaptive_bed_mesh_max[1]} P{bed_mesh_probe_count[0]}:{bed_mesh_probe_count[1]}
|
||||
```
|
||||

|
||||
@@ -1,204 +0,0 @@
|
||||
# Adaptive Pressure Advance
|
||||
|
||||
This feature aims to dynamically adjust the printer’s pressure advance to better match the conditions the toolhead is facing during a print. Specifically, to more closely align to the ideal values as flow rate, acceleration, and bridges are encountered.
|
||||
This wiki page aims to explain how this feature works, the prerequisites required to get the most out of it as well as how to calibrate it and set it up.
|
||||
|
||||
## Settings Overview
|
||||
|
||||
This feature introduces the below options under the filament settings:
|
||||
|
||||
1. **Enable adaptive pressure advance:** This is the on/off setting switch for adaptive pressure advance.
|
||||
2. **Enable adaptive pressure advance for overhangs:** Enable adaptive PA for overhangs as well as when flow changes within the same feature. This is an experimental option because if the PA profile is not set accurately, it will cause uniformity issues on the external surfaces before and after overhangs. It is recommended to start with this option switched off and enable it after the core adaptive pressure advance feature is calibrated correctly.
|
||||
3. **Pressure advance for bridges:** Sets the desired pressure advance value for bridges. Set it to 0 to disable this feature. Experiments have shown that a lower PA value when printing bridges helps reduce the appearance of slight under extrusion immediately after a bridge, which is caused by the pressure drop in the nozzle when printing in the air. Therefore, a lower pressure advance value helps counteract this. A good starting point is approximately half your usual PA value.
|
||||
4. **Adaptive pressure advance measurements:** This field contains the calibration values used to generate the pressure advance profile for the nozzle/printer. Input sets of pressure advance (PA) values and the corresponding volumetric flow speeds and accelerations they were measured at, separated by a comma. Add one set of values per line. More information on how to calibrate the model follows in the sections below.
|
||||
5. **Pressure advance:** The old field is still needed and is required to be populated with a PA value. A “good enough” median PA value should be entered here, as this will act as a fallback value when performing tool changes, printing a purge/wipe tower for multi-color prints as well as a fallback in case the model fails to identify an appropriate value (unlikely but it’s the ultimate backstop).
|
||||
|
||||
<img width="452" alt="Adaptive PA settings" src="https://github.com/user-attachments/assets/68c46885-54c7-4123-afa0-762d3995185f">
|
||||
|
||||
|
||||
## Pre-Requisites
|
||||
|
||||
This feature has been tested with Klipper-based printers. While it may work with Marlin or Bambu lab printers, it is currently untested with them. It shouldn’t adversely affect the machine; however, the quality results from enabling it are not validated.
|
||||
|
||||
**Older versions of Klipper used to stutter when pressure advance was changed while the toolhead was in motion. This has been fixed with the latest Klipper firmware releases. Therefore, make sure your Klipper installation is updated to the latest version before enabling this feature, in order to avoid any adverse quality impacts.**
|
||||
|
||||
Klipper firmware released after July 11th, 2024 (version greater than approximately v0.12.0-267) contains the above fix and is compatible with adaptive pressure advance. If you are upgrading from an older version, make sure you update both your Klipper installation as well as reflash the printer MCU’s (main board and toolhead board if present).
|
||||
|
||||
## Use case (what to expect)
|
||||
|
||||
Following experimentation, it has been noticed that the optimal pressure advance value is less:
|
||||
|
||||
1. The faster you print (hence the higher the volumetric flow rate requested from the toolhead).
|
||||
2. The larger the layer height (hence the higher the volumetric flow rate requested from the toolhead).
|
||||
3. The higher the print acceleration is.
|
||||
|
||||
What this means is that we never get ideal PA values for each print feature, especially when they vary drastically in speed and acceleration. We can tune PA for a faster print speed (flow) but compromise on corner sharpness for slower speeds or tune PA for corner sharpness and deal with slight corner-perimeter separation in faster speeds. The same goes for accelerations as well as different layer heights.
|
||||
|
||||
This compromise usually means that we settle for tuning an "in-between" PA value between slower external features and faster internal features so we don't get gaps, but also not get too much bulging in external perimeters.
|
||||
|
||||
**However, what this also means is that if you are printing with a single layer height, single speed, and acceleration, there is no need to enable this feature.**
|
||||
|
||||
Adaptive pressure advance aims to address this limitation by implementing a completely different method of setting pressure advance. **Following a set of PA calibration tests done at different flow rates (speeds and layer heights) and accelerations, a pressure advance model is calculated by the slicer.** Then that model is used to emit the best fit PA for any arbitrary feature flow rate (speed) and acceleration used in the print process.
|
||||
|
||||
In addition, it means that you only need to tune this feature once and print across different layer heights with good PA performance.
|
||||
|
||||
Finally, if during calibration you notice that there is little to no variance between the PA tests, this feature is redundant for you. **From experiments, high flow nozzles fitted on high-speed core XY printers appear to benefit the most from this feature as they print with a larger range of flow rates and at a larger range of accelerations.**
|
||||
|
||||
### Expected results:
|
||||
|
||||
With this feature enabled there should be absolutely no bulge in the corners, just the smooth rounding caused by the square corner velocity of your printer.
|
||||

|
||||
In addition, seams should appear smooth with no bulging or under extrusion.
|
||||

|
||||
Solid infill should have no gaps, pinholes, or separation from the perimeters.
|
||||

|
||||
Compared to with this feature disabled, where the internal solid infill and external-internal perimeters show signs of separation and under extrusion, when PA is tuned for optimal external perimeter performance as shown below.
|
||||

|
||||
|
||||
|
||||
## How to calibrate the adaptive pressure advance model
|
||||
|
||||
### Defining the calibration sets
|
||||
|
||||
Firstly, it is important to understand your printer speed and acceleration limits in order to set meaningful boundaries for the calibrations:
|
||||
|
||||
1. **Upper acceleration range:** Do not attempt to calibrate adaptive PA for an acceleration that is larger than what the Klipper input shaper calibration tool recommends for your selected shaper. For example, if Klipper recommends an EI shaper with 4k maximum acceleration for your slowest axis (usually the Y axis), don’t calibrate adaptive PA beyond that value. This is because after 4k the input shaper smoothing is magnified and the perimeter separations that appear like PA issues are caused by the input shaper smoothing the shape of the corner. Basically, you’d be attempting to compensate for an input shaper artefact with PA.
|
||||
2. **Upper print speed range:** The Ellis PA pattern test has been proven to be the most efficient and effective test to run to calibrate adaptive PA. It is fast and allows for a reasonably accurate and easy-to-read PA value. However, the size of the line segments is quite small, which means that for the faster print speeds and slower accelerations, the toolhead will not be able to reach the full flow rate that we are calibrating against. It is therefore generally not recommended to attempt calibration with a print speed of higher than ~200-250mm/sec and accelerations slower than 1k in the PA pattern test. If your lowest acceleration is higher than 1k, then proportionally higher maximum print speeds can be used.
|
||||
|
||||
**Remember:** With the calibration process, we aim to create a PA – Flow Rate – Acceleration profile for the toolhead. As we cannot directly control flow rate, we use print speed as a proxy (higher speed -> higher flow).
|
||||
|
||||
With the above in mind, let’s create a worked example to identify the optimal number of PA tests to calibrate the adaptive PA model.
|
||||
|
||||
**The below starting points are recommended for the majority of Core XY printers:**
|
||||
|
||||
1. **Accelerations:** 1k, 2k, 4k
|
||||
2. **Print speeds:** 50mm/sec, 100mm/sec, 150mm/sec, 200mm/sec.
|
||||
|
||||
**That means we need to run 3x4 = 12 PA tests and identify the optimal PA for them.**
|
||||
|
||||
Finally, if the maximum acceleration given by input shaper is materially higher than 4k, run a set of tests with the higher accelerations. For example, if input shaper allows a 6k value, run PA tests as below:
|
||||
|
||||
1. **Accelerations:** 1k, 2k, 4k, 6k
|
||||
2. **Print speeds:** 50mm/sec, 100mm/sec, 150mm/sec, 200mm/sec.
|
||||
|
||||
Similarly, if the maximum value recommended is 12k, run PA tests as below:
|
||||
|
||||
1. **Accelerations:** 1k, 2k, 4k, 8k, 12k
|
||||
2. **Print speeds:** 50mm/sec, 100mm/sec, 150mm/sec, 200mm/sec.
|
||||
|
||||
So, at worst case you will need to run 5x4 = 20 PA tests if your printer acceleration is on the upper end! In essence, you want enough granularity of data points to create a meaningful model while also not overdoing it with the number of tests. So, doubling the speed and acceleration is a good compromise to arrive at the optimal number of tests.
|
||||
For this example, let’s assume that the baseline number of tests is adequate for your printer:
|
||||
|
||||
1. **Accelerations:** 1k, 2k, 4k
|
||||
2. **Print speeds:** 50mm/sec, 100mm/sec, 150mm/sec, 200mm/sec.
|
||||
|
||||
We, therefore, need to run 12 PA tests as below:
|
||||
|
||||
**Speed – Acceleration**
|
||||
1. 50 – 1k
|
||||
2. 100 – 1k
|
||||
3. 150 – 1k
|
||||
4. 200 – 1k
|
||||
5. 50 – 2k
|
||||
6. 100 – 2k
|
||||
7. 150 – 2k
|
||||
8. 200 – 2k
|
||||
9. 50 – 4k
|
||||
10. 100 – 4k
|
||||
11. 150 – 4k
|
||||
12. 200 – 4k
|
||||
|
||||
### Identifying the flow rates from the print speed
|
||||
|
||||
#### OrcaSlicer 2.2.0 and later
|
||||
|
||||
Test parameters needed to build adaptive PA table are printed on the test sample:
|
||||
|
||||
<img width="452" alt="pa batch mode" src="https://github.com/user-attachments/assets/219c53b5-d53f-4360-963e-0985d9257bd7">
|
||||
|
||||
Test sample above was done with acceleration 12000 mm/s² and flow rate 27.13 mm³/s
|
||||
|
||||
|
||||
#### OrcaSlicer 2.1.0 and older.
|
||||
|
||||
As mentioned earlier, **the print speed is used as a proxy to vary the extrusion flow rate**. Once your PA test is set up, change the gcode preview to “flow” and move the horizontal slider over one of the herringbone patterns and take note of the flow rate for different speeds.
|
||||

|
||||
|
||||
|
||||
### Running the tests
|
||||
|
||||
#### General tips
|
||||
|
||||
It is recommended that the PA step is set to a small value, to allow you to make meaningful distinctions between the different tests – **therefore a PA step value of 0.001 is recommended. **
|
||||
|
||||
**Set the end PA to a value high enough to start showing perimeter separation for the lowest flow (print speed) and acceleration test.** For example, for a Voron 350 using Revo HF, the maximum value was set to 0.05 as that was sufficient to show perimeter separation even at the slowest flow rates and accelerations.
|
||||
|
||||
**If the test is too big to fit on the build plate, increase your starting PA value or the PA step value accordingly until the test can fit.** If the lowest value becomes too high and there is no ideal PA present in the test, focus on increasing the PA step value to reduce the number of herringbones printed (hence the size of the print).
|
||||
|
||||
<img width="402" alt="PA calibration parameters" src="https://github.com/user-attachments/assets/b411dc30-5556-4e7c-8c40-5279d3074eae">
|
||||
|
||||
#### OrcaSlicer 2.3.0 and newer
|
||||
|
||||
PA pattern calibration configuration window have been changed to simplify test setup. Now all is needed is to fill list of accelerations and speeds into relevant fields of the calibration window:
|
||||
|
||||

|
||||
|
||||
Test patterns generated for each acceleration-speed pair and all parameters are set accordingly. No additional actions needed from user side. Just slice and print all plates generated.
|
||||
|
||||
Refer to [Calibration Guide](./Calibration) for more details on batch mode calibration.
|
||||
|
||||
#### OrcaSlicer 2.2.0 and older
|
||||
|
||||
Setup your PA test as usual from the calibration menu in Orca slicer. Once setup, your PA test should look like the below:
|
||||
|
||||
<img width="437" alt="PA calibration test 1" src="https://github.com/user-attachments/assets/1e6159fe-c3c5-4480-95a1-4383f1fae422">
|
||||
<img width="437" alt="Pa calibration test 2" src="https://github.com/user-attachments/assets/c360bb18-a97a-4f37-b5a3-bb0c67cac2b6">
|
||||
|
||||
Now input your identified print speeds and accelerations in the fields above and run the PA tests.
|
||||
|
||||
**IMPORTANT:** Make sure your acceleration values are all the same in all text boxes. Same for the print speed values and Jerk (XY) values. Make sure your Jerk value is set to the external perimeter jerk used in your print profiles.
|
||||
|
||||
#### Test results processing
|
||||
|
||||
Now run the tests and note the optimal PA value, the flow, and the acceleration. You should produce a table like this:
|
||||
|
||||
<img width="452" alt="calibration table" src="https://github.com/user-attachments/assets/9451e8e4-352f-4cfc-b835-dffa4420d580">
|
||||
|
||||
Concatenate the PA value, the flow value, and the acceleration value into the final comma-separated sets to create the values entered in the model as shown above.
|
||||
|
||||
**You’re now done! The PA profile is created and calibrated!**
|
||||
|
||||
Remember to paste the values in the adaptive pressure advance measurements text box as shown below, and save your filament profile.
|
||||
|
||||
<img width="452" alt="pa profile" src="https://github.com/user-attachments/assets/e6e61d1b-e422-4a6a-88ff-f55e10f79900">
|
||||
|
||||
|
||||
### Tips
|
||||
|
||||
#### Model input:
|
||||
|
||||
The adaptive PA model built into the slicer is flexible enough to allow for as many or as few increments of flow and acceleration as you want. Ideally, you want at a minimum 3x data points for acceleration and flow in order to create a meaningful model.
|
||||
|
||||
However, if you don’t want to calibrate for flow, just run the acceleration tests and leave flow the same for each test (in which case you’ll input only 3 rows in the model text box). In this case, flow will be ignored when the model is used.
|
||||
|
||||
Similarly for acceleration – in the above example you’ll input only 4 rows in the model text box, in which case acceleration will be ignored when the model is used.
|
||||
|
||||
**However, make sure a triplet of values is always provided – PA value, Flow, Acceleration.**
|
||||
|
||||
#### Identifying the right PA:
|
||||
|
||||
Higher acceleration and higher flow rate PA tests are easier to identify the optimal PA as the range of “good” values is much narrower. It’s evident where the PA is too large, as gaps start to appear in the corner and where PA is too low, as the corner starts bulging.
|
||||
|
||||
However, the lower the flow rate and accelerations are, the range of good values is much wider. Having examined the PA tests even under a microscope, what is evident, is that if you can’t distinguish a value as being evidently better than another (i.e. sharper corner with no gaps) with the naked eye, then both values are correct. In which case, if you can’t find any meaningful difference, simply use the optimal values from the higher flow rates.
|
||||
|
||||
- **Too high PA**
|
||||
|
||||

|
||||
|
||||
- **Too low PA**
|
||||
|
||||

|
||||
|
||||
- **Optimal PA**
|
||||
|
||||

|
||||
@@ -1,6 +1,6 @@
|
||||
OrcaSlicer use `M106 P3` command to control air-filtration/exhaust fan.
|
||||
OrcaSlicer use `M106 P3` command to control air-filtration/exhuast fan.
|
||||
|
||||
If you are using Klipper, you can define a `M106` macro to control the both normal part cooling fan and auxiliary fan and exhaust fan.
|
||||
If you are using Klipper, you can define a `M106` macro to control the both normal part cooling fan and auxiliary fan and exhuast fan.
|
||||
Below is a reference configuration for Klipper.
|
||||
*Note: Don't forget to change the pin name to the actual pin name you are using in the configuration*
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Multiple bed types
|
||||
|
||||
You can enable it in printer settings.
|
||||
|
||||
|
||||
Once enabled, you can select the bed type in the drop-down menu, corresponding bed temperature will be set automatically.
|
||||
You can set the bed temperature for each bed type in the filament settings as demonstrated in the following image.
|
||||

|
||||
|
||||
|
||||
Orca also support `curr_bed_type` variable in custom G-code.
|
||||
For example, the following sample G-codes can detect the selected bed type and adjust the G-code offset accordingly for Klipper:
|
||||
```
|
||||
{if curr_bed_type=="Textured PEI Plate"}
|
||||
SET_GCODE_OFFSET Z=-0.05
|
||||
{else}
|
||||
SET_GCODE_OFFSET Z=0.0
|
||||
{endif}
|
||||
```
|
||||
|
||||
available bed types are:
|
||||
```
|
||||
"Cool Plate"
|
||||
"Engineering Plate"
|
||||
"High Temp Plate"
|
||||
"Textured PEI Plate"
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
# For Developers
|
||||
|
||||
This is a documentation from someone exploring the code and is by no means complete or even completely accurate. Please edit the parts you might find inaccurate. This is probably going to be helpful nonetheless.
|
||||
|
||||
- [Preset, PresetBundle and PresetCollection](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/Preset-and-bundle.md)
|
||||
- [Plater, Sidebar, Tab, ComboBox](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/plater-sidebar-tab-combobox.md)
|
||||
- [Slicing Call Hierarchy](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/slicing-hierarchy.md)
|
||||
@@ -1,43 +0,0 @@
|
||||
This page deals with the explanation for 3 classes in the code.
|
||||
|
||||
## [`Preset`](../../src/libslic3r/Preset.hpp)
|
||||
|
||||
As the name might suggest this class deals with presets for various things. It defines an enum `Type` which basically tells you what kind of data the present contains. Below are a few explained and there corresponding UI elements
|
||||
|
||||
#### Note: There is a lot of outdated and legacy code in the code base.
|
||||
|
||||
- `TYPE_PRINT`: Refers to a process preset. It's called 'Print' probably due to some legacy code.
|
||||
|
||||
<img src="../images/process-preset.png" alt="Example Image" width="320">
|
||||
|
||||
- `TYPE_FILAMENT`: As the name suggests this preset is for filaments
|
||||
|
||||
<img src="../images/filament-preset.png" alt="Example Image" width="320">
|
||||
|
||||
- `TYPE_PRINTER`: Preset for printers.
|
||||
|
||||
<img src="../images/printer-preset.png" alt="Example Image" width="320">
|
||||
|
||||
There are other preset types but some of them are for SLA. Which is legacy code, since SLA printers are no longer supported. Above 3 are the important types.
|
||||
|
||||
## [`PresetBundle`](../../src/libslic3r/PresetBundle.hpp)
|
||||
|
||||
This is a bundle containing a few types of `PresetCollection`. One bundle has presets for some printers, filaments and some processes (TYPE_PRINT).
|
||||
|
||||
`PresetCollection prints`\
|
||||
`PresetCollection filaments`\
|
||||
`PrinterPresetCollection printers`
|
||||
|
||||
each one of these contains a collection of processes, filaments and printers respectively.\
|
||||
|
||||
#### Note: Printers, filaments and processes in the bundle don't all have to be compatible with each other. In fact all the saved presets are stored in one `PresetBundle`. The `PresetBundle` is loaded on start up. The list of filaments and processes shown for a particular printer is a subset of `filaments` and `prints` `PresetCollection`s.
|
||||
|
||||
## [`PresetCollection`](../../src/libslic3r/Preset.hpp)
|
||||
|
||||
`PrinterPresetCollection` is a class derived from `PresetCollection`.
|
||||
|
||||
These contain a collection of presets. The presets could be of any type.\
|
||||
functions of note here are:
|
||||
|
||||
`get_edited_preset()`: returns the current selected preset along with any modifications the user has made.\
|
||||
`get_selected_preset()`: returns the current selected preset without the modifications the user has made.
|
||||
@@ -1,23 +0,0 @@
|
||||
### !! incomplete, possibly inaccurate, being updated with new info !!
|
||||
|
||||
## [`Plater`](../../src/slic3r/GUI/Plater.hpp)
|
||||
|
||||
Refers to the entire application. The whole view, file loading, project saving and loading is all managed by this class. This class contains members for the model viewer, the sidebar, gcode viewer and everything else.
|
||||
|
||||
## [`Sidebar`](../../src/slic3r/GUI/Plater.hpp)
|
||||
|
||||
This is relating the the sidebar in the application window
|
||||
|
||||
<img src="../images/full-sidebar.png" alt="Example Image" width="320">
|
||||
|
||||
## [`ComboBox`](../../src/slic3r/GUI/Widgets/ComboBox.hpp)
|
||||
|
||||
The drop down menus where you can see and select presets
|
||||
|
||||
<img src="../images/combobox.png" alt="Example Image" width="320">
|
||||
|
||||
## [`Tab`](../../src/slic3r/GUI/Tab.hpp)
|
||||
|
||||
Refers to the various windows with settings. e.g. the Popup to edit printer or filament preset. Also the section to edit process preset and the object list. These 4 are managed by `TabPrinter`, `TabFilament`, `TabPrint` and `TabPrintModel` respectively.
|
||||
|
||||
<img src="../images/tab-popup.png" alt="Example Image" width="320">
|
||||
@@ -1,5 +0,0 @@
|
||||
## Slicing Call Hierarchy
|
||||
|
||||
The Slicing logic is not the easiest to locate in the code base. Below is a flow diagram of function calls that are made after clicking the `Slice Plate` button in the UI. Most of the processing happens in different threads. Note the calls after `BackgroundSlicingProcess::start()`, but this is how you can find the slicing logic.
|
||||
|
||||
<img src="../images/slicing_call_heirarchy.svg" alt="Example Image" width="320">
|
||||
|
Before Width: | Height: | Size: 773 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 783 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 463 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 462 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 390 KiB |
|
Before Width: | Height: | Size: 122 KiB |
@@ -1,23 +0,0 @@
|
||||
Large format printers with print volumes in the order of 1m^3 generally use pellets for printing.
|
||||
The overall tech is very similar to FDM printing.
|
||||
It is FDM printing, but instead of filaments, it uses pellets.
|
||||
|
||||
The difference here is that where filaments have a filament_diameter that is used to calculate
|
||||
the volume of filament ingested, pellets have a particular flow_coefficient that is empirically
|
||||
devised for that particular pellet.
|
||||
|
||||
pellet_flow_coefficient is basically a measure of the packing density of a particular pellet.
|
||||
Shape, material and density of an individual pellet will determine the packing density and
|
||||
the only thing that matters for 3d printing is how much of that pellet material is extruded by
|
||||
one turn of whatever feeding mehcanism/gear your printer uses. You can emperically derive that
|
||||
for your own pellets for a particular printer model.
|
||||
|
||||
We are translating the pellet_flow_coefficient into filament_diameter so that everything works just like it
|
||||
does already with very minor adjustments.
|
||||
|
||||
filament_diameter = sqrt( (4 \* pellet_flow_coefficient) / PI )
|
||||
|
||||
sqrt just makes the relationship between flow_coefficient and volume linear.
|
||||
|
||||
higher packing density -> more material extruded by single turn -> higher pellet_flow_coefficient -> treated as if a filament of larger diameter is being used
|
||||
All other calculations remain the same for slicing.
|
||||
@@ -1,6 +0,0 @@
|
||||
This feature ensures the accurate Z height of the model after slicing, even if the model height is not a multiple of the layer height.
|
||||
|
||||
For example, slicing a 20mm x 20mm x 20.1mm cube with a layer height of 0.2mm would typically result in a final height of 20.2mm due to the layer height increments.
|
||||
|
||||
By enabling this parameter, the layer height of the last five layers is adjusted so that the final sliced height matches the actual object height, resulting in an accurate 20.1mm (as shown in the picture).
|
||||

|
||||
@@ -1,17 +0,0 @@
|
||||
# Layer Height
|
||||
|
||||
This setting controls how tall each printed layer will be. Typically, a smaller layer height produces a better-looking part with less jagged edges, especially around curved sections (like the top of a sphere). However, lower layer heights mean more layers to print, proportionally increasing print time.
|
||||
|
||||
### Tips:
|
||||
1. **The optimal layer height depends on the size of your nozzle**. The set layer height must not be taller than 80% of the diameter of the nozzle, else there is little "squish" between the printed layer and the layer below, leading to weaker parts.
|
||||
|
||||
2. While technically there is no limit to how small a layer height one can use, **typically most printers struggle to print reliably with a layer height that is smaller than 20% of the nozzle diameter**. This is because with smaller layer heights, less material is extruded per mm and, at some point, the tolerances of the extruder system result in variations in the flow to such an extent that visible artifacts occur, especially if printing at high speeds.
|
||||
|
||||
For example, it is not uncommon to see "fish scale" type patterns on external walls when printing with a 0.4 mm nozzle at 0.08 mm layer height at speeds of 200mm/sec+. If you observe that pattern, simply increase your layer height to 30% of your nozzle height and/or slow down the print speed considerably.
|
||||
|
||||
# First Layer Height
|
||||
|
||||
This setting controls how tall the first layer of the print will be. Typically, this is set to 50% of the nozzle width for optimal bed adhesion.
|
||||
|
||||
### Tip:
|
||||
A thicker first layer is more forgiving to slight variations to the evenness of the build surface, resulting in a more uniform, visually, first layer. Set it to 0.25mm for a 0.4mm nozzle, for example, if your build surface is uneven or your printer has a slightly inconsistent z offset between print runs. However, as a rule of thumb, try not to exceed 65% of the nozzle width so as to not compromise bed adhesion too much.
|
||||
@@ -1,43 +0,0 @@
|
||||
# Line Width
|
||||
|
||||
These settings control how wide the extruded lines are.
|
||||
|
||||
- **Default**: The default line width in mm or as a percentage of the nozzle size.
|
||||
|
||||
- **First Layer**: The line width of the first layer. Typically, this is wider than the rest of the print, to promote better bed adhesion. See tips below for why.
|
||||
|
||||
- **Outer Wall**: The line width in mm or as a percentage of the nozzle size used when printing the model’s external wall perimeters.
|
||||
|
||||
- **Inner Wall**: The line width in mm or as a percentage of the nozzle size used when printing the model’s internal wall perimeters.
|
||||
|
||||
- **Top Surface**: The line width in mm or as a percentage of the nozzle size used when printing the model’s top surface.
|
||||
|
||||
- **Sparse Infill**: The line width in mm or as a percentage of the nozzle size used when printing the model’s sparse infill.
|
||||
|
||||
- **Internal Solid Infill**: The line width in mm or as a percentage of the nozzle size used when printing the model’s internal solid infill.
|
||||
|
||||
- **Support**: The line width in mm or as a percentage of the nozzle size used when printing the model’s support structures.
|
||||
|
||||
|
||||
## Tips:
|
||||
1. **Typically, the line width will be anything from 100% up to 150% of the nozzle width**. Due to the way the slicer’s flow math works, a 100% line width will attempt to extrude slightly “smaller” than the nozzle size and when squished onto the layer below will match the nozzle orifice. You can read more on the flow math here: [Flow Math](https://manual.slic3r.org/advanced/flow-math).
|
||||
|
||||
2. **For most cases, the minimum acceptable recommended line width is 105% of the nozzle diameter**, typically reserved for the outer walls, where greater precision is required. A wider line is less precise than a thinner line.
|
||||
|
||||
3. **Wider lines provide better adhesion to the layer below**, as the material is squished more with the previous layer. For parts that need to be strong, setting this value to 120-150% of the nozzle diameter is recommended and has been experimentally proven to significantly increase part strength.
|
||||
|
||||
4. **Wider lines improve step over and overhang appearance**, i.e., the overlap of the currently printed line to the surface below. So, if you are printing models with overhangs, setting a larger external perimeter line width will improve the overhang’s appearance to an extent.
|
||||
|
||||
5. **For top surfaces, typically a value of ~100%-105% of the nozzle width is recommended** as it provides the most precision, compared to a wider line.
|
||||
|
||||
6. **For external walls, you need to strike a balance between precision and step over and, consequently, overhang appearance.** Typically these values are set to ~105% of nozzle diameter for models with limited overhangs up to ~120% for models with more significant overhangs.
|
||||
|
||||
7. **For internal walls, you typically want to maximize part strength**, so a good starting point is approximately 120% of the nozzle width, which gives a good balance between print speed, accuracy, and material use. However, depending on the model, larger or smaller line widths may make sense in order to reduce gap fill and/or line width variations if you are using Arachne.
|
||||
|
||||
8. **Don’t feel constrained to have wider internal wall lines compared to external ones**. While this is the default for most profiles, for models where significant overhangs are present, printing wider external walls compared to the internal ones may yield better overhang quality without increasing material use!
|
||||
|
||||
9. **For sparse infill, the line width also affects how dense, visually, the sparse infill will be.** The sparse infill aims to extrude a set amount of material based on the percentage infill selected. When increasing the line width, the space between the sparse infill extrusions is larger in order to roughly maintain the same material usage. Typically for sparse infill, a value of 120% of nozzle diameter is a good starting point.
|
||||
|
||||
10. **For supports, using 100% or less line width will make the supports weaker** by reducing their layer adhesion, making them easier to remove.
|
||||
|
||||
11. **If your printer is limited mechanically, try to maintain the material flow as consistent as possible between critical features of your model**, to ease the load on the extruder having to adapt its flow between them. This is especially useful for printers that do not use pressure advance/linear advance and if your extruder is not as capable mechanically. You can do that by adjusting the line widths and speeds to reduce the variation between critical features (e.g., external and internal wall flow). For example, print them at the same speed and the same line width, or print the external perimeter slightly wider and slightly slower than the internal perimeter. Material flow can be visualized in the sliced model – flow drop down.
|
||||
@@ -1,81 +0,0 @@
|
||||
# Seam Section
|
||||
|
||||
Unless printed in spiral vase mode, every layer needs to begin somewhere and end somewhere. That start and end of the extrusion is what results in what visually looks like a seam on the perimeters. This section contains options to control the visual appearance of a seam.
|
||||
|
||||
- **Seam Position**: Controls the placement of the seam.
|
||||
1. **Aligned**: Will attempt to align the seam to a hidden internal facet of the model.
|
||||
2. **Nearest**: Will place the seam at the nearest starting point compared to where the nozzle stopped printing in the previous layer.
|
||||
3. **Back**: Will align the seam in a (mostly) straight line at the rear of the model.
|
||||
4. **Random**: Will randomize the placement of the seam between layers.
|
||||
|
||||
Typically, aligned or back work the best, especially in combination with seam painting. However, as seams create weak points and slight surface "bulges" or "divots," random seam placement may be optimal for parts that need higher strength as that weak point is spread to different locations between layers (e.g., a pin meant to fit through a hole).
|
||||
|
||||
- **Staggered Inner Seams**: As the seam location forms a weak point in the print (it's a discontinuity in the extrusion process after all!), staggering the seam on the internal perimeters can help reduce stress points. This setting moves the start of the internal wall's seam around across layers as well as away from the external perimeter seam. This way, the internal and external seams don't all align at the same point and between them across layers, distributing those weak points further away from the seam location, hence making the part stronger. It can also help improve the water tightness of your model.
|
||||
|
||||
- **Seam Gap**: Controls the gap in mm or as a percentage of the nozzle size between the two ends of a loop starting and ending with a seam. A larger gap will reduce the bulging seen at the seam. A smaller gap reduces the visual appearance of a seam. For a well-tuned printer with pressure advance, a value of 0-15% is typically optimal.
|
||||
|
||||
- **Scarf Seam**: Read more here: [Better Seams - An Orca Slicer Guide](https://www.printables.com/model/783313-better-seams-an-orca-slicer-guide-to-using-scarf-s).
|
||||
|
||||
- **Role-Based Wipe Speed**: Controls the speed of a wipe motion, i.e., how fast the nozzle will move over a printed area to "clean" it before traveling to another area of the model. It is recommended to turn this option on, to ensure the nozzle performs the wipe motion with the same speed that the feature was printed with.
|
||||
|
||||
- **Wipe Speed**: If role-based wipe speed is disabled, set this field to the absolute wipe speed or as a percentage over the travel speed.
|
||||
|
||||
- **Wipe on Loops**: When finishing printing a "loop" (i.e., an extrusion that starts and ends at the same point), move the nozzle slightly inwards towards the part. That move aims to reduce seam unevenness by tucking in the end of the seam to the part. It also slightly cleans the nozzle before traveling to the next area of the model, reducing stringing.
|
||||
|
||||
- **Wipe Before External Perimeters**: To minimize the visibility of potential over-extrusion at the start of an external perimeter, the de-retraction move is performed slightly on the inside of the model and, hence, the start of the external perimeter. That way, any potential over-extrusion is hidden from the outside surface.
|
||||
|
||||
This is useful when printing with Outer/Inner or Inner/Outer/Inner wall print order, as in these modes, it is more likely an external perimeter is printed immediately after a de-retraction move, which would cause slight extrusion variance at the start of a seam.
|
||||
|
||||
## Tips:
|
||||
With seams being inevitable when 3D printing using FFF, there are two distinct approaches on how to deal with them:
|
||||
|
||||
1. **Try and hide the seam as much as possible**: This can be done by enabling scarf seam, which works very well, especially with simple models with limited overhang regions.
|
||||
2. **Try and make the seam as "clean" and "distinct" as possible**: This can be done by tuning the seam gap and enabling role-based wipe speed, wipe on loops, and wipe before the external loop.
|
||||
|
||||
## Troubleshooting Seam Performance:
|
||||
The section below will focus on troubleshooting traditional seams. For scarf seam troubleshooting, refer to the guide linked above.
|
||||
|
||||
There are several factors that influence how clean the seam of your model is, with the biggest one being extrusion control after a travel move. As a seam defines the start and end of an extrusion, it is critical that:
|
||||
|
||||
1. **The same amount of material is extruded at the same point across layers** to ensure a consistent visual appearance at the start of a seam.
|
||||
2. **The printer consistently stops extruding at the same point** across layers.
|
||||
|
||||
However, due to mechanical and material tolerances, as well as the very nature of 3D printing with FFF, that is not always possible. Hopefully with some tuning you'll be able to achieve prints like this!
|
||||
|
||||

|
||||
|
||||
|
||||
### Troubleshooting the Start of a Seam:
|
||||
Imagine the scenario where the toolhead finishes printing a layer line on one side of the bed, retracts, travels the whole distance of the bed to de-retract, and starts printing another part. Compare this to the scenario where the toolhead finishes printing an internal perimeter and only travels a few mm to start printing an external perimeter, without even retracting or de-retracting.
|
||||
|
||||
The first scenario has much more opportunity for the filament to ooze outside the nozzle, resulting in a small blob forming at the start of the seam or, conversely, if too much material has leaked, a gap/under extrusion at the start of the seam.
|
||||
|
||||
The key to a consistent start of a seam is to reduce the opportunity for ooze as much as possible. The good news is that this is mostly tunable by:
|
||||
|
||||
1. **Ensure your pressure advance is calibrated correctly**. A too low pressure advance will result in the nozzle experiencing excess pressure at the end of the previous extrusion, which increases the chance of oozing when traveling.
|
||||
2. **Make sure your travel speed is as fast as possible within your printer's limits**, and the travel acceleration is as high as practically possible, again within the printer's limits. This reduces the travel time between features, reducing oozing.
|
||||
3. **Enable wipe before external perimeters** – this setting performs the de-retraction move inside the model, hence reducing the visual appearance of the "blob" if it does appear at the seam.
|
||||
4. **Increase your travel distance threshold to be such that small travel moves do not trigger a retraction and de-retraction operation**, reducing extrusion variances caused by the extruder tolerances. 2-4mm is a good starting point as, if your PA is tuned correctly and your travel speed and acceleration are high, it is unlikely that the nozzle will ooze in the milliseconds it will take to travel to the new location.
|
||||
5. **Enable retract on layer change**, to ensure the start of your layer is always performed under the same conditions – a de-pressurized nozzle with retracted filament.
|
||||
|
||||
In addition, some toolhead systems are inherently better at seams compared to others. For example, high-flow nozzles with larger melt zones usually have poorer extrusion control as more of the material is in a molten state inside the nozzle. They tend to string more, ooze easier, and hence have poorer seam performance. Conversely, smaller melt zone nozzles have more of the filament solid in their heat zone, leading to more accurate extrusion control and better seam performance.
|
||||
|
||||
So this is a trade-off between print speed and print quality. From experimental data, volcano-type nozzles tend to perform the worst at seams, followed by CHT-type nozzles, and finally regular flow nozzles.
|
||||
|
||||
In addition, larger nozzle diameters allow for more opportunity for material to leak compared to smaller diameter nozzles. A 0.2/0.25 mm nozzle will have significantly better seam performance than a 0.4, and that will have much better performance than a 0.6mm nozzle and so forth.
|
||||
|
||||
### Troubleshooting the End of a Seam:
|
||||
The end of a seam is much easier to get right, as the extrusion system is already at a pressure equilibrium while printing. It just needs to stop extruding at the right time and consistently.
|
||||
|
||||
**If you are getting bulges at the seam**, the extruder is not stopping at the right time. The first thing to tune would be **pressure advance** – too low of a PA will result in the nozzle still being pressurized when finishing the print move, hence leaving a wider line at the end as it stops printing.
|
||||
|
||||
And the opposite is true too – **too high PA will result in under extrusion at the end of a print move**, shown as a larger-than-needed gap at the seam. Thankfully, tuning PA is straightforward, so run the calibration tests and pick the optimal value for your material, print speed, and acceleration.
|
||||
|
||||
Furthermore, the printer mechanics have tolerances – the print head may be requested to stop at point XY but practically it cannot stop precisely at that point due to the limits of micro-stepping, belt tension, and toolhead rigidity. Here is where tuning the seam gap comes into effect. **A slightly larger seam gap will allow for more variance to be tolerated at the end of a print move before showing as a seam bulge**. Experiment with this value after you are certain your PA is tuned correctly and your travel speeds and retractions are set appropriately.
|
||||
|
||||
Finally, the techniques of **wiping can help improve the visual continuity and consistency of a seam** (please note, these settings do not make the seam less visible, but rather make them more consistent!). Wiping on loops with a consistent speed helps tuck in the end of the seam, hiding the effects of retraction from view.
|
||||
|
||||
### The Role of Wall Ordering in Seam Appearance:
|
||||
The order of wall printing plays a significant role in the appearance of a seam. **Starting to print the external perimeter first after a long travel move will always result in more visible artifacts compared to printing the internal perimeters first and traveling just a few mm to print the external perimeter.**
|
||||
|
||||
For optimal seam performance, printing with **inner-outer-inner wall order is typically best, followed by inner-outer**. It reduces the amount of traveling performed prior to printing the external perimeter and ensures the nozzle is having as consistent pressure as possible, compared to printing outer-inner.
|
||||
@@ -1,181 +0,0 @@
|
||||
<h1>Extrusion rate smoothing</h1>
|
||||
|
||||
Extrusion rate smoothing (ERS), also known as pressure equalizer in Prusa Slicer, aims to **limit the rate of extrusion volume change to be below a user set threshold (the ERS value).** It aims to assist the printer firmware internal motion planners, pressure advance in achieving the desired nozzle flow and reducing deviations against the ideal flow.
|
||||
|
||||
This happens by reducing the stresses put on the extrusion system as well as reducing the absolute deviations from the ideal extrusion flow caused by pressure advance smooth time.
|
||||
|
||||
This feature is especially helpful when printing at high accelerations and large flow rates as the deviations are larger in these cases.
|
||||
|
||||

|
||||
|
||||
<h2>Theory</h2>
|
||||
|
||||
Enabling this feature creates a small **speed "ramp"** by slowing down and ramping up print speeds prior to and after the features causing a sudden change in extrusion flow rate needs, such as overhangs and overhang perimeters.
|
||||
|
||||
This works by breaking down the printed line segments into smaller "chunks", proportional to the ERS segment length, and reduces the print speed of these segments so that the **requested extrusion volumetric flow rate change is less than or equal to the ERS threshold**.
|
||||
|
||||
In summary, **it takes the "edge" off rapid extrusion changes caused by acceleration/deceleration as these are now spread over a longer distance and time.** Therefore, it can reduce wall artefacts that show when the print speeds change suddenly. These artefacts are occuring because the extruder and firmware cannot perfectly adhere to the requested by the slicer flow rates, especially when the extrusion rate is changing rapidly.
|
||||
|
||||
**The example below shows the artefact that is mitigated by ERS.**
|
||||

|
||||
|
||||
The bulging visible above is due to the extruder not being able to respond fast enough against the required speed change when printing with high accelerations and high speeds and requested to slow down for an overhang.
|
||||
|
||||
In the above scenario, the printer (Bambu Lab X1 Carbon) was requested to slow down from a 200mm/sec print speed to 40mm/sec at an acceleration of 5k/sec2. **The extruder could not keep up with the pressure change, resulting in a slight bump ahead at the point of speed change.**
|
||||
|
||||
This parameter interacts with the below printer kinematic settings and physical limits:
|
||||
|
||||
|
||||
**1. The limits of the extruder system** - how fast can it change pressure in the nozzle
|
||||
|
||||
**2. The configured pressure advance values** - that also affect pressure changes in the nozzle
|
||||
|
||||
**3. The acceleration profile of the printer** - higher accelerations mean higher pressure changes
|
||||
|
||||
**4. The pressure advance smooth time (klipper)** - higher smooth time means higher deviation from ideal extrusion, hence more opportunity for this feature to be useful.
|
||||
|
||||
|
||||
<h3>Acceleration vs. Extrusion rate smoothing</h3>
|
||||
A printer's motion system does not exactly follow the speed changes seen in the gcode preview screen of Orca slicer.
|
||||
|
||||
|
||||
When a speed change is requested, the firmware look ahead planner calculates the slow down needed to achieve the target speed. The rate of slowdown is limited by the move's acceleration value.
|
||||
|
||||
**Lets consider an example.** Assume printing an overhang wall with **2k external wall acceleration**, were the printer is called to slow down from **200mm/sec to 40mm/sec**.
|
||||
|
||||
This deceleration move would happen over approximately 9.6mm. This is derived from the following equation:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The time taken to decelerate to this new speed would be approx. 0.08 seconds, derived from the following equation:
|
||||
|
||||

|
||||
|
||||
A printer printing at 200mm/sec with a 0.42 line width and 0.16 layer height would be extruding plastic at approx. 12.16mm3/sec, as can also be seen from the below visual.
|
||||
|
||||

|
||||
|
||||
When the printer is extruding at 40mm/sec with the same line width and layer height as above, the flow rate is 2.43mm3/sec.
|
||||
|
||||
So what we are asking the extruder to do in this example is **slow down from 12.16mm3/sec flow to 2.43mm3/sec flow in 0.08 seconds** or an extrusion change rate of 121mm3/sec2.
|
||||
|
||||
**This value is proportional to the acceleration of the printer. At 4k this value doubles, at 1k it is half and is independent of the speed of movement or starting and ending speeds.**
|
||||
|
||||
**This value is also proportional to the line width - double the line width will result in double the extrusion rate change and vice versa. Same for layer height.**
|
||||
|
||||
So, continuing with the worked example, a 2k acceleration produces an extrusion rate change ramp of 121mm3/sec2. **Therefore, setting a value higher than this would not bring any benefit to the print quality as the motion system would slow down less aggressively based on its acceleration settings.**
|
||||
|
||||
**Therefore, the acceleration values act as a meaningfull upper limit to this setting.** An indicative set of values has been provided later in this page.
|
||||
|
||||
<h3>Pressure advance vs extrusion rate smoothing</h3>
|
||||
|
||||
Then we need to consider pressure advance and smooth time as factors that influence extrusion rate.
|
||||
|
||||
**Pressure Advance** adjusts the extruder's speed to account for the pressure changes inside the hot end’s melt zone. When the print head moves and extrudes filament, there's a delay between the movement of the extruder gear and the plastic being extruded due to the compressibility of the molten plastic in the hot end. This delay can cause too much plastic to be extruded when the print head starts moving or not enough plastic when the print head stops, leading to issues like blobbing or under-extrusion.
|
||||
|
||||
**Pressure Advance Smooth time** helps to mitigate potential negative effects on print quality due to the rapid changes in extruder flow rate, which are controlled by the Pressure Advance algorithm. This parameter essentially adds a smoothing effect to the adjustments made by Pressure Advance, aiming to prevent sharp or sudden changes in the extrusion rate.
|
||||
|
||||
When Pressure Advance adjusts the extruder speed to compensate for the pressure build-up or reduction in the hot end, it can lead to abrupt changes in the flow rate. These abrupt changes can potentially cause issues like:
|
||||
|
||||
1. Extruder motor skipping,
|
||||
2. Increased wear on the extruder gear and filament,
|
||||
3. Visible artifacts on the print surface due to non-uniform extrusion.
|
||||
|
||||
The smooth time setting introduces a controlled delay over which the Pressure Advance adjustments are spread out. This results in a more gradual application or reduction of extrusion pressure, leading to smoother transitions in filament flow.
|
||||
|
||||
The trade-off is extrusion accuracy. There is a deviation between the requested extrusion amount and the actual extrusion amount due to this smoothing.
|
||||
|
||||
**1. Increasing Smooth Time:** Leads to more gradual changes in extrusion pressure. While this can reduce artifacts and stress on the extruder system, setting it too high may diminish the effectiveness of Pressure Advance, as the compensation becomes too delayed to counteract the pressure dynamics accurately.
|
||||
|
||||
**2. Decreasing Smooth Time:** Makes the Pressure Advance adjustments more immediate, which can improve the responsiveness of pressure compensation but may also reintroduce abrupt changes in flow rate, potentially leading to the issues mentioned above.
|
||||
|
||||
In essence, p**ressure advance smooth time creates an intentional deviation from the ideal extruder rotation** and, therefore, extrusion amount, to allow the printer's extruder to perform within its mechanical limits. Typically, this value is set to 0.04sec, which means that when Pressure Advance adjusts the extruder's flow rate to compensate for changes in pressure within the hot end, these adjustments are spread out over a period of 0.04 seconds.
|
||||
|
||||
There is a great example of pressure advance smooth time induced deviations [here](https://klipper.discourse.group/t/pressure-advance-smooth-time-skews-pressure-advance/13451) that is worth a read to get more insight in this trade-off.
|
||||
|
||||
In the worked example above, **we need to set an Extrusion Rate smoothing value enough to decrease the error introduced by pressure advance smooth time against the produced output flow.** The lower the extrusion rate smoothing value, the lower the changes in flow over time hence the lower the absolute deviation from the ideal extrusion caused by the smooth time algorithm. However, going too low will result in a material decrease in overall print speed, as the print speed will be materially reduced to achieve low extrusion deviations between features, for no real benefit after a point.
|
||||
|
||||
**The best way to find what the lower beneficial limit is through experimentation.** Print an object with sharp overhangs that are slowed down because off the overhang print speed settings and observe for extrusion inconsistencies.
|
||||
|
||||
<h2>Finding the ideal Extrusion Rate smoothing value</h2>
|
||||
|
||||
**Firstly, this value needs to be lower than the extrusion rate changes resulting from the acceleration profile of the printer.** As, generally, the greatest impact is in external wall finish, use your external perimeter acceleration as a point of reference.
|
||||
|
||||
**Below are some approximate ERS values for 0.42 line width and 0.16 layer height.**
|
||||
1. 30mm3/sec for 0.5k acceleration
|
||||
2. 60.5mm3/sec for 1k acceleration
|
||||
3. 121mm3/sec2 for 2k acceleration
|
||||
4. 242mm3/sec2 for 4k acceleration
|
||||
|
||||
**Below are some approximate ERS values for 0.42 line width and 0.20 layer height.**
|
||||
1. 38mm3/sec for 0.5k acceleration
|
||||
2. 76mm3/sec for 1k acceleration
|
||||
3. 150mm3/sec2 for 2k acceleration
|
||||
4. 300mm3/sec2 for 4k acceleration
|
||||
|
||||
**Below are some approximate ERS values for 0.45 line width and 0.16 layer height.**
|
||||
1. 32mm3/sec for 0.5k acceleration
|
||||
2. 65mm3/sec for 1k acceleration
|
||||
3. 129mm3/sec2 for 2k acceleration
|
||||
4. 260mm3/sec2 for 4k acceleration
|
||||
|
||||
**So, your tuning starting point needs to be an ERS value that is less than this.** A good point experiment with test prints would be **a value of 60-80%** of the above maximum values. This will give some meaningful assistance to pressure advance, reducing the deviation introduced by pressure advance smooth time. The greater the smooth time, the greater the quality benefit will be.
|
||||
|
||||
Therefore, for a **0.42 line width and 0.16 layer height**, the below are a recommended set of starting ERS values
|
||||
1. 18-25mm3/sec for 0.5k acceleration
|
||||
2. 35-50mm3/sec for 1k acceleration
|
||||
3. 70-100mm3/sec2 for 2k acceleration
|
||||
4. 145-200mm3/sec2 for 4k acceleration
|
||||
|
||||
If you are printing with a 0.2 layer height, you can increase these values by 25% and similarly reduce if printing with lower.
|
||||
|
||||
**The second factor is your extruder's mechanical abilities.** Direct drive extruders with a good grip on the filament typically are more responsive to extrusion rate changes. Similarly with stiff filaments. So, a Bowden printer or when printing softer material like TPU or soft PLAs like polyterra there is more opportunity for the extruder to slip or deviate from the desired extrusion amount due to mechanical grip or material deformation or just delay in propagating the pressure changes (in a Bowden setup).
|
||||
|
||||
**The final factor is the deviation introduced by pressure advance smooth time**, or equivalents in closed source firmware. The higher this value the larger the extrusion deviation from ideal. If you are using a direct drive extruder, reduce this value to 0.02 in your klipper firmware before tuning ERS, as a lower value results in lower deviations to mitigate. Then proceed to experimentaly tune ERS.
|
||||
|
||||
**So where does that leave us?**
|
||||
|
||||
Perform a test print with the above ERS settings as a starting point and adjust to your liking! If you notice budging on sharp overhangs where speed changes, like the hull of the benchy, reduce this value by 10% and try again.
|
||||
|
||||
If you're not noticing any artefacts, increase by 10%, but don’t go over the maximum values recommended above because then this feature would have no effect in your print.
|
||||
|
||||
<h2>A note for Bowden printers using marlin without pressure advance. </h2>
|
||||
If your printer is not equipped with pressure advance and, especially, if you are using a Bowden setup, you don’t have the benefit of pressure advance dynamically adjusting your flow.
|
||||
|
||||
|
||||
In this special case, ERS will be doing all the heavy lifting that pressure advance would typically perform. In this scenario a low value of 8-10mm3/sec is usually recommended, irrespective of your acceleration settings, to smooth out pressure changes in the extrusion system as much as possible without impacting print speed too much.
|
||||
|
||||
<h2>A note on ERS Segment length </h2>
|
||||
Ideally you want this value set to 1 to allow for the largest number of steps between each speed transition. However, this may result in a too large of a gcode, with too many commands sent to your MCU per second and it may not be able to keep up. It will also slow down the Orca slicer front end as the sliced model is more complex to render.
|
||||
|
||||
|
||||
For Klipper printers, a segment length of 1 works OK as the RPI or similar have enough computational power to handle the gcode command volume.
|
||||
|
||||
Similarly, for a Bambu lab printer, a segment length of 1 works well. **However, if you do notice your printer stuttering or stalling** (which may be the case with the lower powered P1 series printers) **or getting "Timer too close" errors** in Klipper, **increase this value to 2 or 3**. This would reduce the effectiveness of the setting but will present a more manageable load to your printer.
|
||||
|
||||
<h2>Limitations</h2>
|
||||
|
||||
**This feature can only work where speed changes are induced by the slicer** - for example when transitioning from fast to slow print moves when printing overhangs, bridges and from printing internal features to external features and vice versa.
|
||||
|
||||
However, it will not affect extruder behaviour when the printer is slowing down due to firmware commands - for example when turning around corners.
|
||||
|
||||
In this case, the printer slows down and then accelerates independently of what the slicer has requested. In this case, the slicer is commanding a consistent speed; however, the printer is adjusting this to operate within its printer kinematic limits (SCV/Jerk) and accelerations. As the slicer is not aware of this slow down, it cannot apply pre-emptive extrusion rate smoothing to the feature and instead, the changes are governed by the printer firmware exclusively.
|
||||
|
||||
<h2>Credits</h2>
|
||||
|
||||
**Original feature authors and creators:** The Prusa Slicer team, including [@bubnikv](https://github.com/bubnikv), [@hejllukas](https://github.com/hejllukas)
|
||||
|
||||
**Enhanced by:** [@MGunlogson](https://github.com/MGunlogson), introducing the feature to external perimeters, enhancing it by taking into account travel, retraction and implementing near-contiguous extrusions pressure equalizer adjustments.
|
||||
|
||||
**Ported to Orca:** [@igiannakas](https://github.com/igiannakas)
|
||||
|
||||
**Enhanced by:** [@noisyfox](https://github.com/Noisyfox), per object pressure equalization and fixing calculation logic bugs
|
||||
|
||||
**Wiki page:** [@igiannakas](https://github.com/igiannakas)
|
||||
|
||||
**Overall Orca owner and assurance:** [@softfever](https://github.com/SoftFever)
|
||||
|
||||
**Community testing and feedback:** [@HakunMatat4](https://github.com/HakunMatat4), [@psiberfunk](https://github.com/psiberfunk), [@u3dreal](https://github.com/u3dreal) and more
|
||||
|
||||
2
flatpak/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
builddir
|
||||
.flatpak-builder
|
||||
@@ -1,3 +0,0 @@
|
||||
# OrcaSlicer
|
||||
|
||||
This is basically a copy of [com.bambulab.BambuStudio](https://github.com/flathub/com.bambulab.BambuStudio). As such, same rules apply here as does over there.
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Work-around https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/754
|
||||
grep -q org.freedesktop.Platform.GL.nvidia /.flatpak-info && export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
|
||||
# Work-around https://github.com/bambulab/BambuStudio/issues/3440
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
exec /app/bin/orca-slicer "$@"
|
||||
|
Before Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 976 KiB |
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>io.github.softfever.OrcaSlicer</id>
|
||||
<launchable type="desktop-id">io.github.softfever.OrcaSlicer.desktop</launchable>
|
||||
<provides>
|
||||
<id>io.github.softfever.OrcaSlicer.desktop</id>
|
||||
</provides>
|
||||
<name>OrcaSlicer</name>
|
||||
<!-- hehe hadess @ppd
|
||||
... seriously though, thanks -->
|
||||
<summary>Get even more perfect prints!</summary>
|
||||
<developer_name>SoftFever</developer_name>
|
||||
<url type="homepage">https://github.com/SoftFever/OrcaSlicer</url>
|
||||
<url type="help">https://github.com/SoftFever/OrcaSlicer/wiki</url>
|
||||
<url type="bugtracker">https://github.com/SoftFever/OrcaSlicer/issues/</url>
|
||||
<url type="donation">https://ko-fi.com/SoftFever</url>
|
||||
<metadata_license>0BSD</metadata_license>
|
||||
<project_license>AGPL-3.0-only</project_license>
|
||||
<content_rating type="oars-1.1" />
|
||||
<requires>
|
||||
<display_length compare="gt">768</display_length>
|
||||
</requires>
|
||||
<recommends>
|
||||
<control>keyboard</control>
|
||||
<control>pointing</control>
|
||||
</recommends>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/powpingdone/com.github.softfever.orcaslicer/master/images/1.png</image>
|
||||
<caption>A model ready to be sliced on a buildplate.</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://raw.githubusercontent.com/powpingdone/com.github.softfever.orcaslicer/master/images/2.png
|
||||
</image>
|
||||
<caption>A calibration test ready to be printed out.</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<description>
|
||||
<p>A powerful, free and open-source 3D printer slicer that features cutting-edge technology.</p>
|
||||
</description>
|
||||
<branding>
|
||||
<color type="primary" scheme_preference="light">#009688</color>
|
||||
</branding>
|
||||
<releases>
|
||||
<release version="2.0.0-951fc8e" date="2024-01-30"> <url>https://github.com/SoftFever/OrcaSlicer/commit/951fc8e98a0d5ca0ccb254315646ce7889a44836</url>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
||||