final
This commit is contained in:
parent
130f7edd79
commit
d319edc659
11 changed files with 912 additions and 458 deletions
291
.github/workflows/build_all.yml
vendored
291
.github/workflows/build_all.yml
vendored
|
|
@ -1,236 +1,55 @@
|
|||
name: Build all
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- 'localization/**'
|
||||
- 'resources/**'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
paths:
|
||||
- 'deps/**'
|
||||
- 'deps_src/**'
|
||||
- 'src/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- 'version.inc'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'build_linux.sh'
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
- 'scripts/flatpak/**'
|
||||
|
||||
|
||||
schedule:
|
||||
- cron: '0 17 * * *' # run once a day at 1 AM Singapore time (UTC+8)
|
||||
|
||||
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_name }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# Don't run scheduled builds on forks:
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
build_windows:
|
||||
# Don't run scheduled builds on forks:
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-win-server' || 'windows-latest' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
force-build: ${{ github.event_name == 'schedule' }}
|
||||
secrets: inherit
|
||||
build_macos_arch:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- arm64
|
||||
- x86_64
|
||||
# Don't run scheduled builds on forks:
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
force-build: ${{ github.event_name == 'schedule' }}
|
||||
secrets: inherit
|
||||
build_macos_universal:
|
||||
name: Build macOS Universal
|
||||
needs: build_macos_arch
|
||||
if: ${{ !cancelled() && needs.build_macos_arch.result == 'success' && !inputs.build-deps-only && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
uses: ./.github/workflows/build_orca.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: universal
|
||||
macos-combine-only: true
|
||||
secrets: inherit
|
||||
unit_tests:
|
||||
name: Unit Tests
|
||||
runs-on: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
needs: build_linux
|
||||
if: ${{ !cancelled() && success() }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github
|
||||
scripts
|
||||
tests
|
||||
- name: Apt-Install Dependencies
|
||||
if: ${{ !vars.SELF_HOSTED }}
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
- name: Restore Test Artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: ${{ github.sha }}-tests
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0" # use most recent 4.3.x version
|
||||
useLocalCache: true # <--= Use the local cache (default is 'false').
|
||||
useCloudCache: true
|
||||
- name: Unpackage and Run Unit Tests
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
tar -xvf build_tests.tar
|
||||
scripts/run_unit_tests.sh
|
||||
- name: Upload Test Logs
|
||||
uses: actions/upload-artifact@v7
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: unit-test-logs
|
||||
path: build/tests/**/*.log
|
||||
- name: Publish Test Results
|
||||
if: always()
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
files: "ctest_results.xml"
|
||||
- name: Delete Test Artifact
|
||||
if: success()
|
||||
uses: geekyeggo/delete-artifact@v6
|
||||
with:
|
||||
name: ${{ github.sha }}-tests
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49
|
||||
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
|
||||
- /opt/hostedtoolcache:/opt/hostedtoolcache1
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
# Don't run scheduled builds on forks; skip entirely on self-hosted runners
|
||||
if: ${{ !cancelled() && !vars.SELF_HOSTED && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
|
||||
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/*" /opt/hostedtoolcache1/*
|
||||
- uses: actions/checkout@v6
|
||||
- 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 }}"
|
||||
git_commit_hash="${{ github.event.pull_request.head.sha }}"
|
||||
else
|
||||
ver=V$ver_pure
|
||||
git_commit_hash="${{ github.sha }}"
|
||||
fi
|
||||
echo "ver=$ver" >> $GITHUB_ENV
|
||||
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
echo "git_commit_hash=$git_commit_hash" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
# Manage flatpak-builder cache externally so PRs restore but never upload
|
||||
- name: Restore flatpak-builder cache
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: .flatpak-builder
|
||||
key: flatpak-builder-${{ matrix.variant.arch }}-${{ github.event.pull_request.base.sha }}
|
||||
restore-keys: flatpak-builder-${{ matrix.variant.arch }}-
|
||||
- name: Save/restore flatpak-builder cache
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: .flatpak-builder
|
||||
key: flatpak-builder-${{ matrix.variant.arch }}-${{ github.sha }}
|
||||
restore-keys: flatpak-builder-${{ matrix.variant.arch }}-
|
||||
- name: Disable debug info for faster CI builds
|
||||
run: |
|
||||
sed -i '/^build-options:/a\ no-debuginfo: true\n strip: true' \
|
||||
scripts/flatpak/com.orcaslicer.OrcaSlicer.yml
|
||||
shell: bash
|
||||
- name: Inject git commit hash into Flatpak manifest
|
||||
run: |
|
||||
sed -i "/name: OrcaSlicer/{n;s|buildsystem: simple|buildsystem: simple\n build-options:\n env:\n git_commit_hash: \"$git_commit_hash\"|}" \
|
||||
scripts/flatpak/com.orcaslicer.OrcaSlicer.yml
|
||||
shell: bash
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@master
|
||||
with:
|
||||
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
|
||||
manifest-path: scripts/flatpak/com.orcaslicer.OrcaSlicer.yml
|
||||
cache: false
|
||||
arch: ${{ matrix.variant.arch }}
|
||||
upload-artifact: false
|
||||
- name: Upload artifacts Flatpak
|
||||
uses: actions/upload-artifact@v7
|
||||
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.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/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_nightly_${{ matrix.variant.arch }}.flatpak
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
|
||||
name: Build all (manual only)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build-deps-only:
|
||||
description: 'Only build dependencies (bypasses caching)'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_windows:
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-win-server' || 'windows-latest' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_macos_arch:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- arm64
|
||||
- x86_64
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_macos_universal:
|
||||
name: Build macOS Universal
|
||||
needs: build_macos_arch
|
||||
if: ${{ !cancelled() && needs.build_macos_arch.result == 'success' && !inputs.build-deps-only }}
|
||||
uses: ./.github/workflows/build_orca.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: universal
|
||||
macos-combine-only: true
|
||||
secrets: inherit
|
||||
|
|
|
|||
431
.github/workflows/build_linux_portable.yml
vendored
Normal file
431
.github/workflows/build_linux_portable.yml
vendored
Normal file
|
|
@ -0,0 +1,431 @@
|
|||
name: Build Linux Portable
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-linux-portable-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CACHE_REV: v1
|
||||
|
||||
jobs:
|
||||
linux_ubuntu22:
|
||||
name: Linux (ubuntu-22.04)
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
DIST_ID: ubuntu22.04
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Compute version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute deps cache key
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
deps_tree="$(git rev-parse HEAD:deps 2>/dev/null || echo no-deps)"
|
||||
recipe_hash="$(find build_linux.sh scripts/linux.d -type f -print0 | sort -z | xargs -0 cat | sha256sum | cut -c1-12)"
|
||||
echo "DEPS_CACHE_KEY=linux-${DIST_ID}-deps-${deps_tree}-${recipe_hash}-${CACHE_REV}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Linux - cache deps
|
||||
id: cache_linux_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ github.workspace }}/deps/build/destdir
|
||||
key: ${{ env.DEPS_CACHE_KEY }}
|
||||
|
||||
- name: Linux - build deps if missing
|
||||
if: steps.cache_linux_deps.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Linux - build + install
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build install-dir out
|
||||
mkdir -p out
|
||||
|
||||
cmake -S . -B build -G "Ninja Multi-Config" \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DSLIC3R_GTK=3 \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DBBL_INTERNAL_TESTING=0 \
|
||||
-DSLIC3R_PCH=ON \
|
||||
-DORCA_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/install-dir"
|
||||
|
||||
cmake --build build --config Release --target install -j"$(nproc)"
|
||||
|
||||
app_bin=""
|
||||
for candidate in \
|
||||
"install-dir/bin/OrcaSlicer" \
|
||||
"install-dir/bin/orca-slicer" \
|
||||
"install-dir/OrcaSlicer" \
|
||||
"install-dir/orca-slicer"; do
|
||||
if [ -x "$candidate" ]; then
|
||||
app_bin="${candidate#install-dir/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$app_bin" ]; then
|
||||
echo "ERROR: installed OrcaSlicer binary not found"
|
||||
find install-dir -maxdepth 3 -type f | sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "APP_BIN=$app_bin" >> "$GITHUB_ENV"
|
||||
tar -C install-dir -czf "out/OrcaSlicer-BMCU_LinuxDir_${DIST_ID}_amd64_${VER}.tar.gz" .
|
||||
|
||||
- name: Linux - build AppImage (best-effort)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -x "build/src/build_linux_image.sh" ]; then
|
||||
(cd build && ./src/build_linux_image.sh -i -R Release) || true
|
||||
fi
|
||||
|
||||
appimage="$(find build -maxdepth 3 -type f -name '*.AppImage' | head -n 1 || true)"
|
||||
if [ -n "$appimage" ]; then
|
||||
mv "$appimage" "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
chmod +x "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
else
|
||||
echo "WARN: no AppImage produced"
|
||||
fi
|
||||
|
||||
- name: Linux - build .deb from install-dir
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dpkg-dev fakeroot binutils
|
||||
|
||||
rm -rf pkgroot debian
|
||||
mkdir -p pkgroot/DEBIAN pkgroot/opt/orcaslicer pkgroot/usr/bin
|
||||
cp -a install-dir/. pkgroot/opt/orcaslicer/
|
||||
|
||||
cat > pkgroot/usr/bin/orca-slicer-bmcu <<EOF
|
||||
#!/bin/sh
|
||||
exec /opt/orcaslicer/${APP_BIN} "$@"
|
||||
EOF
|
||||
chmod 0755 pkgroot/usr/bin/orca-slicer-bmcu
|
||||
|
||||
if [[ "${EVENT_TAG:-${GITHUB_REF_NAME:-}}" == v* ]]; then
|
||||
deb_ver="${VER}~${DIST_ID}"
|
||||
else
|
||||
deb_ver="0.0~${VER}~${DIST_ID}"
|
||||
fi
|
||||
|
||||
mkdir -p debian
|
||||
cat > debian/control <<'EOF'
|
||||
Source: orcaslicer-bmcu
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Standards-Version: 4.6.2
|
||||
|
||||
Package: orcaslicer-bmcu
|
||||
Architecture: amd64
|
||||
Description: dummy control for dpkg-shlibdeps
|
||||
EOF
|
||||
|
||||
depends=""
|
||||
if [ -x "pkgroot/opt/orcaslicer/${APP_BIN}" ]; then
|
||||
set +e
|
||||
out="$(dpkg-shlibdeps --ignore-missing-info -O \
|
||||
-lpkgroot/opt/orcaslicer/bin \
|
||||
-lpkgroot/opt/orcaslicer/lib \
|
||||
-lpkgroot/opt/orcaslicer/lib64 \
|
||||
pkgroot/opt/orcaslicer/${APP_BIN} 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
depends="$(printf "%s\n" "$out" | sed -n 's/^shlibs:Depends=//p' | tail -n 1)"
|
||||
else
|
||||
echo "WARN: dpkg-shlibdeps failed:"
|
||||
echo "$out"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$depends" ]]; then
|
||||
depends="libc6, libstdc++6, libgcc-s1"
|
||||
fi
|
||||
|
||||
cat > pkgroot/DEBIAN/control <<EOF
|
||||
Package: orcaslicer-bmcu
|
||||
Version: ${deb_ver}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Depends: ${depends}
|
||||
Description: OrcaSlicer BMCU build (installed in /opt/orcaslicer)
|
||||
Wrapper: /usr/bin/orca-slicer-bmcu
|
||||
EOF
|
||||
|
||||
fakeroot dpkg-deb --build pkgroot "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.deb"
|
||||
|
||||
- name: Linux - checksums
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}.txt")
|
||||
|
||||
- name: Upload artifacts (Linux ubuntu22.04)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-linux-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
|
||||
linux_ubuntu24:
|
||||
name: Linux (ubuntu-24.04)
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
DIST_ID: ubuntu24.04
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Compute version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute deps cache key
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
deps_tree="$(git rev-parse HEAD:deps 2>/dev/null || echo no-deps)"
|
||||
recipe_hash="$(find build_linux.sh scripts/linux.d -type f -print0 | sort -z | xargs -0 cat | sha256sum | cut -c1-12)"
|
||||
echo "DEPS_CACHE_KEY=linux-${DIST_ID}-deps-${deps_tree}-${recipe_hash}-${CACHE_REV}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Linux - cache deps
|
||||
id: cache_linux_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ github.workspace }}/deps/build/destdir
|
||||
key: ${{ env.DEPS_CACHE_KEY }}
|
||||
|
||||
- name: Linux - build deps if missing
|
||||
if: steps.cache_linux_deps.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Linux - build + install
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build install-dir out
|
||||
mkdir -p out
|
||||
|
||||
cmake -S . -B build -G "Ninja Multi-Config" \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DSLIC3R_GTK=3 \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DBBL_INTERNAL_TESTING=0 \
|
||||
-DSLIC3R_PCH=ON \
|
||||
-DORCA_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/install-dir"
|
||||
|
||||
cmake --build build --config Release --target install -j"$(nproc)"
|
||||
|
||||
app_bin=""
|
||||
for candidate in \
|
||||
"install-dir/bin/OrcaSlicer" \
|
||||
"install-dir/bin/orca-slicer" \
|
||||
"install-dir/OrcaSlicer" \
|
||||
"install-dir/orca-slicer"; do
|
||||
if [ -x "$candidate" ]; then
|
||||
app_bin="${candidate#install-dir/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$app_bin" ]; then
|
||||
echo "ERROR: installed OrcaSlicer binary not found"
|
||||
find install-dir -maxdepth 3 -type f | sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "APP_BIN=$app_bin" >> "$GITHUB_ENV"
|
||||
tar -C install-dir -czf "out/OrcaSlicer-BMCU_LinuxDir_${DIST_ID}_amd64_${VER}.tar.gz" .
|
||||
|
||||
- name: Linux - build AppImage (best-effort)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -x "build/src/build_linux_image.sh" ]; then
|
||||
(cd build && ./src/build_linux_image.sh -i -R Release) || true
|
||||
fi
|
||||
|
||||
appimage="$(find build -maxdepth 3 -type f -name '*.AppImage' | head -n 1 || true)"
|
||||
if [ -n "$appimage" ]; then
|
||||
mv "$appimage" "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
chmod +x "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
else
|
||||
echo "WARN: no AppImage produced"
|
||||
fi
|
||||
|
||||
- name: Linux - build .deb from install-dir
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dpkg-dev fakeroot binutils
|
||||
|
||||
rm -rf pkgroot debian
|
||||
mkdir -p pkgroot/DEBIAN pkgroot/opt/orcaslicer pkgroot/usr/bin
|
||||
cp -a install-dir/. pkgroot/opt/orcaslicer/
|
||||
|
||||
cat > pkgroot/usr/bin/orca-slicer-bmcu <<EOF
|
||||
#!/bin/sh
|
||||
exec /opt/orcaslicer/${APP_BIN} "$@"
|
||||
EOF
|
||||
chmod 0755 pkgroot/usr/bin/orca-slicer-bmcu
|
||||
|
||||
if [[ "${EVENT_TAG:-${GITHUB_REF_NAME:-}}" == v* ]]; then
|
||||
deb_ver="${VER}~${DIST_ID}"
|
||||
else
|
||||
deb_ver="0.0~${VER}~${DIST_ID}"
|
||||
fi
|
||||
|
||||
mkdir -p debian
|
||||
cat > debian/control <<'EOF'
|
||||
Source: orcaslicer-bmcu
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Standards-Version: 4.6.2
|
||||
|
||||
Package: orcaslicer-bmcu
|
||||
Architecture: amd64
|
||||
Description: dummy control for dpkg-shlibdeps
|
||||
EOF
|
||||
|
||||
depends=""
|
||||
if [ -x "pkgroot/opt/orcaslicer/${APP_BIN}" ]; then
|
||||
set +e
|
||||
out="$(dpkg-shlibdeps --ignore-missing-info -O \
|
||||
-lpkgroot/opt/orcaslicer/bin \
|
||||
-lpkgroot/opt/orcaslicer/lib \
|
||||
-lpkgroot/opt/orcaslicer/lib64 \
|
||||
pkgroot/opt/orcaslicer/${APP_BIN} 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
depends="$(printf "%s\n" "$out" | sed -n 's/^shlibs:Depends=//p' | tail -n 1)"
|
||||
else
|
||||
echo "WARN: dpkg-shlibdeps failed:"
|
||||
echo "$out"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$depends" ]]; then
|
||||
depends="libc6, libstdc++6, libgcc-s1"
|
||||
fi
|
||||
|
||||
cat > pkgroot/DEBIAN/control <<EOF
|
||||
Package: orcaslicer-bmcu
|
||||
Version: ${deb_ver}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Depends: ${depends}
|
||||
Description: OrcaSlicer BMCU build (installed in /opt/orcaslicer)
|
||||
Wrapper: /usr/bin/orca-slicer-bmcu
|
||||
EOF
|
||||
|
||||
fakeroot dpkg-deb --build pkgroot "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.deb"
|
||||
|
||||
- name: Linux - checksums
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}.txt")
|
||||
|
||||
- name: Upload artifacts (Linux ubuntu24.04)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-linux-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
1
.github/workflows/build_windows_bridge.yml
vendored
1
.github/workflows/build_windows_bridge.yml
vendored
|
|
@ -1,6 +1,7 @@
|
|||
name: Build Windows with Linux bridge runtime
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
|
|||
74
.github/workflows/my_build_all.yml
vendored
Normal file
74
.github/workflows/my_build_all.yml
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
name: My Build All
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: my-build-all-${{ github.event.release.tag_name || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
uses: ./.github/workflows/build_windows_bridge.yml
|
||||
secrets: inherit
|
||||
|
||||
build_linux:
|
||||
uses: ./.github/workflows/build_linux_portable.yml
|
||||
secrets: inherit
|
||||
|
||||
publish_release:
|
||||
name: Publish release assets
|
||||
needs:
|
||||
- build_windows
|
||||
- build_linux
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
path: release-artifacts
|
||||
|
||||
- name: Flatten release files
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p release-files
|
||||
find release-artifacts -type f -print0 | while IFS= read -r -d '' file; do
|
||||
cp "$file" release-files/"$(basename "$file")"
|
||||
done
|
||||
ls -lah release-files
|
||||
|
||||
- name: Resolve tag
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ -z "$tag" ]]; then
|
||||
echo "ERROR: tag could not be resolved"
|
||||
exit 1
|
||||
fi
|
||||
echo "RELEASE_TAG=$tag" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create or update GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
generate_release_notes: true
|
||||
overwrite_files: true
|
||||
files: |
|
||||
release-files/*
|
||||
219
README.md
219
README.md
|
|
@ -4,206 +4,39 @@
|
|||
<img alt="OrcaSlicer logo" src="resources/images/OrcaSlicer.png" width="15%" height="15%">
|
||||
</picture>
|
||||
|
||||
<a href="https://trendshift.io/repositories/15552" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15552" alt="OrcaSlicer%2FOrcaSlicer | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||||
## This version of OrcaSlicer restores full BambuNetwork support for Bambu Lab printers.
|
||||
|
||||
[](https://github.com/OrcaSlicer/OrcaSlicer/stargazers) [](https://github.com/OrcaSlicer/OrcaSlicer/actions/workflows/build_all.yml)
|
||||
You are not limited to LAN only.
|
||||
It works over the internet just like before, through BambuNetwork, with full functionality for normal use and printing.
|
||||
|
||||
OrcaSlicer: an open source Next-Gen Slicing Software for Precision 3D Prints.
|
||||
Optimize your prints with ultra-fast slicing, intelligent support generation, and seamless printer compatibility—engineered for perfection.
|
||||
<h3>
|
||||
## Installation
|
||||
|
||||
# Official links and community
|
||||
### Windows
|
||||
|
||||
#### Official Website:
|
||||
<a href="https://www.orcaslicer.com/" style="font-size:2em;">OrcaSlicer.com</a>
|
||||
Windows requires WSL 2.
|
||||
|
||||
#### Github Repository:
|
||||
<a href="https://github.com/OrcaSlicer/OrcaSlicer"><img src="https://img.shields.io/badge/OrcaSlicer-181717?style=flat&logo=github&logoColor=white" width="200" alt="GitHub Logo"/> </a>
|
||||
Before first launch, open Command Prompt or PowerShell as Administrator and run:
|
||||
|
||||
#### Follow us:
|
||||
<a href="https://twitter.com/real_OrcaSlicer"><img src="https://img.shields.io/badge/real__OrcaSlicer-000000?style=flat&logo=x&logoColor=white" width="200" alt="X Logo"/> </a>
|
||||
```bat
|
||||
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
|
||||
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
|
||||
```
|
||||
|
||||
#### Join our Discord community:
|
||||
<a href="https://discord.gg/P4VE9UY9gJ"><img src="https://img.shields.io/badge/-Discord-5865F2?style=flat&logo=discord&logoColor=fff" width="200" alt="discord logo"/> </a>
|
||||
Restart Windows, then launch Orca Studio.
|
||||
|
||||
<table border="2" style="border-color: #ffa500; background-color:rgb(232, 220, 180); color: #856404;">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>⚠️ CAUTION:</strong><br>
|
||||
Several clickbait and malicious websites, such as <b>orca-slicer[.]com</b> and <b>orcaslicer[.]net</b>, are pretending to be the official OrcaSlicer site. These sites may redirect you to dangerous downloads or contain misleading information.<br>
|
||||
<b>Our only official website is <a href="https://www.orcaslicer.com/">www.orcaslicer.com</a>.</b><br><br>
|
||||
If you come across any of these in search results, please <b>report them</b> as unsafe or phishing to help keep the community secure with:<br>
|
||||
- <a href="https://safebrowsing.google.com/safebrowsing/report_phish/">Google Safe Browsing</a><br>
|
||||
- <a href="https://www.microsoft.com/en-us/wdsi/support/report-unsafe-site">Microsoft Security Intelligence</a><br>
|
||||
- <a href="https://ipthreat.net/tools/reportphishing">IPThreat</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
### Linux
|
||||
|
||||
On Linux, a normal installation is enough.
|
||||
|
||||
### macOS
|
||||
|
||||
Work in progress.
|
||||
|
||||
|
||||
## BMCU
|
||||
|
||||
I also encourage you to use BMCU.
|
||||
|
||||
You can find BMCU firmware in my repositories.
|
||||
|
||||
</div>
|
||||
|
||||
# Main features
|
||||
|
||||
- **[Advanced Calibration Tools](https://www.orcaslicer.com/wiki/calibration_guide)**
|
||||
Comprehensive suite: temperature towers, flow rate, retraction & more for optimal performance.
|
||||
- **[Precise Wall](https://www.orcaslicer.com/wiki/quality_settings_precision#precise-wall) and [Seam Control](https://www.orcaslicer.com/wiki/quality_settings_seam)**
|
||||
Adjust outer wall spacing and apply scarf seams to enhance print accuracy.
|
||||
- **[Sandwich Mode](https://www.orcaslicer.com/wiki/quality_settings_wall_and_surfaces#innerouterinner) and [Polyholes](https://www.orcaslicer.com/wiki/quality_settings_precision#polyholes) Support**
|
||||
Use varied infill [patterns](https://www.orcaslicer.com/wiki/strength_settings_patterns) and accurate hole shapes for improved clarity.
|
||||
- **[Overhang](https://www.orcaslicer.com/wiki/quality_settings_overhangs) and [Support Optimization](https://www.orcaslicer.com/wiki#support-settings)**
|
||||
Modify geometry for printable overhangs with precise support placement.
|
||||
- **[Granular Controls and Customization](https://www.orcaslicer.com/wiki#process-settings)**
|
||||
Fine-tune print speed, layer height, pressure, and temperature with precision.
|
||||
- **Network Printer Support**
|
||||
Seamless integration with Klipper, PrusaLink, and OctoPrint for remote control.
|
||||
- **[Mouse Ear Brims](https://www.orcaslicer.com/wiki/others_settings_brim) & [Adaptive Bed Mesh](https://www.orcaslicer.com/wiki/printer_basic_information_adaptive_bed_mesh)**
|
||||
Automatic brims and adaptive mesh calibration ensure consistent adhesion.
|
||||
- **User-Friendly Interface**
|
||||
Intuitive drag-and-drop design with pre-made profiles for popular printers.
|
||||
- **[Open-Source](https://github.com/OrcaSlicer/OrcaSlicer) & [Community Driven](https://discord.gg/P4VE9UY9gJ)**
|
||||
Regular updates fueled by continuous community contributions.
|
||||
- **Wide Printer Compatibility**
|
||||
Supports a broad range of printers: Bambu Lab, Prusa, Creality, Voron, and more.
|
||||
- Additional features can be found in the [change notes](https://github.com/OrcaSlicer/OrcaSlicer/releases/).
|
||||
|
||||
# Wiki
|
||||
|
||||
The [wiki](https://www.orcaslicer.com/wiki) 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.
|
||||
|
||||
- **[Access the wiki here](https://www.orcaslicer.com/wiki)**
|
||||
- **[Contribute to the wiki](https://www.orcaslicer.com/wiki/how_to_wiki)**
|
||||
|
||||
# Download
|
||||
|
||||
## Stable Release
|
||||
|
||||
📥 **[Download the Latest Stable Release](https://github.com/OrcaSlicer/OrcaSlicer/releases/latest)**
|
||||
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.
|
||||
|
||||
## Nightly Builds
|
||||
|
||||
🌙 **[Download the Latest Nightly Build](https://github.com/OrcaSlicer/OrcaSlicer/releases/tag/nightly-builds)**
|
||||
Explore the latest developments in OrcaSlicer with our nightly builds. Feedback on these versions is highly appreciated.
|
||||
|
||||
# How to install
|
||||
|
||||
## Windows
|
||||
|
||||
Download the **Windows Installer exe** for your preferred version from the [releases page](https://github.com/OrcaSlicer/OrcaSlicer/releases).
|
||||
|
||||
- *For convenience there is also a portable build available.*
|
||||
<details>
|
||||
<summary>Troubleshooting</summary>
|
||||
|
||||
- *If you have troubles to run the build, you might need to install following runtimes:*
|
||||
- [MicrosoftEdgeWebView2RuntimeInstallerX64](https://github.com/OrcaSlicer/OrcaSlicer/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/OrcaSlicer/OrcaSlicer/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`
|
||||
</details>
|
||||
|
||||
Windows Package Manager
|
||||
|
||||
```shell
|
||||
winget install --id=SoftFever.OrcaSlicer -e
|
||||
```
|
||||
|
||||
## Mac
|
||||
|
||||
1. Download the DMG for your computer: `arm64` version for Apple Silicon and `x86_64` for Intel CPU.
|
||||
2. Drag OrcaSlicer.app to Application folder.
|
||||
3. *If you want to run a build from a PR, you also need to follow the instructions below:*
|
||||
|
||||
<details>
|
||||
<summary>Quarantine</summary>
|
||||
|
||||
- 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**.
|
||||
- Step 2: A warning window will pop up, click _Open_
|
||||
|
||||
- Option 2:
|
||||
Execute this command in terminal:
|
||||
|
||||
```shell
|
||||
xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app
|
||||
```
|
||||
|
||||
- Option 3:
|
||||
- Step 1: open the app, a warning window will pop up
|
||||

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

|
||||
</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`
|
||||
|
||||
# How to Compile
|
||||
|
||||
All updated build instructions for Windows, macOS, and Linux are now available on the official [OrcaSlicer Wiki - How to build](https://www.orcaslicer.com/wiki/how_to_build) page.
|
||||
|
||||
Please refer to the wiki to ensure you're following the latest and most accurate steps for your platform.
|
||||
|
||||
# Klipper Note
|
||||
|
||||
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
|
||||
|
||||
```gcode
|
||||
# Enable object exclusion
|
||||
[exclude_object]
|
||||
|
||||
# Enable arcs support
|
||||
[gcode_arcs]
|
||||
resolution: 0.1
|
||||
```
|
||||
|
||||
# Supports
|
||||
|
||||
**OrcaSlicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
|
||||
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
|
||||
Thank you! :)
|
||||
|
||||
## Sponsors:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="https://qidi3d.com/" style="display:inline-block; border-radius:8px; background:#fff;">
|
||||
<img src="SoftFever_doc\sponsor_logos\QIDI.png" alt="QIDI" width="100" height="100">
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="https://bigtree-tech.com/" style="display:inline-block; border-radius:8px; background:#222;">
|
||||
<img src="SoftFever_doc\sponsor_logos\BigTreeTech.png" alt="BIGTREE TECH" width="100" height="100">
|
||||
</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/badge/GitHub%20Sponsors-30363D?style=flat&logo=GitHub-Sponsors&logoColor=EA4AAA" height="50"></a>
|
||||
<a href="https://ko-fi.com/G2G5IP3CP"><img src="https://img.shields.io/badge/Support_me_on_Ko--fi-FF5E5B?style=flat&logo=ko-fi&logoColor=white" height="50"></a>
|
||||
<a href="https://paypal.me/softfever3d"><img src="https://img.shields.io/badge/PayPal-003087?style=flat&logo=paypal&logoColor=fff" height="50"></a>
|
||||
|
||||
## Some Background
|
||||
|
||||
Open-source slicing has always been built on a tradition of collaboration and attribution. [Slic3r](https://github.com/Slic3r/Slic3r), created by Alessandro Ranellucci and the RepRap community, laid the foundation. [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer) by Prusa Research built on Slic3r and acknowledged that heritage. [Bambu Studio](https://github.com/bambulab/BambuStudio) in turn forked from PrusaSlicer, and [SuperSlicer](https://github.com/supermerill/SuperSlicer) by @supermerill extended PrusaSlicer with community-driven enhancements. Each project carried the work of its predecessors forward, crediting those who came before.
|
||||
|
||||
OrcaSlicer began in that same spirit, drawing from BambuStudio, PrusaSlicer, and ideas inspired by CuraSlicer and SuperSlicer. But it has since grown far beyond its origins. Through relentless innovation — introducing advanced calibration tools, precise wall and seam control, tree supports, adaptive slicing, and hundreds of other features — OrcaSlicer has become the most widely used and actively developed open-source slicer in the 3D printing community. Many of its innovations have been adopted by other slicers, making it a driving force for the entire industry.
|
||||
|
||||
The OrcaSlicer logo was designed by community member Justin Levine (@freejstnalxndr).
|
||||
|
||||
# License
|
||||
- **OrcaSlicer** is licensed under the GNU Affero General Public License, version 3.
|
||||
- The **GNU Affero General Public License**, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
|
||||
- OrcaSlicer includes a **pressure advance calibration pattern test** adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
|
||||
- The **Bambu networking plugin** is based on non-free libraries from BambuLab. It is optional to the OrcaSlicer and provides extended functionalities for Bambulab printer users.
|
||||
|
|
|
|||
BIN
resources/images/bmcu.png
Normal file
BIN
resources/images/bmcu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 659 KiB |
BIN
resources/images/bmcu320.png
Normal file
BIN
resources/images/bmcu320.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
|
|
@ -3689,7 +3689,36 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
|
|||
|
||||
#pragma region hms
|
||||
if (!key_field_only && jj.contains("hms")) {
|
||||
m_hms_system->ParseHMSItems(jj["hms"]);
|
||||
const auto& h = jj["hms"];
|
||||
|
||||
if (h.is_array()) {
|
||||
json filtered = json::array();
|
||||
|
||||
for (const auto& item : h) {
|
||||
if (item.is_object() && item.contains("attr") && item.contains("code")) {
|
||||
if ((item["attr"] == 83887104 && item["code"] == 65604) ||
|
||||
(item["attr"] == 83952640 && item["code"] == 65604) ||
|
||||
(item["attr"] == 84018176 && item["code"] == 65604) ||
|
||||
(item["attr"] == 84083712 && item["code"] == 65604) ||
|
||||
(item["attr"] == 83887616 && item["code"] == 65552) ||
|
||||
(item["attr"] == 83953152 && item["code"] == 65552) ||
|
||||
(item["attr"] == 84018688 && item["code"] == 65552) ||
|
||||
(item["attr"] == 84084224 && item["code"] == 65552) ||
|
||||
(item["attr"] == 84149760 && item["code"] == 65552) ||
|
||||
(item["attr"] == 84215296 && item["code"] == 65552) ||
|
||||
(item["attr"] == 84280832 && item["code"] == 65552)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
filtered.push_back(item);
|
||||
}
|
||||
|
||||
if (!filtered.empty())
|
||||
m_hms_system->ParseHMSItems(filtered);
|
||||
} else {
|
||||
m_hms_system->ParseHMSItems(h);
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,141 @@
|
|||
|
||||
#include "DeviceCore/DevFilaSystem.h"
|
||||
#include "DeviceCore/DevManager.h"
|
||||
#include <wx/cursor.h>
|
||||
#include <wx/regex.h>
|
||||
#include <wx/utils.h>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include "slic3r/Utils/Http.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
static inline bool is_custom_sn(const wxString& sn_upper)
|
||||
{
|
||||
return sn_upper.length() >= 3
|
||||
&& sn_upper[0] == '0'
|
||||
&& sn_upper[1] == 'E'
|
||||
&& sn_upper[2] == 'A';
|
||||
}
|
||||
|
||||
static const wxString kBmcuVersionUrlBase =
|
||||
"https://raw.githubusercontent.com/jarczakpawel/BMCU-C-PJARCZAK/main/version";
|
||||
|
||||
static std::atomic<int> g_bmcu_ver_state{0};
|
||||
static std::atomic<long long> g_bmcu_ver_last_try_ms{0};
|
||||
|
||||
static std::mutex g_bmcu_ver_mtx;
|
||||
static wxString g_bmcu_ver_remote;
|
||||
static wxString g_bmcu_ver_err;
|
||||
|
||||
static inline wxString bmcu_norm_ver_strict_x4(const wxString& in)
|
||||
{
|
||||
wxString s = in;
|
||||
s.Trim(true).Trim(false);
|
||||
|
||||
const int lf = s.Find('\n');
|
||||
if (lf != wxNOT_FOUND)
|
||||
s = s.Left(lf);
|
||||
|
||||
const int cr = s.Find('\r');
|
||||
if (cr != wxNOT_FOUND)
|
||||
s = s.Left(cr);
|
||||
|
||||
s.Trim(true).Trim(false);
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline bool bmcu_is_ver_strict_x4(const wxString& s)
|
||||
{
|
||||
wxRegEx re("^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$");
|
||||
return re.Matches(s);
|
||||
}
|
||||
|
||||
static void bmcu_start_github_version_check()
|
||||
{
|
||||
const int st = g_bmcu_ver_state.load(std::memory_order_acquire);
|
||||
if (st == 1 || st == 2)
|
||||
return;
|
||||
|
||||
const long long now_ms = (long long) wxGetUTCTimeMillis().GetValue();
|
||||
const long long last_ms = g_bmcu_ver_last_try_ms.load(std::memory_order_acquire);
|
||||
|
||||
if (st == 3 && (now_ms - last_ms) < 10000)
|
||||
return;
|
||||
|
||||
g_bmcu_ver_last_try_ms.store(now_ms, std::memory_order_release);
|
||||
g_bmcu_ver_state.store(1, std::memory_order_release);
|
||||
|
||||
std::thread([]() {
|
||||
std::string url = kBmcuVersionUrlBase.ToStdString();
|
||||
url += "?ts=" + std::to_string((unsigned long long) wxGetUTCTimeMillis().GetValue());
|
||||
|
||||
std::string body;
|
||||
std::string err;
|
||||
unsigned http_status = 0;
|
||||
|
||||
try {
|
||||
Slic3r::Http::get(url)
|
||||
.timeout_connect(5)
|
||||
.timeout_max(10)
|
||||
.size_limit(512)
|
||||
.header("User-Agent", "BambuStudio")
|
||||
.on_complete([&](std::string b, unsigned st2) {
|
||||
body = std::move(b);
|
||||
http_status = st2;
|
||||
})
|
||||
.on_error([&](std::string b, std::string e, unsigned st2) {
|
||||
body = std::move(b);
|
||||
err = std::move(e);
|
||||
http_status = st2;
|
||||
})
|
||||
.perform_sync();
|
||||
} catch (const std::exception& e) {
|
||||
err = e.what();
|
||||
}
|
||||
|
||||
if (!err.empty() || http_status == 0 || http_status >= 400) {
|
||||
wxString werr;
|
||||
if (!err.empty())
|
||||
werr = wxString::FromUTF8(err);
|
||||
else
|
||||
werr = wxString::Format("HTTP %u", http_status);
|
||||
|
||||
std::lock_guard<std::mutex> lk(g_bmcu_ver_mtx);
|
||||
g_bmcu_ver_err = werr;
|
||||
g_bmcu_ver_state.store(3, std::memory_order_release);
|
||||
return;
|
||||
}
|
||||
|
||||
wxString content = wxString::FromUTF8(body);
|
||||
content = bmcu_norm_ver_strict_x4(content);
|
||||
|
||||
if (!bmcu_is_ver_strict_x4(content)) {
|
||||
std::lock_guard<std::mutex> lk(g_bmcu_ver_mtx);
|
||||
g_bmcu_ver_err = "Invalid version format (expected x.x.x.x)";
|
||||
g_bmcu_ver_state.store(3, std::memory_order_release);
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(g_bmcu_ver_mtx);
|
||||
g_bmcu_ver_remote = content;
|
||||
g_bmcu_ver_err.clear();
|
||||
}
|
||||
g_bmcu_ver_state.store(2, std::memory_order_release);
|
||||
}).detach();
|
||||
}
|
||||
|
||||
static bool bmcu_get_remote_version(wxString& out_ver, wxString& out_err)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(g_bmcu_ver_mtx);
|
||||
out_ver = g_bmcu_ver_remote;
|
||||
out_err = g_bmcu_ver_err;
|
||||
return (g_bmcu_ver_state.load(std::memory_order_acquire) == 2) && !out_ver.empty();
|
||||
}
|
||||
|
||||
static const wxColour TEXT_NORMAL_CLR = wxColour(0, 150, 136);
|
||||
static const wxColour TEXT_FAILED_CLR = wxColour(255, 111, 0);
|
||||
|
||||
|
|
@ -658,6 +789,7 @@ void MachineInfoPanel::update_version_text(MachineObject* obj)
|
|||
void MachineInfoPanel::update_ams_ext(MachineObject *obj)
|
||||
{
|
||||
bool has_hub_model = false;
|
||||
bool has_custom_ams_sn = false;
|
||||
|
||||
bool is_o_series = obj->is_series_o();
|
||||
|
||||
|
|
@ -819,7 +951,7 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
|
|||
}
|
||||
}
|
||||
|
||||
for (auto i = 0; i < m_amspanel_list.GetCount(); i++) {
|
||||
for (size_t i = 0; i < m_amspanel_list.GetCount(); i++) {
|
||||
AmsPanel* amspanel = m_amspanel_list[i];
|
||||
amspanel->Hide();
|
||||
}
|
||||
|
|
@ -967,20 +1099,97 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
|
|||
}
|
||||
}
|
||||
|
||||
// update ams sn
|
||||
bool is_bmcu = false;
|
||||
|
||||
if (it->second.sn.empty()) {
|
||||
ams_sn = "-";
|
||||
}
|
||||
else {
|
||||
wxString sn_text = it->second.sn;
|
||||
ams_sn = sn_text.MakeUpper();
|
||||
is_bmcu = is_custom_sn(ams_sn);
|
||||
if (is_bmcu)
|
||||
has_custom_ams_sn = true;
|
||||
}
|
||||
|
||||
if (is_bmcu)
|
||||
ams_name = wxString::Format("BMCU-%s", std::to_string(ams_id + 1));
|
||||
}
|
||||
|
||||
amspanel->m_staticText_ams->SetLabelText(ams_name);
|
||||
amspanel->m_staticText_ams_sn_val->SetLabelText(ams_sn);
|
||||
amspanel->m_staticText_ams_ver_val->SetLabelText(ams_ver);
|
||||
|
||||
if (is_custom_sn(ams_sn)) {
|
||||
amspanel->m_fw_url = "https://github.com/jarczakpawel/BMCU-C-PJARCZAK";
|
||||
amspanel->m_fw_link_lbl->Show();
|
||||
amspanel->m_fw_link->SetLabel("GitHub firmware");
|
||||
amspanel->m_fw_link->Show();
|
||||
|
||||
bmcu_start_github_version_check();
|
||||
|
||||
amspanel->m_fw_status_lbl->Show();
|
||||
amspanel->m_fw_status->Show();
|
||||
|
||||
const wxColour green_clr = TEXT_NORMAL_CLR;
|
||||
const wxColour red_clr = wxColour(220, 0, 0);
|
||||
const wxColour gray_clr = wxColour(120, 120, 120);
|
||||
|
||||
auto fnt = amspanel->m_fw_status->GetFont();
|
||||
fnt.SetWeight(wxFONTWEIGHT_NORMAL);
|
||||
amspanel->m_fw_status->SetFont(fnt);
|
||||
|
||||
wxString installed = bmcu_norm_ver_strict_x4(it->second.sw_ver);
|
||||
wxString remote;
|
||||
wxString err;
|
||||
|
||||
if (bmcu_get_remote_version(remote, err)) {
|
||||
if (!bmcu_is_ver_strict_x4(installed)) {
|
||||
amspanel->m_fw_status->SetForegroundColour(gray_clr);
|
||||
amspanel->m_fw_status->SetLabel("Installed firmware version has invalid format (expected x.x.x.x).");
|
||||
} else if (installed == remote) {
|
||||
amspanel->m_fw_status->SetForegroundColour(green_clr);
|
||||
amspanel->m_fw_status->SetLabel("Firmware is up to date (GitHub).");
|
||||
} else {
|
||||
fnt.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
amspanel->m_fw_status->SetFont(fnt);
|
||||
amspanel->m_fw_status->SetForegroundColour(red_clr);
|
||||
amspanel->m_fw_status->SetLabel(
|
||||
wxString::Format("New firmware is available on GitHub. Installed: %s, Latest: %s.", installed, remote));
|
||||
}
|
||||
} else {
|
||||
const int st = g_bmcu_ver_state.load(std::memory_order_acquire);
|
||||
amspanel->m_fw_status->SetForegroundColour(gray_clr);
|
||||
fnt.SetWeight(wxFONTWEIGHT_NORMAL);
|
||||
amspanel->m_fw_status->SetFont(fnt);
|
||||
|
||||
if (st == 3) {
|
||||
wxString e;
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(g_bmcu_ver_mtx);
|
||||
e = g_bmcu_ver_err;
|
||||
}
|
||||
|
||||
if (e.empty())
|
||||
amspanel->m_fw_status->SetLabel("Unable to check GitHub version.");
|
||||
else
|
||||
amspanel->m_fw_status->SetLabel(wxString::Format("Unable to check GitHub version (%s).", e));
|
||||
} else {
|
||||
amspanel->m_fw_status->SetLabel("Checking GitHub version...");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (amspanel->m_fw_link_lbl)
|
||||
amspanel->m_fw_link_lbl->Hide();
|
||||
if (amspanel->m_fw_link)
|
||||
amspanel->m_fw_link->Hide();
|
||||
if (amspanel->m_fw_status_lbl)
|
||||
amspanel->m_fw_status_lbl->Hide();
|
||||
if (amspanel->m_fw_status)
|
||||
amspanel->m_fw_status->Hide();
|
||||
amspanel->m_fw_url.clear();
|
||||
}
|
||||
|
||||
ams_index++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1035,8 +1244,13 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
|
|||
ams_iter++;
|
||||
}
|
||||
|
||||
if (contain_four_slot) {
|
||||
if (m_img_monitor_ams.name() != "monitor_upgrade_ams") {
|
||||
if (has_custom_ams_sn) {
|
||||
if (m_img_monitor_ams.name() != "bmcu320") {
|
||||
m_img_monitor_ams = ScalableBitmap(this, "bmcu320", 150);
|
||||
m_ams_img->SetBitmap(m_img_monitor_ams.bmp());
|
||||
}
|
||||
} else if (contain_four_slot) {
|
||||
if (m_img_monitor_ams.name() != "monitor_upgrade_ams_png") {
|
||||
m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams_png", 150);
|
||||
m_ams_img->SetBitmap(m_img_monitor_ams.bmp());
|
||||
}
|
||||
|
|
@ -1525,7 +1739,7 @@ bool UpgradePanel::Show(bool show)
|
|||
const wxSize & size /*= wxDefaultSize*/,
|
||||
long style /*= wxTAB_TRAVERSAL*/,
|
||||
const wxString &name /*= wxEmptyString*/)
|
||||
: wxPanel(parent,id,pos,size,style)
|
||||
: wxPanel(parent,id,pos,size,style,name)
|
||||
{
|
||||
upgrade_green_icon = ScalableBitmap(this, "monitor_upgrade_online", 5);
|
||||
|
||||
|
|
@ -1586,6 +1800,35 @@ bool UpgradePanel::Show(bool show)
|
|||
ams_sizer->Add(m_staticText_ams_sn_val, 0, wxALL | wxEXPAND, FromDIP(5));
|
||||
ams_sizer->Add(m_ams_ver_sizer, 1, wxEXPAND, FromDIP(5));
|
||||
ams_sizer->Add(content_info, 0, wxEXPAND, FromDIP(5));
|
||||
|
||||
m_fw_link_lbl = new wxStaticText(this, wxID_ANY, _L("Firmware:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_fw_link_lbl->SetFont(Label::Head_14);
|
||||
m_fw_link_lbl->Hide();
|
||||
|
||||
m_fw_link = new wxStaticText(this, wxID_ANY, "GitHub", wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_fw_link->SetForegroundColour(wxColour(0x1F, 0x8E, 0xEA));
|
||||
m_fw_link->SetCursor(wxCursor(wxCURSOR_HAND));
|
||||
auto f = m_fw_link->GetFont();
|
||||
f.SetUnderlined(true);
|
||||
m_fw_link->SetFont(f);
|
||||
m_fw_link->Hide();
|
||||
m_fw_link->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent&) {
|
||||
if (!m_fw_url.empty())
|
||||
wxLaunchDefaultBrowser(m_fw_url);
|
||||
});
|
||||
|
||||
ams_sizer->Add(m_fw_link_lbl, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
|
||||
ams_sizer->Add(m_fw_link, 0, wxALL | wxEXPAND, FromDIP(5));
|
||||
|
||||
m_fw_status_lbl = new wxStaticText(this, wxID_ANY, _L("Status:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_fw_status_lbl->SetFont(Label::Head_14);
|
||||
m_fw_status_lbl->Hide();
|
||||
|
||||
m_fw_status = new wxStaticText(this, wxID_ANY, "-", wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_fw_status->Hide();
|
||||
|
||||
ams_sizer->Add(m_fw_status_lbl, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
|
||||
ams_sizer->Add(m_fw_status, 0, wxALL | wxEXPAND, FromDIP(5));
|
||||
ams_sizer->Add(0, 0, 1, wxEXPAND, 0);
|
||||
|
||||
SetSizer(ams_sizer);
|
||||
|
|
|
|||
|
|
@ -39,21 +39,28 @@ public:
|
|||
class AmsPanel : public wxPanel
|
||||
{
|
||||
public:
|
||||
wxStaticText *m_staticText_ams_model_id;
|
||||
wxStaticText *m_staticText_ams;
|
||||
wxStaticText *m_staticText_ams_sn_val;
|
||||
wxStaticText *m_staticText_ams_ver_val;
|
||||
wxStaticText *m_staticText_beta_version;
|
||||
wxStaticBitmap *m_ams_new_version_img;
|
||||
wxStaticText* m_staticText_ams_model_id;
|
||||
wxStaticText* m_staticText_ams;
|
||||
wxStaticText* m_staticText_ams_sn_val;
|
||||
wxStaticText* m_staticText_ams_ver_val;
|
||||
wxStaticText* m_staticText_beta_version;
|
||||
wxStaticBitmap* m_ams_new_version_img;
|
||||
ScalableBitmap upgrade_green_icon;
|
||||
|
||||
AmsPanel(wxWindow * parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint & pos = wxDefaultPosition,
|
||||
const wxSize & size = wxDefaultSize,
|
||||
long style = wxTAB_TRAVERSAL,
|
||||
const wxString &name = wxEmptyString);
|
||||
~AmsPanel();
|
||||
wxStaticText* m_fw_link_lbl = nullptr;
|
||||
wxStaticText* m_fw_link = nullptr;
|
||||
wxString m_fw_url;
|
||||
|
||||
wxStaticText* m_fw_status_lbl = nullptr;
|
||||
wxStaticText* m_fw_status = nullptr;
|
||||
|
||||
AmsPanel(wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTAB_TRAVERSAL,
|
||||
const wxString& name = wxEmptyString);
|
||||
~AmsPanel() override;
|
||||
|
||||
void msw_rescale();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -198,6 +198,32 @@ function Invoke-NativeCapture([string]$FilePath, [string[]]$ArgumentList) {
|
|||
}
|
||||
|
||||
function Test-WslDistroExists([string]$WslPath, [string]$Name, [ref]$Reason) {
|
||||
$list = Invoke-NativeCapture $WslPath @('--list', '--quiet')
|
||||
if ($list.ExitCode -ne 0) {
|
||||
$text = $list.Combined
|
||||
if ([string]::IsNullOrWhiteSpace($text)) {
|
||||
throw 'Failed to query WSL distributions'
|
||||
}
|
||||
throw ("Failed to query WSL distributions: {0}" -f $text)
|
||||
}
|
||||
|
||||
$exists = $false
|
||||
foreach ($line in ($list.StdOut -split "`n")) {
|
||||
$item = $line.Trim()
|
||||
if ([string]::IsNullOrWhiteSpace($item)) {
|
||||
continue
|
||||
}
|
||||
if ($item -ieq $Name) {
|
||||
$exists = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $exists) {
|
||||
$Reason.Value = "WSL distro '$Name' is not installed"
|
||||
return $false
|
||||
}
|
||||
|
||||
$probe = Invoke-NativeCapture $WslPath @('-d', $Name, '--user', 'root', '--', 'sh', '-lc', 'true')
|
||||
if ($probe.ExitCode -eq 0) {
|
||||
$Reason.Value = ''
|
||||
|
|
@ -205,15 +231,6 @@ function Test-WslDistroExists([string]$WslPath, [string]$Name, [ref]$Reason) {
|
|||
}
|
||||
|
||||
$text = $probe.Combined
|
||||
$lower = $text.ToLowerInvariant()
|
||||
|
||||
if ($lower.Contains('there is no distribution with the supplied name') -or
|
||||
$lower.Contains('wsl_e_distribution_not_found') -or
|
||||
($lower.Contains('distribution') -and $lower.Contains('not') -and $lower.Contains('found'))) {
|
||||
$Reason.Value = "WSL distro '$Name' is not installed"
|
||||
return $false
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($text)) {
|
||||
throw "Failed to start WSL distro '$Name'"
|
||||
}
|
||||
|
|
@ -332,7 +349,7 @@ if (!(Test-Path $bootstrapPath)) {
|
|||
try {
|
||||
& $wsl --status | Out-Null
|
||||
} catch {
|
||||
throw 'WSL is not ready. Run as Administrator once and execute: wsl --install --no-distribution ; wsl --update ; then reboot.'
|
||||
throw 'WSL is not ready. Run as Administrator once and enable Microsoft-Windows-Subsystem-Linux and VirtualMachinePlatform, then reboot.'
|
||||
}
|
||||
|
||||
Convert-FileToLf $bootstrapPath
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue