-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (52 loc) · 2.16 KB
/
macos_intel_bundle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Package Persepolis DM for macos intel
on: workflow_dispatch
jobs:
bundle-macos:
runs-on: macos-latest
steps:
- name: Get build assets
uses: actions/checkout@v4
with:
repository: persepolisdm/mac-package-build
path: mac-package-build
- name: Install requirements
run: pip install PySide6 requests yt_dlp pyinstaller urllib3 pysocks
- name: Install with Brew
run: brew install create-dmg unzip tree
- name: Build
run: |
cd mac-package-build
git clone https://github.com/persepolisdm/persepolis.git
find persepolis/persepolis -type f -exec perl -i -pe 's/persepolis.scripts/scripts/g' '{}' \;
find persepolis/persepolis -type f -exec perl -i -pe 's/persepolis.gui/gui/g' '{}' \;
pyinstaller app.spec
ls -ltrh
- name: Download ffmpeg
run: |
cd mac-package-build
wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/ffmpeg/zip -O ffmpeg.zip && unzip -o ffmpeg.zip && rm ffmpeg.zip
ls -ltrh
- name: Add prerequisites
run: |
cd mac-package-build
ls -ltrh
ls -ltrh dist/
cp ffmpeg 'dist/Persepolis Download Manager.app/Contents/MacOS/'
mv 'dist/Persepolis Download Manager.app' .
- name: Build DMG
run: |
cd mac-package-build
mkdir -p dist/dmg
mv 'Persepolis Download Manager.app' dist/dmg
test -f "dist/Persepolis Download Manager.dmg" && rm "dist/Persepolis Download Manager.dmg"
create-dmg --volname "Persepolis Download Manager" --volicon "icon.icns" --window-pos 200 120 --window-size 600 300 --icon-size 100 --icon "Persepolis Download Manager.app" 120 120 --hide-extension "Persepolis Download Manager.app" --app-drop-link 425 120 "Persepolis Download Manager.dmg" "dist/dmg/"
ls -ltrh
- name: Test
run: |
ls -ltrh
tree
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: Persepolis Download Manager.dmg
path: ./mac-package-build/Persepolis Download Manager.dmg