Skip to content

Commit 2d32c3e

Browse files
committed
fix installers #4
1 parent 0f9de3d commit 2d32c3e

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

.github/workflows/build-macos-arm-installer.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,30 +89,44 @@ jobs:
8989
- name: Build macOS ARM executable
9090
run: |
9191
# Clean any existing output directory
92-
rm -rf dist/Cleanuparr.app/Contents/MacOS
92+
rm -rf dist
9393
mkdir -p dist/Cleanuparr.app/Contents/MacOS
9494
95+
# Set environment variables to disable code signing
96+
export CODESIGN_ALLOCATE=/usr/bin/true
97+
export DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp/dotnet_bundle_extract
98+
99+
# Build without single file first, then we'll handle it manually if needed
95100
dotnet publish code/backend/${{ env.executableName }}/${{ env.executableName }}.csproj \
96101
-c Release \
97102
--runtime osx-arm64 \
98103
--self-contained \
99104
-o dist/Cleanuparr.app/Contents/MacOS \
100-
/p:PublishSingleFile=true \
105+
/p:PublishSingleFile=false \
101106
/p:Version=${{ env.appVersion }} \
102107
/p:DebugType=None \
103108
/p:DebugSymbols=false \
104-
/p:EnableCompressionInSingleFile=false \
105-
/p:IncludeNativeLibrariesForSelfExtract=true \
106109
/p:UseAppHost=true \
107-
/p:EnableMacOSCodeSign=false
110+
/p:EnableMacOSCodeSign=false \
111+
/p:CodeSignOnCopy=false \
112+
/p:_CodeSignDuringBuild=false
108113
109-
- name: Verify architecture
114+
- name: Post-build setup
110115
run: |
116+
# Make sure the executable is actually executable
117+
chmod +x dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
118+
119+
# Remove any .pdb files that might have been created
120+
find dist/Cleanuparr.app/Contents/MacOS -name "*.pdb" -delete
121+
111122
echo "Checking architecture of built binary:"
112123
file dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
113124
if command -v lipo >/dev/null 2>&1; then
114125
lipo -info dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
115126
fi
127+
128+
echo "Files in MacOS directory:"
129+
ls -la dist/Cleanuparr.app/Contents/MacOS/
116130
117131
- name: Create macOS app bundle structure
118132
run: |

.github/workflows/build-macos-intel-installer.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,30 +89,44 @@ jobs:
8989
- name: Build macOS Intel executable
9090
run: |
9191
# Clean any existing output directory
92-
rm -rf dist/Cleanuparr.app/Contents/MacOS
92+
rm -rf dist
9393
mkdir -p dist/Cleanuparr.app/Contents/MacOS
9494
95+
# Set environment variables to disable code signing
96+
export CODESIGN_ALLOCATE=/usr/bin/true
97+
export DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp/dotnet_bundle_extract
98+
99+
# Build without single file first, then we'll handle it manually if needed
95100
dotnet publish code/backend/${{ env.executableName }}/${{ env.executableName }}.csproj \
96101
-c Release \
97102
--runtime osx-x64 \
98103
--self-contained \
99104
-o dist/Cleanuparr.app/Contents/MacOS \
100-
/p:PublishSingleFile=true \
105+
/p:PublishSingleFile=false \
101106
/p:Version=${{ env.appVersion }} \
102107
/p:DebugType=None \
103108
/p:DebugSymbols=false \
104-
/p:EnableCompressionInSingleFile=false \
105-
/p:IncludeNativeLibrariesForSelfExtract=true \
106109
/p:UseAppHost=true \
107-
/p:EnableMacOSCodeSign=false
110+
/p:EnableMacOSCodeSign=false \
111+
/p:CodeSignOnCopy=false \
112+
/p:_CodeSignDuringBuild=false
108113
109-
- name: Verify architecture
114+
- name: Post-build setup
110115
run: |
116+
# Make sure the executable is actually executable
117+
chmod +x dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
118+
119+
# Remove any .pdb files that might have been created
120+
find dist/Cleanuparr.app/Contents/MacOS -name "*.pdb" -delete
121+
111122
echo "Checking architecture of built binary:"
112123
file dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
113124
if command -v lipo >/dev/null 2>&1; then
114125
lipo -info dist/Cleanuparr.app/Contents/MacOS/Cleanuparr
115126
fi
127+
128+
echo "Files in MacOS directory:"
129+
ls -la dist/Cleanuparr.app/Contents/MacOS/
116130
117131
- name: Create macOS app bundle structure
118132
run: |

code/backend/Cleanuparr.Api/Cleanuparr.Api.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<ImplicitUsings>enable</ImplicitUsings>
99
<PublishReadyToRun>true</PublishReadyToRun>
1010
<EnableMacOSCodeSign>false</EnableMacOSCodeSign>
11+
<CodeSignOnCopy>false</CodeSignOnCopy>
12+
<_CodeSignDuringBuild>false</_CodeSignDuringBuild>
13+
<CodesignDisableTimestamp>true</CodesignDisableTimestamp>
14+
<CodesignKeychain></CodesignKeychain>
1115
</PropertyGroup>
1216

1317
<ItemGroup>

0 commit comments

Comments
 (0)