Added a check within the travis script if `emcc` is available locally or if we have a need to execute it within the docker

canary
WolverinDEV 2020-04-18 22:35:23 +02:00
parent e641cef629
commit 91284f7b1d
1 changed files with 14 additions and 4 deletions

View File

@ -148,11 +148,21 @@ if [[ -e "$LOG_FILE" ]]; then
fi
chmod +x ./web/native-codec/build.sh
execute \
"Building native codes" \
"Failed to build native opus codec" \
"docker exec -it emscripten bash -c 'web/native-codec/build.sh'"
if hash emcmake 2>/dev/null; then
hash cmake 2>/dev/null || { echo "Missing cmake. Please install cmake before retrying. (apt-get install cmake)"; exit 1; }
hash make 2>/dev/null || { echo "Missing make. Please install build-essential before retrying. (apt-get install build-essential)"; exit 1; }
echo "Found installation of emcmake locally. Don't use docker in order to build the native parts."
execute \
"Building native codes" \
"Failed to build native opus codec" \
"./web/native-codec/build.sh"
else
execute \
"Building native codes" \
"Failed to build native opus codec" \
"docker exec -it emscripten bash -c 'web/native-codec/build.sh'"
fi
echo "---------- Web client ----------"
function move_target_file() {