mirror of https://github.com/nextcloud/desktop
Only build app bundle if requested
For development a app bundle is not needed. The app bundle is only needed for distribution and macdeployqt takes a lot of time. Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
parent
c89d2abf5a
commit
ec64246dc7
|
@ -98,24 +98,13 @@ message(STATUS "GIT_SHA1 ${GIT_SHA1}")
|
||||||
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
|
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
|
||||||
set(SHAREDIR ${CMAKE_INSTALL_DATADIR})
|
set(SHAREDIR ${CMAKE_INSTALL_DATADIR})
|
||||||
|
|
||||||
#####
|
# Build MacOS app bundle if wished
|
||||||
## handle BUILD_OWNCLOUD_OSX_BUNDLE
|
if(APPLE AND BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
# BUILD_OWNCLOUD_OSX_BUNDLE was not initialized OR set to true on OSX
|
message(STATUS "Build MacOS app bundle")
|
||||||
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_NAME}.app")
|
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
|
||||||
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||||
set(BIN_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)
|
|
||||||
message(FATAL_ERROR "Building in non-bundle mode on OSX is currently not supported. Comment this error out if you want to work on/test it.")
|
|
||||||
|
|
||||||
# any other platform
|
|
||||||
else()
|
|
||||||
set(BUILD_OWNCLOUD_OSX_BUNDLE OFF)
|
|
||||||
endif()
|
endif()
|
||||||
#####
|
|
||||||
|
|
||||||
# this option removes Http authentication, keychain, shibboleth etc and is intended for
|
# this option removes Http authentication, keychain, shibboleth etc and is intended for
|
||||||
# external authentication mechanisms
|
# external authentication mechanisms
|
||||||
|
|
|
@ -185,6 +185,8 @@ Then, in Terminal:
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
% echo 'export CMAKE_INSTALL_PREFIX=~/Builds' >> ~/.nextcloud_build_variables
|
% echo 'export CMAKE_INSTALL_PREFIX=~/Builds' >> ~/.nextcloud_build_variables
|
||||||
|
# If you want to build a macOS app bundle for distribution
|
||||||
|
% echo 'export BUILD_OWNCLOUD_OSX_BUNDLE=ON' >> ~/.nextcloud_build_variables
|
||||||
|
|
||||||
Replace ``~/Builds`` with a different directory if you'd like the build to end up elsewhere.
|
Replace ``~/Builds`` with a different directory if you'd like the build to end up elsewhere.
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
|
set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
|
||||||
|
|
||||||
# The bundle identifier and application group need to have compatible values with the client
|
# The bundle identifier and application group need to have compatible values with the client
|
||||||
# to be able to open a Mach port across the extension's sandbox boundary.
|
# to be able to open a Mach port across the extension's sandbox boundary.
|
||||||
# Pass the info through the xcodebuild command line and make sure that the project uses
|
# Pass the info through the xcodebuild command line and make sure that the project uses
|
||||||
# those user-defined settings to build the plist.
|
# those user-defined settings to build the plist.
|
||||||
add_custom_target( mac_overlayplugin ALL
|
add_custom_target( mac_overlayplugin ALL
|
||||||
xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
|
xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
|
||||||
-project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj
|
-project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj
|
||||||
-target FinderSyncExt -configuration Release "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
|
-target FinderSyncExt -configuration Release "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
"OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}"
|
"OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}"
|
||||||
"OC_APPLICATION_NAME=${APPLICATION_NAME}"
|
"OC_APPLICATION_NAME=${APPLICATION_NAME}"
|
||||||
"OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
|
"OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
|
||||||
"OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
|
"OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
|
||||||
COMMENT building Mac Overlay icons
|
COMMENT building Mac Overlay icons
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
add_dependencies(mac_overlayplugin nextcloud) # for the ownCloud.icns to be generated
|
add_dependencies(mac_overlayplugin nextcloud) # for the ownCloud.icns to be generated
|
||||||
|
|
||||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
|
if (BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
|
||||||
USE_SOURCE_PERMISSIONS)
|
DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
|
||||||
endif(APPLE)
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue