From 6f96233818b5d2e3dbbecdd5a61324a17a41a274 Mon Sep 17 00:00:00 2001 From: poly000 <34085039+poly000@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:16:58 +0800 Subject: [PATCH] package: Win32 copy version info (#754) --- .github/workflows/win-release.yml | 1 + .metadata.yml | 9 +++++++++ Makefile | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 .metadata.yml diff --git a/.github/workflows/win-release.yml b/.github/workflows/win-release.yml index 33e0a28ee3..136ddfd9a8 100644 --- a/.github/workflows/win-release.yml +++ b/.github/workflows/win-release.yml @@ -19,6 +19,7 @@ jobs: python -m pip install --upgrade pip pip install pyqt5 pip install pyinstaller + pip install pyinstaller-versionfile pip install -e .[win32,battery] - name: Download mpv-1.dll run: | diff --git a/.metadata.yml b/.metadata.yml new file mode 100644 index 0000000000..8ba977dd90 --- /dev/null +++ b/.metadata.yml @@ -0,0 +1,9 @@ +CompanyName: FeelUOwn +FileDescription: FeelUOwn +InternalName: FeelUOwn +LegalCopyright: © FeelUOwn. All rights reserved. +OriginalFilename: FeelUOwn.exe +ProductName: FeelUOwn +Translation: + - langID: 2052 + charsetID: 1200 diff --git a/Makefile b/Makefile index 55a44623a3..8a1e656d2d 100644 --- a/Makefile +++ b/Makefile @@ -60,9 +60,16 @@ integration_test: 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