Difference between revisions of "AndroidCompile"
Line 53: | Line 53: | ||
== Environment setup == | == Environment setup == | ||
− | + | === Linux and autotools === | |
+ | |||
+ | You '''MUST''' be on Linux, and a recent one. | ||
+ | |||
+ | You '''MUST''' have installed: ''autoconf'', ''automake'', ''libtool'', ''gcc'', ''g++'', ''pkg-config''. And very up-to-date versions of those tools. | ||
+ | |||
+ | You '''MUST''' install: ''git''. | ||
+ | |||
+ | === Environment === | ||
Set $ANDROID_SDK to point to your android SDK directory | Set $ANDROID_SDK to point to your android SDK directory | ||
Line 71: | Line 79: | ||
export NO_NEON=1 | export NO_NEON=1 | ||
− | Those exports must be set at all times, notably for the contribs and the configure. | + | Those exports must be set at all times, notably for the contribs and the configure. |
= Get VLC Source = | = Get VLC Source = |
Revision as of 12:28, 19 October 2011
This page is an introduction to compilation of VLC for Android on Linux.
Contents
Eclipse, SDK and NDK installation
Android SDK
- Create a working directory android.
- Go to Android SDK page and download android-sdk_r10-linux_x86.tgz.
- Decompress into android folder.
- Run tools/android.
- In the tool, install "SDK Platform Android 2.3, API 10", and follow the instructions.
You can have more details, if needed.
Android NDK
- Check that the SDK installation is correct.
- Go to Android NDK page.
- Download http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2.
- Decompress into android folder, next to your android-sdk-linux_x86 folder.
Eclipse
As used by your distribution, install eclipse with your package manager:
apt-get install eclipse (debian) yum install eclipse (Fedora) pacman -S eclipse (Arch) emerge -av eclipse-sdk (Gentoo) ...
And run it, at least once, and then quit eclipse.
ADT
The ADT plugin is required to compile on Android.
- Go to ADT page.
- Start Eclipse, then select Help > Install New Software....
- Add the "ADT Plugin" repository with https://dl-ssl.google.com/android/eclipse/ as URL
- Validate and select the checkbox next to Developer Tools and click Next, Next, Finish.
- Restart Eclipse.
- Go to Menu > Window > Preferences... and then Android from the left pane.
- Point the SDK Location in to your downloaded SDK directory.
- Ok, and quit Eclipse.
Environment setup
Linux and autotools
You MUST be on Linux, and a recent one.
You MUST have installed: autoconf, automake, libtool, gcc, g++, pkg-config. And very up-to-date versions of those tools.
You MUST install: git.
Environment
Set $ANDROID_SDK to point to your android SDK directory
export ANDROID_SDK=/path/to/android-sdk
Set $ANDROID_NDK to point to your android NDK directory
export ANDROID_NDK=/path/to/android-ndk
Add some useful binaries in your path
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools
If you plan to use the emulator, you need a build without neon
export NO_NEON=1
Those exports must be set at all times, notably for the contribs and the configure.
Get VLC Source
Use the VLC git repository to get the source!
In your android folder, run:
git clone git://git.videolan.org/vlc-ports/android.git
Compile
run
sh install.sh
Package in eclipse
- In Eclipse, create a new Android project from existing source by giving the extra/platform/android/vlc-android path.
- Compile your project using Eclipse.
Run
Run it and enjoy!