2 set DOWNLOAD_URL=https://github.com/harelba/q/releases/download/2.0.19/q-AMD64-Windows.exe
3 set Q_PATH=WinMerge\Commands\q\q-AMD64-Windows.exe
4 set MESSAGE='q command is not installed. Do you want to download it from %DOWNLOAD_URL%?'
5 set TITLE='CSV/TSV Data Querier Plugin'
8 if not exist %Q_PATH% (
9 for %%i in (%Q_PATH%) do mkdir %%~pi 2> NUL
10 powershell "if ((New-Object -com WScript.Shell).Popup(%MESSAGE%,0,%TITLE%,1) -ne 1) { throw }" > NUL
12 echo "download is canceled" 1>&2
14 start "Downloading..." /WAIT powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %DOWNLOAD_URL% -Outfile %Q_PATH%"