mpv/DOCS
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
..
man command: add platform property 2023-02-27 17:13:21 +00:00
build-system-differences.md build: add meson build support 2021-11-14 19:13:10 +00:00
client-api-changes.rst DOCS/client-api-changes.rst: move mpv_del_property to 0.36.0 2023-02-21 17:07:57 +00:00
compatibility.rst DOCS/compatibility.rst: add this file 2019-10-05 02:11:55 +02:00
compile-windows.md DOCS/compile-windows.md: update MSYS2 packages 2023-01-28 01:03:12 +00:00
contribute.md DOCS/contrinute: add commit title example prefixes 2021-08-15 22:15:27 +03:00
edl-mpv.rst edl: add a way to add tags 2021-05-11 22:18:40 +02:00
encoding.rst DOCS/encoding: remove the legacy option syntax 2022-07-07 21:12:57 -04:00
interface-changes.rst command: add platform property 2023-02-27 17:13:21 +00:00
mplayer-changes.rst DOCS: convert mpv.io and github links to https 2021-08-17 13:42:21 +00:00
release-policy.md DOCS: update release policy to match reality 2022-11-13 15:01:34 +01:00
tech-overview.txt various: fix typos 2022-04-25 09:07:18 -04:00
waf-buildsystem.rst DOCS: replace dead waf book link with working one 2021-08-17 13:42:21 +00:00