Datasets:
Download windows/thisismy-github-pyplayer/reference/launch.ps1 from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/windows/thisismy-github-pyplayer/reference/launch.ps1
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/windows/thisismy-github-pyplayer/reference/launch.ps1
-
curl -L -o launch.ps1 https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/windows/thisismy-github-pyplayer/reference/launch.ps1
1.16 kB
| <# | |
| launch.ps1 - Starts the PyPlayer GUI and prints its numeric PID. | |
| PyPlayer is a native PyQt5 (Qt5) desktop app that bundles its own VLC and | |
| FFmpeg. Its runtime hook resolves bundled libvlc/ffmpeg relative to the exe's | |
| own folder, so we just set the working directory to the install folder and | |
| launch pyplayer.exe. | |
| Output contract: the FIRST line written to stdout is the numeric PID. | |
| A trailing blank line is emitted AFTER the PID so that when this script is | |
| captured with $out = & powershell -File launch.ps1 the result is an ARRAY | |
| of lines (Object[]) rather than a single String. That makes the harness's | |
| $out[0] resolve to the PID line ("5148") instead of the first character of a | |
| scalar string ('5' -> [int] 53). Nothing is printed before the PID. | |
| #> | |
| $ErrorActionPreference = 'Stop' | |
| $InstallDir = (Join-Path (Split-Path $PSScriptRoot -Parent) 'install') | |
| $ExePath = Join-Path $InstallDir 'pyplayer.exe' | |
| # Start the GUI from within its install folder so bundled DLLs/plugins resolve. | |
| $proc = Start-Process -FilePath $ExePath -WorkingDirectory $InstallDir -PassThru | |
| Write-Output $proc.Id | |
| Write-Output '' | |