-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
22 lines (19 loc) · 698 Bytes
/
Copy pathmain.py
File metadata and controls
22 lines (19 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import sys
import multiprocessing
from app.gui import AppGUI
def main():
"""
アプリケーションのエントリーポイント。
"""
# PyInstaller でビルドされたバイナリでのマルチプロセス対応
multiprocessing.freeze_support()
try:
app = AppGUI()
app.mainloop()
except Exception as e:
# 起動失敗時にエラーを表示(exe化してコンソールがない場合でもダイアログが出るように)
import tkinter.messagebox as mb
mb.showerror("Startup Error", f"Failed to start the application:\n\n{e}")
sys.exit(1)
if __name__ == "__main__":
main()