網頁

2016年4月6日 星期三

三 VideoLAN Compile 成熟篇

不了解 git 即使能編譯完成,那也只是幸運!
apt-get install apt-show-version

git clone 會取得完整的程式庫,clone 後你就可以使用下列命令

$ git tag -n
列出主要版本 tag
$ git log --pretty=format:'%H %h %ci' -n 10
列出最近的10個版本
$ git log --tags --simplify-by-decoration --pretty="format:%ci %h %d %H"

$ git checkout tags/<tag_name>
使的整的程式庫呈現,tag版本的狀態
$ git checkout master
$ git checkout 035d652
$ git checkout 'master@{2016-03-24 10:02:16}'
$ git checkout -- HEAD

$ git reset --hard
$ git clean -f -d
完整地回復到最後版本,並且刪除不必要的檔案

針對某一檔案
$ git log filename
$ git --no-pager diff 99388eb:filename bdc798c:filename
$ git archive -o foo.tar 99388eb


話說回到 VideoLAN,因為整個計畫太大,所以將一些子計畫放入 contrib 目錄
而 make prebuilt 就是使用編譯好的子計畫
主計畫和子計畫並不一定能同步,據我的經驗要同步很難,所以編譯不過是正常的
真正的重點就是調整計畫的版本

以下是遇到的問題紀錄
add-apt-repository ppa:ubuntu-wine/ppa
add-apt-repository ppa:n-muench/vlc
apt-get update
apt-get install wine1.8-dev
apt-get install libsidplay2-dev
apt-get install libdvd-pkg
apt-get install libdvdread-dev

LUA 要使用32位元的版本,否則會遇下列問題
checking for LUA... no
configure: WARNING: No package 'lua5.2' found, trying lua 5.1 instead
checking for LUA... no
configure: WARNING: No package 'lua5.1' found, trying lua >= 5.1 instead
checking for LUA... yes
checking for luac... luac
configure: error: You need 32-bits luac when using lua from contrib.

32位元版本的安裝就是加上 :i386
apt-get install lua5.2:i386
apt-get install lua5.2-dev:i386
apt-get install liblua5.2:i386
apt-get install liblua5.2-dev:i386

在 contrib 下的 lua 要回復到 5.1 版,之後的版本會遇到 module 的問題
如 lua/modules/common.lua 之
module("common",package.seeall)

下列命令可以測試 lua 版本
contrib/i686-w64-mingw32/bin# ./luac -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

主程式版本
d445720262fbc0eb6c7e3e1244280aee2c492e08 d445720 2016-03-23 14:47:50 +0100

LUA 回復版本
git checkout c433918ec056f0b6a1b6ecbce01e03f62bc68ebf contrib/src/lua

ffmpeg 回復版本
vi contrib/src/ffmpeg/rules.mak
ifdef USE_FFMPEG
else
#HASH=HEAD
HASH=73b0324


沒有留言:

張貼留言