Fixed build errors and updated documentation.

This commit is contained in:
Alexander Zolotarev 2015-12-05 11:13:22 +03:00
parent b2cdcc0f96
commit 55a4b544b4
7 changed files with 39 additions and 18 deletions

View file

@ -2,8 +2,8 @@ To compile guides apk you need to create local.properties file with two values:
sdk.dir=/Full/path/to/android/sdk sdk.dir=/Full/path/to/android/sdk
ndk.dir=/Full/path/to/android/ndk ndk.dir=/Full/path/to/android/ndk
and you need to clone mapswithme android api repo (don't forget to update it if already cloned): and you need to clone mapsme android api repo (don't forget to update it if already cloned):
cd 3rdparty; git clone git@github.com:mapswithme/api-android.git cd 3rdparty; git clone git@github.com:mapsme/api-android.git
Use Use
./gradlew installDebug (or iD) to build and install debug version or ./gradlew installDebug (or iD) to build and install debug version or

View file

@ -1,9 +1,9 @@
buildscript { buildscript {
repositories { mavenCentral() } repositories { mavenCentral() }
dependencies { classpath 'com.android.tools.build:gradle:0.11.+' } dependencies { classpath 'com.android.tools.build:gradle:1.3.1' }
} }
apply plugin: 'android' apply plugin: 'com.android.application'
dependencies { dependencies {
compile propAndroidSupportLibrary compile propAndroidSupportLibrary
@ -30,8 +30,8 @@ android {
buildTypes { buildTypes {
debug { debug {
jniDebugBuild true jniDebuggable true
packageNameSuffix ".debug" applicationIdSuffix ".debug"
} }
release { release {
@ -42,7 +42,7 @@ android {
defaultConfig { defaultConfig {
versionCode = Integer.valueOf(GWMvc) versionCode = Integer.valueOf(GWMvc)
versionName = GWMvn versionName = GWMvn
packageName = GWMpn applicationId = GWMpn
minSdkVersion propMinSdkVersion.toInteger() minSdkVersion propMinSdkVersion.toInteger()
targetSdkVersion propTargetSdkVersion.toInteger() targetSdkVersion propTargetSdkVersion.toInteger()
} }
@ -63,7 +63,7 @@ android {
// replace app name // replace app name
android.applicationVariants.all { variant -> android.applicationVariants.all { variant ->
variant.mergeResources.doLast { variant.mergeResources.doLast {
File valuesFile = file("${buildDir}/intermediates/res/${variant.dirName}/values/values.xml") File valuesFile = file("${buildDir}/intermediates/res/merged/${variant.dirName}/values/values.xml")
println "Replacing app name in " + valuesFile println "Replacing app name in " + valuesFile
println "App name = " + GWMappName println "App name = " + GWMappName
@ -96,8 +96,8 @@ task copyNativeLibs(type: Copy, dependsOn: 'ndkBuild') {
into new File(buildDir, 'native-libs') into new File(buildDir, 'native-libs')
} }
tasks.withType(Compile) { compileTask -> compileTask.dependsOn ndkBuild } tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn ndkBuild }
tasks.withType(Compile) { compileTask -> compileTask.dependsOn copyNativeLibs } tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyNativeLibs }
clean.dependsOn 'cleanCopyNativeLibs' clean.dependsOn 'cleanCopyNativeLibs'
clean.dependsOn 'ndkBuildClean' clean.dependsOn 'ndkBuildClean'

View file

@ -4,7 +4,7 @@ GWMpn=com.guidewithme.germany
GWMapk=GuideWithMe Germany GWMapk=GuideWithMe Germany
GWMappName=GuideWithMe Germany GWMappName=GuideWithMe Germany
GWMndkFlags=propNdkFlags=V=0 NDK_DEBUG=0 GWMndkFlags=propNdkFlags=V=0 NDK_DEBUG=0
propAndroidSupportLibrary=com.android.support:support-v4:19.1.+ propAndroidSupportLibrary=com.android.support:support-v4:+
propMinSdkVersion=11 propMinSdkVersion=11
propTargetSdkVersion=19 propTargetSdkVersion=22
propBuildToolsVersion=19.1 propBuildToolsVersion=22.0.1

View file

@ -1,6 +1,6 @@
#Mon Jun 09 21:06:40 HST 2014 #Sat Dec 05 11:21:19 MSK 2015
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip

View file

@ -14,6 +14,7 @@ public class KeyMap
static static
{ {
// These keys are unique for each Google Play account.
COUTRY_2_KEY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3Yw5S3owvNgKda+fYo6h65tH+nM5yeHVkgYiRqdV6h0zAGWLH5NcFnIKlQZbp2gUWz4QIrmJPUnevGObVV84q3G0EmMXz1Fyn4KdydMaiE+9RzLn6BAKXPeXtu0XGiyqAGfc5vEVFJ2oDR0+2FFrchFF22tKAa2xe7m6sfUwSDopY8XwYtjUZttgGexTsHlETWelwWJRJs+9kmJCi5YDcUIhtq4UX1KJQTsq9ZToH8RmLLbFIaphqPazz0uNNrvCuVBp2OGzQqIAHVb3oCXCs+ESGROhcPnpZ5/4WMPf6jVwIDAQAB");

View file

@ -5532,7 +5532,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe; GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist"; INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 6.0;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = GuideWithMe; PRODUCT_NAME = GuideWithMe;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -5579,7 +5579,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe; GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist"; INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = GuideWithMe; PRODUCT_NAME = GuideWithMe;
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -5942,7 +5942,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe; GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist"; INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = GuideWithMe; PRODUCT_NAME = GuideWithMe;
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
SDKROOT = iphoneos; SDKROOT = iphoneos;

View file

@ -1,3 +1,23 @@
Welcome to Offline Travel Guides based on Wikivoyage open data!
You can check live guides here: http://guidewithme.com/
# Basic setup
All guides apps need pre-built data, which is taken from Wikivoyage project.
Please check out scripts in builder folder to understand how to do it, now they're lacking any documentation.
NOTE: Guides were never built on Windows. If you manage to do it, please
share a pull request with your fixes.
For Android, create android/local.properties file with content:
```
sdk.dir=/full/path/to/android-sdk
ndk.dir=/full/path/to/android-ndk
```
You also need to clone MAPS.ME android api repo (don't forget to update it if already cloned):
```cd android/3rdparty; git clone git@github.com:mapsme/api-android.git```
# How to build guide for a new country # How to build guide for a new country
To add new country to generation list please follow next steps: To add new country to generation list please follow next steps: