Skip to main content

Anyone ever tried packaging Maya as part of Autodesk's Entertainment Creation Suite? Judging by the lack of posts, i'm guessing people may have given up in disgust.



Thanks to some pretty intense googling today, i've come up with this. Full credits given in the readme.



https://github.com/franton/Maya-Postflight-Installer



This saved my bacon today. Hopefully it'll help save someone else's!

@ICT-JPC looks like when we do that it fails since we are using a standalone (non-server) environment. Looks like we will be licensing each device one by one.


#!/bin/sh
## postinstall

pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3

/tmp/Install Maya 2019.app/Contents/MacOS/setup --noui --serial_number=nope-nopenope --product_key=657K1 --license_type=kNetwork --server_name=autodesk.nope.nope.nope.nope

# License separately
mkdir "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F"
touch "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data"
chmod 755 "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data"
echo "_NETWORK" >> "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data"

echo "SERVER servername 0" >> "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LICPATH.lic"
echo "USE_SERVER" >> "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LICPATH.lic"

echo "done" >> "/Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/nw.cfg"

exit 0 ## Success
exit 1 ## Failure


I have a pkg that puts the Maya or Mudbox installer in /tmp then run this as a post install script still works on 2019 versions.



For Mud you change the 657K1_2019.0.0 to the key for Mud with a find/replace.



I'm putting this on some MacBooks so the next step is to open the Licence Sever to WiFi.


Just thought I'd offer up my $0.02 on this issue. Autodesk products in general have been a royal pain the last year or so with packaging and activating/licensing, with Maya being the worst offender. I've tried every method in this thread but none seemed to work at all for Maya 2019.



I finally had some time the last few days to sit down and dive deep on this and I was finally able to come up with a system that seems to work reliably.



I used Composer to put together a pkg with the following contents:





The basic Maya installer goes into the tmp folder and a secondary script that contains the activation goes into /Users/Shared.
I know it's odd to have them in different spots but this would actually fail if I tried to put the activation script in the same folder as the installer package.
In the pkg, I have a post install shell script that installs the maya package silently, then executes the activation script with the credentials of the logged in user. That is the big caveat here, it does not work if blindly pushed out to a system with no logged in user. You'd definitely want to run this policy as a self service item or using a login hook trigger:



#!/bin/bash
## postinstall

Installs Maya 2019 silently
/var/tmp/Maya/Install Maya 2019.app/Contents/MacOS/setup --noui

sleep 15

# Gets short name and UID of currently logged in user, then runs MayaAct.sh as that user
/bin/chmod +x /Users/Shared/MayaAct.sh
currentUser=$(stat -f%Su /dev/console)
currentUserUID=$(id -u "$currentUser")
/bin/launchctl asuser "$currentUserUID" sudo -iu "$currentUser" "/Users/Shared/MayaAct.sh"

sleep 10

# Cleans up
rm -rf /private/var/tmp/Maya
rm -rf /Users/Shared/MayaAct.sh

exit 0 ## Success
exit 1 ## Failure


The activation script contains a string of commands to license Maya for our standalone key, but subbing in a network server config is not hard if needed.



#!/bin/bash

# ACTIVATE SILENTLY
# REFERENCE: https://knowledge.autodesk.com/support/maya/learn-explore/caas/sfdcarticles/sfdcarticles/command-line-installation-of-Maya-2017-on-Mac.html
# REFERENCE: https://moof-it.co.uk/deploying-autodesk-maya-2018-with-jamf-pro/

/var/tmp/Maya/Install Maya 2019.app/Contents/Resources/adlmreg -i S 657K1 657K1 2019.0.0.F 123-45678901 /Library/Application Support/Autodesk/Adlm/PIT/2019/MayaConfig.pit

mkdir /Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F
touch /Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data
chmod 777 /Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data
echo "_STANDALONE" >> /Library/Application Support/Autodesk/CLM/LGS/657K1_2019.0.0.F/LGS.data

sleep 10


I've run about thirty test runs on a variety of systems spread across High Sierra, Mojave and a few on Catalina, it seems to work reliably.



I was so pumped I tried this same method on another problem child (Unity Editor) and amazingly it worked as well.



As always with Jamf and Apple, YMMV.



Good luck!


Looks like they did a major redo to the 2020 installer app. Anyone successfully deploy 2020 with JAMF ?
I can follow the instructions here
and package it up in such a way that the pkg drops the installer.app and a postflight script calls it. If i run the the pkg manually it installs maya2020 if I use a JAMF policy to install the pkg no maya 2020.


