diff options
author | SammysHP <sven@sammyshp.de> | 2011-08-02 14:17:02 +0200 |
---|---|---|
committer | SammysHP <sven@sammyshp.de> | 2011-08-02 14:17:02 +0200 |
commit | adca83cf3792eadec567e2fcdc2ae0ca16d4d195 (patch) | |
tree | e6058ee7aeea88c5f1c6b56344261c28fa75ff12 | |
parent | eb5cb7491ae133e74fe485f5670d9b666556b940 (diff) | |
download | cgeo-adca83cf3792eadec567e2fcdc2ae0ca16d4d195.zip cgeo-adca83cf3792eadec567e2fcdc2ae0ca16d4d195.tar.gz cgeo-adca83cf3792eadec567e2fcdc2ae0ca16d4d195.tar.bz2 |
Add Ant relating files, closes #44
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | BUILDNOTES | 32 | ||||
-rw-r--r-- | build.xml | 90 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | templates/mapsapikey.xml | 4 | ||||
-rw-r--r-- | templates/private.properties | 17 |
6 files changed, 146 insertions, 4 deletions
@@ -1,2 +1,5 @@ /bin /gen +/local.properties +/private.properties +/res/values/mapsapikey.xml
\ No newline at end of file diff --git a/BUILDNOTES b/BUILDNOTES new file mode 100644 index 0000000..98d8daf --- /dev/null +++ b/BUILDNOTES @@ -0,0 +1,32 @@ ++------------------------------------------------------------------------------+ +| | +| Building c:geo | +| | ++------------------------------------------------------------------------------+ + + +I. Ant + + 1. copy ./templates/private.properties to ./ + 2. edit private.properties (see comments) + 3. run in ./ one of the following commands: + ant help + ant clean + ant debug + ant release + + +II. Other + + follow steps from above, but run + ant -pre-build + + -- or -- + + 1) copy ./templates/mapsapikey.xml to ./res/values/ + 2) edit ./templates/mapsapikey.xml and insert your api-key + + +Notes for Eclipse: + You can't select the targets from above in ant-configuration, but you can + add one of them in Main->Arguments.
\ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..c372e2b --- /dev/null +++ b/build.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<project name="cgeo">
+
+<!-- The local.properties file is created and updated by the 'android'
+ tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The build.properties file can be created by you and is never touched
+ by the 'android' tool. This is the place to change some of the
+ default property values used by the Ant rules.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="build.properties" />
+
+ <!-- The default.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <property file="default.properties" />
+
+ <!-- The private.properties file sets api-keys as well as keystore,
+ certificate and passwords (if you want).
+ See /templates/private.properties for more information. -->
+ <property file="private.properties" />
+
+
+ <!-- Required pre-setup import -->
+ <import file="${sdk.dir}/tools/ant/pre_setup.xml" />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+
+ <target name="-pre-build">
+ <filterset id="build-tokens">
+ <filter token="maps.api.key" value="${maps.api.key}"/>
+ </filterset>
+ <copy file="./templates/mapsapikey.xml" todir="./res/values/" overwrite="true">
+ <filterset refid="build-tokens" />
+ </copy>
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ <!-- [This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir}] -->
+ <target name="-post-compile">
+ </target>
+
+
+ <!-- Execute the Android Setup task that will setup some properties
+ specific to the target, and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/tools/ant/
+ Depending on the project type it can be either:
+ - main_rules.xml
+ - lib_rules.xml
+ - test_rules.xml
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <setup> task.
+ - customize it to your needs.
+ - Customize the whole script.
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, *after* the <setup> task
+ - disable the import of the rules by changing the setup task
+ below to <setup import="false" />.
+ - customize to your needs.
+ -->
+ <setup />
+
+</project>
diff --git a/res/values/strings.xml b/res/values/strings.xml index 2509377..34987bc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3,10 +3,6 @@ <string name="app_name">c:geo</string> <string name="app_name_compass">c:geo compass</string> - <!-- keys --> - <string name="maps_api_key">0_xEJVmqy36u8h1HaFz1YeOknLa7fozNSKI4lHg</string> <!-- dev --> - <string name="maps_api_keyx">0_xEJVmqy36vnWDcOuXUXTpS6JMk-OuN3w1BfJw</string> <!-- market --> - <!-- basics --> <string name="cache">Cache</string> <string name="detail">Detail</string> diff --git a/templates/mapsapikey.xml b/templates/mapsapikey.xml new file mode 100644 index 0000000..5514121 --- /dev/null +++ b/templates/mapsapikey.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources> + <string name="maps_api_key">@maps.api.key@</string> +</resources> diff --git a/templates/private.properties b/templates/private.properties new file mode 100644 index 0000000..7f48ddf --- /dev/null +++ b/templates/private.properties @@ -0,0 +1,17 @@ +# The API-key is necessary in order that Google Maps is working. +# You can get one at +# http://code.google.com/intl/de/android/add-ons/google-apis/maps-api-signup.html + +maps.api.key= + + +# Uncomment the following lines if you want Ant to sign the application +# automatically. Otherwise you must sign and zipalign it manually. +# If you don't enter passwords you'll be asked for it. +# +# Note: You have to escape backslashes (e.g. C:\\Programs) + +#key.store= +#key.alias= +#key.store.password= +#key.alias.password= |