@echo off rem ============================================================================ rem Guanlan uninstaller (entry). ASCII ONLY (see docs 11.3). rem rem Usage: rem uninstall.bat uninstall everything (plan first) rem uninstall.bat --module app_ETL uninstall one module rem uninstall.bat --module app_ETL --dry-run dry run for one module rem uninstall.bat --list list module names rem (other flags --yes --purge --all --keep-logs are passed through) rem ============================================================================ chcp 65001 >nul set PYTHONUTF8=1 set "HERE=%~dp0" if /i "%~1"=="--list" ( echo app_frontEnd app_backEnd app_algorithmModel app_ETL pause exit /b 0 ) if /i "%~1"=="--module" goto by_module rem ---- whole-package uninstall (unchanged behaviour) ---- set "SCRIPT=%HERE%scripts\guanlan_uninstall.py" cd /d "%TEMP%" if exist "%HERE%.venv\Scripts\python.exe" ( "%HERE%.venv\Scripts\python.exe" "%SCRIPT%" %* goto done ) where py >nul 2>nul && ( py -3 "%SCRIPT%" %* & goto done ) python "%SCRIPT%" %* goto done :by_module set "MODS=%~2" shift shift for %%M in (%MODS:,= %) do ( if not exist "%HERE%%%M\uninstall.bat" ( echo [X] unknown module: %%M ) else ( echo == uninstall module %%M call "%HERE%%%M\uninstall.bat" %1 %2 %3 %4 %5 ) ) goto done :done pause