Fix windows updater being broken

This commit is contained in:
crschnick 2024-02-29 09:09:50 +00:00
parent e7fc20b40d
commit 27fb7370be
3 changed files with 11 additions and 10 deletions

View file

@ -71,11 +71,12 @@ public class AppInstaller {
.resolve(XPipeInstallation.getDaemonExecutablePath(OsType.getLocal())).toString(); .resolve(XPipeInstallation.getDaemonExecutablePath(OsType.getLocal())).toString();
var logsDir = FileNames.join(XPipeInstallation.getDataDir().toString(), "logs"); var logsDir = FileNames.join(XPipeInstallation.getDataDir().toString(), "logs");
var logFile = FileNames.join(logsDir, "installer_" + FileNames.getFileName(file) + ".log"); var logFile = FileNames.join(logsDir, "installer_" + FileNames.getFileName(file) + ".log");
var script = ScriptHelper.createExecScript( var command = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD) ?
shellProcessControl, getCmdCommand(file, logFile, exec) : getPowershellCommand(file, logFile, exec);
LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD) ? var toRun = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD) ?
getCmdCommand(file, logFile, exec) : getPowershellCommand(file, logFile, exec)); "start \"XPipe Updater\" /min cmd /c \"" + ScriptHelper.createLocalExecScript(command) + "\"" :
TerminalLauncher.openDirect("XPipe Updater", LocalShell.getShell(), script); "Start-Process -WindowStyle Minimized -FilePath powershell -ArgumentList \"-ExecutionPolicy\", \"Bypass\", \"-File\", \"`\"" + ScriptHelper.createLocalExecScript(command) + "`\"\"";
shellProcessControl.executeSimpleCommand(toRun);
} }
private String getCmdCommand(String file, String logFile, String exec) { private String getCmdCommand(String file, String logFile, String exec) {
@ -84,7 +85,7 @@ public class AppInstaller {
echo Installing %s ... echo Installing %s ...
cd /D "%%HOMEDRIVE%%%%HOMEPATH%%" cd /D "%%HOMEDRIVE%%%%HOMEPATH%%"
echo + msiexec /i "%s" /lv "%s" /qr echo + msiexec /i "%s" /lv "%s" /qr
start "" /wait msiexec /i "%s" /lv "%s" /qr start "" /wait msiexec /i "%s" /lv "%s" /qb
echo Starting XPipe ... echo Starting XPipe ...
echo + "%s" echo + "%s"
start "" "%s" start "" "%s"
@ -98,7 +99,7 @@ public class AppInstaller {
echo Installing %s ... echo Installing %s ...
cd "$env:HOMEDRIVE\\$env:HOMEPATH" cd "$env:HOMEDRIVE\\$env:HOMEPATH"
echo '+ msiexec /i "%s" /lv "%s" /qr' echo '+ msiexec /i "%s" /lv "%s" /qr'
Start-Process msiexec -Wait -ArgumentList "/i", "`"%s`"", "/lv", "`"%s`"", "/qr" Start-Process msiexec -Wait -ArgumentList "/i", "`"%s`"", "/lv", "`"%s`"", "/qb"
echo 'Starting XPipe ...' echo 'Starting XPipe ...'
echo '+ "%s"' echo '+ "%s"'
Start-Process -FilePath "%s" Start-Process -FilePath "%s"

View file

@ -1,4 +1,4 @@
name=GraalVM Community name=GraalVM Community
version=21.0.2 version=21.0.1
license=GPL2 with the Classpath Exception license=GPL2 with the Classpath Exception
link=https://www.graalvm.org/ link=https://www.graalvm.org/

View file

@ -10,5 +10,5 @@ if [ $? -ne 0 ]; then
. "$HOME/.sdkman/bin/sdkman-init.sh" . "$HOME/.sdkman/bin/sdkman-init.sh"
fi; fi;
sdk install java 21.0.2-graalce sdk install java 21.0.1-graalce
sdk default java 21.0.2-graalce sdk default java 21.0.1-graalce