@@ -11,9 +11,9 @@ Upstream doesn't want to merge patches to build on versions prior to macos
111110.13, so this patch is not forwarded upstream.
1212See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-1291750066
1313
14- --- CMakeLists.txt
15- +++ CMakeLists.txt
16- @@ -81 ,6 +81,42 @@ if(APPLE)
14+ --- CMakeLists.txt.orig 2025-09-17 16:07:50.000000000 -0700
15+ +++ CMakeLists.txt 2025-09-17 16:14:00.000000000 -0700
16+ @@ -82 ,6 +82,46 @@
1717 ${CMAKE_CURRENT_BINARY_DIR}/tiometry_test/
1818 ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_watch_support.mm)
1919 message(STATUS "Apple watch compiler support: ${XC_APPLE_COMPILER_SUPPORT_WATCH}")
@@ -53,6 +53,10 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
5353+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_SecAccessControlRef_support.mm)
5454+ message(STATUS "SecAccessControlRef compiler support: ${XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef}")
5555+
56+ + try_compile(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit
57+ + ${CMAKE_CURRENT_BINARY_DIR}/ScreenCaptureKit_test/
58+ + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-checks/macos/control_ScreenCaptureKit_support.mm)
59+ + message(STATUS "ScreenCaptureKit compiler support: ${XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit}")
5660 endif()
5761
5862 if(WITH_CCACHE)
@@ -115,9 +119,14 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
115119+ kSecUseOperationPrompt;
116120+ return 0;
117121+ }
118- --- src/config-keepassx.h.cmake
119- +++ src/config-keepassx.h.cmake
120- @@ -41,10 +41,24 @@
122+ --- /dev/null
123+ +++ cmake/compiler-checks/macos/control_ScreenCaptureKit_support.mm
124+ @@ -0,0 +1,2 @@
125+ + #include <ScreenCaptureKit/ScreenCaptureKit.h>
126+ + int main() { return 0; }
127+ --- src/config-keepassx.h.cmake.orig 2025-09-17 16:23:31.000000000 -0700
128+ +++ src/config-keepassx.h.cmake 2025-09-17 16:26:08.000000000 -0700
129+ @@ -43,10 +43,26 @@
121130 #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_BIOMETRY()
122131 #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_TOUCH_ID()
123132 #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_WATCH()
@@ -128,6 +137,7 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
128137+ #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_kSecAttrAccessControl()
129138+ #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_kSecUseOperationPrompt()
130139+ #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef()
140+ + #cmakedefine01 XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit()
131141
132142 #define XC_COMPILER_SUPPORT(X) XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_##X()
133143 #define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_APPLE_BIOMETRY() XC_APPLE_COMPILER_SUPPORT_BIOMETRY()
@@ -140,6 +150,7 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
140150+ #define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_kSecAttrAccessControl() XC_APPLE_COMPILER_SUPPORT_kSecAttrAccessControl()
141151+ #define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_kSecUseOperationPrompt() XC_APPLE_COMPILER_SUPPORT_kSecUseOperationPrompt()
142152+ #define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_SecAccessControlRef() XC_APPLE_COMPILER_SUPPORT_SecAccessControlRef()
153+ + #define XC_COMPILER_SUPPORT_PRIVATE_DEFINITION_ScreenCaptureKit() XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit()
143154
144155 #endif // KEEPASSX_CONFIG_KEEPASSX_H
145156--- src/touchid/TouchID.mm
@@ -229,17 +240,34 @@ See: https://github.com/keepassxreboot/keepassxc/pull/8650#issuecomment-12917500
229240 LogStatusError("TouchID::getKey - key query error", status);
230241 return false;
231242 }
232- --- src/CMakeLists.txt
233- +++ src/CMakeLists.txt
234- @@ -354 ,7 +354,10 @@ if(WITH_XC_KEESHARE)
243+ --- src/CMakeLists.txt.orig 2025-09-17 17:04:25.000000000 -0700
244+ +++ src/CMakeLists.txt 2025-09-17 17:06:55.000000000 -0700
245+ @@ -372 ,7 +372,13 @@
235246 endif()
236247
237248 if(APPLE)
238- - target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security -framework LocalAuthentication")
249+ - target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security -framework LocalAuthentication -framework ScreenCaptureKit ")
239250+ target_link_libraries(keepassx_core "-framework Foundation -framework AppKit -framework Carbon -framework Security")
240251+ if(XC_APPLE_COMPILER_SUPPORT_LocalAuthentication)
241252+ target_link_libraries(keepassx_core "-framework LocalAuthentication")
253+ + endif()
254+ + if(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit)
255+ + target_link_libraries(keepassx_core "-framework ScreenCaptureKit")
242256+ endif()
243257 if(Qt5MacExtras_FOUND)
244258 target_link_libraries(keepassx_core Qt5::MacExtras)
245259 endif()
260+ --- src/autotype/mac/CMakeLists.txt.orig 2025-09-17 18:29:38.000000000 -0700
261+ +++ src/autotype/mac/CMakeLists.txt 2025-09-17 18:40:25.000000000 -0700
262+ @@ -1,7 +1,10 @@
263+ set(autotype_mac_SOURCES AutoTypeMac.cpp)
264+
265+ add_library(keepassxc-autotype-cocoa MODULE ${autotype_mac_SOURCES})
266+ - set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit -framework Carbon -framework ScreenCaptureKit")
267+ + set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework Foundation -framework AppKit -framework Carbon")
268+ + if(XC_APPLE_COMPILER_SUPPORT_ScreenCaptureKit)
269+ + set_target_properties(keepassxc-autotype-cocoa PROPERTIES LINK_FLAGS "-framework ScreenCaptureKit")
270+ + endif()
271+ target_link_libraries(keepassxc-autotype-cocoa ${PROGNAME} Qt5::Core Qt5::Widgets)
272+
273+ install(TARGETS keepassxc-autotype-cocoa
0 commit comments