Commit 3d9e621a authored by Rafaël Carré's avatar Rafaël Carré
Browse files

Get sdk.dir from $ANDROID_SDK

Let local.properties override the definition if it exists
Don't generate local.properties anymore
parent d73eaac5
......@@ -11,7 +11,7 @@ PRIVATE_LIBS=$(PRIVATE_LIBDIR)/libstagefright.so $(PRIVATE_LIBDIR)/libmedia.so $
# Verbose level: -q -v or nothing (default verbose)
VERBOSE ?= -v
$(VLC_APK): $(LIBVLCJNI) $(JAVA_SOURCES) vlc-android/local.properties
$(VLC_APK): $(LIBVLCJNI) $(JAVA_SOURCES)
cd vlc-android && ant $(VERBOSE) debug
VLC_MODULES=`find $(VLC_BUILD_DIR)/modules -name 'lib*_plugin.a'|grep -v stats|tr \\\\n \ `
......@@ -57,16 +57,12 @@ $(LIBVLCJNI): $(JNI_SOURCES) $(LIBVLCJNI_H) $(PRIVATE_LIBS)
VLC_BUILD_DIR="$$VLC_BUILD_DIR" \
VLC_MODULES="$$vlc_modules"
vlc-android/local.properties:
@if [ -z "$$ANDROID_SDK" ]; then echo "ANDROID_SDK not defined" ; exit 1; fi
printf "# Auto-generated file. Do not edit.\nsdk.dir=$$ANDROID_SDK" > $@
clean:
cd vlc-android && rm -rf gen libs obj bin $(VLC_APK)
rm -f $(PRIVATE_LIBDIR)/*.so $(PRIVATE_LIBDIR)/*.c
distclean: clean
rm -f $(LIBVLCJNI) $(LIBVLCJNI_H) vlc-android/local.properties
rm -f $(LIBVLCJNI) $(LIBVLCJNI_H)
install: $(VLC_APK)
@echo "=== Installing VLC on device ==="
......
......@@ -2,6 +2,5 @@ bin
gen
libs/armeabi/libvlcjni.so
obj
local.properties
jni/libvlcjni.h
.settings
......@@ -39,9 +39,17 @@
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_SDK}" >
<and>
<not><isset property="${env.ANDROID_SDK}"/></not>
<not><isset property="sdk.dir"/></not>
</and>
</condition>
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through $ANDROID_SDK env var"
unless="sdk.dir"
/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment