forked from Taiko2k/Tauon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Windows CI and fix up Linux and macOS (Taiko2k#1354)
* Add Windows CI * Try fixing Windows spec to work in CI too * Windows.spec: Prefer temp msys * Use pathlib * Install zip * docs + rename from linux to windows * pack assets, locale, theme, templates and sdl2dll * run.sh: Switch to using spec file for win_build * Fix up changelog * Fix up changelog some more * add missing comma * Fix up exception logging for imports * Use pathlib for pyinstaller * Fix debug message * Fix pychromecast * Try fixing a resource leak in Phazor * Migrate to lynxtray * Fix up deps and hiddenimports * lynxtray does not need to be in hiddenimports * Stop removing _internal from path on Windows pyinstaller builds * Sort array * Document picard being commented out better * Fix jxlpy on macOS * Also export libs on macOS * run.sh: Compile both phazor and phazor-pw when compiling phazor-pw * Try adding gir1.2-rsvg-2.0 for Linux * Try adding libayatana-appindicator3-dev * try installing SDL2 for Linux - should not be needed but see if it fixes the GTK warnings (doubt) * Try adding kde-config-gtk-style to get rid of GTK warnings * Linux: Try adding GTK 3.0 modules to get rid of warns * Fix commas * Comment out the GTK modules since they don't work anyway at the moment, from the spec file only * Try shipping Plasma GTK libs to get rid of warns * Fix up .so path * Crash if user attempts to load new DB on old Tauon (starting with 7.9.0 and onwards) * Add a helpful message for resolving the error
- Loading branch information
Showing
16 changed files
with
221 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Build Windows (MINGW64) app | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
# TODO(Martin): This is duped from the file in extra, install from said file somehow instead | ||
- name: Set up MSYS2 MinGW-W64 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
update: true | ||
install: >- | ||
base-devel | ||
ca-certificates | ||
cmake | ||
ninja | ||
zip | ||
mingw-w64-x86_64-flac | ||
mingw-w64-x86_64-gcc | ||
mingw-w64-x86_64-gobject-introspection | ||
mingw-w64-x86_64-gtk3 | ||
mingw-w64-x86_64-libgme | ||
mingw-w64-x86_64-libopenmpt | ||
mingw-w64-x86_64-libsamplerate | ||
mingw-w64-x86_64-opusfile | ||
mingw-w64-x86_64-pkgconf | ||
mingw-w64-x86_64-python3 | ||
mingw-w64-x86_64-python3-gobject | ||
mingw-w64-x86_64-python3-pillow | ||
mingw-w64-x86_64-python3-pip | ||
mingw-w64-x86_64-python-websocket-client | ||
mingw-w64-x86_64-python-zeroconf | ||
mingw-w64-x86_64-rust | ||
mingw-w64-x86_64-SDL2 | ||
mingw-w64-x86_64-SDL2_image | ||
mingw-w64-x86_64-wavpack | ||
mingw-w64-x86_64-zlib | ||
- name: Update CA trust and hack opusfile | ||
shell: msys2 {0} | ||
run: | | ||
update-ca-trust | ||
# https://github.com/xiph/opusfile/pull/47 | ||
sed -i 's,<opus_multistream.h>,<opus/opus_multistream.h>,' /mingw64/include/opus/opusfile.h | ||
- name: Install Python dependencies and setup venv | ||
shell: msys2 {0} | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
export CFLAGS="-I/mingw64/include" | ||
pip install \ | ||
-r requirements.txt \ | ||
build \ | ||
pyinstaller | ||
- name: Build the project using python-build | ||
shell: msys2 {0} | ||
run: | | ||
source .venv/bin/activate | ||
python -m compile_translations | ||
python -m build --wheel | ||
- name: Install the project into a venv | ||
shell: msys2 {0} | ||
run: | | ||
source .venv/bin/activate | ||
pip install --prefix ".venv" dist/*.whl | ||
- name: "[DEBUG] List all files" | ||
shell: msys2 {0} | ||
run: find . | ||
|
||
- name: Build Windows App with PyInstaller | ||
shell: msys2 {0} | ||
run: | | ||
source .venv/bin/activate | ||
pyinstaller --log-level=DEBUG windows.spec | ||
- name: Create ZIP | ||
shell: msys2 {0} | ||
run: | | ||
mkdir -p dist/zip | ||
APP_NAME="TauonMusicBox" | ||
APP_PATH="dist/${APP_NAME}" | ||
ZIP_PATH="dist/zip/${APP_NAME}.zip" | ||
zip -r "${ZIP_PATH}" "${APP_PATH}" | ||
- name: Upload ZIP artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: TauonMusicBox-windows | ||
path: dist/zip/TauonMusicBox.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ PlexAPI | |
PyGObject | ||
pylast>=3.1.0 | ||
PySDL2 | ||
pysdl2-dll | ||
requests | ||
Send2Trash | ||
unidecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ Pillow | |
PlexAPI | ||
PyGObject | ||
pylast>=3.1.0 | ||
pysdl2-dll | ||
PySDL2 | ||
pysdl2-dll | ||
requests | ||
Send2Trash | ||
unidecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
beautifulsoup4 | ||
comtypes # Windows dep | ||
infi.systray | ||
keyboard # Windows dep | ||
comtypes | ||
lynxtray | ||
keyboard | ||
musicbrainzngs | ||
mutagen | ||
natsort # optdep | ||
opencc-python-reimplemented # Windows version of openCC optdep | ||
Pillow | ||
PlexAPI | ||
PyGObject | ||
pyinstaller | ||
pylast>=3.1.0 | ||
pypresence # optdep | ||
PySDL2 | ||
pysdl2-dll | ||
requests | ||
Send2Trash | ||
tekore # optdep | ||
unidecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
beautifulsoup4 | ||
musicbrainzngs | ||
mutagen | ||
Pillow | ||
PlexAPI | ||
PyGObject | ||
pylast>=3.1.0 | ||
PySDL2 | ||
pysdl2-dll # Don't rely on system SDL2 https://github.com/py-sdl/py-sdl2#requirements | ||
requests | ||
Send2Trash | ||
unidecode | ||
dbus-python; sys_platform == 'linux' | ||
pysdl2-dll # Don't rely on system SDL2 https://github.com/py-sdl/py-sdl2#requirements | ||
comtypes; sys_platform == 'win32' | ||
infi.systray; sys_platform == 'win32' | ||
dbus-python; sys_platform == 'linux' | ||
jxlpy | ||
keyboard; sys_platform == 'win32' | ||
Pillow | ||
opencc; sys_platform != 'win32' # OPTDEP | ||
opencc-python-reimplemented; sys_platform == 'win32' # OPTDEP | ||
#pyinstaller # ; sys_platform != 'linux' # for macOS at least | ||
pypresence # optdep | ||
tekore # optdep, | ||
natsort # optdep | ||
jxlpy; sys_platform != 'darwin' # macOS hates it - fails to find jxl/types.h - https://github.com/olokelo/jxlpy/issues/25#issuecomment-2547928563 | ||
lynxtray; sys_platform == 'win32' | ||
opencc; sys_platform != 'win32' # optional | ||
opencc-python-reimplemented; sys_platform == 'win32' # optional | ||
pypresence # optional | ||
tekore # optional | ||
natsort # optional | ||
PyChromecast # optional | ||
setproctitle # optional | ||
tidalapi # optional | ||
colored_traceback # very optional | ||
#pyinstaller | ||
#librespot - https://github.com/kokarare1212/librespot-python/pull/286 | ||
#picard - picard 2.12.3 requires charset-normalizer~=3.3.2, but you have charset-normalizer 3.4.0 which is incompatible. | ||
PyChromecast # OPTDEP | ||
setproctitle # OPTDEP | ||
tidalapi # OPTDEP | ||
colored_traceback # very opt | ||
zeroconf # pychromecast dependency, TODO(Martin): This is a test, remove me | ||
#picard - Waiting for release newer than 2.12.3 which has a fix for this: picard | ||
# 2.12.3 requires charset-normalizer~=3.3.2, but you have charset-normalizer 3.4.0 which is incompatible. | ||
# https://github.com/metabrainz/picard/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.