diff --git a/factory_sliceing/README.md b/factory_sliceing/README.md new file mode 100644 index 0000000..d61bba4 --- /dev/null +++ b/factory_sliceing/README.md @@ -0,0 +1,47 @@ +# Factory Sliceing 项目 + +## 安装依赖 + +在运行项目之前,需要先安装依赖: + +```bash +# 使用 pip 安装 +pip install -r requirements.txt + +# 或者使用 pip3 +pip3 install -r requirements.txt + +# 或者使用 python -m pip +python -m pip install -r requirements.txt +``` + +### 主要依赖 + +- `toml` - 配置文件解析(必需) +- `redis` - Redis 客户端 +- `oss2` - 阿里云 OSS 客户端 +- `requests` - HTTP 请求库 +- `uiautomation` - UI 自动化(Windows) +- `pywin32` - Windows API(仅 Windows 系统需要) +- `minio` - MinIO 客户端(如果使用) + +## 快速开始 + +1. **安装依赖** + ```bash + pip install -r requirements.txt + ``` + +2. **配置配置文件** + - 复制 `config.example.toml` 为 `config.toml` + - 根据实际情况修改配置 + +3. **运行程序** + ```bash + python main.py [work_dir] + ``` + +## 打包为 exe + +详见 [README_BUILD.md](README_BUILD.md) + diff --git a/factory_sliceing/build_exe.py b/factory_sliceing/build_exe.py index e632c65..58763a1 100644 --- a/factory_sliceing/build_exe.py +++ b/factory_sliceing/build_exe.py @@ -40,6 +40,10 @@ def build_exe(): '--hidden-import=download_batch_data.main_download_batch_data_and_trans', '--hidden-import=auto_sliceing_operate.utils', '--hidden-import=download_batch_data.utils', + '--hidden-import=utils.config', + + # 配置文件解析模块 + '--hidden-import=toml', # UI 自动化相关模块 '--hidden-import=uiautomation', diff --git a/factory_sliceing/dist/factory_sliceing.exe b/factory_sliceing/dist/factory_sliceing.exe deleted file mode 100644 index c4ce213..0000000 Binary files a/factory_sliceing/dist/factory_sliceing.exe and /dev/null differ diff --git a/factory_sliceing/requirements.txt b/factory_sliceing/requirements.txt new file mode 100644 index 0000000..ec81314 --- /dev/null +++ b/factory_sliceing/requirements.txt @@ -0,0 +1,26 @@ +# Factory Sliceing 项目依赖 + +# 配置文件解析 +toml>=0.10.2 + +# Redis 客户端 +redis>=4.0.0 + +# OSS 客户端 +oss2>=2.17.0 + +# HTTP 请求 +requests>=2.28.0 + +# UI 自动化(Windows) +uiautomation>=2.0.0 + +# Windows API(Windows 系统需要) +pywin32>=300; sys_platform == 'win32' + +# 打包工具(可选,仅打包时需要) +pyinstaller>=5.0.0 + +# MinIO 客户端(如果使用) +minio>=7.0.0 +