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}"

  • 相关阅读:
    hdu2476 string painter
    lightoj1422 Halloween Costumes
    cf1369D---找规律,递推
    cf1368D---贪心
    cf1373D---思维,最大子段和
    poj2279 Mr. Young's Picture Permutations
    AT2442 fohen phenomenon 差分
    poj2796 feel good 单调栈
    poj2082 terrible sets 单调栈
    洛谷P2979 cheese towers
  • 原文地址:https://www.cnblogs.com/headchen/p/5844578.html
Copyright © 2011-2022 走看看