Update collect_libs.sh
This commit is contained in:
parent
53de41052e
commit
acba5fd4e7
1 changed files with 17 additions and 6 deletions
|
@ -1,28 +1,39 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
ROOT_LOC="$SCRIPT_LOC/../.."
|
ROOT_LOC="$SCRIPT_LOC/../.."
|
||||||
|
|
||||||
|
if [[ "$(uname -a)" =~ Linux ]]; then
|
||||||
|
if [[ -z "$OSMAND_BUILD_CPU_CORES_NUM" ]]; then
|
||||||
|
OSMAND_BUILD_CPU_CORES_NUM=`nproc`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$(uname -a)" =~ Darwin ]]; then
|
||||||
|
if [[ -z "$OSMAND_BUILD_CPU_CORES_NUM" ]]; then
|
||||||
|
OSMAND_BUILD_CPU_CORES_NUM=`sysctl hw.ncpu | awk '{print $2}'`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
function copyLibs {
|
function copyLibs {
|
||||||
if [ -d "$ROOT_LOC/binaries/$1/$2" ]; then
|
if [ -d "$ROOT_LOC/binaries/$1/$2" ]; then
|
||||||
echo "Copy binaries $1 $2";
|
echo "Copy binaries $1 $2";
|
||||||
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndJNI.$4 bin/OsmAndJNI-$1-$3.lib
|
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndJNI.$4 bin/OsmAndJNI-$1-$3.lib
|
||||||
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndCoreUtils.$4 bin/OsmAndCoreUtils-$1-$3.lib
|
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndCoreUtils.$4 bin/OsmAndCoreUtils-$1-$3.lib
|
||||||
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndCore.$4 bin/OsmAndCore-$1-$3.lib
|
cp "$ROOT_LOC"/binaries/$1/$2/libOsmAndCore.$4 bin/OsmAndCore-$1-$3.lib
|
||||||
cp "$ROOT_LOC"/core/externals/qtbase-desktop/upstream.patched.$1.$2/lib/libQt5Core.$4.5.0.2 bin/Qt5Core-$1-$3.lib
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function compile {
|
function compile {
|
||||||
"$ROOT_LOC/core/externals/configure.sh"
|
OSMAND_ANDROID_EXTERNAL_DEPENDENCIES=(expat freetype gdal giflib glm glsl-optimizer harfbuzz jpeg libpng protobuf qtbase-desktop skia)
|
||||||
"$ROOT_LOC/core/externals/qtbase-desktop/build.sh"
|
"$ROOT_LOC/core/externals/configure.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
"$ROOT_LOC/tools/map-viewer/externals/freeglut/configure.sh"
|
"$ROOT_LOC/core/externals/build.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
if [ ! -d "$ROOT_LOC/amd64-linux-gcc-release.makefile" ]; then
|
if [ ! -d "$ROOT_LOC/amd64-linux-gcc-release.makefile" ]; then
|
||||||
"$ROOT_LOC/build/amd64-linux-gcc.sh" release
|
"$ROOT_LOC/build/amd64-linux-gcc.sh" release
|
||||||
fi
|
fi
|
||||||
(cd "$ROOT_LOC/baked/amd64-linux-gcc-release.makefile" && make -j`nproc` OsmAndJNI)
|
(cd "$ROOT_LOC/baked/amd64-linux-gcc-release.makefile" && make -j$OSMAND_BUILD_CPU_CORES_NUM OsmAndJNI)
|
||||||
if [ ! -d "$ROOT_LOC/baked/i686-linux-gcc-release.makefile" ]; then
|
if [ ! -d "$ROOT_LOC/baked/i686-linux-gcc-release.makefile" ]; then
|
||||||
"$ROOT_LOC/build/i686-linux-gcc.sh" release
|
"$ROOT_LOC/build/i686-linux-gcc.sh" release
|
||||||
fi
|
fi
|
||||||
(cd "$ROOT_LOC/baked/i686-linux-gcc-release.makefile" && make -j`nproc` OsmAndJNI)
|
(cd "$ROOT_LOC/baked/i686-linux-gcc-release.makefile" && make -j$OSMAND_BUILD_CPU_CORES_NUM OsmAndJNI)
|
||||||
}
|
}
|
||||||
|
|
||||||
compile
|
compile
|
||||||
|
|
Loading…
Reference in a new issue