[Trick] Batch whitelisting vst2 for Dorico.

I am terrible at writing RegEx, hence providing my thoughts of steps-to-do here:

[Step 1] Do the following bash scripts (also executable under Microsoft PowerShell for macOS):

ls /library/audio/plug-ins/vst > ~/Desktop/vst2whitelist.txt

[Step 2] Use RegEx to process the “~/Desktop/vst2whitelist.txt” to do the following two things in order (then save):

  1. Recursively check every line, if not ended with “.vst” or blank line then remove the line.
  2. For all rest lines ended with “.vst”, remove the “.vst” string from the end of each line.

[Steps 3] Copy the vst2whitelist.txt to “/Library/Preferences/VSTAudioEngine?” folder.
For Dorico 2, the folder is “/Users/username/Library/Preferences/VSTAudioEngine2”.

P.S.: The steps above works under macOS with both Microsoft PowerShell 6.0.2 and the macOS built-in bash.
Theoretically, this trick works with Windows PowerShell and you just have to change the extensions and related directories.

Update: I finished the script for macOS bash: https://gist.github.com/ShikiSuen/a7c45ccdd653f37f73fb1eab134815ec

Reference: https://helpcenter.steinberg.de/hc/en-us/articles/206899770-How-to-use-VST2-plug-ins-in-Dorico