carla/Util/BuildTools/BuildUtilsDocker.sh

42 lines
1.1 KiB
Bash
Raw Normal View History

2020-02-06 01:46:50 +08:00
#! /bin/bash
2020-02-06 01:46:50 +08:00
source $(dirname "$0")/Environment.sh
2020-02-06 01:46:50 +08:00
FBX2OBJ_DIST=${CARLA_DOCKER_UTILS_FOLDER}/dist
FBX2OBJ_FOLDER=${CARLA_DOCKER_UTILS_FOLDER}/fbx
FBX2OBJ_BUILD_FOLDER=${FBX2OBJ_FOLDER}/build
FBX2OBJ_DEP_FOLDER=${FBX2OBJ_FOLDER}/dependencies
if [ -f "${FBX2OBJ_DIST}/FBX2OBJ" ]; then
2020-02-06 01:46:50 +08:00
log "FBX SDK already installed."
exit
fi
2020-02-06 01:46:50 +08:00
log "Downloading and preparing FBX SDK..."
2020-02-06 01:46:50 +08:00
LIB_NAME=fbx202001_fbxsdk_linux
FBXSDK_URL=https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-0-1/${LIB_NAME}.tar.gz
echo "Downloading FBX SDK 2020"
wget -c "${FBXSDK_URL}" -P "${CARLA_DOCKER_UTILS_FOLDER}"
2020-02-06 01:46:50 +08:00
echo "Unpacking..."
mkdir -p "${FBX2OBJ_DEP_FOLDER}"
tar -xvzf "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}.tar.gz" -C "${CARLA_DOCKER_UTILS_FOLDER}" "${LIB_NAME}"
2020-02-25 23:12:14 +08:00
rm "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}.tar.gz"
2020-02-06 01:46:50 +08:00
echo "Installing..."
echo -e "y\nyes\nn\n" | "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}" "${FBX2OBJ_DEP_FOLDER}"
2020-02-06 01:46:50 +08:00
echo
rm "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}"
echo "Compiling FBX2OBJ..."
mkdir -p "${FBX2OBJ_DIST}"
2020-02-06 01:46:50 +08:00
cmake -S "${FBX2OBJ_FOLDER}" -B "${FBX2OBJ_BUILD_FOLDER}"
2020-02-06 01:46:50 +08:00
make -C "${FBX2OBJ_BUILD_FOLDER}" install
2020-02-06 01:46:50 +08:00
log "Success!"