Merge pull request #51 from ok2/codex/fix-widget-install-issue-on-mac-os-x

Fix macOS widget packaging
This commit is contained in:
Kiyomichi Kosaka 2025-06-16 13:00:58 +02:00 committed by GitHub
commit 81c93710ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 9 deletions

View File

@ -70,8 +70,8 @@ The repository includes a minimal Dashboard widget under
package it automatically:
1. Run `./build-widget.sh` from the repository root.
2. The script creates `CoBiEClock.wdgt` which you can double-click to
install.
2. The script creates a folder `CoBiEClock.wdgt` which you can
doubleclick to install on macOS.
The widget runs offline and shows the analog CoBiE clock on your
desktop.

View File

@ -4,9 +4,9 @@ set -euo pipefail
WIDGET_NAME="CoBiEClock"
SRC_DIR="macos-widget"
BUILD_DIR="build-widget"
BUILD_DIR="${WIDGET_NAME}.wdgt"
# Clean build directory
# Clean previous build
rm -rf "$BUILD_DIR"
mkdir "$BUILD_DIR"
@ -16,8 +16,4 @@ cp "$SRC_DIR/Info.plist" "$SRC_DIR/index.html" "$BUILD_DIR/"
# Copy shared files from repository root
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
# Create archive and rename
zip -r "${WIDGET_NAME}.zip" "$BUILD_DIR" > /dev/null
mv "${WIDGET_NAME}.zip" "${WIDGET_NAME}.wdgt"
echo "Widget created: ${WIDGET_NAME}.wdgt"
echo "Widget created: ${BUILD_DIR}"