install.sh 1.8 KB
Newer Older
ivoire's avatar
ivoire committed
1
2
3
4
5
6
7
8
9
#! /bin/sh

GIT=git

if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
   echo "You must define ANDROID_NDK and ANDROID_SDK before starting";
   exit 1;
fi;

10
11
12
13
14
15
16
17
18
19
20
21
22
echo "Fetching Android system headers"
# Using CyanogenMod headers instead of AOSP, since CyanogenMod
# has commit 1563f4aca88d354c502dba056d173cefc7c2ea7f,
# "Stagefright: Memcpy optimization on output port." (available
# upstream at https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base.git;a=commit;h=052368f194c9fc180b9b0335b60114a2f1fb88d8),
# which adds some vtable entries needed on newer qualcomm devices.
$GIT clone --depth=1 git://github.com/CyanogenMod/android_frameworks_base.git android-headers/frameworks/base
$GIT clone --depth=1 git://github.com/CyanogenMod/android_system_core.git android-headers/system/core
export ANDROID_SYS_HEADERS=${PWD}/android-headers

echo "Fetching Android libraries for linking"
# Libraries from any froyo/gingerbread device/emulator should work
# fine, since the symbols used should be available on most of them.
23
24
25
26
27
28
if [ ! -f "update-cm-7.0.3-N1-signed.zip" ]; then
    wget http://download.cyanogenmod.com/get/update-cm-7.0.3-N1-signed.zip
    unzip update-cm-7.0.3-N1-signed.zip system/lib/*
    mv system/lib android-libs
    rmdir system
fi
29
30
export ANDROID_LIBS=${PWD}/android-libs

ivoire's avatar
ivoire committed
31
32
33
34
35
echo "Cloning and updating VLC"
$GIT clone git://git.videolan.org/vlc.git

echo "Applying the patches"
cd vlc
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
36
$GIT am ../patches/*.patch || $GIT am --abort
ivoire's avatar
ivoire committed
37
38
39
40
41
42

echo "Building the contribs"
cd extras/contrib && ./bootstrap -t arm-eabi -d android && make

cd ../.. && mkdir -p android && cd android

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
43
44
if test ! -s "../configure"
then
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
45
46
47
    echo "Bootstraping"
    ../bootstrap
fi;
ivoire's avatar
ivoire committed
48
49
50
51

echo "Configuring"
sh ../extras/package/android/configure.sh

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
52
echo "Building"
ivoire's avatar
ivoire committed
53
make
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
54
55
56
57
58

echo "Building Android"
cd ../../
make distclean
VLC_BUILD_DIR=vlc/android make