2020-02-06 01:46:50 +08:00
|
|
|
#! /bin/bash
|
2019-12-04 01:27:11 +08:00
|
|
|
|
2020-02-06 01:46:50 +08:00
|
|
|
source $(dirname "$0")/Environment.sh
|
2019-12-04 01:27:11 +08:00
|
|
|
|
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
|
2019-12-04 01:27:11 +08:00
|
|
|
|
2020-02-06 20:15:02 +08:00
|
|
|
if [ -f "${FBX2OBJ_DIST}/FBX2OBJ" ]; then
|
2020-02-06 01:46:50 +08:00
|
|
|
log "FBX SDK already installed."
|
|
|
|
exit
|
|
|
|
fi
|
2019-12-04 01:27:11 +08:00
|
|
|
|
2020-02-06 01:46:50 +08:00
|
|
|
log "Downloading and preparing FBX SDK..."
|
2019-12-04 01:27:11 +08:00
|
|
|
|
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"
|
|
|
|
|
2020-02-06 20:15:02 +08:00
|
|
|
wget -c "${FBXSDK_URL}" -P "${CARLA_DOCKER_UTILS_FOLDER}"
|
2020-02-06 01:46:50 +08:00
|
|
|
|
|
|
|
echo "Unpacking..."
|
2020-02-06 20:15:02 +08:00
|
|
|
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..."
|
2020-02-06 20:15:02 +08:00
|
|
|
echo -e "y\nyes\nn\n" | "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}" "${FBX2OBJ_DEP_FOLDER}"
|
2020-02-06 01:46:50 +08:00
|
|
|
echo
|
2020-02-06 20:15:02 +08:00
|
|
|
rm "${CARLA_DOCKER_UTILS_FOLDER}/${LIB_NAME}"
|
2019-12-04 01:27:11 +08:00
|
|
|
|
|
|
|
echo "Compiling FBX2OBJ..."
|
2020-02-06 20:15:02 +08:00
|
|
|
mkdir -p "${FBX2OBJ_DIST}"
|
2020-02-06 01:46:50 +08:00
|
|
|
|
2020-02-06 20:15:02 +08:00
|
|
|
cmake -S "${FBX2OBJ_FOLDER}" -B "${FBX2OBJ_BUILD_FOLDER}"
|
2020-02-06 01:46:50 +08:00
|
|
|
|
2020-02-06 20:15:02 +08:00
|
|
|
make -C "${FBX2OBJ_BUILD_FOLDER}" install
|
2020-02-06 01:46:50 +08:00
|
|
|
|
|
|
|
log "Success!"
|