:: target
set targetFileName=Public_2
set targetPath=./
:: source
set sourceFileName=Public_1
@echo ui run task
@echo -----------------------------------------------------------------------------
copy /y "%sourceFileName%form.ui" "%targetPath%%targetFileName%form.ui"
@echo off
setlocal EnableDelayedExpansion
@echo -----------------------------------------------------------------------------
@echo spec run task
@echo -----------------------------------------------------------------------------
for /f "delims=" %%i in (%sourceFileName%.spec) do (
set var=%%i
set var=!var:%sourceFileName%=%targetFileName%!
echo !var!>>%targetPath%%targetFileName%.spec
)
@echo -----------------------------------------------------------------------------
@echo form run task
@echo -----------------------------------------------------------------------------
python -m PyQt5.uic.pyuic "%targetFileName%form.ui" -o "%targetPath%%targetFileName%form.py"
@echo -----------------------------------------------------------------------------
@echo py run task
@echo -----------------------------------------------------------------------------
for /f "delims=" %%i in (%sourceFileName%.py) do (
set var=%%i
set var=!var:%sourceFileName%form=%targetFileName%form!
echo !var!>>%targetPath%%targetFileName%.py
)
@echo -----------------------------------------------------------------------------
@echo ui run bat task
@echo -----------------------------------------------------------------------------
for /f "delims=" %%i in (%sourceFileName%RunUi.bat) do (
set var=%%i
set var=!var:%sourceFileName%=%targetFileName%!
echo !var!>>%targetPath%%targetFileName%RunUi.bat
)
@echo --------okay---------
=====================
set targetPath=./
:: source
set sourceFileName=Public_1
@echo -----------------------------------------------------------------------------
@echo form run task
@echo -----------------------------------------------------------------------------
python -m PyQt5.uic.pyuic %sourceFileName%form.ui -o %targetPath%%sourceFileName%form.py