[autobuild] Fixed internal path variables

This commit is contained in:
Alex Zolotarev 2014-03-11 18:47:02 +03:00 committed by Alex Zolotarev
parent 9f3fd91d8e
commit 63682a5cda
4 changed files with 22 additions and 21 deletions

View file

@ -1,9 +1,9 @@
# Script takes configuration as a parameter and optional clean keyword.
# Possible configurations: debug release production
# Script builds only C++ native libs. To build also jni part see another script: eclipse[*].sh
set -e -u -x
LOCAL_DIRNAME="${PWD}/$(dirname "$0")"
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
if [[ $# < 1 ]]; then
echo "Usage: $0 <debug|release|production> [armeabi|armeabi-v7a|armeabi-v7a-hard|mips|x86] [android-PLATFORM_NUMBER]"
@ -11,12 +11,12 @@ if [[ $# < 1 ]]; then
fi
CONFIGURATION="$1"
source "$LOCAL_DIRNAME/build.sh"
source "$LOCAL_DIRNAME/ndk_helper.sh"
source "$MY_PATH/build.sh"
source "$MY_PATH/ndk_helper.sh"
MKSPEC="$LOCAL_DIRNAME/../mkspecs/android-g++"
MKSPEC="$MY_PATH/../mkspecs/android-g++"
QMAKE_PARAMS="CONFIG+=${CONFIGURATION}"
SHADOW_DIR_BASE="$LOCAL_DIRNAME/../../../omim-android"
SHADOW_DIR_BASE="$MY_PATH/../../../omim-android"
# Try to read ndk root path from android/local.properties file
export NDK_ROOT=$(GetNdkRoot) || ( echo "Can't read NDK root path from android/local.properties"; exit 1 )

View file

@ -1,10 +1,10 @@
#!/bin/bash
set -e -x
set -e -x -u
LOCAL_DIRNAME="$(dirname "$0")"
#LOCAL_DIRNAME="${PWD}/$(dirname "$0")"
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
source "$LOCAL_DIRNAME/detect_qmake.sh"
source "$MY_PATH/detect_qmake.sh"
# Prints number of cores to stdout
GetCPUCores() {
@ -36,7 +36,7 @@ BuildQt() {
mkdir -p "$SHADOW_DIR"
cd "$SHADOW_DIR"
"$QMAKE" CONFIG-=sdk -r "$QMAKE_PARAMS" -spec "$MKSPEC" "$LOCAL_DIRNAME/../../omim.pro"
"$QMAKE" CONFIG-=sdk -r "$QMAKE_PARAMS" -spec "$MKSPEC" "$MY_PATH/../../omim.pro"
# make clean > /dev/null || true
make -j $(GetCPUCores)
)

View file

@ -3,8 +3,8 @@
set -e -u -x
LOCAL_DIRNAME="$(dirname "$0")"
#LOCAL_DIRNAME="${PWD}/$(dirname "$0")"
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
if [[ $# < 1 ]]; then
echo "Usage: $0 <debug|release|production|simulator|simulator-release> [clean]"
@ -12,8 +12,8 @@ if [[ $# < 1 ]]; then
fi
CONFIGURATION="$1"
source "$LOCAL_DIRNAME/build.sh"
source "$LOCAL_DIRNAME/detect_xcode.sh"
source "$MY_PATH/build.sh"
source "$MY_PATH/detect_xcode.sh"
SDK_ROOT="$(PrintIOSSDKPath "$CONFIGURATION")"
if [[ $? -ne 0 ]]; then
@ -22,7 +22,7 @@ if [[ $? -ne 0 ]]; then
fi
export SDK_ROOT
SHADOW_DIR="$LOCAL_DIRNAME/../../../omim-iphone"
SHADOW_DIR="$MY_PATH/../../../omim-iphone"
if [[ $CONFIGURATION == *production* ]]; then
QMAKE_PARAMS="CONFIG+=production CONFIG+=release"
@ -39,9 +39,9 @@ else
fi
if [[ $CONFIGURATION == *simulator* ]]; then
MKSPEC="$LOCAL_DIRNAME/../mkspecs/iphonesimulator"
MKSPEC="$MY_PATH/../mkspecs/iphonesimulator"
else
MKSPEC="$LOCAL_DIRNAME/../mkspecs/iphonedevice"
MKSPEC="$MY_PATH/../mkspecs/iphonedevice"
fi
if [[ $GCC_VERSION == *clang* ]]; then

View file

@ -1,12 +1,13 @@
set -e -u
LOCAL_DIRNAME="${PWD}/$(dirname "$0")"
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
# Echoes found NDK root path or nothing if not found
# return 1 on error and 0 on success
GetNdkRoot()
{
local FILENAME="$LOCAL_DIRNAME/../../android/local.properties"
local FILENAME="$MY_PATH/../../android/local.properties"
while read line
do
if [[ "${line:0:7}" == "ndk.dir" ]]; then