65 lines
2.2 KiB
Python
65 lines
2.2 KiB
Python
# setup.py
|
|
import sys, 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')
|
|
extensions_dir = os.path.join(browsers_dir, 'extensions')
|
|
user_data_dir = os.path.join(browsers_dir, 'user_data')
|
|
|
|
# 필요한 파일 정의
|
|
include_files = [
|
|
'config.ini',
|
|
'leensoo1nt.json',
|
|
'prompt.json',
|
|
'userDB.db',
|
|
('src/initialDB.db', 'src/initialDB.db'),
|
|
('src/Percenty_SS_Code.json', 'src/Percenty_SS_Code.json'),
|
|
(chromium_dir, 'browsers/chromium-1112'), # Chromium 브라우저 실행 파일
|
|
(extensions_dir, 'browsers/extensions'), # 확장 프로그램 폴더
|
|
(user_data_dir, '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', 'PyQt5.QtCore',
|
|
'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', 'ssl', 'test', 'unittest', 'matplotlib', 'tensorflow', 'torch', 'scipy'
|
|
]
|
|
}
|
|
|
|
# 애플리케이션 메인 파일 및 설정
|
|
base = None
|
|
if sys.platform == 'win32':
|
|
base = 'Win32GUI'
|
|
|
|
executables = [
|
|
Executable('main.py', base=base, target_name='AutoPercenty2.exe')
|
|
]
|
|
|
|
# Setup 설정
|
|
setup(
|
|
name='AutoPercenty2',
|
|
version='1.1',
|
|
description='자동화도구',
|
|
options={'build_exe': build_exe_options},
|
|
executables=executables
|
|
)
|