mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-11 16:13:51 +03:00
The static files need to be inside the module to be installed correctly as part of the module.
31 lines
715 B
Python
31 lines
715 B
Python
import os
|
|
from PyInstaller.building.build_main import Analysis
|
|
from PyInstaller.building.api import EXE, PYZ
|
|
from PyInstaller.utils.hooks import copy_metadata
|
|
|
|
a = Analysis(
|
|
['main.py'],
|
|
datas=[
|
|
('decky_loader/locales', 'decky_loader/locales'),
|
|
('decky_loader/static', 'decky_loader/static'),
|
|
] + copy_metadata('decky_loader'),
|
|
hiddenimports=['logging.handlers', 'sqlite3', 'decky_plugin', 'decky'],
|
|
)
|
|
pyz = PYZ(a.pure, a.zipped_data)
|
|
|
|
noconsole = bool(os.getenv('DECKY_NOCONSOLE'))
|
|
name = "PluginLoader"
|
|
if noconsole:
|
|
name += "_noconsole"
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
name=name,
|
|
upx=True,
|
|
console=not noconsole,
|
|
)
|