summarylogtreecommitdiffstats
path: root/maya.install
blob: b5c6b7abfbec93aa919bf5b0c6605327a022df88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# This is a default template for a post-install scriptlet.
# Uncomment only required functions and remove any functions
# you don't need (and this header).

## arg 1:  the new package version
#pre_install() {
  #echo "If you have not already done so, you can get your serial number from: http://students.autodesk.com"
  #read -p "Please enter your serial number: " SERIALNUMBER
  #read -p "Please enter your product id: " PRODUCTID
  #echo ""
#}

## arg 1:  the new package version
post_install() {
  mkdir /usr/tmp
  chmod 777 /usr/tmp

  cp /opt/Autodesk/Adlm/R11/lib64/libadlmPIT.so.11 /usr/lib/libadlmPIT.so.11
  cp /opt/Autodesk/Adlm/R11/lib64/libadlmutil.so.11 /usr/lib/libadlmutil.so.11

  echo -e 'MAYA_LICENSE=unlimited\nMAYA_LICENSE_METHOD=standalone' > /usr/autodesk/maya2016/bin/License.env

  #/usr/autodesk/maya2016/bin/adlmreg -i S $PRODUCTID $PRODUCTID 2016.0.0.F $SERIALNUMBER /var/opt/Autodesk/Adlm/Maya2016/MayaConfig.pit

  /opt/Autodesk/Adlm/FLEXnet/bin/install_fnp.sh /opt/Autodesk/Adlm/FLEXnet/bin/FNPLicensingService

  ln -s /usr/lib/libssl.so /usr/autodesk/maya2016/lib/libssl.so.10
  ln -s /usr/lib/libcrypto.so /usr/autodesk/maya2016/lib/libcrypto.so.10

  ln -s /usr/lib/libjpeg.so /usr/autodesk/maya2016/lib/libjpeg.so.62
  ln -s /usr/lib/libtiff.so /usr/autodesk/maya2016/lib/libtiff.so.3

  mkdir /usr/autodesk/maya2016/plugin-backups
  mv /usr/autodesk/maya2016/plug-ins/bifrost /usr/autodesk/maya2016/plugin-backups/

  read -r -d '' POSTINSTALLMGG << EOF
######################################
## Run this commands once after install
######################################
#export MAYA_LOCATION=/usr/autodesk/maya2016/
#export LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R11/lib64/

#nano mayainstall.c

##add the following in nano, save and close
#int main (void) {return 0;}

#gcc mayainstall.c

#if [ -f "/usr/bin/rpm" ] && sudo mv /usr/bin/rpm /usr/bin/rpm_backup

#gcc mayainstall.c
#sudo cp a.out /usr/bin/rpm

#chmod +x /opt/Autodesk/MayaSetup/setup
#sudo /opt/Autodesk/MayaSetup/setup

##Then, follow the GUI, Accept, put your Serial Number and the 657G1 thing

#sudo rm /usr/bin/rpm
#if [ -f "/usr/bin/rpm_backup" ] && sudo mv /usr/bin/rpm_backup /usr/bin/rpm

## Run once as sudo to activate the licence

#sudo maya

##If didn’t activate so go to https://registeronce.autodesk.com and when it asks you for request file, get from /tmp/MAYA2016en_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
## Since Maya was ran once with sudo, reset the owner of the maya folder to user
#sudo chown -R "$USER":"$USER" ~/maya

## Close the file and you are almost done
## 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

EOF

   echo "$POSTINSTALLMGG"

}

## arg 1:  the new package version
## arg 2:  the old package version
#pre_upgrade() {
	# do something here
#}

## arg 1:  the new package version
## arg 2:  the old package version
#post_upgrade() {
	# do something here
#}

## arg 1:  the old package version
pre_remove() {
  rm /usr/lib/libadlmPIT.so.11
  rm /usr/lib/libadlmutil.so.11

  rm /usr/autodesk/maya2016/bin/License.env

  rm /var/opt/Autodesk/Adlm/Maya2016/MayaConfig.pit

  rm /usr/autodesk/maya2016/lib/libssl.so.10
  rm /usr/autodesk/maya2016/lib/libcrypto.so.10

  rm /usr/autodesk/maya2016/lib/libjpeg.so.62
  rm /usr/autodesk/maya2016/lib/libtiff.so.3

  rm -rf /usr/autodesk/maya2016/plugin-backups
}

## arg 1:  the old package version
#post_remove() {
	# do something here
#}