Created
March 24, 2017 07:49
-
-
Save stenstorp/9acf28a8d372f047edf682459703f8a6 to your computer and use it in GitHub Desktop.
Install Autodesk Maya 2016 with mentalray on Debian Jessie
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 | |
#Get a student License from: http://www.autodesk.com/education/free-software/maya | |
#Log in and select maya 2016, your language and an OS. | |
#Check if license present, if not, exit | |
if [ -z "$1" ]; then | |
echo Usage: ./AutodeskMaya_2016SP6_DebianJessie.sh LICENSE | |
echo | |
echo LICENSE = Autodesk Maya License | |
exit | |
fi | |
#Download Maya if not present | |
if [ ! -f Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz ]; then | |
wget http://download.autodesk.com/us/support/files/maya_2016_service_pack_6/Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz | |
fi | |
#Create setup folder and extract Maya | |
mkdir maya2016_setup | |
mv Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz maya2016_setup/ | |
cd maya2016_setup | |
tar xvf Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz | |
#Edit some variables for Maya to install | |
export RPM_INSTALL_PREFIX=/usr | |
echo "export LD_LIBRARY_PATH=$(pwd)/maya2016_setup:/opt/Autodesk/Adlm/R11/lib64/:/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> ~/.bashrc | |
echo "export LIBCRYPTO=\"/lib/x86_64-linux-gnu/libcrypto.so.1.0.0\"" >> ~/.bashrc | |
echo "export LIBSSL=\"/lib/x86_64-linux-gnu/libssl.so.1.0.0\"" >> ~/.bashrc | |
source ~/.bashrc | |
#Install necessary dependencies | |
sudo apt-get install -y gcc libssl1.0.0 libssl-dev libjpeg62 alien csh tcsh libaudiofile-dev libglw1-mesa elfutils libglw1-mesa-dev mesa-utils xfstt ttf-liberation xfonts-100dpi xfonts-75dpi ttf-mscorefonts-installer libfam0 libfam-dev libgstreamer-plugins-base0.10-0 libxp6 libcurl3 | |
#Convert rpms to debs and install them | |
fakeroot alien -c adlmapps11-11.0.15-0.x86_64.rpm | |
fakeroot alien -c adlmflexnetclient-11.0.15-0.x86_64.rpm | |
fakeroot alien -c adlmflexnetserver-11.0.15-0.x86_64.rpm | |
fakeroot alien -c Maya2016_64-2016.0-2775.x86_64.rpm | |
sudo dpkg -i *.deb | |
#Create folder maya uses and set some fonts | |
sudo mkdir /usr/tmp | |
sudo chmod 777 /usr/tmp | |
xset +fp /usr/share/fonts/X11/100dpi/ | |
xset +fp /usr/share/fonts/X11/75dpi/ | |
#Licensing stuff | |
sudo echo -e 'MAYA_LICENSE=unlimited\nMAYA_LICENSE_METHOD=standalone' > /usr/autodesk/maya2016/bin/License.env | |
sudo /usr/autodesk/maya2016/bin/adlmreg -i S 657H1 657H1 2016.0.0.F $1 /var/opt/Autodesk/Adlm/Maya2016/MayaConfig.pit | |
sudo sh -c "echo 'setenv LC_ALL en_US.UTF-8' >> /usr/autodesk/maya2016/bin/maya2016" | |
/usr/autodesk/maya2016/bin/licensechooser /usr/autodesk/maya2016/ standalone 657H1 maya | |
export MAYA_LOCATION=/usr/autodesk/maya2016/ | |
#Make sure the setup program doesn't use the real rpm | |
sudo mv /usr/bin/rpm /usr/bin/rpm.bak | |
sudo cp /bin/true /usr/bin/rpm | |
sudo ./setup | |
sudo mv /usr/bin/rpm.bak /usr/bin/rpm | |
#Fix a couple of issues | |
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>" | |
sudo sed -n '/LIBQUICKTIME_PLUGIN_DIR/ i setenv LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjpeg.so.62' /usr/autodesk/maya2016/bin/maya | |
sudo sed -i '/Exec/c\Exec=xterm -e maya' /usr/autodesk/maya2016/desktop/Autodesk-Maya.desktop | |
sudo rm /usr/share/applications/Autodesk-Maya2016.desktop | |
sudo cp /usr/autodesk/maya2016/desktop/Autodesk-Maya.desktop /usr/share/applications/Autodesk-Maya2016.desktop | |
sudo cp /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0 /opt/Autodesk/Adlm/R11/lib64/libtiff.so.3 | |
#Run maya for the first time | |
maya | |
#Remove setup folder | |
mv Autodesk_Maya_2016_SP6_EN_Linux_64bit.tgz .. | |
cd .. | |
rm -rf maya2016_setup | |
#Download Mentalray if not present | |
if [ ! -f mentalray_Plugin_for_Maya_2016_EN_Linux.tgz ]; then | |
wget https://knowledge.autodesk.com/sites/default/files/file_downloads/mentalray_Plugin_for_Maya_2016_EN_Linux.tgz | |
fi | |
#Create setup folder | |
mkdir mentalray_setup | |
mv mentalray_Plugin_for_Maya_2016_EN_Linux.tgz mentalray_setup/ | |
cd mentalray_setup | |
tar xf mentalray_Plugin_for_Maya_2016_EN_Linux.tgz | |
#Convert rpm into deb | |
fakeroot alien -c mentalrayForMaya2016_0-2016.0-2775.x86_64.rpm | |
#Install deb | |
sudo dpkg -i mentalrayformaya2016-0_2016.0-2776_amd64.deb | |
#Make sure the setup program doesn't use the real rpm | |
sudo mv /usr/bin/rpm /usr/bin/rpm.bak | |
sudo cp /bin/true /usr/bin/rpm | |
sudo ./setup | |
sudo mv /usr/bin/rpm.bak /usr/bin/rpm | |
#Making sure Mentalray will run# | |
sudo sed -i '/MENTALRAY_LOCATION/c\MENTALRAY_LOCATION:=/usr/autodesk/mentalrayForMaya2016\' /usr/autodesk/modules/maya/2016/mentalray.mod | |
#Remove setup folder | |
mv mentalray_Plugin_for_Maya_2016_SP6_EN_Linux_64bit.tgz ../ | |
cd .. | |
rm -rf mentalray_setup | |
echo "Maya is now ready to use!" | |
echo "You can delete the maya2016_setup folder but not the \"Adlm\", \"maya\" and \"xgen\" folders" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wonderful! Really streamlines the process for non redhat distros.