21 lines
509 B
Python
21 lines
509 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def _bootstrap_path() -> None:
|
|
root = Path(__file__).resolve().parent.parent
|
|
if getattr(sys, "frozen", False):
|
|
# In onefile, the bundled libs live alongside the exe
|
|
root = Path(sys._MEIPASS) if hasattr(sys, "_MEIPASS") else root # type: ignore[attr-defined]
|
|
if str(root) not in sys.path:
|
|
sys.path.insert(0, str(root))
|
|
|
|
|
|
_bootstrap_path()
|
|
|
|
from ameba_control_panel.app import main # noqa: E402
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|