亚欧色一区w666天堂,色情一区二区三区免费看,少妇特黄A片一区二区三区,亚洲人成网站999久久久综合,国产av熟女一区二区三区

  • 發布文章
  • 消息中心
點贊
收藏
評論
分享
原創

openconnect構建iOS動態庫

2023-03-20 08:31:13
112
0

openconnect簡介

OpenConnect是一個SSL VPN客戶端,最初創建用于支持思科的AnyConnect SSL VPN。
它已經被移植到支持Juniper SSL VPN(現在被稱為Pulse Connect Secure)、Palo Alto Networks GlobalProtect SSL VPN、F5 Big-IP SSL VPN和Fortinet FortiGate SSL VPN。

 

openconnect提供C語言、Java接口,支持windows、mac、linux、andriod,但不支持ios系統,本文介紹openconnect構建ios版本動態庫。

openconnect以來openssl,openssl構建在另外一篇中介紹。

執行腳本如下:

#!/bin/sh


OPENCONNECTPATH="openconnect-ios"
git clone //gitlab.com/openconnect/openconnect.git ${OPENCONNECTPATH}

#xcodebuild -version
#xcodeversion_current=`xcodebuild -version`
#xcodeversion="13.4.1"
#result=$(echo $xcodeversion_current | grep "$xcodeversion")
#echo $result
#if [[ "$result" != "" ]]
#then
#  echo "此時Xcode版本設置錯誤,請運行命令 'sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer' 來更換Xcode版本 "
#  exit
#fi

# build for iOS 

# this is the folder where the libs will be generated
export OUTPUT_DIR=libs

# Select toolchains folder
export XCODE_TOOLCHAINS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain


#$(CURRENT_ARCH)

build_target()
{
    PLATFORM=$1
    ARCH=$2
    SDK_VERSION=$3
    CONFIGURE_HOST=$4
    IOS_DEPLOYMENT_TARGET=$5

    SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/$PLATFORM.platform/Developer/SDKs/$PLATFORM$SDK_VERSION.sdk


    PKGCONFIGPATH="$(PWD)/libopenssl/$ARCH/lib/pkgconfig"

    #copy pkgconfig
    cp ${PKGCONFIGPATH}/openssl.pc /usr/local/lib/pkgconfig
    cp ${PKGCONFIGPATH}/libssl.pc /usr/local/lib/pkgconfig
    cp ${PKGCONFIGPATH}/libcrypto.pc /usr/local/lib/pkgconfig

    echo ---------------------------------------------------
    echo ---------------------------------------------------
    echo -------------- BUILD OPENCONNECT
    echo -------------- PLATFORM : $PLATFORM
    echo -------------- ARCH : $ARCH
    echo -------------- SDK_VERSION : $SDK_VERSION
    echo -------------- HOST : $CONFIGURE_HOST
    echo -------------- MIN iOS : $IOS_DEPLOYMENT_TARGET
    echo -------------- SDK PATH : $SDKROOT
    echo ---------------------------------------------------
    echo ---------------------------------------------------

    #sleep 3
    cd ${OPENCONNECTPATH}
    sudo ./autogen.sh

    sudo make clean
    sudo ./configure CC="$XCODE_TOOLCHAINS/usr/bin/clang -arch $ARCH"  --prefix=/usr/local/ --with-vpnc-script=/usr/local/etc/vpnc-script \
    --without-gnutls --disable-nls --without-libpcsclite --without-lz4 --host $CONFIGURE_HOST CFLAGS="-g -fPIC -isysroot $SDKROOT"
    

    #x86_64
    #sudo ./configure CC="$XCODE_TOOLCHAINS/usr/bin/clang -arch $ARCH"  --prefix=/usr/local/ --with-vpnc-script=/usr/local/etc/vpnc-script \
    --without-gnutls --disable-nls --without-libpcsclite --without-lz4 --host $CONFIGURE_HOST CFLAGS="-miphoneos-version-min=$IOS_DEPLOYMENT_TARGET -fPIC -isysroot $SDKROOT" 

    sudo make
    sudo make install

    # Copy the lib
    rm -rf $OUTPUT_DIR/$ARCH/
    mkdir $OUTPUT_DIR/$ARCH/

    cp .libs/libopenconnect.5.dylib $OUTPUT_DIR/$ARCH/

}

# Copy the header file too, just for convenience

#build_target "iPhoneOS" "armv7s" "15.5" "arm-apple-darwin" "7.0"
#build_target "iPhoneOS" "armv7" "15.5" "arm-apple-darwin" "11.0"
#build_target "iPhoneOS" "arm64" "15.5" "arm-apple-darwin" "9.0"
build_target "iPhoneSimulator" "x86_64" "15.5" "x86_64-apple-darwin" "9.0"
#build_target "iPhoneSimulator" "i386" "15.5" "i386-apple-darwin" "9.0"

#build_target "MacOSX" "x86_64" "11.4" "i386-apple-darwin" "7.0"

 

 

