mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
gst-env: Add support for PowerShell 7
The executable binary name of "PowerShell 7" is "pwsh.exe" which is different from system default installed "Windows PowerShell (version 5.x or older)" Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2545>
This commit is contained in:
parent
77937f9398
commit
12fdf93ba4
2 changed files with 3 additions and 4 deletions
|
@ -2,7 +2,7 @@ $i=1
|
|||
$ppid=(gwmi win32_process -Filter "processid='$pid'").parentprocessid
|
||||
$pname=(Get-Process -id $ppid).Name
|
||||
While($true) {
|
||||
if($pname -eq "cmd" -Or $pname -eq "powershell") {
|
||||
if($pname -eq "cmd" -Or $pname -eq "powershell" -Or $pname -eq "pwsh") {
|
||||
Write-Host ("{0}.exe" -f $pname)
|
||||
Break
|
||||
}
|
||||
|
|
|
@ -549,9 +549,8 @@ if __name__ == "__main__":
|
|||
env = get_subprocess_env(options, gst_version)
|
||||
if os.name == 'nt':
|
||||
shell = get_windows_shell()
|
||||
if shell == 'powershell.exe':
|
||||
new_args = ['powershell.exe']
|
||||
new_args += ['-NoLogo']
|
||||
if shell in ['powershell.exe', 'pwsh.exe']:
|
||||
new_args = [shell, '-NoLogo']
|
||||
if not args:
|
||||
prompt = 'function global:prompt { "[gst-' + gst_version + '"+"] PS " + $PWD + "> "}'
|
||||
new_args += ['-NoExit', '-Command', prompt]
|
||||
|
|
Loading…
Reference in a new issue