Skip to content

Commit c80c5c4

Browse files
authored
Refactor and recreate in Xcode 16.2 (#17)
1 parent 0ccfd62 commit c80c5c4

26 files changed

+827
-597
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,26 @@ jobs:
5757
-configuration Release \
5858
-derivedDataPath build \
5959
-destination 'generic/platform=macOS'
60-
- name: Create zip
60+
- name: Install create-dmg
6161
run: |
62-
cd build/Build/Products/Release/
63-
zip -r mpvx.app.zip mpvx.app
64-
- name: Upload artifact
62+
brew install create-dmg
63+
- name: Create .dmg with Applications folder
64+
run: |
65+
mkdir -p dist
66+
create-dmg \
67+
--volname "mpvx" \
68+
--window-pos 200 200 \
69+
--window-size 600 400 \
70+
--icon-size 100 \
71+
--app-drop-link 400 200 \
72+
--icon "mpvx.app" 200 200 \
73+
./dist/mpvx.dmg \
74+
./build/Build/Products/Release/mpvx.app
75+
- name: Upload .dmg artifact
6576
uses: actions/upload-artifact@v4
6677
with:
67-
name: mpvx.app.zip
68-
path: ./build/Build/Products/Release/mpvx.app.zip
78+
name: mpvx.dmg
79+
path: ./dist/mpvx.dmg
6980
- name: Upload release note
7081
uses: actions/upload-artifact@v4
7182
with:
@@ -75,7 +86,7 @@ jobs:
7586
if: startsWith(github.ref, 'refs/tags/')
7687
uses: softprops/action-gh-release@v1
7788
with:
78-
files: ./build/Build/Products/Release/mpvx.app.zip
89+
files: ./dist/mpvx.dmg
7990
body_path: release_note.md
8091
prerelease: true
8192
env:

.github/workflows/test-and-coverage.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ jobs:
4747
name: "ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult"
4848
path: "artifacts/ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult"
4949
if: always()
50+
- name: Install Dependencies
51+
run: |
52+
brew install --formula xcresultparser
53+
- name: Convert Merged Result to Coverage
54+
run: |
55+
xcresultparser \
56+
--output-format cobertura \
57+
artifacts/ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult > artifacts/coverage-${{ matrix.os }}-${{ matrix.arch }}.xml
58+
- name: Upload Coverage to Codecov
59+
uses: codecov/codecov-action@v5
60+
with:
61+
files: artifacts/coverage.xml
62+
token: ${{ secrets.CODECOV_TOKEN }}
63+
flags: ${{ matrix.os }}_${{ matrix.arch }}_tests
64+
fail_ci_if_error: true
5065

5166
merge:
5267
runs-on: macos-latest

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,29 @@ Mac app for mpv inspired by [grsyncx](https://github.com/username0x0a/grsyncx)
88

99
## Requirements
1010

11+
### mpv Homebrew Installation (Recommended)
12+
1113
Install the command-line interface mpv with [Homebrew](https://brew.sh).
1214

1315
```bash
1416
brew install mpv
1517
```
1618

17-
Please ensure mpv is installed in one of the following paths:
19+
The mpvx app will automatically check the following paths, which means it supports both Apple Silicon and Intel:
1820

1921
```text
2022
/opt/homebrew/bin/mpv
2123
/usr/local/bin/mpv
2224
```
2325

26+
### Standalone mpv Executable
27+
28+
You can specify the `--mpvx-mpv-binary-path=` argument to indicate the mpv executable you'd like to use. For example:
29+
30+
```bash
31+
/Applications/mpvx.app/Contents/MacOS/mpvx --mpvx-mpv-binary-path=/Applications/mpv.app/Contents/MacOS/mpv
32+
```
33+
2434
## Screenshot
2535

2636
![mpvx-demo.png](https://raw.githubusercontent.com/HackingGate/mpvx/master/assets/mpvx-demo.png)
@@ -35,10 +45,10 @@ I investigated the [source code of IINA](https://github.com/iina/iina) and learn
3545

3646
You can have look at [the PR](https://github.com/typcn/bilibili-mac-client/pull/163/files) I created for [bilibili-mac-client](https://github.com/typcn/bilibili-mac-client) years ago for how to implement both `keyDown` and `keyUp` event.
3747

38-
However, IINA has its own layer of key management, which means it requires a lot of work to implement.
48+
However, IINA has its own layer of key management, which means it requires a lot of work to implement that I don't have time to do.
3949

4050
That is why I created this simpler project that handles media resource opening and launches vanilla mpv from the Homebrew formula.
4151

42-
## Alternatives
52+
## Looking for iOS?
4353

44-
[mpv-nightly-build](https://github.com/jnozsc/mpv-nightly-build): Unoffical mpv nightly build for macOS
54+
[Outplayer](https://outplayer.app/) by Stephen Salerno: video player for iOS powered by mpv

0 commit comments

Comments
 (0)