-
-
Save OEP/3772559 to your computer and use it in GitHub Desktop.
Shell script to install and setup Autodesk Maya 2013 on Ubuntu 12.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Heith Seewald 2012 | |
#Feel free to extend/modify to meet your needs. | |
#Maya on Ubuntu v.1 | |
#This is the base installer... I’ll add more features in later versions. | |
#if you have any issues, feel free email me at heiths@gmail.com | |
#### Lets run a few checks to make sure things work as expected. | |
#Make sure we’re running with root permissions. | |
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 Maya will only run on 64-bit linux. | |
echo Please install the 64-bit ubuntu and try again. | |
exit | |
fi | |
#Setup a few vars | |
export MAYAINSTALL='mayaTempInstall' | |
export RPM_INSTALL_PREFIX=/usr | |
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R5/lib64/ | |
LIBCRYPTO="/usr/lib/x86_64-linux-gnu/libcrypto.so.0.9.8" | |
LIBSSL="/usr/lib/x86_64-linux-gnu/libssl.so.0.9.8" | |
MAYAURL="http://download.autodesk.com/us/maya/service_packs/Autodesk_Maya_2013_SP1_English_Linux_64bit.tgz" | |
#Install Message | |
echo "You’re about to download and install Autodesk Maya 2013" | |
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://students.autodesk.com" | |
echo "Enter the serial number" | |
read SERIALNUMBER | |
echo "" | |
#Create a temp folder for the install files | |
if [ ! -d "$HOME/$MAYAINSTALL" ]; then | |
mkdir $HOME/$MAYAINSTALL | |
echo "Creating $MAYAINSTALL folder" | |
echo "" | |
fi | |
export INSTALLDIR=$HOME/$MAYAINSTALL | |
cd $INSTALLDIR | |
#Get Maya | |
wget --referer="http://trial.autodesk.com" --content-disposition $MAYAURL | |
# Install Dependencies | |
sudo apt-get install csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfs xfstt ttf-liberation ttf-mscorefonts-installer xfonts-100dpi xfonts-75dpi alien | |
sleep 3s | |
#This is in case of name change (due to new service pack or something) | |
MAYAFILE=Autodesk*.tgz | |
# Extract Maya Install Files | |
tar xvf $INSTALLDIR/$MAYAFILE | |
# Convert rpms to debs | |
for i in $INSTALLDIR/*.rpm; do | |
echo aliening $i ... | |
sudo alien -cv $i; | |
done | |
sleep 2s | |
#install the debs | |
sudo dpkg -i $INSTALLDIR/*.deb | |
#Setup For Mental Ray. | |
sudo mkdir /usr/tmp | |
sudo chmod 777 /usr/tmp | |
# License Setup: | |
sudo echo -e 'MAYA_LICENSE=unlimited\nMAYA_LICENSE_METHOD=standalone' > /usr/autodesk/maya2013-x64/bin/License.env | |
#Notice the lack of sudo. | |
/usr/autodesk/maya2013-x64/bin/adlmreg -i S 657E1 657E1 2013.0.0.F $SERIALNUMBER /var/opt/Autodesk/Adlm/Maya2013/MayaConfig.pit | |
# symbolic links: | |
# Its preferred to use the libssl and libcrypto that’s included with your system... so we’ll try that first. | |
# We’ll use the files included by autodesk as a fallback | |
#Libssl Link | |
if [ -f "$LIBSSL" ] | |
then | |
echo "$LIBSSL found. Using it." | |
ln -s $LIBSSL /usr/autodesk/maya2013-x64/lib/libssl.so.6 | |
else | |
echo "$LIBSSL not found. Using Autodesk’s libssl" | |
sudo ln -s /usr/autodesk/maya2013-x64/support/openssl/libssl.so.6 /usr/autodesk/maya2013-x64/lib/libssl.so.6 | |
fi | |
#LibCrypto Link | |
if [ -f "$LIBCRYPTO" ] | |
then | |
echo "$LIBCRYPTO found. Using it." | |
ln -s $LIBCRYPTO /usr/autodesk/maya2013-x64/lib/libcrypto.so.6 | |
else | |
echo "$LIBCRYPTO not found. Using Autodesk’s libssl" | |
sudo ln -s /usr/autodesk/maya2013-x64/support/openssl/libcrypto.so.6 /usr/autodesk/maya2013-x64/lib/libcrypto.so.6 | |
fi | |
# libtiff | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.4.3.4 /usr/lib/libtiff.so.3 | |
sleep 2s | |
#Everything should work now... | |
echo "Installation Complete." | |
echo "" | |
echo "Start Maya Now?" | |
read RUNNOW | |
case "$RUNNOW" in | |
n*|N*) | |
echo "You can run maya any time by typing maya into the terminal" | |
exit 0; | |
esac | |
maya |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some notes about running this on Ubuntu 13.04 this script fails @ line 71 due to alien(something to do with perl 5) to be able convert the package scripts of Maya2013*.rpm . This does not occur in Ubuntu 12.10 from my testing, so convert the package on an earlier system.
On line 85 I had some issues. I had to copy libadlmPIT.so.5 and libadlmutil.so.5 to /usr/autodesktop/maya2013-x64/lib/ . To get it to work.
Line 112. Ubuntu 13.04 uses libtiff 4.3.6 (at the time of writing this) so make sure to double check before creating that link and adjust the numbers as needed.
I hope this helps!
EDIT: Also it appears that Maya must be run once as root for it to work right. This should probably be told to the user if they choice not to open it after install.