Merge pull request #51 from ok2/codex/fix-widget-install-issue-on-mac-os-x
Fix macOS widget packaging
This commit is contained in:
commit
81c93710ed
@ -70,8 +70,8 @@ The repository includes a minimal Dashboard widget under
|
|||||||
package it automatically:
|
package it automatically:
|
||||||
|
|
||||||
1. Run `./build-widget.sh` from the repository root.
|
1. Run `./build-widget.sh` from the repository root.
|
||||||
2. The script creates `CoBiEClock.wdgt` which you can double-click to
|
2. The script creates a folder `CoBiEClock.wdgt` which you can
|
||||||
install.
|
double‑click to install on macOS.
|
||||||
|
|
||||||
The widget runs offline and shows the analog CoBiE clock on your
|
The widget runs offline and shows the analog CoBiE clock on your
|
||||||
desktop.
|
desktop.
|
||||||
|
|||||||
@ -4,9 +4,9 @@ set -euo pipefail
|
|||||||
|
|
||||||
WIDGET_NAME="CoBiEClock"
|
WIDGET_NAME="CoBiEClock"
|
||||||
SRC_DIR="macos-widget"
|
SRC_DIR="macos-widget"
|
||||||
BUILD_DIR="build-widget"
|
BUILD_DIR="${WIDGET_NAME}.wdgt"
|
||||||
|
|
||||||
# Clean build directory
|
# Clean previous build
|
||||||
rm -rf "$BUILD_DIR"
|
rm -rf "$BUILD_DIR"
|
||||||
mkdir "$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
|
# Copy shared files from repository root
|
||||||
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
|
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
|
||||||
|
|
||||||
# Create archive and rename
|
echo "Widget created: ${BUILD_DIR}"
|
||||||
zip -r "${WIDGET_NAME}.zip" "$BUILD_DIR" > /dev/null
|
|
||||||
mv "${WIDGET_NAME}.zip" "${WIDGET_NAME}.wdgt"
|
|
||||||
|
|
||||||
echo "Widget created: ${WIDGET_NAME}.wdgt"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user