summaryrefslogtreecommitdiff
path: root/backend/pyinstaller.spec
diff options
context:
space:
mode:
Diffstat (limited to 'backend/pyinstaller.spec')
-rw-r--r--backend/pyinstaller.spec30
1 files changed, 30 insertions, 0 deletions
diff --git a/backend/pyinstaller.spec b/backend/pyinstaller.spec
new file mode 100644
index 00000000..67bdc26e
--- /dev/null
+++ b/backend/pyinstaller.spec
@@ -0,0 +1,30 @@
+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=[
+ ('locales', 'locales'),
+ ('static', 'static'),
+ ] + copy_metadata('decky_loader'),
+ hiddenimports=['logging.handlers', 'sqlite3', 'decky_plugin'],
+)
+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,
+)