корректное определение __file__, использование spec

This commit is contained in:
Dusha01 2026-03-17 01:27:22 +10:00
parent 85f3cb9453
commit 05fae971b5
1 changed files with 3 additions and 2 deletions

View File

@ -5,8 +5,9 @@
import sys import sys
import os import os
SPEC = os.path.dirname(os.path.abspath(__file__)) # PyInstaller передаёт SPEC (путь к spec-файлу); __file__ может быть не определён
ROOT = os.path.dirname(SPEC) SPEC_DIR = os.path.dirname(SPEC)
ROOT = os.path.dirname(SPEC_DIR)
block_cipher = None block_cipher = None