diff options
| author | manuel <manuel@mausz.at> | 2016-12-14 02:24:46 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-12-14 02:24:46 +0100 |
| commit | a662ba767a6444b76b0394eb60380eee3e839db7 (patch) | |
| tree | a13d904b75e8d899e2b11df3db5bd2a8a47b0acb /project/cmake/scripts/ios/Install.cmake | |
| parent | 2818eb9609d118212211cd657134974f10428b31 (diff) | |
| download | kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.tar.gz kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.tar.bz2 kodi-pvr-build-a662ba767a6444b76b0394eb60380eee3e839db7.zip | |
Sync with Krypton branch
Diffstat (limited to 'project/cmake/scripts/ios/Install.cmake')
| -rw-r--r-- | project/cmake/scripts/ios/Install.cmake | 93 |
1 files changed, 41 insertions, 52 deletions
diff --git a/project/cmake/scripts/ios/Install.cmake b/project/cmake/scripts/ios/Install.cmake index c49fcd5..052565f 100644 --- a/project/cmake/scripts/ios/Install.cmake +++ b/project/cmake/scripts/ios/Install.cmake | |||
| @@ -1,54 +1,42 @@ | |||
| 1 | # IOS packaging | 1 | # IOS packaging |
| 2 | 2 | ||
| 3 | set(BUNDLE_RESOURCES ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png | 3 | set(PACKAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/build/${CORE_BUILD_CONFIG}-iphoneos) |
| 4 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png | ||
| 5 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png | ||
| 6 | ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png | ||
| 7 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 8 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 9 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 10 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 11 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 12 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 13 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 14 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 15 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 16 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 17 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 18 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 19 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 20 | ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 21 | 4 | ||
| 22 | if(CMAKE_GENERATOR STREQUAL Xcode) | 5 | file(MAKE_DIRECTORY ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app) |
| 23 | set(RESOURCE_LOCATION ${APP_NAME}.app) | 6 | set(BUNDLE_RESOURCES xbmc/platform/darwin/ios/Default-568h@2x.png |
| 24 | else() | 7 | xbmc/platform/darwin/ios/Default-667h@2x.png |
| 25 | set(RESOURCE_LOCATION ".") | 8 | xbmc/platform/darwin/ios/Default-736h@3x.png |
| 26 | endif() | 9 | xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png |
| 10 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png | ||
| 11 | tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png | ||
| 12 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png | ||
| 13 | tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png | ||
| 14 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png | ||
| 15 | tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png | ||
| 16 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png | ||
| 17 | tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png | ||
| 18 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png | ||
| 19 | tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png | ||
| 20 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png | ||
| 21 | tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png | ||
| 22 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png | ||
| 23 | tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) | ||
| 27 | 24 | ||
| 28 | target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES}) | 25 | foreach(resource IN LISTS BUNDLE_RESOURCES) |
| 29 | foreach(file IN LISTS BUNDLE_RESOURCES) | 26 | configure_file(${CORE_SOURCE_DIR}/${resource} ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app COPYONLY) |
| 30 | set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION}) | ||
| 31 | endforeach() | 27 | endforeach() |
| 28 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings | ||
| 29 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/English.lproj/InfoPlist.strings COPYONLY) | ||
| 32 | 30 | ||
| 33 | target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) | 31 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in |
| 34 | set_source_files_properties(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") | 32 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/Info.plist @ONLY) |
| 35 | |||
| 36 | # Options for code signing propagated as env vars to Codesign.command via Xcode | ||
| 37 | set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") | ||
| 38 | if(IOS_CODE_SIGN_IDENTITY) | ||
| 39 | set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE | ||
| 40 | XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY}) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | ||
| 44 | # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file | ||
| 45 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> | ||
| 46 | $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin | ||
| 47 | 33 | ||
| 34 | add_custom_target(bundle | ||
| 35 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/${APP_NAME}.bin | ||
| 48 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | 36 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h |
| 49 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | 37 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h |
| 50 | COMMAND "ACTION=build" | 38 | COMMAND "ACTION=build" |
| 51 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | 39 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" |
| 52 | "TARGET_NAME=${APP_NAME}.app" | 40 | "TARGET_NAME=${APP_NAME}.app" |
| 53 | "APP_NAME=${APP_NAME}" | 41 | "APP_NAME=${APP_NAME}" |
| 54 | "PRODUCT_NAME=${APP_NAME}" | 42 | "PRODUCT_NAME=${APP_NAME}" |
| @@ -56,22 +44,15 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD | |||
| 56 | "SRCROOT=${CMAKE_BINARY_DIR}" | 44 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 57 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command | 45 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command |
| 58 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | 46 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" |
| 59 | "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | 47 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" |
| 60 | "TARGET_NAME=${APP_NAME}.app" | 48 | "TARGET_NAME=${APP_NAME}.app" |
| 61 | "APP_NAME=${APP_NAME}" | 49 | "APP_NAME=${APP_NAME}" |
| 62 | "PRODUCT_NAME=${APP_NAME}" | 50 | "PRODUCT_NAME=${APP_NAME}" |
| 63 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | 51 | "FULL_PRODUCT_NAME=${APP_NAME}.app" |
| 64 | "WRAPPER_EXTENSION=app" | 52 | "WRAPPER_EXTENSION=app" |
| 65 | "SRCROOT=${CMAKE_BINARY_DIR}" | 53 | "SRCROOT=${CMAKE_BINARY_DIR}" |
| 66 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command | 54 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command) |
| 67 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." | 55 | add_dependencies(bundle ${APP_NAME_LC}) |
| 68 | "PLATFORM_NAME=${PLATFORM}" | ||
| 69 | "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" | ||
| 70 | "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." | ||
| 71 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 72 | "APP_NAME=${APP_NAME}" | ||
| 73 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 74 | ) | ||
| 75 | 56 | ||
| 76 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | 57 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) |
| 77 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in | 58 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in |
| @@ -80,6 +61,14 @@ configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh. | |||
| 80 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) | 61 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) |
| 81 | 62 | ||
| 82 | add_custom_target(deb | 63 | add_custom_target(deb |
| 64 | COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." | ||
| 65 | "PLATFORM_NAME=${PLATFORM}" | ||
| 66 | "CODESIGNING_FOLDER_PATH=${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app" | ||
| 67 | "BUILT_PRODUCTS_DIR=${PACKAGE_OUTPUT_DIR}" | ||
| 68 | "WRAPPER_NAME=${APP_NAME}.app" | ||
| 69 | "APP_NAME=${APP_NAME}" | ||
| 70 | "CODE_SIGN_IDENTITY=\"\"" | ||
| 71 | ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command | ||
| 83 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} | 72 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} |
| 84 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) | 73 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) |
| 85 | add_dependencies(deb ${APP_NAME_LC}) | 74 | add_dependencies(deb bundle) |
