• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Jun-2020-

gen/com/enst/gpac/H16-Jun-2020-2415

jni/H16-Jun-2020-896703

res/H16-Jun-2020-1917

src/com/enst/gpac/H16-Jun-2020-1310

AndroidManifest.xmlH A D16-Jun-2020672 1816

READMEH A D16-Jun-20203.8 KiB7545

default.propertiesH A D16-Jun-2020362 1210

README

1*********************************
2* How to build GPAC for Android *
3*********************************
4
5To compile GPAC for Android, please execute the following steps:
6
71) Check out the GPAC GIT repository (but if you read this you probably already checkouted the GPAC repository):
8
9	git clone https://github.com/gpac/gpac
10	This directory will be reminded as <GPAC_DIR>
11
12Get the extra lib packages from http://download.tsi.telecom-paristech.fr/gpac/gpac_extra_libs.zip and unzip the archive.
13This directory will be reminded as <GPAC_EXTRA_DIR>
14
15
162) Get the Android softwares:
17
18	A. Download the Android NDK at http://developer.android.com/sdk/ndk/index.html and unzip it at a place of your choice (referenced as <ANDROID_NDK_DIR>).
19
20	B. Download the Java Development Kit at http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html (referenced as <JDK_DIR>)
21
22	C. One of the following tools i) or ii) are needed for building the Android Package (APK):
23		i)  GPAC provides scripts to build the APK from the shell. No IDE is needed.
24				You will then ignore every step in this readme that follow the ii) mark (as it concerns only people using Android Studio).
25
26		ii) Android Studio is useful if you want to go beyond the build (ie debug, add features, use the simulator etc). Firstly get Android Studio at https://developer.android.com/studio/index.html
27
28
29	D. Get and install SDK Component for Android:
30
31		i)  If you build without Android Studio, download the basic Android command line tools at https://developer.android.com/studio/index.html (at the bottom of the page), unzip it and launch tools/android. This opens a window. In "Tools" folder select "Android SDK Build-tools 23.0.3" and "Android API 23", in "Extras" folder select "Android Support Repository" and "Google Repository" and then Install packages  at SDK Path (referenced as <ANDROID_SDK_DIR>).
32
33		ii) If you use Android Studio, during installation you should tick the option  Android SDK, so it will be downloaded
34
353) Compile extra-libs for android
36
37	A. Unzip all libs
38
39		Go to <GPAC_EXTRA_DIR>. Set the right to execute the unzip_all script (e.g. chmod +x unzip_all.sh)
40		Run the script as follows :  ./unzip_all
41
42	B. Build all extra-libs
43
44		Go to <GPAC_EXTRA_DIR>/build/android. Set the right to execute the script gpac_build_all_extra_libs (e.g. chmod u+x gpac_build_all_extra_libs ).
45		Run the script as follows : ./gpac_build_all_extra_libs <ANDROID_NDK_DIR>
46
47		NOTE: In case there is an error compiling ffmpeg, make sure there is permission to execute the script compile_ffmpeg_android as well (e.g. chmod u+rxw compile_ffmpeg_android)
48
49 	C. Copy all the compiled extra lib to the right folder
50
51		Go back to <GPAC_EXTRA_DIR>
52		Copy the just compiled libs into <GPAC_DIR>/extra_lib/lib/android by entering this command :
53		cp -r lib/android/* <GPAC_DIR>/extra_lib/lib/android/
54
554) Building GPAC for Android
56
57	(optional) Links the Android SDK and NDK directories
58
59		* cd /opt/
60		* sudo ln -s /home/xxx/xxx/<Android SDK> android_sdk /* /opt/android_sdk will then become your new <ANDROID_SDK_DIR> */
61		* sudo ln -s /home/xxx/xxx/<Android NDK> android_ndk /* /opt/android_ndk will then become your new <ANDROID_NDK_DIR> */
62
63	i) Building Osmo4.apk without Android Studio
64
65		 Go to GPAC_DIR/build/android/jni and launch the script
66		./gpac_build_android -ndk=<ANDROID_NDK_DIR> -sdk=<ANDROID_SDK_DIR> -jdk=<JDK_DIR>
67		It will generate the package Osmo4.apk.
68		You can find the APK in <GPAC_DIR>/applications/osmo4_android_studio/app/build/outputs/apk
69
70  ii)Building Osmo4.apk with Android Studio
71
72		Go to GPAC_DIR/build/android/jni and launch the script
73		./gpac_build_android <ANDROID_NDK_DIR>
74		Open Android Studio, click on "open an existing Android Studio project" and put <GPAC_DIR>/applications/osmo4_android_studio and build project
75