change_code/setup_python_tool.bat

48 lines
1.5 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
echo ========================================
echo UFT30 ChangeCode - Python 工具初始化
echo ========================================
echo.
REM 设置目录
set "PROJECT_DIR=%~dp0"
set "PYTHON_SRC_DIR=F:\04.python\04.python\uf2touft3"
set "PYTHON_DEST_DIR=%PROJECT_DIR%3rd\Python\uf2touft3"
set "BIN_DEST_DIR=%PYTHON_DEST_DIR%\bin"
echo [步骤 1/4] 创建目录结构...
if not exist "%PYTHON_DEST_DIR%" mkdir "%PYTHON_DEST_DIR%"
if not exist "%PYTHON_DEST_DIR%\src" mkdir "%PYTHON_DEST_DIR%\src"
if not exist "%BIN_DEST_DIR%" mkdir "%BIN_DEST_DIR%"
echo ✓ 目录结构已创建
echo.
echo [步骤 2/4] 复制 Python 源代码...
xcopy /E /I /Y "%PYTHON_SRC_DIR%" "%PYTHON_DEST_DIR%\src\" >nul
echo ✓ 源代码已复制
echo.
echo [步骤 3/4] 复制配置文件...
if exist "%PYTHON_SRC_DIR%\config.ini" (
copy /Y "%PYTHON_SRC_DIR%\config.ini" "%BIN_DEST_DIR%\" >nul
echo ✓ 配置文件已复制到 bin 目录
)
echo.
echo [步骤 4/4] 复制临时可执行文件(占位符)...
REM 这里可以先放一个简单的说明文件
echo 请运行 build_package.bat 来生成 uf2touft3_converter.exe > "%BIN_DEST_DIR%\README.txt"
echo.
echo ========================================
echo ✓ 初始化完成!
echo.
echo 下一步:
echo 1. 运行 3rd\Python\uf2touft3\build_package.bat
echo 来打包 Python 项目
echo 2. 编译 Qt 项目Python 工具会自动
echo 拷贝到 bin 目录
echo ========================================
echo.
pause