Packaging AutoDesk Maya 2024 with Redundant License Servers

BrewmasterEd
New Contributor

Hello,

After going through efforts in attempt to get the AutoDesk Maya application packaged up, wanted to post here with regards to how I did it so that others can leverage it (its a culmination of multiple different techniques, and some digging deep to get the right scripting language). Maya includes Arnold Render and will be installed along with Maya. There are two passes that need to occur, as I had found that the licensing components don't always work the first time around.

1) Mount the dmg acquired from AutoDesk and copy the 'Install Maya 2024.app' to /tmp/, and remove all the spacing to just 'InstallMaya2024.app'
2) Leverage this script (test local first, then attach as post-installation script in WhiteBox Packages)

 

#!/bin/sh

#Application Info (For each AutoDesk app, change the app/year/pKey/package)
app="Maya"
year="2024"
pKey="Product Key"

#Location where the application file is going to sit (remove the spaces)
pkgpath="/tmp/InstallMaya2024.app"

#For Redundant Servers (3), have a space between them rather than a comma
networkServer="Server1 Server2 Server3"

#Identify where the license file will be generated at
licPath="/Library/Application Support/Autodesk/AdskLicensingService/${pKey}_${year}.0.0.F"
licFile="licpath.lic"

#All packages that exist within the Package Contents, conduct install
runInstaller ()
{
for PKG in $(find "$pkgpath" -name "*.pkg"); do
	echo "Installing $PKG"
	installer -pkg ${PKG} -target /
done
}

#Creates and appends servers identified into 'new' license file, 'for each' server that exists, write to file
createLicenseFile ()
{
    /bin/mkdir -p "${licPath}"
    /usr/bin/touch "${licPath}/${licFile}"
    for server in ${networkServer}; do
        echo "Accounting for server $server"
        /bin/echo "SERVER ${server} 000000000000" >> "${licPath}/${licFile}"
    done
        /bin/echo "USE_SERVER" >> "${licPath}/${licFile}"
        /bin/echo "_NETWORK" >> "${licPath}/${licFile}"
}

#Append the license servers to the products installed, 'ls' is list servers based on @IP,@IP... distinction
LicenseHelper ()
{
    /Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper change --pk "${pKey}" --pv "${year}.0.0.F" --lm NETWORK --lt REDUNDANT --ls "@ServerIP1,@ServerIP2,@Server3IP"
}

#All files leveraged during installation will be cleaned from system package path and temporary files
cleanUp ()
{
    /bin/rm -rf /tmp/*
}

#Run script (1st Pass)
echo "Starting 1st Pass"
runInstaller
createLicenseFile
LicenseHelper

#Run script (2nd Pass), the licensing portion doesn't always install/engage during first run
echo "Starting 2nd Pass"
runInstaller
LicenseHelper

#Cleanup Files
echo "Executing Cleanup"
cleanUp

#################################################

### Verify license details - not required, but kind of nice to see.
/Library/Application\ Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper list
echo "Autodesk network licensing complete"


##################################################

 

 

2 REPLIES 2

MCerano
New Contributor II

Hello,

Do you know if this would work for a single license server setup?

@BrewmasterEd responded with "Yes, you just change the component of redundant to SINGLE, along with respective server information"

I hope this helps!!