From 020152c3d5d5dbe0d4068ba9c2c2d577f50c22d6 Mon Sep 17 00:00:00 2001 From: pony <1356137040@qq.com> Date: Mon, 15 Dec 2025 11:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=AD=E6=96=87=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init_backend.bat | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/init_backend.bat b/init_backend.bat index 8f6faed..eff5f7a 100644 --- a/init_backend.bat +++ b/init_backend.bat @@ -1,62 +1,62 @@ @echo off chcp 65001 >nul echo ================================ -echo Hertz Django 项目初始化脚本 +echo Hertz Django Project Initialization Script echo ================================ -echo 检查 Python 环境... +echo Checking Python environment... python --version if %errorlevel% neq 0 ( - echo 错误: 未检测到 Python,请先安装 Python! + echo Error: Python not detected, please install Python first! pause exit /b 1 ) -echo 配置 pip 全局镜像源... +echo Configuring pip global mirror... pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple -echo 创建虚拟环境... +echo Creating virtual environment... python -m venv venv if %errorlevel% neq 0 ( - echo 错误: 创建虚拟环境失败! + echo Error: Failed to create virtual environment! pause exit /b 1 ) -echo 激活虚拟环境... +echo Activating virtual environment... call venv\Scripts\activate if %errorlevel% neq 0 ( - echo 错误: 激活虚拟环境失败! + echo Error: Failed to activate virtual environment! pause exit /b 1 ) -echo 升级 pip... +echo Upgrading pip... python -m pip install --upgrade pip if %errorlevel% neq 0 ( - echo 错误: 升级 pip 失败! + echo Error: Failed to upgrade pip! pause exit /b 1 ) -echo 安装 Python 第三方依赖... +echo Installing Python third-party dependencies... pip install -r requirements.txt if %errorlevel% neq 0 ( - echo 错误: 安装 requirements.txt 失败! + echo Error: Failed to install requirements.txt! pause exit /b 1 ) -echo 安装 Hertz 官方依赖... +echo Installing Hertz official dependencies... pip install -r hertz.txt -i https://hertz:hertz@hzpypi.hzsystems.cn/simple/ if %errorlevel% neq 0 ( - echo 错误: 安装 hertz.txt 失败! 请先激活机器码。 + echo Error: Failed to install hertz.txt! Please activate the machine code first. pause exit /b 1 ) echo ================================ -echo 项目初始化完成! +echo Project initialization completed! echo ================================ -echo 请运行 start_project.bat 启动项目 +echo Please run start_project.bat to start the project pause \ No newline at end of file