3 REM This is the Jalview batch script wrapper to run the powershell script of the same name.
4 REM There is nothing specific to Jalview.
6 REM ******************************************************************************
7 REM If you need to set a full path to the PowerShell executable please do so here:
9 REM ******************************************************************************
11 REM This is some DOS magic to substitute the extension in the full path of this batch script with .ps1
12 SET SCRIPTPATH=%~dpn0.ps1
14 REM PowerShell script isn't where it should be!
15 IF NOT EXIST %SCRIPTPATH% (
16 ECHO Could not find PowerShell script %SCRIPTPATH%. Is %~nx0 in the right folder?
20 REM Look for either pwsh.exe or powershell.exe if not set in PWSHPATH above.
21 REM pwsh.exe is preferred as it is likely to be a newer version.
26 FOR %%X IN (pwsh.exe powershell.exe) DO (
28 IF NOT "%%~$PATH:X" == "" (
29 REM Found a PowerShell executable in the PATH
38 REM No PowerShell executable found -- tell the user what to do.
39 ECHO No PowerShell found in %%PATH%%. If PowerShell is installed either
40 ECHO 1. add it to your PATH, or
41 ECHO 2. edit the PWSHPATH value at the top of this file:
44 ECHO %~n0 on the command line requires PowerShell. To install PowerShell see
45 ECHO https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell
49 REM Run the PowerShell script
50 %PWSH% -NoProfile -ExecutionPolicy Bypass -Command "& '%SCRIPTPATH%' %*";