前幾天還說編譯vlc for iphone buildMobileVLC.sh改進了很多,解決了一些以前的bug,好很多,這些都是表像。安裝Xcode 4.0後,再編譯,差錯一個都不少,陸陸續續搞了一個星期,大致理順。
=======================================
準備好檔案,可備份MobileVLC,進行多次編譯調試
=======================================
git clone git://git.videolan.org/MobileVLC.git
cd MobileVLC
mkdir -p ImportedSources
cd ImportedSources
git clone git://git.videolan.org/vlc.git
git clone git://github.com/pdherbemont/MediaLibraryKit.git
=======================================
因為Xcode4.0的變化,修改MobileVLC/ImportedSources/vlc/extras/contrib/bootstrap
=======================================
增加:EXTRA_LDFLAGS=”${EXTRA_LDFLAGS} -isysroot ${IOS_SDK_ROOT}”
case “$DISTRO” in
ios)
if test -z “$IOS_SDK_ROOT”; then
error “The bootstrap script requires the IOS_SDK_ROOT environment ”
error “variable to be set when building for iOS”
exit 1
fi
add_makefile_cfg “IOS_SDK_ROOT = ${IOS_SDK_ROOT}”
EXTRA_LDFLAGS=”${EXTRA_LDFLAGS} -isysroot ${IOS_SDK_ROOT}”
=======================================
修改MobileVLC/ImportedSources/vlc/extras/package/ios/build.sh,字寫錯
=======================================
把–with-macosx-sdk=${OS_SDK_ROOT}改成–with-macosx-sdk=${IOS_SDK_ROOT}
=======================================
修改MobileVLCKit工程中的MobileVLC/ImportedSources/vlc/projects/macosx/framework/MobileVLCKit/AggregateStaticPlugins.sh,找不到庫檔案,直接刪除掉
=======================================
#plugins+=”audio_filter/bandlimited_resampler ”
#plugins+=”demux/ts ”
#plugins+=”misc/xtag
=======================================
試編譯
=======================================
cd MobileVLC/
./buildMobileVLC.sh -v -k iphoneos4.3
ffmpeg ok
libVLC ok
MobileVLCKit.xcodeproj ok
MobileMediaLibraryKit.xcodeproj ok
MobileVLC/MobileVLC.xcodeproj armv7與armv6衝突,算你狠