From 62178bfb09a379f2b4cf08ec21503c675fdaadc6 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 29 Jun 2023 21:40:12 +0200 Subject: [PATCH] Use --pause-on-exit from launchers The terminal opened by scrcpy-console (.bat or .desktop) must not close if scrcpy terminates with an error, so that error messages can be read. Refs #3817 Refs #3822 PR #4130 --- app/data/scrcpy-console.bat | 4 +--- app/data/scrcpy-console.desktop | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/data/scrcpy-console.bat b/app/data/scrcpy-console.bat index b90be29a48..0ea7619f4a 100644 --- a/app/data/scrcpy-console.bat +++ b/app/data/scrcpy-console.bat @@ -1,4 +1,2 @@ @echo off -scrcpy.exe %* -:: if the exit code is >= 1, then pause -if errorlevel 1 pause +scrcpy.exe --pause-on-exit=if-error %* diff --git a/app/data/scrcpy-console.desktop b/app/data/scrcpy-console.desktop index 0e2f9ab0b8..6ca1e36a0c 100644 --- a/app/data/scrcpy-console.desktop +++ b/app/data/scrcpy-console.desktop @@ -5,7 +5,7 @@ Comment=Display and control your Android device # For some users, the PATH or ADB environment variables are set from the shell # startup file, like .bashrc or .zshrc… Run an interactive shell to get # environment correctly initialized. -Exec=/bin/bash --norc --noprofile -i -c "\"\\$SHELL\" -i -c scrcpy || read -p 'Press Enter to quit...'" +Exec=/bin/sh -c "\"\\$SHELL\" -i -c scrcpy --pause-on-exit=if-error" Icon=scrcpy Terminal=true Type=Application