mpv/DOCS/man
Dudemanguy 80feac62f1 command: add platform property
This returns the value of the target OS that mpv was built on as
reported by the build system. It is quite conceivable that script
writers and API users would need to make OS-dependent choices in some
cases. Such people end up writing boilerplate/hacks to guess what OS
they are on. Assuming you trust the build system (if you don't, we're in
really deep trouble), then mpv actually knows exactly what OS it was
built on. Simply take this information at configuration time, make it a
define, and let mp_property_platform return the value.

Note that mpv has two build systems (waf and meson), so the names of the
detected OSes may not be exactly the same. Since meson is the newer
build system, the value of this property follows meson's naming
conventions*. In the waf build, there is a small function to map known
naming deviations to match meson (i.e. changing "win32" to "windows").
waf's documentation is a nightmare to follow, but it seems to simply
take the output of sys.platform in python and strip away any trailing
numbers if they exist (exception being win32 and os2)*.

*: https://mesonbuild.com/Reference-tables.html#operating-system-names
*: https://waf.io/apidocs/Utils.html#waflib.Utils.unversioned_sys_platform
2023-02-27 17:13:21 +00:00
..
af.rst various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
ao.rst ao_pipewire: allow usage of global volume control 2023-02-11 10:00:46 -08:00
changes.rst manpage: directly link interface-changes.rst in changelog section 2020-02-21 14:34:02 +01:00
console.rst console: add history deduplication 2022-11-03 13:30:58 +01:00
encode.rst manpage: explain deprecated usage of multiple items with *-add 2020-01-07 18:13:12 +01:00
input.rst command: add platform property 2023-02-27 17:13:21 +00:00
ipc.rst DOCS: Add missing 'not' 2023-01-28 11:59:59 -05:00
javascript.rst lua/js: remove user-data helpers 2023-01-29 01:52:31 +02:00
libmpv.rst DOCS/libmpv: fix typo in linkage section 2022-09-03 12:54:48 -04:00
lua.rst lua/js: remove user-data helpers 2023-01-29 01:52:31 +02:00
mpv.rst DOCS: document E to cycle through Editions 2022-10-24 15:23:41 -04:00
options.rst DOCS: clarify that GLX is deprecated 2023-02-22 23:25:47 +01:00
osc.rst osc.lua: add osc-tcspace script option 2022-07-19 23:19:45 +03:00
stats.rst DOCS/stats.rst: fix quoting 2021-08-09 23:57:04 +03:00
vf.rst DOCS/man/vf.rst : replace the outdated syntax 2022-09-27 08:24:54 -04:00
vo.rst vo_kitty: Introduce modern sixel alternative 2022-12-21 19:39:30 +01:00