Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Marchuk <a.marchuk@corp.mail.ru>2015-08-14 13:36:47 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:02:42 +0300
commit998e2699c719363529e827405bfa7b09dac954d4 (patch)
tree4522559eadafe974b8a58006c4e184f14ac098c1 /tools/autobuild
parent30974e0d83bf5d5e4d1625edeeb128856d4ff62f (diff)
[android] fix: Build under Windows.
add: Resources update script included.
Diffstat (limited to 'tools/autobuild')
-rw-r--r--tools/autobuild/build.sh18
-rw-r--r--tools/autobuild/detect_qmake.sh1
-rw-r--r--tools/autobuild/ndk_helper.sh4
3 files changed, 19 insertions, 4 deletions
diff --git a/tools/autobuild/build.sh b/tools/autobuild/build.sh
index aca940816a..efb7284215 100644
--- a/tools/autobuild/build.sh
+++ b/tools/autobuild/build.sh
@@ -10,7 +10,7 @@ source "$MY_PATH/detect_qmake.sh"
GetCPUCores() {
case "$OSTYPE" in
# it's GitBash under Windows
- msys) echo $NUMBER_OF_PROCESSORS
+ cygwin) echo $NUMBER_OF_PROCESSORS
;;
linux-gnu) grep -c ^processor /proc/cpuinfo 2>/dev/null
;;
@@ -23,6 +23,20 @@ GetCPUCores() {
return 0
}
+
+# Replaces "/cygwin/c" prefix with "c:" one on Windows platform.
+# Does nothing under other OS.
+# 1st param: path to be modified.
+StripCygwinPrefix() {
+ if [[ $(GetNdkHost) == "windows-x86_64" ]]; then
+ echo "c:`(echo "$1" | cut -c 12-)`"
+ return 0
+ fi
+
+ echo "$1"
+ return 0
+}
+
# 1st param: shadow directory path
# 2nd param: mkspec
# 3rd param: additional qmake parameters
@@ -38,7 +52,7 @@ BuildQt() {
cd "$SHADOW_DIR"
if [ ! -f "$SHADOW_DIR/Makefile" ]; then
echo "Launching qmake..."
- "$QMAKE" CONFIG-=sdk -r "$QMAKE_PARAMS" -spec "$MKSPEC" "$MY_PATH/../../omim.pro"
+ "$QMAKE" CONFIG-=sdk -r "$QMAKE_PARAMS" -spec "$(StripCygwinPrefix $MKSPEC)" "$(StripCygwinPrefix $MY_PATH)/../../omim.pro"
fi
# make clean > /dev/null || true
make -j $(GetCPUCores)
diff --git a/tools/autobuild/detect_qmake.sh b/tools/autobuild/detect_qmake.sh
index 1e760d8785..d64b531541 100644
--- a/tools/autobuild/detect_qmake.sh
+++ b/tools/autobuild/detect_qmake.sh
@@ -13,6 +13,7 @@ KNOWN_QMAKE_PATHS=( \
~/Qt5.3.0/5.3/clang_64/bin/qmake \
~/Developer/Qt/5.4/clang_64/bin/qmake \
~/Developer/Qt/5.5/clang_64/bin/qmake \
+ /cygdrive/c/Qt/5.5/msvc2013_64/bin/qmake.exe \
)
# Prints path to directory with found qmake binary or prints nothing if not found
diff --git a/tools/autobuild/ndk_helper.sh b/tools/autobuild/ndk_helper.sh
index 627174296e..97ae0eaf2e 100644
--- a/tools/autobuild/ndk_helper.sh
+++ b/tools/autobuild/ndk_helper.sh
@@ -28,8 +28,8 @@ GetNdkHost()
echo "darwin-x86_64"
return 0
fi
- if [[ "$OSTYPE" == "msys" ]]; then
- echo windows
+ if [[ "$OSTYPE" == "cygwin" ]]; then
+ echo windows-x86_64
return 0
fi
echo "ERROR: Can't detect your host OS"