From 6a8cf26f6ab4c3d0f860c8e2a07cd5da71c05324 Mon Sep 17 00:00:00 2001 From: poly000 <34085039+poly000@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:00:45 +0800 Subject: [PATCH 1/2] fix(ci): install `pyinstaller-versionfile` (#757) --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8a1e656d2d..71629a2132 100644 --- a/Makefile +++ b/Makefile @@ -61,26 +61,33 @@ test: lint unittest BUNDLE_FLAGS= -target: ; - ifeq ($(OS),Windows_NT) BUNDLE_FLAGS += --name FeelUOwn BUNDLE_FLAGS += --icon feeluown/gui/assets/icons/feeluown.ico BUNDLE_FLAGS += --version-file version_file.txt - target: - create-version-file .metadata.yml --version \ - $(shell python -c 'print(__import__("feeluown").__version__, end="")' | tr -c '[:digit:]' '.') else # macOS: since apfs is not case-sensitive, we use FeelUOwnX instead of FeelUOwn BUNDLE_FLAGS += --name FeelUOwnX --osx-bundle-identifier org.feeluown.FeelUOwnX BUNDLE_FLAGS += --icon feeluown/gui/assets/icons/feeluown.icns endif + # Please install pyinstaller manually. + +ifeq ($(OS),Windows_NT) bundle: + create-version-file .metadata.yml --version \ + $(shell python -c 'print(__import__("feeluown").__version__, end="")' | tr -c '[:digit:]' '.') pyinstaller -w feeluown/pyinstaller/main.py \ ${BUNDLE_FLAGS} \ -w \ --noconfirm +else +bundle: + pyinstaller -w feeluown/pyinstaller/main.py \ + ${BUNDLE_FLAGS} \ + -w \ + --noconfirm +endif clean: clean_py clean_emacs From 8915c7462a3425e072e3879fbfd9f053be411bf1 Mon Sep 17 00:00:00 2001 From: Shaowen Yin Date: Fri, 12 Jan 2024 11:03:31 +0800 Subject: [PATCH 2/2] distribution: fix #748 (#749) (#759) Co-authored-by: poly000 <34085039+poly000@users.noreply.github.com> --- pyinstaller_hooks/hook-feeluown.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyinstaller_hooks/hook-feeluown.py b/pyinstaller_hooks/hook-feeluown.py index 2d50cc49e2..a684753a18 100644 --- a/pyinstaller_hooks/hook-feeluown.py +++ b/pyinstaller_hooks/hook-feeluown.py @@ -10,10 +10,14 @@ '**/*.svg', '**/*.ico', '**/*.icns', - '**/*.colors' + '**/*.colors', + '**/*.mo', ] datas, hiddenimports = collect_entry_point('fuo.plugins_v1') +if 'fuo_ytmusic' in hiddenimports: + hiddenimports.append('ytmusicapi') + # aionowplaying is conditionally imported. if os.name == 'nt': hiddenimports.append('aionowplaying')