mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Merge branch 'main' into dev/gizmo
This commit is contained in:
commit
df48b05f73
8 changed files with 344 additions and 242 deletions
56
.github/workflows/build_all.yml
vendored
Normal file
56
.github/workflows/build_all.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
name: Build all
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'deps/**'
|
||||||
|
- 'src/**'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- 'version.inc'
|
||||||
|
- 'localization/**'
|
||||||
|
- 'resources/**'
|
||||||
|
- ".github/workflows/build_*.yml"
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'deps/**'
|
||||||
|
- 'src/**'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- 'version.inc'
|
||||||
|
- ".github/workflows/build_*.yml"
|
||||||
|
|
||||||
|
workflow_dispatch: # allows for manual dispatch
|
||||||
|
inputs:
|
||||||
|
build-deps-only:
|
||||||
|
description: 'Only build dependencies (bypasses caching)'
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_all:
|
||||||
|
name: Build All
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
- os: windows-latest
|
||||||
|
- os: macos-12
|
||||||
|
arch: x86_64
|
||||||
|
- 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
|
58
.github/workflows/build_check_cache.yml
vendored
Normal file
58
.github/workflows/build_check_cache.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
name: Check Cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
arch:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
build-deps-only:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_cache: # determines if there is a cache and outputs variables used in caching process
|
||||||
|
name: Check Cache
|
||||||
|
runs-on: ${{ inputs.os }}
|
||||||
|
outputs:
|
||||||
|
cache-key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||||
|
cache-path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||||
|
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: set outputs
|
||||||
|
id: set_outputs
|
||||||
|
env:
|
||||||
|
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=${{ 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@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||||
|
key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||||
|
lookup-only: true
|
||||||
|
|
||||||
|
build_deps: # call next step
|
||||||
|
name: Build Deps
|
||||||
|
needs: [check_cache]
|
||||||
|
uses: ./.github/workflows/build_deps.yml
|
||||||
|
with:
|
||||||
|
cache-key: ${{ needs.check_cache.outputs.cache-key }}
|
||||||
|
cache-path: ${{ needs.check_cache.outputs.cache-path }}
|
||||||
|
valid-cache: ${{ needs.check_cache.outputs.valid-cache == 'true' }}
|
||||||
|
os: ${{ inputs.os }}
|
||||||
|
arch: ${{ inputs.arch }}
|
||||||
|
build-deps-only: ${{ inputs.build-deps-only }}
|
||||||
|
secrets: inherit
|
133
.github/workflows/build_deps.yml
vendored
133
.github/workflows/build_deps.yml
vendored
|
@ -1,60 +1,62 @@
|
||||||
# name: Build Deps
|
|
||||||
name: Build deps
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_call:
|
||||||
branches:
|
inputs:
|
||||||
- main
|
cache-key:
|
||||||
paths:
|
required: true
|
||||||
- 'deps/**'
|
type: string
|
||||||
- .github/workflows/build_deps.yml
|
cache-path:
|
||||||
push:
|
required: true
|
||||||
branches:
|
type: string
|
||||||
- main
|
valid-cache:
|
||||||
paths:
|
required: true
|
||||||
- 'deps/**'
|
type: boolean
|
||||||
- .github/workflows/build_deps.yml
|
os:
|
||||||
|
required: true
|
||||||
concurrency:
|
type: string
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
arch:
|
||||||
cancel-in-progress: true
|
required: false
|
||||||
|
type: string
|
||||||
|
build-deps-only:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_deps:
|
build_deps:
|
||||||
strategy:
|
name: Build Deps
|
||||||
fail-fast: false
|
if: inputs.build-deps-only || inputs.valid-cache != true
|
||||||
matrix:
|
runs-on: ${{ inputs.os }}
|
||||||
include:
|
env:
|
||||||
- os: ubuntu-20.04
|
date:
|
||||||
- os: windows-latest
|
|
||||||
- os: macos-12
|
|
||||||
arch: x86_64
|
|
||||||
- os: macos-12
|
|
||||||
arch: arm64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
# Setup the environment
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: load cached deps
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ inputs.cache-path }}
|
||||||
|
key: ${{ inputs.cache-key }}
|
||||||
|
|
||||||
- name: setup dev on Windows
|
- name: setup dev on Windows
|
||||||
if: matrix.os == 'Windows'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
- name: Get the date on Ubuntu and macOS
|
- name: Get the date on Ubuntu and macOS
|
||||||
if: matrix.os != 'windows-latest'
|
if: inputs.os != 'windows-latest'
|
||||||
id: get-date-unix
|
|
||||||
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Get the date on Windows
|
- name: Get the date on Windows
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
id: get-date-windows
|
|
||||||
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
|
||||||
|
# Build Dependencies
|
||||||
- name: Build on Windows
|
- name: Build on Windows
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
choco install strawberryperl
|
choco install strawberryperl
|
||||||
|
@ -64,26 +66,18 @@ jobs:
|
||||||
.\build_release_vs2022.bat pack
|
.\build_release_vs2022.bat pack
|
||||||
cd ${{ github.workspace }}/deps/build
|
cd ${{ github.workspace }}/deps/build
|
||||||
|
|
||||||
- name: Build on Mac x86_64
|
- name: Build on Mac ${{ inputs.arch }}
|
||||||
if: matrix.os == 'macos-12' && matrix.arch == 'x86_64'
|
if: inputs.os == 'macos-12'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
brew install cmake git gettext automake
|
brew install cmake git gettext automake
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_x86_64
|
brew list
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep_x86_64
|
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
|
||||||
./build_release_macos.sh -dp -a x86_64
|
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
|
||||||
|
./build_release_macos.sh -dp -a ${{ inputs.arch }}
|
||||||
- name: Build on Mac arm64
|
|
||||||
if: matrix.os == 'macos-12' && matrix.arch == 'arm64'
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
brew install cmake git gettext automake
|
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_arm64
|
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep_arm64
|
|
||||||
./build_release_macos.sh -dp -a arm64
|
|
||||||
|
|
||||||
- name: Build on Ubuntu
|
- name: Build on Ubuntu
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -99,32 +93,39 @@ jobs:
|
||||||
./BuildLinux.sh -dr
|
./BuildLinux.sh -dr
|
||||||
cd deps/build
|
cd deps/build
|
||||||
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
|
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
|
||||||
|
|
||||||
- name: Upload Mac arm64 artifacts
|
|
||||||
if: matrix.os == 'macos-12' && matrix.arch == 'arm64'
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: OrcaSlicer_dep_mac_arm64_${{ env.date }}
|
|
||||||
path: ${{ github.workspace }}/deps/build_arm64/OrcaSlicer_dep*.tar.gz
|
|
||||||
|
|
||||||
- name: Upload Mac x86_64 artifacts
|
|
||||||
if: matrix.os == 'macos-12' && matrix.arch == 'x86_64'
|
# Upload Artifacts
|
||||||
|
- name: Upload Mac ${{ inputs.arch }} artifacts
|
||||||
|
if: inputs.os == 'macos-12'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_dep_mac_x86_64_${{ env.date }}
|
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
|
||||||
path: ${{ github.workspace }}/deps/build_x86_64/OrcaSlicer_dep*.tar.gz
|
path: ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep*.tar.gz
|
||||||
|
|
||||||
- name: Upload Windows artifacts
|
- name: Upload Windows artifacts
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_dep_win64_${{ env.date }}
|
name: OrcaSlicer_dep_win64_${{ env.date }}
|
||||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
|
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
|
||||||
|
|
||||||
- name: Upload Ubuntu artifacts
|
- name: Upload Ubuntu artifacts
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
|
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
|
||||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
|
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
|
||||||
|
|
||||||
|
build_orca:
|
||||||
|
name: Build OrcaSlicer
|
||||||
|
needs: [build_deps]
|
||||||
|
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success()) }}
|
||||||
|
uses: ./.github/workflows/build_orca.yml
|
||||||
|
with:
|
||||||
|
cache-key: ${{ inputs.cache-key }}
|
||||||
|
cache-path: ${{ inputs.cache-path }}
|
||||||
|
os: ${{ inputs.os }}
|
||||||
|
arch: ${{ inputs.arch }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
|
246
.github/workflows/build_orca.yml
vendored
246
.github/workflows/build_orca.yml
vendored
|
@ -1,51 +1,33 @@
|
||||||
name: Build OrcaSlicer
|
on:
|
||||||
|
workflow_call:
|
||||||
on:
|
inputs:
|
||||||
push:
|
cache-key:
|
||||||
branches:
|
required: true
|
||||||
- main
|
type: string
|
||||||
paths:
|
cache-path:
|
||||||
- 'src/**'
|
required: true
|
||||||
- '**/CMakeLists.txt'
|
type: string
|
||||||
- 'version.inc'
|
os:
|
||||||
- 'localization/**'
|
required: true
|
||||||
- 'resources/**'
|
type: string
|
||||||
- ".github/workflows/build_orca.yml"
|
arch:
|
||||||
|
required: false
|
||||||
pull_request:
|
type: string
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'src/**'
|
|
||||||
- '**/CMakeLists.txt'
|
|
||||||
- 'version.inc'
|
|
||||||
- ".github/workflows/build_orca.yml"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_orca:
|
build_orca:
|
||||||
strategy:
|
name: Build OrcaSlicer
|
||||||
fail-fast: false
|
runs-on: ${{ inputs.os }}
|
||||||
matrix:
|
env:
|
||||||
include:
|
date:
|
||||||
- os: ubuntu-20.04
|
ver:
|
||||||
- os: windows-latest
|
|
||||||
- os: macos-12
|
|
||||||
arch: x86_64
|
|
||||||
- os: macos-12
|
|
||||||
arch: arm64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get the version and date on Ubuntu and macOS
|
- name: Get the version and date on Ubuntu and macOS
|
||||||
if: matrix.os != 'windows-latest'
|
if: inputs.os != 'windows-latest'
|
||||||
id: get-version-unix
|
|
||||||
run: |
|
run: |
|
||||||
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||||
echo "ver=$ver" >> $GITHUB_ENV
|
echo "ver=$ver" >> $GITHUB_ENV
|
||||||
|
@ -53,8 +35,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Get the version and date on Windows
|
- name: Get the version and date on Windows
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
id: get-version-windows
|
|
||||||
run: |
|
run: |
|
||||||
echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||||
# Extract the version from the file
|
# Extract the version from the file
|
||||||
|
@ -65,50 +46,30 @@ jobs:
|
||||||
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||||
echo "date: ${{ env.date }} version: $ver"
|
echo "date: ${{ env.date }} version: $ver"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: load cached deps
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ inputs.cache-path }}
|
||||||
|
key: ${{ inputs.cache-key }}
|
||||||
|
|
||||||
# Mac
|
# Mac
|
||||||
- name: Install tools mac
|
- name: Install tools mac
|
||||||
if: matrix.os == 'macos-12'
|
if: inputs.os == 'macos-12'
|
||||||
run: |
|
run: |
|
||||||
brew install cmake git gettext zstd tree
|
brew install cmake git gettext zstd tree
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}
|
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_${{matrix.arch}}/OrcaSlicer_dep_${{matrix.arch}}
|
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}}
|
||||||
|
|
||||||
# - name: build deps
|
|
||||||
# if: matrix.os == 'macos-12'
|
|
||||||
# id: cache_deps
|
|
||||||
# uses: actions/cache@v3
|
|
||||||
# env:
|
|
||||||
# cache-name: ${{ runner.os }}-cache-orcaslicer_deps_${{matrix.arch}}
|
|
||||||
# with:
|
|
||||||
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
|
||||||
# key: build-${{ env.cache-name }}
|
|
||||||
|
|
||||||
# - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }}
|
|
||||||
# name: build deps
|
|
||||||
# working-directory: ${{ github.workspace }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: ./build_release_macos.sh -d -a ${{matrix.arch}}
|
|
||||||
- name: Download and extract deps
|
|
||||||
if: matrix.os == 'macos-12'
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz
|
|
||||||
tar -zvxf ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz -C ${{ github.workspace }}/deps/build_${{matrix.arch}}
|
|
||||||
chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_${{matrix.arch}}
|
|
||||||
tree ${{ github.workspace }}/deps/build_${{matrix.arch}}
|
|
||||||
rm ./OrcaSlicer_dep_mac_${{matrix.arch}}_20231008.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
- name: Build slicer mac
|
- name: Build slicer mac
|
||||||
if: matrix.os == 'macos-12'
|
if: inputs.os == 'macos-12'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
./build_release_macos.sh -s -n -a ${{matrix.arch}}
|
./build_release_macos.sh -s -n -a ${{inputs.arch}}
|
||||||
|
|
||||||
# Thanks to RaySajuuk, it's working now
|
# Thanks to RaySajuuk, it's working now
|
||||||
- name: Sign app and notary
|
- name: Sign app and notary
|
||||||
if: github.ref == 'refs/heads/main' && matrix.os == 'macos-12'
|
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-12'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
env:
|
env:
|
||||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||||
|
@ -125,116 +86,86 @@ jobs:
|
||||||
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH
|
||||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/OrcaSlicer.app
|
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/OrcaSlicer.app
|
||||||
ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications
|
ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications
|
||||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
|
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg
|
||||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
|
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg
|
||||||
xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}"
|
xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}"
|
||||||
xcrun notarytool submit "OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
|
xcrun notarytool submit "OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
|
||||||
xcrun stapler staple OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
|
xcrun stapler staple OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg
|
||||||
|
|
||||||
- name: Create DMG without notary
|
- name: Create DMG without notary
|
||||||
if: github.ref != 'refs/heads/main' && matrix.os == 'macos-12'
|
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-12'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications
|
ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications
|
||||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
|
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg
|
||||||
|
|
||||||
- name: Upload artifacts mac
|
- name: Upload artifacts mac
|
||||||
if: matrix.os == 'macos-12'
|
if: inputs.os == 'macos-12'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}
|
name: OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}
|
||||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg
|
path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_V${{ env.ver }}.dmg
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
- name: setup MSVC
|
- name: setup MSVC
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
- name: Install nsis
|
- name: Install nsis
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
||||||
choco install nsis
|
choco install nsis
|
||||||
|
|
||||||
- name: download deps
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
shell: powershell
|
|
||||||
run: '(new-object System.Net.WebClient).DownloadFile("https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_win64_20230810_vs2022.zip", "$env:temp\OrcaSlicer_dep_win64_20230810_vs2022.zip")'
|
|
||||||
|
|
||||||
- name: maker dir
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
mkdir ${{ github.workspace }}/deps/build
|
|
||||||
mkdir ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
|
||||||
|
|
||||||
- name: extract deps
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
working-directory: ${{ github.workspace }}/deps/build
|
|
||||||
shell: cmd
|
|
||||||
run: '"C:/Program Files/7-Zip/7z.exe" x %temp%\OrcaSlicer_dep_win64_20230810_vs2022.zip'
|
|
||||||
|
|
||||||
# - name: build deps
|
|
||||||
# if: matrix.os == 'windows-latest'
|
|
||||||
# id: cache_deps
|
|
||||||
# uses: actions/cache@v3
|
|
||||||
# env:
|
|
||||||
# cache-name: ${{ runner.os }}-cache-orcaslicer_deps
|
|
||||||
# with:
|
|
||||||
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
|
||||||
# key: ${{ runner.os }}-build-${{ env.cache-name }}
|
|
||||||
|
|
||||||
# - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }}
|
|
||||||
# name: build deps
|
|
||||||
# working-directory: ${{ github.workspace }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: .\build_release_vs2022.bat deps
|
|
||||||
|
|
||||||
# - run: Get-ChildItem ${{ github.workspace }}/deps/build/ -Exclude OrcaSlicer_dep | Remove-Item -Recurse -Force
|
|
||||||
|
|
||||||
- name: Build slicer Win
|
- name: Build slicer Win
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: .\build_release_vs2022.bat slicer
|
run: .\build_release_vs2022.bat slicer
|
||||||
|
|
||||||
- name: Create installer Win
|
- name: Create installer Win
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
working-directory: ${{ github.workspace }}/build
|
working-directory: ${{ github.workspace }}/build
|
||||||
run: |
|
run: |
|
||||||
cpack -G NSIS
|
cpack -G NSIS
|
||||||
|
|
||||||
# - name: pack app
|
- name: Pack app
|
||||||
# if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
# working-directory: ${{ github.workspace }}/build
|
working-directory: ${{ github.workspace }}/build
|
||||||
# shell: cmd
|
shell: cmd
|
||||||
# run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_dev_build.zip ${{ github.workspace }}/build/OrcaSlicer'
|
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_Windows_V${{ env.ver }}_portable.zip ${{ github.workspace }}/build/OrcaSlicer'
|
||||||
|
|
||||||
|
- name: Pack PDB
|
||||||
|
if: inputs.os == 'windows-latest'
|
||||||
|
working-directory: ${{ github.workspace }}/build/src/Release
|
||||||
|
shell: cmd
|
||||||
|
run: '"C:/Program Files/7-Zip/7z.exe" a -m0=lzma2 -mx9 Debug_PDB_V${{ env.ver }}_for_developers_only.7z *.pdb'
|
||||||
|
|
||||||
- name: Upload artifacts Win zip
|
- name: Upload artifacts Win zip
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Windows_V${{ env.ver }}_portable
|
name: OrcaSlicer_Windows_V${{ env.ver }}_portable
|
||||||
path: ${{ github.workspace }}/build/OrcaSlicer
|
path: ${{ github.workspace }}/build/OrcaSlicer_Windows_V${{ env.ver }}_portable.zip
|
||||||
|
|
||||||
- name: Upload artifacts Win installer
|
- name: Upload artifacts Win installer
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Windows_V${{ env.ver }}
|
name: OrcaSlicer_Windows_V${{ env.ver }}
|
||||||
path: ${{ github.workspace }}/build/OrcaSlicer*.exe
|
path: ${{ github.workspace }}/build/OrcaSlicer*.exe
|
||||||
|
|
||||||
- name: Upload artifacts Win PDB
|
- name: Upload artifacts Win PDB
|
||||||
if: matrix.os == 'windows-latest'
|
if: inputs.os == 'windows-latest'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Windows_V${{ env.ver }}_pdb
|
name: PDB
|
||||||
path: ${{ github.workspace }}/build/src/Release/*.pdb
|
path: ${{ github.workspace }}/build/src/Release/Debug_PDB_V${{ env.ver }}_for_developers_only.7z
|
||||||
# Ubuntu
|
|
||||||
|
|
||||||
|
# Ubuntu
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
|
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
|
||||||
|
@ -244,52 +175,25 @@ jobs:
|
||||||
libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget
|
libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget
|
||||||
|
|
||||||
- name: Install dependencies from BuildLinux.sh
|
- name: Install dependencies from BuildLinux.sh
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sudo ./BuildLinux.sh -ur
|
run: sudo ./BuildLinux.sh -ur
|
||||||
|
|
||||||
- name: Fix permissions
|
- name: Fix permissions
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sudo chown $USER -R ./
|
run: sudo chown $USER -R ./
|
||||||
# - name: Build deps
|
|
||||||
# if: matrix.os == 'ubuntu-20.04'
|
|
||||||
# id: cache_deps
|
|
||||||
# uses: actions/cache@v3
|
|
||||||
# env:
|
|
||||||
# cache-name: ${{ runner.os }}-cache-orcaslicer_deps_x64
|
|
||||||
# with:
|
|
||||||
# path: ${{ github.workspace }}/deps/build/destdir
|
|
||||||
# key: build-${{ env.cache-name }}
|
|
||||||
|
|
||||||
# - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }}
|
|
||||||
# name: Build deps
|
|
||||||
# working-directory: ${{ github.workspace }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: ./BuildLinux.sh -dr
|
|
||||||
- name: Download and extract deps
|
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
|
||||||
working-directory: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
mkdir -p ${{ github.workspace }}/deps/build
|
|
||||||
mkdir -p ${{ github.workspace }}/deps/build/destdir
|
|
||||||
curl -LJO https://github.com/SoftFever/OrcaSlicer_deps/releases/download/OrcaSlicer_deps_Oct2023/OrcaSlicer_dep_ubuntu_20231008.zip
|
|
||||||
unzip ./OrcaSlicer_dep_ubuntu_20231008.zip -d ${{ github.workspace }}/deps/build/destdir
|
|
||||||
chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build/destdir
|
|
||||||
ls -l ${{ github.workspace }}/deps/build/destdir
|
|
||||||
rm OrcaSlicer_dep_ubuntu_20231008.zip
|
|
||||||
|
|
||||||
|
|
||||||
- name: Build slicer
|
- name: Build slicer
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
./BuildLinux.sh -isr
|
./BuildLinux.sh -isr
|
||||||
chmod +x ./build/OrcaSlicer_ubu64.AppImage
|
chmod +x ./build/OrcaSlicer_ubu64.AppImage
|
||||||
|
|
||||||
- name: Upload artifacts Ubuntu
|
- name: Upload artifacts Ubuntu
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: inputs.os == 'ubuntu-20.04'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Linux_V${{ env.ver }}
|
name: OrcaSlicer_Linux_V${{ env.ver }}
|
||||||
path: './build/OrcaSlicer_ubu64.AppImage'
|
path: './build/OrcaSlicer_ubu64.AppImage'
|
4
.github/workflows/orca_bot.yml
vendored
4
.github/workflows/orca_bot.yml
vendored
|
@ -13,12 +13,12 @@ jobs:
|
||||||
- uses: actions/stale@v5
|
- uses: actions/stale@v5
|
||||||
with:
|
with:
|
||||||
days-before-issue-stale: 90
|
days-before-issue-stale: 90
|
||||||
days-before-issue-close: 14
|
days-before-issue-close: 7
|
||||||
operations-per-run: 1000
|
operations-per-run: 1000
|
||||||
stale-issue-label: "stale"
|
stale-issue-label: "stale"
|
||||||
ascending: true
|
ascending: true
|
||||||
stale-issue-message: "GitHub bot: this issue is stale because it has been open for 90 days with no activity."
|
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 14 days since being marked as stale."
|
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
|
days-before-pr-stale: -1
|
||||||
days-before-pr-close: -1
|
days-before-pr-close: -1
|
||||||
remove-issue-stale-when-updated: true
|
remove-issue-stale-when-updated: true
|
||||||
|
|
|
@ -5329,6 +5329,74 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Custom g-code overview
|
||||||
|
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ?
|
||||||
|
wxGetApp().plater()->model().get_curr_plate_custom_gcodes().gcodes :
|
||||||
|
m_custom_gcode_per_print_z;
|
||||||
|
if (custom_gcode_per_print_z.size() != 0) {
|
||||||
|
float max_len = window_padding + 2 * ImGui::GetStyle().ItemSpacing.x;
|
||||||
|
ImGui::Spacing();
|
||||||
|
// Title Line
|
||||||
|
std::string cgcode_title_str = _u8L("Custom g-code");
|
||||||
|
std::string cgcode_layer_str = _u8L("Layer");
|
||||||
|
std::string cgcode_time_str = _u8L("Time");
|
||||||
|
// Types of custom gcode
|
||||||
|
std::string cgcode_pause_str = _u8L("Pause");
|
||||||
|
std::string cgcode_template_str= _u8L("Template");
|
||||||
|
std::string cgcode_toolchange_str = _u8L("ToolChange");
|
||||||
|
std::string cgcode_custom_str = _u8L("Custom");
|
||||||
|
std::string cgcode_unknown_str = _u8L("Unknown");
|
||||||
|
|
||||||
|
// Get longest String
|
||||||
|
max_len += std::max(ImGui::CalcTextSize(cgcode_title_str.c_str()).x,
|
||||||
|
std::max(ImGui::CalcTextSize(cgcode_pause_str.c_str()).x,
|
||||||
|
std::max(ImGui::CalcTextSize(cgcode_template_str.c_str()).x,
|
||||||
|
std::max(ImGui::CalcTextSize(cgcode_toolchange_str.c_str()).x,
|
||||||
|
std::max(ImGui::CalcTextSize(cgcode_custom_str.c_str()).x,
|
||||||
|
ImGui::CalcTextSize(cgcode_unknown_str.c_str()).x))))
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
ImGui::Dummy(ImVec2(0.0f, ImGui::GetFontSize() * 0.1));
|
||||||
|
ImGui::Dummy({window_padding, window_padding});
|
||||||
|
ImGui::SameLine();
|
||||||
|
imgui.title(cgcode_title_str,true);
|
||||||
|
ImGui::SameLine(max_len);
|
||||||
|
imgui.title(cgcode_layer_str, true);
|
||||||
|
ImGui::SameLine(max_len*1.5);
|
||||||
|
imgui.title(cgcode_time_str, false);
|
||||||
|
|
||||||
|
for (Slic3r::CustomGCode::Item custom_gcode : custom_gcode_per_print_z) {
|
||||||
|
ImGui::Dummy({window_padding, window_padding});
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
switch (custom_gcode.type) {
|
||||||
|
case PausePrint: imgui.text(cgcode_pause_str); break;
|
||||||
|
case Template: imgui.text(cgcode_template_str); break;
|
||||||
|
case ToolChange: imgui.text(cgcode_toolchange_str); break;
|
||||||
|
case Custom: imgui.text(cgcode_custom_str); break;
|
||||||
|
default: imgui.text(cgcode_unknown_str); break;
|
||||||
|
}
|
||||||
|
ImGui::SameLine(max_len);
|
||||||
|
char buf[64];
|
||||||
|
int layer = m_layers.get_l_at(custom_gcode.print_z);
|
||||||
|
::sprintf(buf, "%d",layer );
|
||||||
|
imgui.text(buf);
|
||||||
|
ImGui::SameLine(max_len * 1.5);
|
||||||
|
|
||||||
|
std::vector<float> layer_times = m_print_statistics.modes[static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Normal)].layers_times;
|
||||||
|
float custom_gcode_time = 0;
|
||||||
|
if (layer > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < layer-1; i++) {
|
||||||
|
custom_gcode_time += layer_times[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
imgui.text(short_time(get_time_dhms(custom_gcode_time)));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// total estimated printing time section
|
// total estimated printing time section
|
||||||
if (show_estimated) {
|
if (show_estimated) {
|
||||||
|
@ -5406,10 +5474,10 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||||
imgui.text(buf);
|
imgui.text(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto role_time = [time_mode](ExtrusionRole role) {
|
auto role_time = [time_mode](ExtrusionRole role) {
|
||||||
auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair<ExtrusionRole, float>& item) { return role == item.first; });
|
auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair<ExtrusionRole, float>& item) { return role == item.first; });
|
||||||
return (it != time_mode.roles_times.end()) ? it->second : 0.0f;
|
return (it != time_mode.roles_times.end()) ? it->second : 0.0f;
|
||||||
};
|
};
|
||||||
//BBS: start gcode is mostly same with prepeare time
|
//BBS: start gcode is mostly same with prepeare time
|
||||||
if (time_mode.prepare_time != 0.0f) {
|
if (time_mode.prepare_time != 0.0f) {
|
||||||
ImGui::Dummy({ window_padding, window_padding });
|
ImGui::Dummy({ window_padding, window_padding });
|
||||||
|
|
|
@ -1845,6 +1845,20 @@ void ImGuiWrapper::title(const std::string& str)
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImGuiWrapper::title(const std::string &str, bool suppress_seperator)
|
||||||
|
{
|
||||||
|
if (bold_font) {
|
||||||
|
ImGui::PushFont(bold_font);
|
||||||
|
text(str);
|
||||||
|
ImGui::PopFont();
|
||||||
|
} else {
|
||||||
|
text(str);
|
||||||
|
}
|
||||||
|
if (!suppress_seperator) {
|
||||||
|
ImGui::Separator();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ImGuiWrapper::disabled_begin(bool disabled)
|
void ImGuiWrapper::disabled_begin(bool disabled)
|
||||||
{
|
{
|
||||||
wxCHECK_RET(!m_disabled, "ImGUI: Unbalanced disabled_begin() call");
|
wxCHECK_RET(!m_disabled, "ImGUI: Unbalanced disabled_begin() call");
|
||||||
|
|
|
@ -176,6 +176,7 @@ public:
|
||||||
bool is_localized);
|
bool is_localized);
|
||||||
void bold_text(const std::string &str);
|
void bold_text(const std::string &str);
|
||||||
void title(const std::string& str);
|
void title(const std::string& str);
|
||||||
|
void title(const std::string &str, bool suppress_seperator);
|
||||||
|
|
||||||
// set font
|
// set font
|
||||||
const std::vector<std::string> get_fonts_names() const { return m_fonts_names; }
|
const std::vector<std::string> get_fonts_names() const { return m_fonts_names; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue