From 3812d60bf4e6da379bd2547883a25b257deff3fb Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Mon, 22 Jan 2024 17:37:27 -0500 Subject: [PATCH 1/3] Add Matrix URL handling support to MacOS --- cmake/MacOSXBundleInfo.plist.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmake/MacOSXBundleInfo.plist.in b/cmake/MacOSXBundleInfo.plist.in index b95de173..60a78b99 100644 --- a/cmake/MacOSXBundleInfo.plist.in +++ b/cmake/MacOSXBundleInfo.plist.in @@ -34,5 +34,16 @@ NSApplication NSHighResolutionCapable + CFBundleURLTypes + + + CFBundleURLName + Matrix URL + CFBundleURLSchemes + + matrix + + + From 36041e525a765e99152c70ca103a945c75c5df19 Mon Sep 17 00:00:00 2001 From: Joseph Donofry Date: Wed, 24 Jan 2024 23:39:51 -0500 Subject: [PATCH 2/3] Make sure to use our info plist template --- CMakeLists.txt | 5 +++++ cmake/MacOSXBundleInfo.plist.in | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 201e51aa..fc04e3a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -676,6 +676,11 @@ if(WIN32) else() qt_add_executable(nheko ${OS_BUNDLE} ${NHEKO_DEPS}) + if(APPLE) + set_target_properties(nheko PROPERTIES MACOSX_BUNDLE_INFO_PLIST + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/MacOSXBundleInfo.plist.in") + endif() + if(HAVE_BACKTRACE_SYMBOLS_FD AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") set_target_properties(nheko PROPERTIES ENABLE_EXPORTS ON) endif() diff --git a/cmake/MacOSXBundleInfo.plist.in b/cmake/MacOSXBundleInfo.plist.in index 60a78b99..d05f1b25 100644 --- a/cmake/MacOSXBundleInfo.plist.in +++ b/cmake/MacOSXBundleInfo.plist.in @@ -45,5 +45,7 @@ + NSSupportsAutomaticGraphicsSwitching + From a9f9d90e013490e50c1e4aa830703393309f2231 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Sat, 27 Jan 2024 19:12:47 -0500 Subject: [PATCH 3/3] Change URL to URI --- cmake/MacOSXBundleInfo.plist.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/MacOSXBundleInfo.plist.in b/cmake/MacOSXBundleInfo.plist.in index d05f1b25..01977550 100644 --- a/cmake/MacOSXBundleInfo.plist.in +++ b/cmake/MacOSXBundleInfo.plist.in @@ -38,7 +38,7 @@ CFBundleURLName - Matrix URL + Matrix URI CFBundleURLSchemes matrix