iOS2011. 7. 21. 10:20

http://www.luuvish.org/208

VLC는 한번에 제대로 컴파일된 적이 없네요. iOS 버전은 최근에 작업중인지 그나마 덜 고생하고 컴파일 성공했습니다. 프로젝트들이 얽혀있어 분석이 쉽진 않겠네요.

$ tar jxvf VLC-1.1.0-iOS.tar.bz2
$ ln -s VLC-1.1.0-iOS vlc
$ cd vlc/extras/package/ios
  • build_for_iOS.sh 을 열어서 SDK 버전을 수정합니다. 현재 최신버전은 4.2.sdk입니다. IOS_SDK_ROOT="${DEVROOT}/SDKs/iPhone${PLATFORM}3.2.sdk"
  • build_for_iOS.sh 를 실행해서 컴파일해 보면 중간에 에러가 나면서 멈춥니다. patch file의 버전문제인데 ../../contrib/src-arm-apple-darwin10-ios/src/Patches/live-inet_ntop.patch의 161-185 라인을 참고해서 ../../contrib/src-arm-apple-darwin10-ios/src/live/liveMedia/RTSPServer.cpp을 직접 수정하면 됩니다. our_inet_ntoa()의 두번째 인자로 buf를 추가하기만 하면됩니다.
  • 이제 build_for_iOS.sh를 실행해서 컴파일합니다. 완료되면 vlc/install-ios-OS에 해더와 라이브러리가 생성됩니다.
  • MobileVLCKit의 static plugins를 build합니다.
$ cd vlc/projects/macosx/framework
$ xcodebuild -project MobileVLCKit.xcodeproj -target "Aggregate static plugins" -configuration "Release"
  • MobileVLCKit의 MobileVLCKit의 SDK 버전을 최신버전으로 수정하고 build합니다.
$ open MobileVLCKit.xcodeproj
fix Targets/MobileVLCKit - Get Info / Build
Configuration : All Configurations
Architectures / Base SDK : Latest iOS
$ xcodebuild -project MobileVLCKit.xcodeproj -target "MobileVLCKit" -configuration "Release"



MediaLibraryKit compile하기
  • 작업디렉토리(VLC-1.1.0-iOS와 같은 위치)에 MediaLibraryKit 디렉토리를 만들고 압축을 풉니다.
$ mkdir MediaLibraryKit && cd MediaLibraryKit
$ unzip MediaLibraryKit-1.1.0.zip
  • External 디렉토리로 들어가 MobileVLCKit의 링크를 만듭니다.
$ ln -s ../../vlc/projects/macosx/framework/build/Release-iphoneos MobileVLCKit
  • MediaLibraryKit의 SDK 버전을 최신버전으로 수정하고 build합니다.
$ open MobileMediaLibraryKit.xcodeproj
fix Targets/MobileMediaLibraryKit - Get Info / Build
Configuration : All Configurations
Architectures / Base SDK : Latest iOS
$ xcodebuild -project MobileMediaLibraryKit.xcodeproj -configuration "Release"



MobileVLC compile하기
  • 작업디렉토리(VLC-1.1.0-iOS와 같은 위치)에서 MobileVLC의 압축을 풉니다.
$ tar zxvf MobileVLC-1.1.0.tar.gz
$ cd MobileVLC
  • External 밑에 있는 MediaLibraryKit와 MobileVLCKit의 링크가 제대로 되어있는지 확인합니다.
  • MobileVLC의 SDK 버전을 최신버전으로 수정하고 build합니다.
$ open MobileVLC.xcodeproj
fix Targets/MobileVLC - Get Info / Build
Configuration : All Configurations
Architectures / Architectures : Standard (armv6 armv7)
Architectures / Base SDK : Latest iOS
build with Device-Release configurations

Posted by 삼스