-
-
Save Era-Dorta/859324436d1273aa56ff to your computer and use it in GitHub Desktop.
Updated for Maya 2015 SP5 and ubuntu 14.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 | |
#Garoe Dorta 2015 | |
# Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac | |
#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 [email protected] | |
#### 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 INSTALLFILE="Autodesk_Maya_2015_SP5_English_Linux.tgz" | |
export RPM_INSTALL_PREFIX=/usr | |
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R9/lib64/ | |
LIBCRYPTO="/lib/x86_64-linux-gnu/libcrypto.so.1.0.0" | |
LIBSSL="/lib/x86_64-linux-gnu/libssl.so.1.0.0" | |
MAYAURL="http://download.autodesk.com/us/support/files/maya_2015_service_pack_5/Autodesk_Maya_2015_SP5_English_Linux.tgz" | |
PRODUCTID="657G1" | |
#Prev ID is for student version | |
#Install Message | |
echo "You’re about to download and install Autodesk Maya 2015" | |
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 "" | |
sudo apt-get install libjpeg62 alien csh tcsh libaudiofile-dev libglw1-mesa elfutils gamin libglw1-mesa-dev mesa-utils xfstt ttf-liberation xfonts-100dpi xfonts-75dpi ttf-mscorefonts-installer libgamin0 libxp6 | |
#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 | |
sudo chmod -R 777 $INSTALLDIR | |
#Now check to see if you already have maya downloaded and in the install folder. | |
if [ -f $INSTALLDIR/$INSTALLFILE ]; then | |
#Make sure the install file is complete. | |
MAYA_INSTALL_HASH=$(md5sum -b $INSTALLDIR/$INSTALLFILE | awk '{print $1}') | |
if [ "$MAYA_INSTALL_HASH" = "c4f709095760803d19e413093d7d5ab7" ]; then | |
echo "Maya install file found and verified... skipping download" | |
else | |
echo "Maya 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 $MAYAURL | |
fi | |
else | |
echo "Maya install file not found. We'll download it now." | |
wget --referer="http://trial.autodesk.com" --content-disposition $MAYAURL | |
fi | |
# 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 | |
#Setup For Mental Ray. | |
sudo mkdir /usr/tmp | |
sudo chmod 777 /usr/tmp | |
#Required for license to install | |
sudo cp libadlmPIT.so.9 /usr/lib/libadlmPIT.so.9 | |
sudo cp libadlmutil.so.9 /usr/lib/libadlmutil.so.9 | |
# License Setup: | |
sudo echo -e 'MAYA_LICENSE=unlimited\nMAYA_LICENSE_METHOD=standalone' > /usr/autodesk/maya2015-x64/bin/License.env | |
#Notice the lack of sudo. | |
export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R9/lib64/ | |
# The adlmreg codes meaning can be checked here http://www.artwork.com/support/flexlm/flex_err_list.htm | |
/usr/autodesk/maya2015-x64/bin/adlmreg -i S $PRODUCTID $PRODUCTID 2015.0.0.F $SERIALNUMBER /var/opt/Autodesk/Adlm/Maya2015/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." | |
sudo ln -s $LIBSSL /usr/autodesk/maya2015-x64/lib/libssl.so.10 | |
else | |
echo "$LIBSSL not found. Using Autodesk’s libssl" | |
sudo ln -s /usr/autodesk/maya2015-x64/support/openssl/libssl.so.6 /usr/autodesk/maya2015-x64/lib/libssl.so.10 | |
fi | |
#LibCrypto Link | |
if [ -f "$LIBCRYPTO" ] | |
then | |
echo "$LIBCRYPTO found. Using it." | |
sudo ln -s $LIBCRYPTO /usr/autodesk/maya2015-x64/lib/libcrypto.so.10 | |
else | |
echo "$LIBCRYPTO not found. Using Autodesk’s libssl" | |
sudo ln -s /usr/autodesk/maya2015-x64/support/openssl/libcrypto.so.6 /usr/autodesk/maya2015-x64/lib/libcrypto.so.10 | |
fi | |
#jpeg | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 /usr/lib/libjpeg.so.62 | |
# libtiff | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.0 /usr/lib/libtiff.so.3 | |
# Bug with openGL populate, can do it here permanently, but a better alternative is explained below | |
# sudo mv /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/baklibGL.so | |
# sudo ldconfig | |
# Bitfrost bug | |
sudo mkdir /usr/autodesk/maya2015-x64/plugin-backups | |
sudo mv /usr/autodesk/maya2015-x64/plug-ins/bifrost /usr/autodesk/maya2015-x64/plugin-backups/ | |
sleep 2s | |
echo "Done with initial setup" | |
###################################### | |
## Run this commands once the above script has finished | |
###################################### | |
#export MAYA_LOCATION=/usr/autodesk/maya2015-x64/ | |
#export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R9/lib64/ | |
#nano mayainstall.c | |
##add the following in nano, save and close | |
#int main (void) {return 0;} | |
#gcc mayainstall.c | |
#sudo mv /usr/bin/rpm /usr/bin/rpm_backup | |
#sudo cp a.out /usr/bin/rpm | |
#chmod +x ./setup | |
#sudo ./setup | |
##Then, follow the GUI, Accept, put your Serial Number and the 657G1 thing | |
#sudo rm /usr/bin/rpm | |
#sudo mv /usr/bin/rpm_backup /usr/bin/rpm | |
## Run once as sudo to activate the licence | |
#sudo maya | |
## For Arch Users, if this fails with X Error: BadDrawable (invalid Pixmap ), run sudo QT_X11_NO_MITSHM=1 maya | |
##didn’t activate so go to https://registeronce.autodesk.com and when it asks you for request file, get from /tmp/MAYA2015en_USLongCode.xml while maya activation screen is open. You will get a file named Long_Response_Code.xml which will allow you to activate. | |
################################### | |
## Close maya and run the following | |
################################### | |
## Fix texture crash | |
# gksudo gedit /usr/autodesk/maya2015-x64/bin/maya | |
## -> Search for the following two lines | |
## Set up the location of the libquicktime plugins | |
#setenv LIBQUICKTIME_PLUGIN_DIR "$MAYA_LOCATION/lib" | |
## -> And add this line below them | |
#setenv LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjpeg.so.62 | |
## Since Maya was ran once with sudo, reset the owner of the maya folder to user | |
#sudo chown -R "$USER":"$USER" ~/maya | |
################ | |
# Optional configuration | |
################ | |
## Maya uses the windows key to move around, so disable the Unity hints so that they don't pop up | |
##Install compizconfig-settings-manager | |
##Disable Shortcut Hints Overlay | |
##Uninstall it when you are done | |
## If you are a developer this allows you to debug maya | |
## Allow ptrace, change kernel.yama.ptrace_scope = 1, to 0 | |
#gksudo gedit /etc/sysctl.d/10-ptrace.conf | |
## See Maya Output when launching for Unity | |
# gksudo gedit /usr/share/applications/Autodesk-Maya*.desktop | |
# Replace the following line | |
# Exec=/usr/autodesk/maya/bin/maya | |
# With this content | |
# Exec=gnome-terminal --title="Output Window" -e "/usr/local/bin/maya" | |
## This is only for Nvidia cards users, and if OGS populate() error appears and Maya crashes | |
# Reference -> http://forums.autodesk.com/t5/installation-hardware-os/maya-crashes-at-startup-ubuntu-mint/td-p/5852456 | |
# Rename maya bin | |
#sudo mv /usr/local/bin/maya /usr/local/bin/oriMaya | |
## Create a new bin that is a script that runs the old one plus few other things | |
#sudo touch /usr/local/bin/maya | |
#sudo chmod +x /usr/local/bin/maya | |
#gksudo gedit /usr/local/bin/maya | |
## Add this lines to the script | |
##!/bin/bash | |
## If user has prime-select installed, i.e. optimus technology laptop check | |
## which card is being used, otherwise assumed it is nvidia | |
#if command -v prime-select > /dev/null 2>&1; then | |
# CARD=$(prime-select query) | |
# if [ "$CARD" = "intel" ]; then | |
# USE_NVIDIA="false" | |
# else | |
# USE_NVIDIA="true" | |
# fi | |
#else | |
# USE_NVIDIA="true" | |
#fi | |
# | |
#if [ "$USE_NVIDIA" = "true" ]; then | |
# | |
# # Find all the nvidia-<number> paths with optional -updates | |
# NVIDIA_PATHS=$(ls /usr/lib/nvidia-* 2> /dev/null | egrep "nvidia-[0-9]+(-updates)?:") | |
# | |
# if [ ! -z "$NVIDIA_PATHS" ]; then | |
# | |
# # Remove the : at the end of the path | |
# NVIDIA_PATHS=${NVIDIA_PATHS%?} | |
# | |
# # Get the last one, assumes they are ordered by number | |
# NVIDIA_PATHS=${NVIDIA_PATHS##*:} | |
# | |
# export LD_LIBRARY_PATH="${NVIDIA_PATHS}:$LD_LIBRARY_PATH" | |
# else | |
# echo "/usr/lib/nvidia-* directory missing" | |
# fi | |
#fi | |
#oriMaya "$@" |
Also, I was having problems with activation with Heith's script -- it couldn't connect to the internet to activate and had problems with offline activation; does this solve that?
As the script converts the rpms to debs, most of it can be uninstall with apt-get or synaptic, look at the maya folder and run apt-get purge for each of the deb file names, to undo the cp and ln commands simply delete each file manually. The offline activation is taken from https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac Could you be more specific in what is the error you are getting with the activation?
If anyone wants a version for Maya 2016 SP4, I have it here: https://gist.github.com/z3ntu/8ed3fd920ebd8651dd87
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you uninstall what was previously installed by Heith's script?