mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-18 07:23:03 +08:00
chore(*): 重构项目文件目录结构
- 将 src/gui 目录下的 Qt 资源文件移动到 src/gui/resources 目录下 - 将 src/gui 目录下的 Qt UI 设计文件移动到 src/gui/resources/ui 目录下 - 将 src/gui/icons 目录下的图标文件移动到 src/gui/resources/icons 目录下 - 将 src/gui/translators 目录下移动到 src/gui/resources/translators 目录下 - 将 src/gui/configs 目录移动到 templates 目录下 - 将 document, driver, model 目录重命名为 manuals, drivers, models - 由于上述目录移动和重命名,相应的更改了代码和批处理脚本中的文件路径
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
cd src/gui/resources
|
||||
|
||||
echo [AutoLibrary compile] 检查翻译文件...
|
||||
if exist translators (
|
||||
cd translators
|
||||
set ts_count=0
|
||||
for %%f in (*.ts) do set /a ts_count+=1
|
||||
|
||||
if !ts_count! gtr 0 (
|
||||
echo [AutoLibrary compile] 找到 !ts_count! 个 .ts 文件,开始编译翻译文件...
|
||||
for %%f in (*.ts) do (
|
||||
set "qm_filename=%%~nf.qm"
|
||||
echo [AutoLibrary compile] 正在编译翻译文件: "%%f" -> "!qm_filename!"
|
||||
|
||||
pyside6-lrelease "%%f"
|
||||
if !errorlevel! equ 0 (
|
||||
echo [AutoLibrary compile] 翻译文件 "%%f" 编译成功,输出文件: "!qm_filename!"
|
||||
) else (
|
||||
echo [AutoLibrary compile] 翻译文件 "%%f" 编译失败
|
||||
)
|
||||
)
|
||||
) else (
|
||||
echo [AutoLibrary compile] 未找到任何 .ts 翻译文件
|
||||
)
|
||||
cd ..
|
||||
) else (
|
||||
echo [AutoLibrary compile] 未找到 translators 目录
|
||||
)
|
||||
echo.
|
||||
|
||||
set count=0
|
||||
for %%f in (*.qrc) do set /a count+=1
|
||||
|
||||
if %count% equ 0 (
|
||||
echo [AutoLibrary compile] 错误: 未找到任何 .qrc 文件
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [AutoLibrary compile] 找到 %count% 个 .qrc 文件,开始编译...
|
||||
echo.
|
||||
|
||||
for %%f in (*.qrc) do (
|
||||
set "filename=%%~nf"
|
||||
set "output_file=!filename!.py"
|
||||
echo [AutoLibrary compile] 正在编译: "%%f" -> "!output_file!"
|
||||
|
||||
pyside6-rcc "%%f" -o "!output_file!"
|
||||
if !errorlevel! equ 0 (
|
||||
echo [AutoLibrary compile] 文件 "%%f" 编译成功,输出文件: "!output_file!"
|
||||
) else (
|
||||
echo [AutoLibrary compile] 文件 "%%f" 编译失败
|
||||
)
|
||||
)
|
||||
|
||||
echo [AutoLibrary compile] 所有操作完成。
|
||||
Reference in New Issue
Block a user