Skip to content

Commit 1234720

Browse files
committed
CR fix installer script
1 parent 9e0d192 commit 1234720

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Assets/FbxExporters/Integrations/Autodesk/maya/scripts/install_maya_plugin.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ echo "Using PACKAGE_PATH=${PACKAGE_PATH}"
3434

3535
# Configure where Maya is installed
3636
if [ ! -d "${MAYA_LOCATION}" ]; then
37-
MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app
37+
MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app/Contents
3838
fi
3939
echo "Using MAYA_LOCATION=${MAYA_LOCATION}"
4040

@@ -43,26 +43,32 @@ if [ ! -f "${UNITY_EDITOR_PATH}" ]; then
4343
exit -1
4444
fi
4545

46+
# remove existing installation
47+
if [ -d "${PROJECT_PATH}/Assets/FbxExporters" ]; then
48+
echo "Uninstalling previous version"
49+
rm -rf "${PROJECT_PATH}/Assets/FbxExporters"
50+
fi
51+
4652
# Install FbxExporters package
4753
"${UNITY_EDITOR_PATH}" -projectPath "${PROJECT_PATH}" -importPackage ${PACKAGE_PATH} -quit
4854

4955
# Install Maya Integration
5056
"${UNITY_EDITOR_PATH}" -batchMode -projectPath "${PROJECT_PATH}" -executeMethod FbxExporters.Integrations.InstallMaya -quit
5157

5258
# Configuring Maya2017 to auto-load integration
53-
MAYA_PATH=${MAYA_LOCATION}/Contents/bin/maya
59+
MAYA_PATH=${MAYA_LOCATION}/bin/maya
5460

5561
if [ ! -f "${MAYA_PATH}" ]; then
5662
echo "Maya not installed at ${MAYA_PATH}"
5763
else
5864
# Configure Maya Integration
5965
TEMP_SAVE_PATH="_safe_to_delete"
60-
EXPORT_SETTINGS_PATH="Integrations/Autodesk/maya/scripts/unityFbxExportSettings.mel"
66+
EXPORT_SETTINGS_PATH="FbxExporters/Integrations/Autodesk/maya/scripts/unityFbxExportSettings.mel"
6167
MAYA_INSTRUCTION_PATH="_safe_to_delete/_temp.txt"
6268
HEADLESS=1
6369

6470
# NOTE: we need start Maya in UI mode so that we can correctly configure the auto-load of the plugin.
6571
"${MAYA_PATH}" -command "configureUnityOneClick \"${PROJECT_PATH}\" \"${UNITY_EDITOR_PATH}\" \"${TEMP_SAVE_PATH}\" \"${EXPORT_SETTINGS_PATH}\" \"${MAYA_INSTRUCTION_PATH}\" ${HEADLESS}; scriptJob -idleEvent quit;"
6672
fi
6773

68-
exit 0
74+
exit 0

0 commit comments

Comments
 (0)