From 4d7699b628357ae2c1dca7fea7ce8e8a61149099 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 28 Sep 2025 13:38:13 +0800 Subject: [PATCH] Update DMG creation process in build workflow (#10891) Refactor DMG creation process in build workflow * Update the OrcaSlicer DMG creation steps to exclude the profile validator helper from the main DMG. * Introduce a dedicated directory for the main OrcaSlicer DMG and the profile validator DMG, ensuring a cleaner build process. * Use symbolic links with the `-sfn` option to avoid issues with existing links. This change enhances the organization of the build artifacts and improves the clarity of the DMG creation process. --- .github/workflows/build_orca.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index b6cb12d21d..bebcaba1b2 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -125,16 +125,20 @@ jobs: codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app fi - # Create main OrcaSlicer DMG - ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications - hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg + # Create main OrcaSlicer DMG without the profile validator helper + mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg + rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/* + cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/ + ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications + hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_universal_${{ env.ver }}.dmg # Create separate OrcaSlicer_profile_validator DMG if the app exists if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg + rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/* cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/ - ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications + ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg fi @@ -154,14 +158,18 @@ jobs: if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14' working-directory: ${{ github.workspace }} run: | - ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications - hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg + mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg + rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/* + cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/ + ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications + hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg # Create separate OrcaSlicer_profile_validator DMG if the app exists if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg + rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/* cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/ - ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications + ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg fi