Skip to content

Package Persepolis DM for macos intel #6

Package Persepolis DM for macos intel

Package Persepolis DM for macos intel #6

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 wget create-dmg unzip
- name: Download ffmpeg
run: wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/ffmpeg/zip -O ffmpeg.zip && unzip -o ffmpeg.zip && rm ffmpeg.zip
- 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
- name: Add Prerequisites
run: |
cp ffmpeg 'dist/Persepolis Download Manager.app/Contents/MacOS/'
rm -rf 'Persepolis Download Manager.app'
mv 'dist/Persepolis Download Manager.app' .
- name: Build DMG
run: |
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/"