shinchiro / mpv-winbuild-cmake

CMake-based MinGW-w64 Cross Toolchain
659 stars 116 forks source link

is there a feature to automatically add `mpv` as a `path` in `environment variable` to use `mpv` from `terminal`/`Command Prompt` easily #714

Closed candrapersada closed 1 month ago

candrapersada commented 1 month ago

is there a feature to automatically add mpv as a path in windows environment variable?

rorgoroth commented 1 month ago

C:\Users\YourUserName\Documents\WindowsPowerShell\profile.ps1

$env:Path += ";C:\Users\YourUserName\PathToMPV\"
candrapersada commented 1 month ago

C:\Users\YourUserName\Documents\WindowsPowerShell\profile.ps1

$env:Path += ";C:\Users\YourUserName\PathToMPV\"

it's only temporary after closing it you have to try doing it again

rorgoroth commented 4 weeks ago

C:\Users\YourUserName\Documents\WindowsPowerShell\profile.ps1

$env:Path += ";C:\Users\YourUserName\PathToMPV\"

it's only temporary after closing it you have to try doing it again

Then you have done something wrong. You add that line to your powershell profile.ps1, as I wrote, it will be in your environment for all spawned sessions. I've been using it like this for years without issue. The only quirk is autocomplete the binary (using tab) selects mpv.com first before mpv.exe but this isn't an issue as mpv.com works just fine to launch the player.