66 lines
2.5 KiB
Python
66 lines
2.5 KiB
Python
import os
|
|
from cx_Freeze import setup, Executable
|
|
|
|
# 필요한 파일 경로 설정
|
|
base_dir = os.path.dirname(__file__)
|
|
browsers_dir = os.path.join(base_dir, 'browsers')
|
|
chromium_dir = os.path.join(browsers_dir, 'chromium-1112')
|
|
whale_dir = os.path.join(browsers_dir, 'whale')
|
|
extensions_dir = os.path.join(browsers_dir, 'extensions')
|
|
user_data_dir = os.path.join(browsers_dir, 'user_data')
|
|
|
|
# 포함할 파일 설정
|
|
include_files = [
|
|
os.path.abspath('config.ini'),
|
|
os.path.abspath('leensoo1nt.json'),
|
|
os.path.abspath('prompt.json'),
|
|
os.path.abspath('userDB.db'),
|
|
(os.path.abspath('src/initialDB.db'), 'src/initialDB.db'),
|
|
(os.path.abspath('src/Percenty_SS_Code.json'), 'src/Percenty_SS_Code.json'),
|
|
(os.path.abspath('browsers/chromium-1112'), 'browsers/chromium-1112'),
|
|
(os.path.abspath('browsers/whale'), 'browsers/whale'),
|
|
(os.path.abspath('browsers/extensions'), 'browsers/extensions'),
|
|
(os.path.abspath('browsers/user_data'), 'browsers/user_data'),
|
|
]
|
|
|
|
# 빌드 옵션 정의
|
|
build_exe_options = {
|
|
'packages': [
|
|
'ctypes', 'asyncio', 'os', 're', 'time', 'math', 'json', 'logging', 'shutil', 'random',
|
|
'base64', 'subprocess', 'configparser', 'pyperclip', 'numpy', 'cv2', 'requests',
|
|
'win32clipboard', 'win32gui', 'win32con', 'win32process', 'PIL', 'bs4', 'pyautogui',
|
|
'pyvda', 'sqlalchemy', 'sqlalchemy.orm', 'sqlalchemy.exc', 'collections', 'pandas'
|
|
],
|
|
'includes': [
|
|
'PySide6.QtWidgets', 'PySide6.QtCore', 'PySide6.QtGui',
|
|
'whale_translator', 'gui', 'logger_module', 'toggleSwitch',
|
|
'browser_control', 'clipboardImageManager', 'vertexAI', 'option',
|
|
'price', 'title', 'locatorManager', 'src.cmb_diag', 'src.DatabaseManager',
|
|
'vertexai.generative_models'
|
|
],
|
|
'include_files': include_files,
|
|
'excludes': [
|
|
'tkinter', 'PyQt4', 'PyQt6', 'AppKit', 'Foundation', 'IPython', 'OpenSSL', 'asyncpg',
|
|
'curses', 'pydantic', 'test', 'unittest', 'matplotlib', 'tensorflow', 'torch', 'scipy'
|
|
],
|
|
'silent': False # 디버그 메시지 활성화
|
|
}
|
|
|
|
# 실행 파일 정의
|
|
executables = [
|
|
Executable(
|
|
script='main.py', # 메인 파일
|
|
target_name='MyApp.exe', # 생성될 실행 파일 이름
|
|
base='Win32GUI' # GUI 애플리케이션의 경우 사용
|
|
)
|
|
]
|
|
|
|
# setup 함수
|
|
setup(
|
|
name="MyApplication",
|
|
version="1.0",
|
|
description="My Python application",
|
|
options={'build_exe': build_exe_options},
|
|
executables=executables
|
|
)
|