Skip to content

Commit

Permalink
Fixed build errors and updated documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
biodranik committed Dec 5, 2015
1 parent b2cdcc0 commit 55a4b54
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 18 deletions.
4 changes: 2 additions & 2 deletions android/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
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):
cd 3rdparty; git clone [email protected]:mapswithme/api-android.git
and you need to clone mapsme android api repo (don't forget to update it if already cloned):
cd 3rdparty; git clone [email protected]:mapsme/api-android.git

Use
./gradlew installDebug (or iD) to build and install debug version or
Expand Down
16 changes: 8 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
buildscript {
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 {
compile propAndroidSupportLibrary
Expand All @@ -30,8 +30,8 @@ android {
buildTypes {

debug {
jniDebugBuild true
packageNameSuffix ".debug"
jniDebuggable true
applicationIdSuffix ".debug"
}

release {
Expand All @@ -42,7 +42,7 @@ android {
defaultConfig {
versionCode = Integer.valueOf(GWMvc)
versionName = GWMvn
packageName = GWMpn
applicationId = GWMpn
minSdkVersion propMinSdkVersion.toInteger()
targetSdkVersion propTargetSdkVersion.toInteger()
}
Expand All @@ -63,7 +63,7 @@ android {
// replace app name
android.applicationVariants.all { variant ->
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 "App name = " + GWMappName

Expand Down Expand Up @@ -96,8 +96,8 @@ task copyNativeLibs(type: Copy, dependsOn: 'ndkBuild') {
into new File(buildDir, 'native-libs')
}

tasks.withType(Compile) { compileTask -> compileTask.dependsOn ndkBuild }
tasks.withType(Compile) { compileTask -> compileTask.dependsOn copyNativeLibs }
tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn ndkBuild }
tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn copyNativeLibs }

clean.dependsOn 'cleanCopyNativeLibs'
clean.dependsOn 'ndkBuildClean'
Expand Down
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GWMpn=com.guidewithme.germany
GWMapk=GuideWithMe Germany
GWMappName=GuideWithMe Germany
GWMndkFlags=propNdkFlags=V=0 NDK_DEBUG=0
propAndroidSupportLibrary=com.android.support:support-v4:19.1.+
propAndroidSupportLibrary=com.android.support:support-v4:+
propMinSdkVersion=11
propTargetSdkVersion=19
propBuildToolsVersion=19.1
propTargetSdkVersion=22
propBuildToolsVersion=22.0.1
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jun 09 21:06:40 HST 2014
#Sat Dec 05 11:21:19 MSK 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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
1 change: 1 addition & 0 deletions android/src/com/guidewithme/expansion/KeyMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class KeyMap

static
{
// These keys are unique for each Google Play account.
COUTRY_2_KEY.put("hawaii", "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA14T4ru6Wj03NA8e/Gf4/MacpWjk+/j52lAe8Q5TWWlEeiRkvWYAWgT20O2rryGRTCNmgb69rDMch0QrXndenKucRHtG4q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AB");
Expand Down
6 changes: 3 additions & 3 deletions iOS/offlineguides.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5532,7 +5532,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = GuideWithMe;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -5579,7 +5579,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = GuideWithMe;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -5942,7 +5942,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
GWM = GuideWithMe;
INFOPLIST_FILE = "offlineguides/offlineguides-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = GuideWithMe;
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
Expand Down
20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]:mapsme/api-android.git```

# How to build guide for a new country

To add new country to generation list please follow next steps:
Expand Down

0 comments on commit 55a4b54

Please sign in to comment.