@jwaltonen I managed to get the maya2020 installer to work but with some caveats.



To make it work I had to do these steps:
- Moved installer.app into a dmg
- Moved the postflight script to a script in jamf and deploy script after dmg is installed.



Caveats:
- A user must be login for the installer to work.



Note I am using outset for deploying it to computer that are not login.



Hope that helps.


I got Maya 2020 to install, here's how i did it:



Per this article: https://knowledge.autodesk.com/support/maya/troubleshooting/caas/CloudHelp/cloudhelp/2020/ENU/Installation-Maya/files/GUID-FBFA0C09-8E21-4EA1-95CD-E47A40D7C9F0-htm.html
This first section: " Important: When you copy the installation files to the network share, make sure that the path to the deployment_maya.xml file contains no spaces. If the path contains spaces, the deployment will fail."



I copy the installer to /var/tmp and rename it: InstallMaya2020.app
Edit the Deployment XML file located at: /private/var/tmp/InstallMaya2020.app/Contents/Helper/manifest/deployment_maya.xml



Per the above article:
Changed the EULA to Accept
The licensing part, i struggled with this, we have a simple license server. I changed the <LicenseSetting> section.
Leave the serial number at the "0's" (I kept putting our serial in and it would never register with our server)
I changed the Name to:



<LicenseSetting>
<Name>MayaNetworkLicense</Name>
<SerialNumber>000-00000000</SerialNumber>
<ProductKey>657L1</ProductKey>
<ProductVersion>2020.0.0.F</ProductVersion>
<ConfigFile>MayaConfig.pit</ConfigFile>
</LicenseSetting>


Then i deleted the sections of other licensing for single, redundant and distributed, and left:



<LicenseSettings>
<LicenseSetting>
<Name>MayaNetworkLicense</Name>
<NetworkLicense>
<Single>
<Server>ourlicenseserver</Server>


For the installing of the other apps (MtoA, Bifrost, Substance) I changed the install to True
After testing this out installing (see below soon) and verifying it all works, I turned the Logging Settings to false



Saved the .xml, And packaged up the app with Composer.



Added the .pkg to JAMF and I suppose this could be done with a post flight script, but i'm fine just having a simple script in JAMF to run it.



The install command looks like:
sudo /private/var/tmp/InstallMaya2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup -i deploy --silent -o /private/var/tmp/InstallMaya2020.app/Contents/Helper/manifest/deployment_maya.xml



I probably don't need sudo because all JAMF scripts run as root, but it works, i'm fine..



Anyways... it's working and in JAMF, and installs and tags to our license server. Yea.


hunh, when I edit the post, the returns and tabs for the <LicenseSettings> areas look correct..... Hopefully it makes sense.


@macdsl If you set it to be a code block, it'll look correct.


Ahhh, figured it out, Thanks! Code Block posting achievement added!


@macdsl



Thanks for the post.



however when i run the command from the terminal i can see it launch the setup in the dock for a few seconds then close and no logs are created.



sudo "/Users/administrator/prestage_files/Autodesk_2020/InstallMaya2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup" -i deploy --silent -o "/Users/administrator/prestage_files/Autodesk_2020/deployment_maya.xml"


Also i have the .xml out from the install cause when i modified with it being the .app it would not run and give an error saying it was corrupt.



thoughts?


I think you might need the part after Autodesk_2020 to be "/Contents/Helper/manifest/deployment_maya.xml" ?



Not sure but the .xml lived in a manifest path for me....


@macdsl



Thats what i did the first time but then the installer gave errors that is was corrupt so i moved the xml out of the installer.


@macdsl



just tried



sudo "/Users/administrator/prestage_files/Autodesk_2020/InstallMaya2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup" -i deploy --silent -o "/Users/administrator/prestage_files/Autodesk_2020/InstallMaya2020.app/Contents/Helper/manifest/deployment_maya.xml"


And this time no corrupt error and i have even validated the XML to check it for errors and it passed....



it just opens the install in the dock and then closes shortly after.



now if it was to run the below it installs fine.



/Users/administrator/prestage_files/Autodesk_2020/InstallMaya2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup" --silent


Thoughts?


@macdsl



Ahhhh i got it working now, I just started with a fresh copy of the XML and rebuilt it. It works now.



Do you have an install method for mudbox 2020? its structure is the not the same of maya....



