34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
import sys
|
|
import os
|
|
from cx_Freeze import setup, Executable
|
|
|
|
# Dependencies are automatically detected, but it might need fine tuning.
|
|
build_exe_options = {
|
|
"packages": ["os", "sys", "requests", "aiohttp", "certifi", "idna", "urllib3", "PySide6"],
|
|
"excludes": ["tkinter", "unittest", "email", "html", "http", "xml"],
|
|
"include_files": [
|
|
("assets", "assets"),
|
|
("config.ini", "config.ini"),
|
|
("ARCHITECTURE.md", "ARCHITECTURE.md"),
|
|
("database", "database"), # Ensure database folder structure exists
|
|
],
|
|
"include_msvcr": True,
|
|
}
|
|
|
|
# GUI applications require a different base on Windows (the default is for a
|
|
# console application).
|
|
base = None
|
|
if sys.platform == "win32":
|
|
base = "Win32GUI"
|
|
|
|
setup(
|
|
name="HandoverSystem",
|
|
version="1.0.0",
|
|
description="전동차 업무 인수인계 및 고장관리 프로그램",
|
|
options={"build_exe": build_exe_options},
|
|
executables=[
|
|
Executable("main.py", base=base, target_name="HandoverSystem.exe", icon="assets/icons/app_icon.ico" if os.path.exists("assets/icons/app_icon.ico") else None),
|
|
Executable("updater.py", base=base, target_name="updater.exe") # Pack updater together
|
|
],
|
|
)
|