Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复macOS构建错误 #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,24 @@ jobs:
run: |
brew install gtk4
brew install libadwaita
brew install dylibbundler
brew install mpv
brew install glib
rustup target add ${{matrix.target}}
cargo build --release --locked

- name: Make MacOS package
run: |
mkdir -p Tsukimi.app/Contents/Resources/glib-2.0/schemas
cp *.gschema.xml Tsukimi.app/Contents/Resources/glib-2.0/schemas/
glib-compile-schemas Tsukimi.app/Contents/Resources/glib-2.0/schemas/

mkdir -p Tsukimi.app/Contents/MacOS
mkdir -p Tsukimi.app/Contents/Resources
cp share/macos/Info.plist Tsukimi.app/Contents/
cp share/macos/AppIcon.icns Tsukimi.app/Contents/Resources/
mv target/release/tsukimi Tsukimi.app/Contents/MacOS/
dylibbundler -od -b -x ./Tsukimi.app/Contents/MacOS/tsukimi -d ./Tsukimi.app/Contents/Frameworks -p @executable_path/../Frameworks/
tar -czf tsukimi-x86_64-apple-darwin.tar.gz Tsukimi.app/

- name: Upload artifact
Expand Down
6 changes: 6 additions & 0 deletions share/macos/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<key>LSMinimumSystemVersion</key>
<string>12.7.3</string>

<key>LSEnvironment</key>
<dict>
<key>GSETTINGS_SCHEMA_DIR</key>
<string>/Applications/Tsukimi.app/Contents/Resources/glib-2.0/schemas</string>
</dict>

<!-- 网络权限 -->
<key>NSAppTransportSecurity</key>
<dict>
Expand Down