diff --git a/FchatiApp/Package.swift b/FchatiApp/Package.swift index 7bdc10d..94f1cfe 100644 --- a/FchatiApp/Package.swift +++ b/FchatiApp/Package.swift @@ -7,7 +7,8 @@ let package = Package( targets: [ .executableTarget( name: "FchatiApp", - path: "Sources/FchatiApp" + path: "Sources/FchatiApp", + resources: [.process("Resources")] ), .testTarget( name: "FchatiAppTests", diff --git a/FchatiApp/Resources/AppIcon.png b/FchatiApp/Resources/AppIcon.png index 2513932..c9baca7 100644 Binary files a/FchatiApp/Resources/AppIcon.png and b/FchatiApp/Resources/AppIcon.png differ diff --git a/FchatiApp/Resources/Fchati.icns b/FchatiApp/Resources/Fchati.icns index 402f74f..2f6a930 100644 Binary files a/FchatiApp/Resources/Fchati.icns and b/FchatiApp/Resources/Fchati.icns differ diff --git a/FchatiApp/Sources/FchatiApp/FchatiApp.swift b/FchatiApp/Sources/FchatiApp/FchatiApp.swift index bbed68e..da4890e 100644 --- a/FchatiApp/Sources/FchatiApp/FchatiApp.swift +++ b/FchatiApp/Sources/FchatiApp/FchatiApp.swift @@ -10,9 +10,12 @@ struct FchatiApp: App { } .defaultSize(width: 420, height: 560) - MenuBarExtra("Fchati", systemImage: "message") { + MenuBarExtra { RootView() .background(WindowConfigurator()) + } label: { + Image("MenuBarIcon", bundle: .module) + .renderingMode(.original) } .menuBarExtraStyle(.window) } diff --git a/FchatiApp/Sources/FchatiApp/Resources/MenuBarIcon.png b/FchatiApp/Sources/FchatiApp/Resources/MenuBarIcon.png new file mode 100644 index 0000000..367560c Binary files /dev/null and b/FchatiApp/Sources/FchatiApp/Resources/MenuBarIcon.png differ diff --git a/IMPLEMENTATION_STATUS.md b/IMPLEMENTATION_STATUS.md index b774a83..a59df7c 100644 --- a/IMPLEMENTATION_STATUS.md +++ b/IMPLEMENTATION_STATUS.md @@ -200,6 +200,7 @@ - The macOS app now has an always-visible quit control beside the top-level tabs, in addition to the existing Settings action. - The macOS app now includes a normal main window and Dock presence while retaining the menu-bar shortcut. - `FchatiApp/Resources/AppIcon.png` and `FchatiApp/Resources/Fchati.icns` provide the bundled Dock and application icon, and the installer copies the icon into the application bundle. +- The supplied Teamwork Chat icon now replaces the app icon and provides the custom menu-bar icon through the Swift package resources; the installer copies that resource bundle into the application bundle. ## Bug Fixes — Post-Review ✅ diff --git a/scripts/run-macos-app.sh b/scripts/run-macos-app.sh index c93449a..2875aa0 100755 --- a/scripts/run-macos-app.sh +++ b/scripts/run-macos-app.sh @@ -41,16 +41,23 @@ echo "Building the release executable..." swift build --configuration release --package-path "$PROJECT_DIR" EXECUTABLE_PATH="$PROJECT_DIR/.build/release/$PRODUCT_NAME" +RESOURCE_BUNDLE="$PROJECT_DIR/.build/release/FchatiApp_FchatiApp.bundle" if [[ ! -x "$EXECUTABLE_PATH" ]]; then echo "Release executable not found: $EXECUTABLE_PATH" >&2 exit 1 fi +if [[ ! -d "$RESOURCE_BUNDLE" ]]; then + echo "Application resource bundle not found: $RESOURCE_BUNDLE" >&2 + exit 1 +fi + echo "Creating the application bundle..." 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" +cp -R "$RESOURCE_BUNDLE" "$STAGING_APP/Contents/Resources/" codesign --force --sign - --timestamp=none --entitlements "$PROJECT_DIR/FchatiApp.entitlements" "$STAGING_APP" if [[ -d "$INSTALL_PATH" ]]; then