Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
#2016 Aleksey Samoilov aka Sunderland93
#samoilov.lex@gmail.com
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
echo Motion Builder will only run on 64-bit linux.
echo Please install the 64-bit debian and try again.
exit
fi
#Setup a few vars
export MBUILDERINSTALL='mbuilderTempInstall'
export INSTALLFILE="Autodesk_MotionBuilder_2017_EN_JP_ZH_Linux_64bit.tgz"
export RPM_INSTALL_PREFIX=/usr
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R12/lib64/
MBUILDERURL="http://edutrial.autodesk.com/NET17SWDLD/2017/MOBPRO/ESD/Autodesk_MotionBuilder_2017_EN_JP_ZH_Linux_64bit.tgz"
PRODUCTID="727I1"
#Install Message
echo "You’re about to download and install Autodesk Mudbox 2017"
echo ""
echo "Do you wish to continue [Y/n]?"
read RESPONSE
case "$RESPONSE" in
n*|N*)
echo "Install Terminated"
exit 0;
esac
#Get serial number
echo "If you have not already done so, you can get your serial number from: http://www.autodesk.com/education/home"
echo "Enter the serial number"
read SERIALNUMBER
echo ""
#Create a temp folder for the install files
if [ ! -d /tmp/$MBUILDERINSTALL" ]; then
mkdir /tmp/$MBUILDERINSTALL
echo "Creating $MBUILDERINSTALL folder"
echo ""
fi
export INSTALLDIR=/tmp/$MBUILDERINSTALL
cd $INSTALLDIR
sudo chmod -R 777 $INSTALLDIR
#Now check to see if you already have mudbox downloaded and in the install folder.
if [ -f $INSTALLDIR/$INSTALLFILE ]; then
#Make sure the install file is complete.
MBUILDER_INSTALL_HASH=$(md5sum -b $INSTALLDIR/$INSTALLFILE | awk '{print $1}')
if [ "$MUDBOX_INSTALL_HASH" = "0353913ab397ee2b6c7a5dcab67a2fa3" ]; then
echo "Motion Builder install file found and verified... skipping download"
else
echo "Motion Builder file found, but it's not complete. We'll try the download again"
mv $INSTALLFILE $INSTALLFILE.bak
wget --referer="http://trial.autodesk.com" --content-disposition $MBUILDERURL
fi
else
echo "Mudbox install file not found. We'll download it now."
wget --referer="http://trial.autodesk.com" --content-disposition $MBUILDERURL
fi
# Install Dependencies
sudo apt-get install csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfstt ttf-liberation ttf-mscorefonts-installer xfonts-100dpi xfonts-75dpi alien, libtiff5, openssl
sleep 3s
# Extract Maya Install Files
tar xvf $INSTALLDIR/$INSTALLFILE
# Convert rpms to debs
for i in $INSTALLDIR/*.rpm; do sudo alien -cv $i; done
sleep 2s
#install the debs
sudo dpkg -i $INSTALLDIR/*.deb
#Required for license to install
sudo cp libadlmPIT.so.11 /usr/lib/libadlmPIT.so.11
sudo cp libadlmutil.so.11 /usr/lib/libadlmutil.so.11
# License Setup:
sudo touch /usr/autodesk/MotionBuilder2017/bin/License.env
sudo echo -e 'MOTIONBUILDER_LICENSE=unlimited\nMOTIONBUILDER_LICENSE_METHOD=standalone' > /usr/autodesk/MotionBuilder2017/bin/License.env
#Notice the lack of sudo.
/usr/autodesk/MotionBuilder2017/bin/adlmreg -i S $PRODUCTID $PRODUCTID 2017.0.0.F $SERIALNUMBER /usr/autodesk/MotionBuilder2017/bin/MotionBuilderConfig.pit
# symbolic links:
# libtiff
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0 /usr/lib/libtiff.so.3
sleep 2s
#Everything should work now...
echo "Installation Complete."
@alexisrolland

This comment has been minimized.

Copy link

alexisrolland commented Oct 13, 2019

Lines 27, 52, 65 refer to Mudbox rather than MotionBuilder
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L27
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L52
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L65

Line 56 refers to variable MUDBOX_INSTALL_HASH instead of MBUILDER_INSTALL_HASH. Also is the hash value correct?
if [ "$MUDBOX_INSTALL_HASH" = "0353913ab397ee2b6c7a5dcab67a2fa3" ]
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L56

Line 72 refers to Maya rather than MotionBuilder
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L72

Seems there's an extra double quote line 44: if [ ! -d /tmp/$MBUILDERINSTALL" ]; then
Or there's one double quote missing? I'm not sure I don't know shell very well
https://gist.github.com/Sunderland93/ee90d9080a2af692bfbd05f9a5717d3f#file-mbuilderondebian-sh-L44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.