diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2025-06-25 00:17:14 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2025-06-25 00:17:14 -0500 |
| commit | b4c2bf500d1939d93f1c2146798842d5f98902de (patch) | |
| tree | 9404312ac4cfe2da717bc28fa3cb635b922d27bd /manager.py | |
| parent | 14eb01ff466ac78b2912d325a45786545d495f45 (diff) | |
| download | immich-frame-b4c2bf500d1939d93f1c2146798842d5f98902de.tar.xz immich-frame-b4c2bf500d1939d93f1c2146798842d5f98902de.zip | |
pyinstaller support
Diffstat (limited to 'manager.py')
| -rw-r--r-- | manager.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -3,6 +3,7 @@ import sys import signal import copy from threading import Thread +from pathlib import Path from OpenGL.GLUT import glutLeaveMainLoop @@ -109,6 +110,26 @@ class PixMan: return True + @property + def frozen(self): + # For pyinstaller + # https://api.arcade.academy/en/latest/tutorials/bundling_with_pyinstaller/index.html#handling-data-files + if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): + return True + return False + + @property + def static_dir(self): + if self.frozen: + return Path(sys._MEIPASS) / "static" + return Path("./static/dist") + + @property + def static_public(self): + if self.frozen: + return Path(sys._MEIPASS) / "public" + return Path("./static/public") + from lazycachelist import LazyCachingTextureList from window import PixDisplay |
