From e99dc7266fddbd8a025c6bfb82bd82153acb9954 Mon Sep 17 00:00:00 2001 From: Uladzimir Karpenka Date: Thu, 25 Jun 2026 15:30:02 +0300 Subject: [PATCH] fix create macos bundle --- other/create_bundle_app_macos.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/other/create_bundle_app_macos.sh b/other/create_bundle_app_macos.sh index 82fb55e..729d0c8 100755 --- a/other/create_bundle_app_macos.sh +++ b/other/create_bundle_app_macos.sh @@ -11,12 +11,14 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +# Project root holds bin/, icon/, dist/. This script lives in other/, so go up one. +PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" # ── Locate source .app ──────────────────────────────────────────────────────── if [[ $# -ge 1 ]]; then SRC_APP="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")" else - SRC_APP="$(find "$SCRIPT_DIR/bin" -maxdepth 3 -name "*.app" | head -1)" + SRC_APP="$(find "$PROJECT_ROOT/bin" -maxdepth 3 -name "*.app" | head -1)" [[ -n "$SRC_APP" ]] || { echo "ERROR: no .app found under bin/"; exit 1; } fi @@ -24,14 +26,14 @@ fi if [[ $# -ge 2 ]]; then OUT_DIR="$2" else - OUT_DIR="$SCRIPT_DIR/dist" + OUT_DIR="$PROJECT_ROOT/dist" fi mkdir -p "$OUT_DIR" # ── Generate .icns from icon/ folder ───────────────────────────────────────── ICNS_PATH="" -ICON_SRC="$SCRIPT_DIR/icon" +ICON_SRC="$PROJECT_ROOT/icon" if [[ -d "$ICON_SRC" ]]; then echo "Generating EWSDR.icns..." ICONSET_TMP="$(mktemp -d)/EWSDR.iconset"