Improve Switch-only MTP UI with drag export, i18n, and polish.
Ship Finder-style drag-out for files and folders, system-language packs with an Options override, About/menu bar support, and sorting plus selection UX fixes.
This commit is contained in:
@@ -78,6 +78,7 @@ find_library(FW_APPKIT AppKit REQUIRED)
|
||||
find_library(FW_FOUNDATION Foundation REQUIRED)
|
||||
find_library(FW_WEBKIT WebKit REQUIRED)
|
||||
find_library(FW_CORETEXT CoreText REQUIRED)
|
||||
find_library(FW_UTTYPES UniformTypeIdentifiers REQUIRED)
|
||||
|
||||
# ─── Application ─────────────────────────────────────────────────────────────
|
||||
file(GLOB_RECURSE APP_SOURCES CONFIGURE_DEPENDS
|
||||
@@ -87,9 +88,17 @@ file(GLOB_RECURSE APP_SOURCES CONFIGURE_DEPENDS
|
||||
|
||||
# webroot resource files — copied into the bundle at Resources/webroot/
|
||||
file(GLOB WEBROOT_FILES "src/ui/webroot/*")
|
||||
file(GLOB WEBROOT_LANG_FILES "src/ui/webroot/lang/*.json")
|
||||
foreach(WF ${WEBROOT_FILES})
|
||||
# Skip the lang directory entry if glob picks it up as a file path oddly
|
||||
if(IS_DIRECTORY "${WF}")
|
||||
continue()
|
||||
endif()
|
||||
set_source_files_properties(${WF} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/webroot)
|
||||
endforeach()
|
||||
foreach(LF ${WEBROOT_LANG_FILES})
|
||||
set_source_files_properties(${LF} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/webroot/lang)
|
||||
endforeach()
|
||||
|
||||
# App icon — generated from assets/AppIcon.png at build time
|
||||
set(APP_ICON_SOURCE "${CMAKE_SOURCE_DIR}/assets/AppIcon.png")
|
||||
@@ -103,7 +112,7 @@ add_custom_command(
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_executable(OmniMTP MACOSX_BUNDLE ${APP_SOURCES} ${WEBROOT_FILES} ${APP_ICON_ICNS})
|
||||
add_executable(OmniMTP MACOSX_BUNDLE ${APP_SOURCES} ${WEBROOT_FILES} ${WEBROOT_LANG_FILES} ${APP_ICON_ICNS})
|
||||
|
||||
target_include_directories(OmniMTP PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
@@ -111,7 +120,7 @@ target_include_directories(OmniMTP PRIVATE
|
||||
)
|
||||
target_link_libraries(OmniMTP PRIVATE
|
||||
usb_static
|
||||
${FW_APPKIT} ${FW_FOUNDATION} ${FW_METAL} ${FW_WEBKIT} ${FW_CORETEXT}
|
||||
${FW_APPKIT} ${FW_FOUNDATION} ${FW_METAL} ${FW_WEBKIT} ${FW_CORETEXT} ${FW_UTTYPES}
|
||||
)
|
||||
|
||||
target_compile_options(OmniMTP PRIVATE
|
||||
@@ -125,7 +134,7 @@ set_target_properties(OmniMTP PROPERTIES
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "OmniMTP"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2025 OmniMTP"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2026 NiklasCFW"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/cmake/Info.plist.in"
|
||||
MACOSX_BUNDLE_ICON_FILE AppIcon
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user