mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Raised LSMinimumSystemVersion to 11.0. Aligned CFBundleIdentifier with project naming (net.zoite.Zoitechat). Kept version placeholders (@VERSION@) in CFBundleGetInfoString, CFBundleShortVersionString, and CFBundleVersion so they map cleanly via template substitution. Confirmed icon/document declarations still point to zoitechat.icns and zct/hct extensions. Made Info.plist generation deterministic in bundling workflow by updating osx/makebundle.sh: Force script execution from its own directory for stable relative paths. Always render Info.plist from Info.plist.in before bundling. Use a single explicit version source: VERSION env var or fallback to meson.build project version. Use LC_ALL=C substitution and atomic temp-file move for stable output behavior.
56 lines
1.6 KiB
Bash
Executable File
56 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
BUNDLE_DEF="zoitechat.bundle"
|
|
APP_NAME="ZoiteChat.app"
|
|
|
|
# Expected prefixes for macOS GTK dependencies:
|
|
# - Homebrew: /opt/homebrew (Apple Silicon) or /usr/local (Intel)
|
|
# - MacPorts: /opt/local
|
|
# Required runtime stack includes GTK3, Pango, GDK-Pixbuf and enchant.
|
|
|
|
if command -v gtk-mac-bundler >/dev/null 2>&1; then
|
|
BUNDLER_CMD="gtk-mac-bundler"
|
|
elif command -v python3 >/dev/null 2>&1 && python3 -c 'import gtk_mac_bundler' >/dev/null 2>&1; then
|
|
BUNDLER_CMD="python3 -m gtk_mac_bundler"
|
|
else
|
|
cat >&2 <<'MSG'
|
|
error: gtk-mac-bundler not found.
|
|
Install one of the following before running osx/makebundle.sh:
|
|
- executable: gtk-mac-bundler
|
|
- python module: gtk_mac_bundler (invoked via: python3 -m gtk_mac_bundler)
|
|
MSG
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf "$APP_NAME"
|
|
rm -f ./*.app.zip
|
|
|
|
|
|
# Keep Info.plist generation deterministic by always rendering from template
|
|
# using a single, explicit version source.
|
|
VERSION_STRING="${VERSION:-$(sed -n "s/^ version: '\([^']*\)',$/\1/p" ../meson.build | head -n1)}"
|
|
if [ -z "$VERSION_STRING" ]; then
|
|
echo "error: unable to determine VERSION_STRING for Info.plist" >&2
|
|
exit 1
|
|
fi
|
|
|
|
TMP_PLIST="Info.plist.tmp"
|
|
LC_ALL=C sed "s/@VERSION@/$VERSION_STRING/g" Info.plist.in > "$TMP_PLIST"
|
|
mv -f "$TMP_PLIST" Info.plist
|
|
|
|
# shellcheck disable=SC2086
|
|
$BUNDLER_CMD "$BUNDLE_DEF"
|
|
|
|
if [ ! -d "$APP_NAME" ]; then
|
|
echo "error: bundler finished but $APP_NAME was not created" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Compressing bundle"
|
|
zip -9rXq "./ZoiteChat-$(git describe --tags).app.zip" "./$APP_NAME"
|