+#!/usr/bin/env pwsh
+
# save first parameter
$ARGS = $args
$ARG1 = $args[0]
}
$APPDIR = $DIR
-$JAVA = "${APPDIR}/jre/bin/java.exe"
-$GETDOWNTXT = "${APPDIR}/getdown.txt"
+$JAVA = "${APPDIR}\jre\bin\java.exe"
+$GETDOWNTXT = "${APPDIR}\getdown.txt"
if (-not (Test-Path -Path "${GETDOWNTXT}")) {
throw "Cannot find getdown.txt"
$JAVA = "java.exe"
}
-$CLASSPATH = (Select-String -Path "${GETDOWNTXT}" -AllMatches -Pattern "code\s*=\s*(.*)$" | foreach { "$DIR/$($_.Matches.Groups[1].Value)" }) -join ":"
+$CLASSPATH = (Select-String -Path "${GETDOWNTXT}" -AllMatches -Pattern "code\s*=\s*(.*)$" | foreach { "$DIR\$($_.Matches.Groups[1].Value -replace "/", "\")" }) -join ";"
-Invoke-Expression -Command "${JAVA} -cp ${CLASSPATH} jalview.bin.Launcher $ARGS"
+Invoke-Expression -Command "${JAVA} -cp '${CLASSPATH}' jalview.bin.Launcher $ARGS"