From 077f362e2de5d14d93e1cc0534d644fd3286b460 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 17 Mar 2011 18:15:25 -0700 Subject: [PATCH] android: add tips when SDK isn't configured. --- clients/android/Makefile | 2 ++ clients/android/check-environment.pl | 14 ++++++++++++++ clients/android/local.properties.TEMPLATE | 3 +++ 3 files changed, 19 insertions(+) create mode 100755 clients/android/check-environment.pl create mode 100644 clients/android/local.properties.TEMPLATE diff --git a/clients/android/Makefile b/clients/android/Makefile index 78e1fde8d..83ff2e1af 100644 --- a/clients/android/Makefile +++ b/clients/android/Makefile @@ -1,7 +1,9 @@ all: + ./check-environment.pl ant debug # Dummy target to make build.pl happy install: + ./check-environment.pl ant debug diff --git a/clients/android/check-environment.pl b/clients/android/check-environment.pl new file mode 100755 index 000000000..daf1610e2 --- /dev/null +++ b/clients/android/check-environment.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl + +use strict; +use FindBin qw($Bin); + +my $props = "$Bin/local.properties"; +unless (-e $props) { + die "\n". + "**************************************************************\n". + "Can't build the Camlistore Android client; SDK not configured.\n". + "You need to create your $props file.\n". + "See local.properties.TEMPLATE for instructions.\n". + "**************************************************************\n\n"; +} diff --git a/clients/android/local.properties.TEMPLATE b/clients/android/local.properties.TEMPLATE new file mode 100644 index 000000000..32c51f694 --- /dev/null +++ b/clients/android/local.properties.TEMPLATE @@ -0,0 +1,3 @@ +# Copy this file to one named "local.properties" and update this path to +# wherever your Android SDK is located: +sdk.dir=/home/bradfitz/sdk/android