Skip to content

Small spacing fix

Small spacing fix #444

Workflow file for this run

name: Build macOS app
on:
push:
pull_request:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.13'
- name: brew update and upgrade
run: brew update && brew upgrade
- name: Install brew dependencies
run: |
brew install \
gobject-introspection \
gtk+3 \
pango \
pillow \
sdl2 \
sdl2_image \
jpeg-xl \
ffmpeg \
librsvg \
opusfile \
libopenmpt \
wavpack \
game-music-emu
# This generates 30MB of logs, enable it only when actively debugging something
# - name: "[DEBUG] List all Cellar files"
# run: find /opt/homebrew/Cellar
- name: Install Python dependencies and setup venv
run: |
export CXXFLAGS="-I/opt/homebrew/include"
export LDFLAGS="-L/opt/homebrew/lib"
$(brew --prefix python)/libexec/bin/python -m pip install --break-system-packages --upgrade pip
$(brew --prefix python)/libexec/bin/pip install --break-system-packages \
-r requirements.txt \
build
# Hack until pyinstaller has a release newer than 6.11.1 - https://github.com/pyinstaller/pyinstaller/releases
$(brew --prefix python)/libexec/bin/pip install --break-system-packages https://github.com/pyinstaller/pyinstaller/archive/develop.zip
# $(brew --prefix python)/libexec/bin/python -m venv --system-site-packages .venv
# source .venv/bin/activate
# pyinstaller
# CFLAGS: "-I/opt/homebrew/include"
- name: Build the project using python-build
run: |
$(brew --prefix python)/libexec/bin/python -m compile_translations
$(brew --prefix python)/libexec/bin/python -m build --wheel
# source .venv/bin/activate
- name: Install the project into a venv
run: |
$(brew --prefix python)/libexec/bin/pip install --prefix ".venv" dist/*.whl
# $(brew --prefix python)/libexec/bin/pip install --break-system-packages dist/*.whl
# source .venv/bin/activate
- name: "[DEBUG] List all files"
run: find .
- name: Build macOS app with PyInstaller
run: |
pyinstaller --log-level=DEBUG mac.spec
# source .venv/bin/activate
env:
DYLD_LIBRARY_PATH: "/opt/homebrew/lib"
- name: "[DEBUG] List all files in .app"
run: find "dist/TauonMusicBox.app"
- name: Create DMG
run: |
mkdir -p dist/dmg
APP_NAME="TauonMusicBox"
APP_PATH="dist/${APP_NAME}.app"
DMG_PATH="dist/dmg/${APP_NAME}.dmg"
# Create a .dmg package
hdiutil create -volname "$APP_NAME" -srcfolder "$APP_PATH" -ov -format UDZO "$DMG_PATH"
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: TauonMusicBox-dmg
path: dist/dmg/TauonMusicBox.dmg
# - name: Run Tauon for testing
# run: |
# hdiutil attach dist/dmg/TauonMusicBox.dmg
# /Volumes/TauonMusicBox/TauonMusicBox.app/Contents/MacOS/Tauon\ Music\ Box