1
0
forked from Rowland/EG
EG/install_fbx2gltf.sh

38 lines
1.2 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# FBX2glTF 安装脚本
echo "开始安装 FBX2glTF..."
# 创建工具目录
mkdir -p ~/tools
# 方案1: 尝试下载 Godot 维护的版本
echo "尝试下载 Godot 维护的 FBX2glTF..."
if wget -O ~/tools/FBX2glTF https://github.com/godotengine/FBX2glTF/releases/download/v0.13.1/FBX2glTF-linux-x64 2>/dev/null; then
chmod +x ~/tools/FBX2glTF
echo "✓ FBX2glTF 下载成功"
else
echo "× Godot版本下载失败尝试原版..."
# 方案2: 尝试下载 Facebook 原版
if wget -O ~/tools/FBX2glTF https://github.com/facebookincubator/FBX2glTF/releases/download/v0.9.7/FBX2glTF-linux-x64 2>/dev/null; then
chmod +x ~/tools/FBX2glTF
echo "✓ FBX2glTF 原版下载成功"
else
echo "× 下载失败,请手动安装"
echo " 1. 访问: https://github.com/godotengine/FBX2glTF/releases"
echo " 2. 下载 FBX2glTF-linux-x64"
echo " 3. 移动到 ~/tools/FBX2glTF"
echo " 4. 运行: chmod +x ~/tools/FBX2glTF"
exit 1
fi
fi
# 添加到 PATH
if ! grep -q "~/tools" ~/.bashrc; then
echo 'export PATH="$HOME/tools:$PATH"' >> ~/.bashrc
echo "✓ 已添加到 PATH"
fi
echo "✓ FBX2glTF 安装完成"
echo "请运行: source ~/.bashrc 或重启终端"