Skip to content

Commit c1d28cf

Browse files
KorigamiKclaude
andcommitted
Address Copilot PR review comments
- Remove unused Qt6Multimedia REQUIRED dependency from CMakeLists.txt - Set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 to match Info.plist LSMinimumSystemVersion - Remove qtmultimedia from build_mac.sh required formulae check loop - Move macOS ~/.config/sioyek config paths to be pushed last (after AppDataLocation paths) so they become the preferred write location via user_config_paths.back() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8e6e66f commit c1d28cf

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1111

1212
if(APPLE)
1313
enable_language(OBJCXX)
14+
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
15+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum macOS deployment target")
16+
endif()
1417
endif()
1518

1619
set(CMAKE_AUTOMOC ON)
@@ -24,7 +27,6 @@ find_package(Qt6Network 6.7 REQUIRED)
2427
find_package(Qt6OpenGL 6.7 REQUIRED)
2528
find_package(Qt6QuickWidgets 6.7 REQUIRED)
2629
find_package(Qt6Svg 6.7 REQUIRED)
27-
find_package(Qt6Multimedia 6.7 REQUIRED)
2830
find_package(Qt6TextToSpeech 6.7 REQUIRED)
2931
find_package(Qt6OpenGLWidgets 6.7 REQUIRED)
3032

build_mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717

1818
required_formulae=(cmake mupdf qtspeech)
1919
cmake_prefixes=()
20-
for formula in qtbase qtdeclarative qtsvg qtmultimedia qtspeech mupdf; do
20+
for formula in qtbase qtdeclarative qtsvg qtspeech mupdf; do
2121
prefix=$(brew --prefix "$formula" 2>/dev/null || true)
2222
if [[ -z $prefix || ! -d $prefix ]]; then
2323
echo "Missing Homebrew formula '$formula'. Install dependencies with:" >&2

pdf_viewer/main.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ void configure_paths() {
230230
#ifdef Q_OS_MACOS
231231
app_data_path = parent_path.slash(L"..").slash(L"Resources");
232232
shader_path = app_data_path.slash(L"shaders");
233-
234-
Path mac_home_path(QDir::homePath().toStdWString());
235-
Path mac_standard_config_path = mac_home_path.slash(L".config").slash(L"sioyek");
236-
user_keys_paths.push_back(mac_standard_config_path.slash(L"keys_user.config"));
237-
user_config_paths.push_back(mac_standard_config_path.slash(L"prefs_user.config"));
238233
#else
239234
shader_path = parent_path.slash(L"shaders");
240235
#endif
@@ -322,6 +317,14 @@ void configure_paths() {
322317
local_database_file_path = standard_data_path.slash(L"local.db");
323318
global_database_file_path = standard_data_path.slash(L"shared.db");
324319
last_opened_file_address_path = standard_data_path.slash(L"last_document_path.txt");
320+
#ifdef Q_OS_MACOS
321+
// XDG-style ~/.config path is pushed last so it is the preferred write location (back())
322+
// while AppDataLocation paths above serve as read-only fallbacks
323+
Path mac_home_path(QDir::homePath().toStdWString());
324+
Path mac_standard_config_path = mac_home_path.slash(L".config").slash(L"sioyek");
325+
user_keys_paths.push_back(mac_standard_config_path.slash(L"keys_user.config"));
326+
user_config_paths.push_back(mac_standard_config_path.slash(L"prefs_user.config"));
327+
#endif
325328
#else
326329
user_config_paths.push_back(parent_path.slash(L"prefs_user.config"));
327330
user_keys_paths.push_back(parent_path.slash(L"keys_user.config"));

0 commit comments

Comments
 (0)