mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
fix create macos bundle
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user