History

win32: set consoleAllocationPolicy to detached in the manifest

This essentially obsoletes the console wrapper (mpv.com), which is no longer needed. The console is attached depending on the context in which mpv.exe is run. Add an option to control which subsystem is targeted. Keep the GUI application as the default to preserve compatibility with Windows versions prior to 24H2. For more information about the new console handling, see: https://github.com/microsoft/terminal/blob/4386bf07fd65f763693132ee5e4c43a2a571dc76/doc/specs/%237335%20-%20Console%20Allocation%20Policy.md

Kacper Michajłow committed 2 years ago

Commit e09278c1 parent 48963ae3 files · +4 −2Browse files

Unified · Split

3 files
  1. meson.build +2 −2
  2. meson_options.txt +1 −0
  3. osdep/mpv.exe.manifest +1 −0
meson.build+2−2
@@ -1797,9 +1797,9 @@ if get_option('cplayer') · 1796 unmodified lines
1797 install_data('etc/mpv-symbolic.svg', install_dir: join_paths(hicolor_dir, 'symbolic', 'apps'))1797 install_data('etc/mpv-symbolic.svg', install_dir: join_paths(hicolor_dir, 'symbolic', 'apps'))
1798 1798
1799 mpv = executable('mpv', main_fn_source, objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies,1799 mpv = executable('mpv', main_fn_source, objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies,
1800 win_subsystem: 'windows', install: true)1800 win_subsystem: get_option('win32-subsystem'), install: true)
1801 1801
1802 if win321802 if win32 and get_option('win32-subsystem') != 'console'
1803 wrapper_sources= 'osdep/win32-console-wrapper.c'1803 wrapper_sources= 'osdep/win32-console-wrapper.c'
1804 executable('mpv', wrapper_sources, c_args: '-municode', link_args: '-municode',1804 executable('mpv', wrapper_sources, c_args: '-municode', link_args: '-municode',
1805 name_suffix: 'com', install: true)1805 name_suffix: 'com', install: true)
meson_options.txt+1−0
@@ -117,6 +117,7 @@ option('swift-flags', type: 'string', description: 'Optional Swift compiler flag · 116 unmodified lines
117 117
118# Windows features118# Windows features
119option('win32-smtc', type: 'feature', value: 'auto', description: 'Enable Media Control support')119option('win32-smtc', type: 'feature', value: 'auto', description: 'Enable Media Control support')
120option('win32-subsystem', type : 'string', value: 'windows', description : 'Windows subsystem to use for mpv.exe')
120 121
121# manpages122# manpages
122option('html-build', type: 'feature', value: 'disabled', description: 'HTML manual generation')123option('html-build', type: 'feature', value: 'disabled', description: 'HTML manual generation')
osdep/mpv.exe.manifest+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
9 <description>mpv - The Movie Player</description>9 <description>mpv - The Movie Player</description>
10 <application xmlns="urn:schemas-microsoft-com:asm.v3">10 <application xmlns="urn:schemas-microsoft-com:asm.v3">
11 <windowsSettings>11 <windowsSettings>
12 <consoleAllocationPolicy xmlns="http://schemas.microsoft.com/SMI/2024/WindowsSettings">detached</consoleAllocationPolicy>
12 <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>13 <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
13 <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>14 <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
14 <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>15 <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t