0條評論
0 / 1000
袁****勛
3文章數
0粉絲數
袁****勛
3 文章 | 0 粉絲
袁****勛
3文章數
0粉絲數
袁****勛
3 文章 | 0 粉絲
原創

openconnect構建iOS動態庫

2023-03-20 08:31:13
112
0

openconnect簡介

OpenConnect是一個SSL VPN客戶端,最初創建用于支持思科的AnyConnect SSL VPN。
它已經被移植到支持Juniper SSL VPN(現在被稱為Pulse Connect Secure)、Palo Alto Networks GlobalProtect SSL VPN、F5 Big-IP SSL VPN和Fortinet FortiGate SSL VPN。

 

openconnect提供C語言、Java接口,支持windows、mac、linux、andriod,但不支持ios系統,本文介紹openconnect構建ios版本動態庫。

openconnect以來openssl,openssl構建在另外一篇中介紹。

執行腳本如下:

#!/bin/sh


OPENCONNECTPATH="openconnect-ios"
git clone //gitlab.com/openconnect/openconnect.git ${OPENCONNECTPATH}

#xcodebuild -version
#xcodeversion_current=`xcodebuild -version`
#xcodeversion="13.4.1"
#result=$(echo $xcodeversion_current | grep "$xcodeversion")
#echo $result
#if [[ "$result" != "" ]]
#then
#  echo "此時Xcode版本設置錯誤,請運行命令 'sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer' 來更換Xcode版本 "
#  exit
#fi

# build for iOS 

# this is the folder where the libs will be generated
export OUTPUT_DIR=libs

# Select toolchains folder
export XCODE_TOOLCHAINS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain


#$(CURRENT_ARCH)

build_target()
{
    PLATFORM=$1
    ARCH=$2
    SDK_VERSION=$3
    CONFIGURE_HOST=$4
    IOS_DEPLOYMENT_TARGET=$5

    SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/$PLATFORM.platform/Developer/SDKs/$PLATFORM$SDK_VERSION.sdk


    PKGCONFIGPATH="$(PWD)/libopenssl/$ARCH/lib/pkgconfig"

    #copy pkgconfig
    cp ${PKGCONFIGPATH}/openssl.pc /usr/local/lib/pkgconfig
    cp ${PKGCONFIGPATH}/libssl.pc /usr/local/lib/pkgconfig
    cp ${PKGCONFIGPATH}/libcrypto.pc /usr/local/lib/pkgconfig

    echo ---------------------------------------------------
    echo ---------------------------------------------------
    echo -------------- BUILD OPENCONNECT
    echo -------------- PLATFORM : $PLATFORM
    echo -------------- ARCH : $ARCH
    echo -------------- SDK_VERSION : $SDK_VERSION
    echo -------------- HOST : $CONFIGURE_HOST
    echo -------------- MIN iOS : $IOS_DEPLOYMENT_TARGET
    echo -------------- SDK PATH : $SDKROOT
    echo ---------------------------------------------------
    echo ---------------------------------------------------

    #sleep 3
    cd ${OPENCONNECTPATH}
    sudo ./autogen.sh

    sudo make clean
    sudo ./configure CC="$XCODE_TOOLCHAINS/usr/bin/clang -arch $ARCH"  --prefix=/usr/local/ --with-vpnc-script=/usr/local/etc/vpnc-script \
    --without-gnutls --disable-nls --without-libpcsclite --without-lz4 --host $CONFIGURE_HOST CFLAGS="-g -fPIC -isysroot $SDKROOT"
    

    #x86_64
    #sudo ./configure CC="$XCODE_TOOLCHAINS/usr/bin/clang -arch $ARCH"  --prefix=/usr/local/ --with-vpnc-script=/usr/local/etc/vpnc-script \
    --without-gnutls --disable-nls --without-libpcsclite --without-lz4 --host $CONFIGURE_HOST CFLAGS="-miphoneos-version-min=$IOS_DEPLOYMENT_TARGET -fPIC -isysroot $SDKROOT" 

    sudo make
    sudo make install

    # Copy the lib
    rm -rf $OUTPUT_DIR/$ARCH/
    mkdir $OUTPUT_DIR/$ARCH/

    cp .libs/libopenconnect.5.dylib $OUTPUT_DIR/$ARCH/

}

# Copy the header file too, just for convenience

#build_target "iPhoneOS" "armv7s" "15.5" "arm-apple-darwin" "7.0"
#build_target "iPhoneOS" "armv7" "15.5" "arm-apple-darwin" "11.0"
#build_target "iPhoneOS" "arm64" "15.5" "arm-apple-darwin" "9.0"
build_target "iPhoneSimulator" "x86_64" "15.5" "x86_64-apple-darwin" "9.0"
#build_target "iPhoneSimulator" "i386" "15.5" "i386-apple-darwin" "9.0"

#build_target "MacOSX" "x86_64" "11.4" "i386-apple-darwin" "7.0"

 

 

文章來自個人專欄
文章 | 訂閱
0條評論
0 / 1000
請輸入你的評論
0
0