Skip to content

Commit

Permalink
Create bare-bones macOS app bundle in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed May 27, 2024
1 parent 7366337 commit fa7988b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
51 changes: 49 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,56 @@ jobs:
run: brew bundle exec -- ninja test -C build
- name: Install
run: brew bundle exec -- meson install -C build
- name: Post Install
run: |
brew bundle exec -- glib-compile-schemas tuba-macos/share/glib-2.0/schemas
brew bundle exec -- gtk4-update-icon-cache -f -t tuba-macos/share/icons/hicolor
- name: Create App Bundle
run: |
mkdir -p Tuba.app/Contents/MacOS
mv tuba-macos/bin/dev.geopjr.Tuba Tuba.app/Contents/MacOS/
mkdir -p Tuba.app/Contents/Resources
mv tuba-macos/share/ Tuba.app/Contents/Resources/
cat <<EOF >Tuba.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Tuba</string>
<key>CFBundleExecutable</key>
<string>dev.geopjr.Tuba</string>
<key>CFBundleIconFile</key>
<string>dev.geopjr.Tuba.svg</string>
<key>CFBundleIconName</key>
<string>dev.geopjr.Tuba.svg</string>
<key>CFBundleIdentifier</key>
<string>dev.geopjr.Tuba</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Tuba</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(meson introspect --projectinfo build | jq -r '.version')</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>$(meson introspect --projectinfo build | jq -r '.version')</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string>
<key>MDItemKeywords</key>
<string>toot, mastodon, fediverse, gotosocial, pleroma, akkoma</string>
</dict>
</plist>
EOF
# Run with XDG_DATA_DIRS=Tuba.app/Contents/Resources/share for now
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: tuba-macos
path: tuba-macos
name: Tuba.app
path: Tuba.app
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ builddir
/tuba_windows_portable/
tuba_windows_portable.zip
Brewfile.lock.json
.DS_Store
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build dependencies
brew "cmake"
brew "jq"
brew "meson"
brew "ninja"
brew "pkg-config"
Expand Down

0 comments on commit fa7988b

Please sign in to comment.