美文网首页
ios RDP 协议

ios RDP 协议

作者: 魔童转世 | 来源:发表于2018-08-10 11:55 被阅读0次

今天也做一个翻译君,是因为发现国内没有大神翻译,实在是没办法了,只好看英文了,翻译一遍就当对文档的理解吧
翻译协议FreeRDP(https://github.com/FreeRDP/FreeRDP) IOS编译过程

概述

FreeRDP 让用户能够在ios设备上享受到远程桌面的功能,此应用运行在ios 4.3以上的系统

构建要求

The following prerequisites are required in order to build the iOS port:
编译ios版本 必须具备以下要求

  • cmake version >= 2.8.9

  • latest Xcode installed (>= 4.6)

  • installed Provisioning Profile and iOS Developer Certificate for code signing
    (not required for simulator builds)

  • pre-build static OpenSSL libraries (see below)

  • FreeRDP需要OpenSSL库建设,但他们不是iOS SDK的一部分,因此他们需要手动预构建。(我理解的意思是,电脑上需要装一个openssl 库,一般mac系统都自带的有,不需要重新安装)

  • 有各种各样的版本和构建静态库OpenSSL 就像iosprorts

  • 在本文写作的时候, 我们已经用测试了用一个小脚本去下载并且编译armv7、armv7s、i386版本的openssl 1.0.0 库

如果你不想修改openssl的编译,你可以在freeRDP的跟目录运行下面的命令

./scripts/OpenSSL-DownloadAndBuild.command 

脚本默认输出目录在 external/openssl/ 在实际情况中,你可以指定输出的目录

./scripts/OpenSSL-DownloadAndBuild.command  /tmp/

例子中脚本将输出在/tmp/openssl.

脚本默认使用老的iOS / iPhoneSimulator SDK构建。如果是需要建立对一个特定的SDK版本 ,可以使用变量SDK_VERSION来指定它。最低SDK版本应该可以设置使用MIN_SDK_VERSION在脚本。

当脚本运行完成你讲得到库libcrypto.a和libssl.at 两个通用库包含所有openssl / lib文件夹中指定的安装目录(外部默认)

如果你已经建立OpenSSL或用FREERDP_IOS_EXTERNAL_SSL_PATH 指定你自己编译的openssl库目录。

构建

cmake -DCMAKE_TOOLCHAIN_FILE=cmake/iOSToolchain.cmake -GXcode

这个命令将在FreeRDP跟目录创建 XCode工程,用xcode打开工程,构建并运行

你可以用xcodebuild命令构建xcodebuild -project FreeRDP.xcodeproj -configuration Debug -sdk iphoneos6.1,也可以用cmake --build . 构建目录 (没看明白这是想干啥的)

xcodebuild -project FreeRDP.xcodeproj -configuration Debug -sdk iphoneos6.1
cmake --build . 

说明:

  • XCode,默认应用程序的xxx(xxx是看不懂的意思)数据保存在(~/Library/Developer/...),如果你想指定输出的位置,添加CONFIGURATION_BUILD_DIR=<output-path-here> 到上文中命令行的末尾
  • If using XCode choose "Open Other" from the welcome screen, browse to the FreeRDP root directory and select FreeRDP.xcodeproj. Alternatively you can also start it with "open FreeRDP.xcodeproj".(此句话理解不了,可能是智商问题吧,大神路过要指正下)
  • 如果你用模拟器或者是OS ,请在运行cmake志强 删除 CMakeCache.txt 和 CMakeFiles/ ,另外如果构建报错(这可能是cmake的的一个bug),请跟换不同的平台
rm CMakeCache.txt
rm -rf CMakeFiles/

cmake variables

CMAKE_TOOLCHAIN_FILE

  • toolchain必须用 cmake/iOSToolchain.cmake

IOS_PLATFORM (OS (default), SIMULATOR)

  • the platform for which to build iFreeRDP. OS compiles for iOS devices (using armv7 and armv7s ABIs) and SIMULATOR compiles for the iOS Simulator (i386)
    *平台选择 OS IOS(using armv7 and armv7s ABIs) 模拟器

CMAKE_IOS_DEVELOPER_ROOT (used by toolchain file)

  • ios平台开发的绝地路径
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer) the toolchain file will usually auto-detect the correct Developer platform depending on IOS_PLATFORM

CMAKE_IOS_SDK_ROOT (used by toolchain file)
*IOS SDK 绝对路径
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk) the toolchain file will usually auto-detect the correct SDK, depending on IOS_PLATFORM

FREERDP_IOS_EXTERNAL_SSL_PATH (used by FindOpenSSL)

  • absolut root path to the pre-built static OpenSSL libraries

CODE_SIGN_IDENTITY

  • specify the identity to sign the code with

相关文章

网友评论

      本文标题:ios RDP 协议

      本文链接:https://www.haomeiwen.com/subject/fnlkbftx.html