zoukankan      html  css  js  c++  java
  • 合并 ios 静态库

    合并 cordovaLib库:

     

    lipo -create 'Release-iphoneos/libCordova.a' "Release-iphonesimulator/libCordova.a" -output "libCordova.a"

     

    查看: 

     

    lipo -info libCordova.a

     

    合并cordova脚本:

     

     

     define static library target name

    LIB_NAME="Cordova"

     

    # define output folder environment variable

    UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal

    DEVICE_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos

    SIMULATOR_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator

     

    # Step 1. Build Device and Simulator versions

    # insert such -arch i386 before BUILD_DIR assign arch

    xcodebuild -target "${LIB_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

    xcodebuild -target "${LIB_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

     

    # Cleaning the oldest and make sure the output directory exists

    if [ -d "${UNIVERSAL_OUTPUTFOLDER}" ]

    then

    rm -rf "${UNIVERSAL_OUTPUTFOLDER}"

    fi

    mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"

     

    # Step 2. Create universal binary file using lipo

    lipo -create "${DEVICE_DIR}/lib${LIB_NAME}.a" "${SIMULATOR_DIR}/lib${LIB_NAME}.a" -output "${UNIVERSAL_OUTPUTFOLDER}/lib${LIB_NAME}.a"

     

    # Last touch. copy the header files. Just for convenience

    cp -R "${DEVICE_DIR}/include" "${UNIVERSAL_OUTPUTFOLDER}/"

    #open the universal dir

    open "${UNIVERSAL_OUTPUTFOLDER}/"

     

    #delete DEVICE and SIMULATOR build file

    #rm -rf "${DEVICE_DIR}"

    #rm -rf "${SIMULATOR_DIR}"

  • 相关阅读:
    DBCC 常用命令
    查看数据库备份情况
    identity 列自动增长问题(SQL Server 2012 Auto Identity Column Value Jump Issue)
    job相关脚本
    Ad hoc update to system catalogs is not supported
    数据库加密&证书创建
    sp_MSforeachdb&sp_MSforeachtable&sp_MSforeachobject&查看某个对象的依赖对象
    session 学习
    Eclipse Python Djando 环境配置
    MySQL 日志文件与相关参数
  • 原文地址:https://www.cnblogs.com/headchen/p/5844578.html
Copyright © 2011-2022 走看看