# Sets the target folders and the final framework product.

FMK_NAME=HovnVoipEngine

FMK_VERSION=1.0

# Install dir will be the final output to the framework.

# The following line create it in the root folder of the current project.

INSTALL_DIR=${SRCROOT}/Products/${FMK_NAME}.framework

# Working dir will be deleted after the framework creation.

WRK_DIR=build

DEVICE_DIR=${WRK_DIR}/Release-iphoneos/${FMK_NAME}.framework

SIMULATOR_DIR=${WRK_DIR}/Release-iphonesimulator/${FMK_NAME}.framework

# Building both architectures.

xcodebuild -configuration "Release" -target
"${FMK_NAME}" -sdk iphoneos

xcodebuild -configuration "Release" -target
"${FMK_NAME}" -sdk iphonesimulator

# Cleaning the oldest.

if [ -d "${INSTALL_DIR}" ]

then

rm -rf "${INSTALL_DIR}"

fi

# Creates and renews the final product folder.

mkdir -p "${INSTALL_DIR}"

mkdir -p "${INSTALL_DIR}/Versions"

mkdir -p "${INSTALL_DIR}/Versions/${FMK_VERSION}"

mkdir -p "${INSTALL_DIR}/Versions/${FMK_VERSION}/Resources"

mkdir -p "${INSTALL_DIR}/Versions/${FMK_VERSION}/Headers"

# Creates the internal links.

# It MUST uses relative path, otherwise will not work when the folder is copied/moved.

ln -s "${FMK_VERSION}"
"${INSTALL_DIR}/Versions/Current"

ln -s "Versions/Current/Headers"
"${INSTALL_DIR}/Headers"

ln -s "Versions/Current/Resources"
"${INSTALL_DIR}/Resources"

ln -s "Versions/Current/${FMK_NAME}"
"${INSTALL_DIR}/${FMK_NAME}"

# Copies the headers and resources files to the final product folder.

cp -R "${DEVICE_DIR}/Headers/"
"${INSTALL_DIR}/Versions/${FMK_VERSION}/Headers/"

cp -R "${DEVICE_DIR}/"
"${INSTALL_DIR}/Versions/${FMK_VERSION}/Resources/"

# Removes the binary and header from the resources folder.

rm -r "${INSTALL_DIR}/Versions/${FMK_VERSION}/Resources/Headers"
"${INSTALL_DIR}/Versions/${FMK_VERSION}/Resources/${FMK_NAME}"

# Uses the Lipo Tool to merge both binary files (i386 + armv6/armv7) into one Universal final product.

lipo -create "${DEVICE_DIR}/${FMK_NAME}"
"${SIMULATOR_DIR}/${FMK_NAME}" -output
"${INSTALL_DIR}/Versions/${FMK_VERSION}/${FMK_NAME}"

rm -r "${WRK_DIR}"

最新文章

  1. Citrix Xen Desktop安装配置
  2. DP(优化) UVALive 6073 Math Magic
  3. SQL Server 2005中的分区表(六):将已分区表转换成普通表(转)
  4. [工作积累] jboolean is neither JNI_TRUE nor JNI_FALSE
  5. html5 canvas 鼠标绘制
  6. C# Index 定义索---引具体使用2
  7. 加载程序到android虚拟机报错: android.widget.RelativeLayout cannot be cast to android.widget.Button
  8. html中文乱码
  9. js函数预编译和声明语句被提升问题小结
  10. 如何用php写app接口[原创]
  11. android仿微信红包动画、Kotlin综合应用、Xposed模块、炫酷下拉视觉、UC浏览器滑动动画等源码
  12. UserNotifications ios10 通知使用
  13. C#sealed和final
  14. DELPHI XE10,JSON 生成和解析,再利用INDYHTTP控件POST
  15. mysql创建计算列(5.7以后才有)
  16. python,函数的基本用法
  17. Emacs, Nano, or Vim 编辑器“三剑客”
  18. T4模板批量生成代码文件
  19. Java多线程 -sleep 用法详解
  20. web项目在iis配置好后不能正确访问问题集锦,以及IIS常规设置

热门文章

  1. shell-4.bash的变量:用户自定义变量
  2. 3ds Max修改桌面快捷方式为中文语言
  3. ZBrush实用插件ZAppLink简介
  4. ajax同时提交表单且包含文件
  5. 拉格朗日插值&&快速插值
  6. Pytorch搭建简单神经网络 Task2
  7. 支持JSONP跨域的对象
  8. virt-install 创建虚拟机
  9. hdu 4771 求一点遍历全部给定点的最短路(bfs+dfs)
  10. Mysql信息数据库:Information_schema