之前这样写- ::处理锁屏
- if exist %1\lockscreen\advance (xcopy /e /i /y %1\lockscreen\advance %~dp0advance
- copy %1\lockscreen\advance\manifest.xml %~dp0
- cd /d "%~dp0"
- PowerShell -exec ByPass "&'%~dp01.ps1'" "%~f1\lockscreen\advance"
- ::call 1.bat
- move %~dp0\1.xml %1\lockscreen\advance\manifest.xml
- )>nul
- ::处理时钟
- if exist %1\clock_2x4 (xcopy /e /i /y %1\clock_2x4 %~dp0clock_2x4
- copy %1\clock_2x4\manifest.xml %~dp0
- cd /d "%~dp0"
- PowerShell -exec ByPass "&'%~dp01.ps1'" "%~f1\clock_2x4"
- move %~dp0\1.xml %1\clock_2x4\manifest.xml
- )>nul
- ::处理动态壁纸
- if exist %1\miwallpaper (xcopy /e /i /y %1\miwallpaper %~dp0miwallpaper
- copy %1\miwallpaper\manifest.xml %~dp0
- cd /d "%~dp0"
- PowerShell -exec ByPass "&'%~dp01.ps1'" "%~f1\miwallpaper"
- move %~dp0\1.xml %1\miwallpaper\manifest.xml
- )>nul
复制代码 感觉还能精减- ::处理锁屏、时钟、动态壁纸、自由桌面
- if exist "%1\lockscreen\advance" (set "smss=lockscreen\advance"&goto C)
- if exist "%1\clock_2x4" (set "smss=clock_2x4"&goto C)
- if exist "%1\miwallpaper" (set "smss=miwallpaper"&goto C)
- if exist "%1\com.miui.home.freestyle" (set "smss=com.miui.home.freestyle"&goto C)
- goto D
- :C
- ::echo %1\%smss%
- xcopy /e /i /y "%1\%smss%" "%~dp0%smss%"
- copy "%1\%smss%\manifest.xml" "%~dp0"
- cd /d "%~dp0"
- PowerShell -exec ByPass "&'%~dp01.ps1'" "%~f1\%smss%"
- ::call 1.bat
- move "%~dp0\1.xml" "%1\%smss%\manifest.xml"
- if "%smss%" == "com.miui.home.freestyle" (goto D)
-
- if exist "%1\clock_2x4" (if "%smss%" NEQ "clock_2x4" (set "smss=clock_2x4"&goto C)
- )
- if exist "%1\miwallpaper" (if "%smss%" NEQ "miwallpaper" (set "smss=miwallpaper"&goto C)
- )
- if exist "%1\com.miui.home.freestyle" (if "%smss%" NEQ "com.miui.home.freestyle" (set "smss=com.miui.home.freestyle"&goto C)
- )
- goto D
- :D
- echo %1\%smss% OK
复制代码
|