Skip to content

Commit

Permalink
粗暴的 Nuitka 兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzdyl committed Nov 2, 2024
1 parent de6659f commit d5bff35
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions install_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,9 @@ def get_external_data_path():
# 兼容 PyInstaller
if hasattr(sys, '_MEIPASS'):
return sys._MEIPASS # PyInstaller 打包后的临时文件路径
if getattr(sys, 'frozen', False):
executable_dir = os.path.dirname(sys.executable)
print("检测到 Nuitka 打包环境,使用可执行文件目录:", executable_dir)
return executable_dir # Nuitka 打包时的可执行文件目录
# 兼容 Nuitka
if os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), "LiteLoaderQQNT.zip")):
return os.path.dirname(os.path.abspath(__file__))
return None


Expand Down

0 comments on commit d5bff35

Please sign in to comment.