diff --git a/build-mac.sh b/build-mac.sh new file mode 100755 index 00000000..a755f973 --- /dev/null +++ b/build-mac.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Local macOS build. Produces a .app bundle via macos/release-macos.sh. +# https://avaloniaui.net/blog/the-definitive-guide-to-building-and-deploying-avalonia-applications-for-macos +set -euo pipefail +exec "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/macos/release-macos.sh" "$@" diff --git a/macos/release-macos.sh b/macos/release-macos.sh index 6bc4b049..3d4865cd 100755 --- a/macos/release-macos.sh +++ b/macos/release-macos.sh @@ -57,8 +57,9 @@ mkdir -p "$OUTPUT_DIR" # ============================================================================= if [ "${SKIP_BUILD:-}" != "true" ]; then echo "[INFO] Building WheelWizard for $RID..." - cd "$WW_DIR" - dotnet publish -r "$RID" -c Release-macOS \ + # Publish the project, not the solution: WheelWizard.sln only has + # Debug|Any CPU and Release|Any CPU, so -c Release-macOS fails against the .sln. + dotnet publish "$WW_DIR/WheelWizard/WheelWizard.csproj" -r "$RID" -c Release-macOS \ /p:PublishSingleFile=true \ /p:IncludeAllContentForSelfExtract=true \ /p:IncludeNativeLibrariesForSelfExtract=true \ @@ -67,7 +68,6 @@ if [ "${SKIP_BUILD:-}" != "true" ]; then -p:UseAppHost=true \ --self-contained true \ -o "$OUTPUT_DIR/compiled/$RID" - cd "$SCRIPT_DIR" else echo "[INFO] Skipping build (SKIP_BUILD=true)" fi