fix build process: use absolute paths for icon folder in PyInstaller configuration to prevent runtime errors

This commit is contained in:
Ross
2025-11-24 12:11:12 +00:00
parent 6db2a8fcf3
commit fa469a79fc
2 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -1,11 +1,16 @@
# -*- mode: python ; coding: utf-8 -*-
import os
from pathlib import Path
here = Path(__file__).resolve().parent
project_root = here
a = Analysis(
['nice.py'],
pathex=[],
pathex=[str(project_root)],
binaries=[],
datas=[('icon', 'icon'), ('icon/icon1.png', 'icon')],
datas=[(str(project_root / 'icon'), 'icon'), (str(project_root / 'icon' / 'icon1.png'), 'icon')],
hiddenimports=['bs4', 'requests', 'nicegui', 'pynng'],
hookspath=[],
hooksconfig={},