mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
Start macOS app bundle name with uppercase letter
It's a convention on macOS that app bundle names start with an uppercase letter. Also this aligns the app name with Windows and Linux. Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
parent
ce54a98f7d
commit
7850551cad
5 changed files with 23 additions and 22 deletions
|
@ -102,9 +102,9 @@ set(SHAREDIR ${DATADIR})
|
|||
# BUILD_OWNCLOUD_OSX_BUNDLE was not initialized OR set to true on OSX
|
||||
if(APPLE AND (NOT DEFINED BUILD_OWNCLOUD_OSX_BUNDLE OR BUILD_OWNCLOUD_OSX_BUNDLE))
|
||||
set(BUILD_OWNCLOUD_OSX_BUNDLE ON)
|
||||
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_EXECUTABLE}.app")
|
||||
set(LIB_INSTALL_DIR "${APPLICATION_EXECUTABLE}.app/Contents/MacOS")
|
||||
set(BIN_INSTALL_DIR "${APPLICATION_EXECUTABLE}.app/Contents/MacOS")
|
||||
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
|
||||
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||
|
||||
# BUILD_OWNCLOUD_OSX_BUNDLE was disabled on OSX
|
||||
elseif(APPLE AND NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<key>GID</key>
|
||||
<integer>80</integer>
|
||||
<key>PATH</key>
|
||||
<string>@APPLICATION_EXECUTABLE@.app</string>
|
||||
<string>@APPLICATION_NAME@.app</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@APPLICATION_EXECUTABLE@</string>
|
||||
<string>@APPLICATION_NAME@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@APPLICATION_ICON_NAME@.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
|
@ -27,24 +27,20 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|||
endif()
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
add_executable(${cmd_NAME} cmd.cpp)
|
||||
add_executable(${cmd_NAME} cmd.cpp)
|
||||
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
RUNTIME_OUTPUT_DIRECTORY "${BIN_OUTPUT_DIRECTORY}/${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS")
|
||||
else()
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY})
|
||||
|
||||
target_link_libraries(${cmd_NAME} cmdCore)
|
||||
endif()
|
||||
|
||||
# OSX: Copy nextcloudcmd to app bundle, src/gui will run macdeployqt
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
add_custom_command(TARGET ${cmd_NAME} POST_BUILD
|
||||
COMMAND "cp"
|
||||
"$<TARGET_FILE:${cmd_NAME}>"
|
||||
"${BIN_OUTPUT_DIRECTORY}/${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS"
|
||||
COMMENT "Copying nextcloudcmd..."
|
||||
)
|
||||
elseif(NOT BUILD_LIBRARIES_ONLY)
|
||||
install(TARGETS ${cmd_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${cmd_NAME} cmdCore)
|
||||
endif()
|
||||
|
|
|
@ -375,6 +375,11 @@ else()
|
|||
# we must add MACOSX_BUNDLE only if building a bundle
|
||||
add_executable(${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${APP_ICON})
|
||||
|
||||
if (BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
set_target_properties(${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
OUTPUT_NAME "${APPLICATION_NAME}")
|
||||
endif()
|
||||
|
||||
set (QM_DIR ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/Translations)
|
||||
install(FILES ${client_I18N} DESTINATION ${QM_DIR})
|
||||
get_target_property(_qmake Qt5::qmake LOCATION)
|
||||
|
|
Loading…
Reference in a new issue