why cant autodesk standardize the macos installers....


Here's my script for Maya 2020. https://www.jamf.com/jamf-nation/discussions/36036/packaging-maya-2020
@5Y54DMIN Mudbox is similar to the old installers and its next on my list. Should be pretty straightforward.


So I've been struggling with this myself because I'm trying to automate the process of getting the latest installer in our software distro repo and I don't understand why we're reinventing the wheel here (referring to the script posted in https://www.jamf.com/jamf-nation/discussions/36036/packaging-maya-2020). This is very dependent on how things are now, and Autodesk does give us tools to trigger this install via an XML file.



What I'm trying to figure out is why does the triggering the setup binary fail almost immediately when -i deploy is included, but when this is removed though it installs the software does not get properly licensed for a standalone license given the provided XML file? Here's my file which I'm installing to /tmp/deployment_maya.xml (minus the the sensitive stuff):



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identity>
<Name>Autodesk Maya 2020</Name>
<UPI2>{4DFC17CC-DE75-47D8-867C-BF8962267737}</UPI2>
<Platforms>
<Platform architecture="x64" minVersion="10.11" name="Mac" />
</Platforms>
<Languages>
<Language langId="en-US" />
</Languages>
</Identity>
<Configuration>
</Configuration>
<Eula src="https://www.autodesk.com/eula">
<Status>Accept</Status>
</Eula>
<LoggingSettings>
<Logging>true</Logging>
<Path>/Library/Logs</Path>
<Name>autodesk_maya_2020_deployment.log</Name>
</LoggingSettings>
<Applications>
<!-- CORE MAYA APP -->
<Application>
<Name>Maya</Name>
<UPI2>{19988503-984D-46F1-8222-6C76C135AD41}</UPI2>
<Manifest>manifest/app.maya.xml</Manifest>
<Core>true</Core>
<Install>true</Install>
<LicenseSetting>
<Name>MayaStandaloneLicense</Name>
<SerialNumber>XXX-ABCDEFGH</SerialNumber>
<ProductKey>657L1</ProductKey>
<ProductVersion>2020.0.0.F</ProductVersion>
<ConfigFile>MayaConfig.pit</ConfigFile>
</LicenseSetting>
</Application>
<!-- PLUGINS -->
<Application>
<Name>MtoA</Name>
<UPI2>{2F46F1A9-6506-45B7-94FC-CB88773A9A48}</UPI2>
<Manifest>manifest/app.mtoa.xml</Manifest>
<Core>false</Core>
<Install>false</Install>
</Application>
<Application>
<Name>Bifrost</Name>
<UPI2>{3221ED25-1A12-4076-96BE-1E30428FF6C3}</UPI2>
<Manifest>manifest/app.bifrost.xml</Manifest>
<Core>false</Core>
<Install>false</Install>
</Application>
<Application>
<Name>Substance</Name>
<UPI2>{10F85F13-FF62-4A64-BD02-919CCB0B9A52}</UPI2>
<Manifest>manifest/app.substance.xml</Manifest>
<Core>false</Core>
<Install>false</Install>
</Application>
<Application>
<Name>Rokoko</Name>
<UPI2>{7B6A9A0D-8603-441C-B25C-CD9636CE1A23}</UPI2>
<Manifest>manifest/app.rokoko.xml</Manifest>
<Core>false</Core>
<Install>false</Install>
</Application>
</Applications>
<LicenseSettings>
<!-- <LicenseSetting>
<Name>MayaDistributedNetworkLicense</Name>
<NetworkLicense>
<Distributed>
<Server>Server1</Server>
<Server>Server2</Server>
</Distributed>
</NetworkLicense>
</LicenseSetting>
<LicenseSetting>
<Name>MayaNetworkLicense</Name>
<NetworkLicense>
<Single>
<Server>Server1</Server>
</Single>
</NetworkLicense>
</LicenseSetting>
<LicenseSetting>
<Name>MayaRedundantNetworkLicense</Name>
<NetworkLicense>
<Redundant>
<Server>Server1</Server>
<Server>Server2</Server>
<Server>Server3</Server>
</Redundant>
</NetworkLicense>
</LicenseSetting> -->
<LicenseSetting>
<Name>MayaStandaloneLicense</Name>
<SerialNumber>XXX-ABCDEFGH</SerialNumber>
<ProductKey>657L1</ProductKey>
<ProductVersion>2020.0.0.F</ProductVersion>
<ConfigFile>MayaConfig.pit</ConfigFile>
</LicenseSetting>
<!-- <LicenseSetting>
<Name>MayaUserLicense</Name>
<UserLicense />
</LicenseSetting> -->
</LicenseSettings>
</Deployment>

The template XML file shows license info both within the <Application> tags and in a separate <LicenseSettings> tag. Which are we supposed to use? All of Autodesk's documentation don't seem to address this at all.


OK, I was able to get this working minus using any deployment.xml file (I never did try to remove all spaces from the path to determine if that was my issue, but frankly I prefer the method below because it doesn't require installing any separate deployment config and all I care about is installing Maya, not any of the additional plugins). The reference here (https://www.jamf.com/jamf-nation/discussions/36036/packaging-maya-2020) to the AdskLicensingInstHelper apparently was the key. Don't even know then why Autodesk's own documentation doesn't use this.



This is essentially what I did (but am working on a more detailed blog post):




  1. Copy installer to local machine

  2. Run silent install via: sudo /path/to/Install Maya 2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup --silent. This assumes you are not installing any of the optional plugins ...

  3. Post install, use the AdskLicensingInstHelper tool to register your license (in my case, this was standalone):
    sudo /Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk ${key} --pv ${version} --cf /path/to/Install Maya 2020.app/Contents/Helper/MayaConfig.pit --el ${locale} --lm ${license_type} --sn ${serial}


@aporlebeke I tried using the Helper tool a while back and got in touch with Autodesk, as you can imagine their support is just terrible. I have had issues with the --c coming up as missing MANDATORY argument: not sure where the MayaConfig.pit file should be so that is the command with the error
led true --cls_check_succ true --authorize_succ true --lic_server_type 3 --lic_servers 2080@Mylicenseserver1@Mylicenseserv2 --serial_number_sa 000-00000000 --serial_number_nw xxx-xxxxxxxx --cf /Applications/Maya 2020.app/Contents/Helper/MayaConfig.pit/
missing MANDATORY argument: config_file(cf)


@robertojok a few things ...
1. you've included your serial number (may want to remove)
2. you have a trailing slash after MayaConfig.pit. In my tests, when you have this additional slash you get the following error: Native call error in adlmPITSetProductInformation_2 26: User has passed invalid configuration file
3. I'm uncertain given your example if you are copying the Maya installer app into the /Applications folder or if your path is just incorrect
4. given your error, what happens if you move the --cf argument earlier in the command?


@aporlebeke thanks for your help... managed to get the --cf to run without any issues... here's what I have now ... sudo ./AdskLicensingInstHelper register --pk 657L1 --pv 2020.0.0.F --lt DISTRIBUTED --ls 2080@MyDistributedServer1,2080@MyDistributedServer2 --fi MAYA --sn xxx-xxxxxxxx --el UK --cf /Applications/Autodesk/maya2020/adlmreg/MayaConfig.pit --nu



I am running distributed server setup. I added the --nu flag since in order to remove the option for Single user license when the app is launched. I still get the server license option pop up, I have not yet found the flag to disable that or the whole window so that the app just launches. However on clicking the server license button the application runs fine.



on a computer that Maya2020 is installed Manually when I run the helper command ./AdskLicensingInstHelper list the list show the configurations which have been set which provides some sort of pointers to the flags that can be used



"feature_id": "ACDMAC",
"def_prod_key": "777M1",
"def_prod_ver": "2021.0.0.F",
"sel_prod_key": "777M1",
"sel_prod_ver": "2021.0.0.F",
"user_lic_enabled": true,
"trial_enabled": true,
"cls_check_succ": true,



so the --nu is related to "user_lic_enabled": true.
So I am assuming that "authorize_succ": true can ensure that the window for licensing does not pop up however I am yet to find the correct flag for it.
So one could run the silent install command sudo /Volumes/Maya 2020 Installer/Install Maya 2020.app/Contents/Helper/Setup.app/Contents/MacOS/Setup -–silent
Then run the ./AdskLicensingInstHelper command to license.


Blog post about my workflow: https://aporlebeke.wordpress.com/2020/07/14/automating-manual-munki-imports-with-autopkg-part-2-autodesk-maya/


@5Y54DMIN Do you mind sharing your resolution .It does the same for me.it just opens in the dock and then it closes right after.


@efarjami does my linked blog post help at all?


@apizz That was my hope to get that xml file to work ! But I'm going to try your resolution.Thank you !


Reply