4
0

install.cmd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. @echo off
  2. rem Installs LYNX's plugins for other hosts on Windows, in the folders every host scans:
  3. rem CLAP -> %CommonProgramFiles%\CLAP VST3 -> %CommonProgramFiles%\VST3
  4. rem Those folders need administrator rights: right-click this file and choose "Run as administrator".
  5. rem "install.cmd /uninstall" removes exactly what it installed (the names in PLUGINS.txt).
  6. setlocal
  7. set "HERE=%~dp0"
  8. set "CLAPDIR=%CommonProgramFiles%\CLAP"
  9. set "VST3DIR=%CommonProgramFiles%\VST3"
  10. net session >nul 2>&1
  11. if errorlevel 1 (
  12. echo This needs administrator rights: right-click install.cmd and choose "Run as administrator".
  13. pause
  14. exit /b 1
  15. )
  16. if /i "%~1"=="/uninstall" (
  17. if exist "%CLAPDIR%\LYNX Plugins.clap" del /f /q "%CLAPDIR%\LYNX Plugins.clap"
  18. for /d %%B in ("%HERE%VST3\*.vst3") do if exist "%VST3DIR%\%%~nxB" rmdir /s /q "%VST3DIR%\%%~nxB"
  19. echo LYNX plugins removed.
  20. pause
  21. exit /b 0
  22. )
  23. if not exist "%CLAPDIR%" mkdir "%CLAPDIR%"
  24. if not exist "%VST3DIR%" mkdir "%VST3DIR%"
  25. copy /y "%HERE%CLAP\LYNX Plugins.clap" "%CLAPDIR%\" >nul || goto failed
  26. for /d %%B in ("%HERE%VST3\*.vst3") do (
  27. if exist "%VST3DIR%\%%~nxB" rmdir /s /q "%VST3DIR%\%%~nxB"
  28. xcopy /e /i /q /y "%%B" "%VST3DIR%\%%~nxB" >nul || goto failed
  29. )
  30. echo LYNX plugins installed: CLAP in %CLAPDIR%, VST3 in %VST3DIR%. Rescan the plugins in your host.
  31. pause
  32. exit /b 0
  33. :failed
  34. echo Copying failed. Close every program that has the LYNX plugins loaded, then try again.
  35. pause
  36. exit /b 1