Add bundled Fchati application icon

This commit is contained in:
diyaa
2026-07-26 22:26:33 +02:00
parent ddb5131ae8
commit cce1b350e0
5 changed files with 11 additions and 1 deletions
+8 -1
View File
@@ -9,6 +9,7 @@ PRODUCT_NAME="FchatiApp"
INSTALL_PATH="/Applications/Fchati.app"
STAGING_DIR="$(mktemp -d "${TMPDIR:-/tmp}/fchati-install.XXXXXX")"
STAGING_APP="$STAGING_DIR/Fchati.app"
ICON_PATH="$PROJECT_DIR/Resources/Fchati.icns"
cleanup() {
rm -rf "$STAGING_DIR"
@@ -20,6 +21,11 @@ if [[ ! -f "$PROJECT_DIR/Package.swift" ]]; then
exit 1
fi
if [[ ! -f "$ICON_PATH" ]]; then
echo "Application icon not found: $ICON_PATH" >&2
exit 1
fi
if [[ -e "$INSTALL_PATH" && ! -d "$INSTALL_PATH" ]]; then
echo "Expected an application bundle at $INSTALL_PATH, but found a non-directory." >&2
exit 1
@@ -41,9 +47,10 @@ if [[ ! -x "$EXECUTABLE_PATH" ]]; then
fi
echo "Creating the application bundle..."
mkdir -p "$STAGING_APP/Contents/MacOS"
mkdir -p "$STAGING_APP/Contents/MacOS" "$STAGING_APP/Contents/Resources"
cp "$PROJECT_DIR/Info.plist" "$STAGING_APP/Contents/Info.plist"
cp "$EXECUTABLE_PATH" "$STAGING_APP/Contents/MacOS/$PRODUCT_NAME"
cp "$ICON_PATH" "$STAGING_APP/Contents/Resources/Fchati.icns"
codesign --force --sign - --timestamp=none --entitlements "$PROJECT_DIR/FchatiApp.entitlements" "$STAGING_APP"
if [[ -d "$INSTALL_PATH" ]]; then