diff options
Diffstat (limited to 'project/cmake/scripts/ios/Install.cmake')
| -rw-r--r-- | project/cmake/scripts/ios/Install.cmake | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/project/cmake/scripts/ios/Install.cmake b/project/cmake/scripts/ios/Install.cmake new file mode 100644 index 0000000..052565f --- /dev/null +++ b/project/cmake/scripts/ios/Install.cmake | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | # IOS packaging | ||
| 2 | |||
| 3 | set(PACKAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/build/${CORE_BUILD_CONFIG}-iphoneos) | ||
| 4 | |||
| 5 | file(MAKE_DIRECTORY ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app) | ||
| 6 | set(BUNDLE_RESOURCES xbmc/platform/darwin/ios/Default-568h@2x.png | ||
| 7 | xbmc/platform/darwin/ios/Default-667h@2x.png | ||
| 8 | xbmc/platform/darwin/ios/Default-736h@3x.png | ||
| 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) | ||
| 24 | |||
| 25 | foreach(resource IN LISTS BUNDLE_RESOURCES) | ||
| 26 | configure_file(${CORE_SOURCE_DIR}/${resource} ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app COPYONLY) | ||
| 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) | ||
| 30 | |||
| 31 | configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in | ||
| 32 | ${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app/Info.plist @ONLY) | ||
| 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 | ||
| 36 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h | ||
| 37 | ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h | ||
| 38 | COMMAND "ACTION=build" | ||
| 39 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | ||
| 40 | "TARGET_NAME=${APP_NAME}.app" | ||
| 41 | "APP_NAME=${APP_NAME}" | ||
| 42 | "PRODUCT_NAME=${APP_NAME}" | ||
| 43 | "WRAPPER_EXTENSION=app" | ||
| 44 | "SRCROOT=${CMAKE_BINARY_DIR}" | ||
| 45 | ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command | ||
| 46 | COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" | ||
| 47 | "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" | ||
| 48 | "TARGET_NAME=${APP_NAME}.app" | ||
| 49 | "APP_NAME=${APP_NAME}" | ||
| 50 | "PRODUCT_NAME=${APP_NAME}" | ||
| 51 | "FULL_PRODUCT_NAME=${APP_NAME}.app" | ||
| 52 | "WRAPPER_EXTENSION=app" | ||
| 53 | "SRCROOT=${CMAKE_BINARY_DIR}" | ||
| 54 | ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command) | ||
| 55 | add_dependencies(bundle ${APP_NAME_LC}) | ||
| 56 | |||
| 57 | set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) | ||
| 58 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in | ||
| 59 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY) | ||
| 60 | configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in | ||
| 61 | ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) | ||
| 62 | |||
| 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 | ||
| 72 | COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} | ||
| 73 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) | ||
| 74 | add_dependencies(deb bundle) | ||
