- The Mac client’s Media tab now has pagination and a preview/play area.
What changed in [main.m](/Users/tyemeclifford/Documents/GH/blog/macclient/AppKitClient/main.m): Media list now paginates with Previous/Next and 10/25/50/100 per page. Selecting an image loads an inline preview. Selecting audio/video loads an AVPlayerView with native playback controls. Added an Open button and double-click support to open media in the default Mac app. Media file sizes now display as readable values like 1.4 MB. I also updated [build-app.sh](/Users/tyemeclifford/Documents/GH/blog/macclient/build-app.sh) to link AVKit and AVFoundation, and to honor the app’s CFBundleExecutable from Info.plist so the rebuilt bundle launches with the expected TCMS executable.
This commit is contained in:
@@ -4,10 +4,11 @@ set -eu
|
||||
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||||
APP="$ROOT/TCMSMacClient.app"
|
||||
SRC="$ROOT/AppKitClient/main.m"
|
||||
EXECUTABLE="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$ROOT/AppKitClient/Info.plist")"
|
||||
|
||||
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
|
||||
cp "$ROOT/AppKitClient/Info.plist" "$APP/Contents/Info.plist"
|
||||
/usr/bin/clang -fobjc-arc -mmacosx-version-min=12.0 -framework Cocoa "$SRC" -o "$APP/Contents/MacOS/TCMSMacClient"
|
||||
/usr/bin/clang -fobjc-arc -mmacosx-version-min=12.0 -framework Cocoa -framework AVKit -framework AVFoundation "$SRC" -o "$APP/Contents/MacOS/$EXECUTABLE"
|
||||
printf 'APPL????' > "$APP/Contents/PkgInfo"
|
||||
|
||||
echo "Built $APP"
|
||||
|
||||
Reference in New Issue
Block a user