From 27fb54ed6556e04722fe435af4f9593389308787 Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Mon, 31 Mar 2025 08:34:01 +0800 Subject: [PATCH] build: update spec file to use proper pathex and datas paths (#895) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: add "src" to pathex. Instead of having to pre-install tagstudio, this will have PyInstaller directly build it from source. * build: be more selective about the data files. Since PyInstaller builds from source now there is no need to manually add it. --------- Co-authored-by: Léonard --- tagstudio.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tagstudio.spec b/tagstudio.spec index bf83b61f..e64bdecf 100644 --- a/tagstudio.spec +++ b/tagstudio.spec @@ -23,11 +23,17 @@ elif system == "Darwin": icon = "src/tagstudio/resources/icon.icns" +datafiles = [ + ("src/tagstudio/qt/*.json", "tagstudio/qt"), + ("src/tagstudio/qt/*.qrc", "tagstudio/qt"), + ("src/tagstudio/resources", "tagstudio/resources"), +] + a = Analysis( ["src/tagstudio/main.py"], - pathex=[], + pathex=["src"], binaries=[], - datas=[("src/tagstudio", "tagstudio")], + datas=datafiles, hiddenimports=[], hookspath=[], hooksconfig={},