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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
<html>
<head>
<title>How To Upgrade Shave To A New Version Of Maya</title>
<style type="text/css">
em { color: #408040 }
</style>
</head>
<body bgcolor="#e0ffe0">
<h1>How To Upgrade Shave To A New Version Of Maya</h1>
<h2>Contents</h2>
<ul>
<li><a href="#linux">Linux</a></li>
<li><a href="#osx">MacOS</a></li>
<li><a href="#win">Microsoft Windows</a></li>
</ul>
<p>
WARNING!!! This document is out of date. Use with caution.
<h2><a name="linux">Linux</a></h2>
<h3>Preparation</h3>
These instructions assume that you are using a 64-bit Fedora Core or
CentOS system as your build machine.
<p>
Install the new version of Maya. If the installation comes in multiple
parts, or has optional parts which can be selected, be sure to install both
the devkit and the documentation.
<h3>Determine The OS Version Required</h3>
The versions of Linux supported by each release of Maya can be found <a href="https://knowledge.autodesk.com/support/maya/troubleshooting/caas/sfdcarticles/sfdcarticles/System-requirements-for-Autodesk-Maya.html">here</a>.
Look for the Fedora Core/CentOS version and make note of it. If it matches
the version you are using on your build machine, then you're safe. If not
then you <i>may</i> be able to get away with building on whatever version
of Fedora Core/CentOS you have.
We'll start by trying that.
<h3>Get The Right Compiler</h3>
Find out what version of gcc the new version of Maya requires. In recent
versions this information has been found in the docs under <em>Maya
Developer Help -> Setting up your build environment -> Linux environment ->
Linux compiler requirement</em>. However, if you are building from a Beta
version of Maya often that section is empty or still refers to the previous
version of Maya. If that is the case then post on the Beta forum a request
for the Linux compiler requirement and gcc build info.
<p>
Check to see if you already have the necessary compiler. Type the following
command:
<pre>
gcc -v
</pre>
<p>
The last line of that should look something like this:
<pre>
gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)
</pre>
<p>
This indicates that your default version of gcc is 4.1.1. If that matches
Maya's requirement, then you're all set. If not, then do the following
command:
<pre>
ls -d1 /opt/gcc*
</pre>
<p>
Note that that is the digit one after <em>-d</em>.
<p>
That should give you a listing something like this:
<pre>
/opt/gcc402
/opt/gcc412
/opt/gcc421
</pre>
<p>
That means that you also have versions 4.0.2, 4.1.2 and 4.2.1 of gcc
installed as options. If one of those matches Maya's compiler requirment
then you're all set. If not then you will have to download the source code
for the appropriate version of gcc and build and install it on your system.
The <em>Linux compiler requirement</em> page in the docs gives instructions
on how to do this. Again, if you are working from Beta docs the information
may be missing or out of date so ask for it on the Beta forum.
<p>
In some cases it is possible to build a plugin using a different version of
gcc than Autodesk has recommended. For example, we were able to
successfully build the plugins for Maya 2008 using gcc 4.0.2 even though
the recommended version was 4.1.2. You can try this if you feel lucky, but
if you subsequently start seeing odd problem reports, keep in mind that it
might be due to using the wrong version of gcc.
<h3>Update mayaVersions.linux</h3>
This file contains a description of the Linux configuration required for
each version of Maya. It is broken up into three sections. The first
contains descriptions of the official configurations supported by Autodesk.
The second are the list of actual build configurations which we use for
Shave. The third are a list of "unsafe" configurations which are added
to match whatever weird configurations Shave development team members have
available to them and can get to work.
<p>
At the end of the first section, add a line for the new Maya version, using
the officially supported version of Fedora Core. If you will be building
using that exact configuration (i.e. same compiler and same version of
Fedora Core) then the last field on the line should be <em>y</em>,
otherwise it should be <em>n</em>.
<p>
If you are building using something other than the supported configuration,
then add a line to the end of the second section describing the build
configuration that you will be using. Be sure to set the final field of
this line to <em>y</em>.
<h3>Build It</h3>
That's it, you're done. Try doing a build.
<h2><a name="osx">MacOS</a></h2>
<h3>Preparation</h3>
Install the new version of Maya for MacOS. If the installation comes in multiple
parts, or has optional parts which can be selected, be sure to install both
the devkit and the documentation.
<h3>Upgrade Your MacOS Version If Necessary</h3>
The versions of MacOS supported by each release of Maya can be found <a href="https://knowledge.autodesk.com/support/maya/troubleshooting/caas/sfdcarticles/sfdcarticles/System-requirements-for-Autodesk-Maya.html">here</a>.
If your build system's version of MacOS is on the list then you're safe.
If not then you can try building Shave with the version you have, though
that hasn't worked very often in the past. Failing that, you must upgrade
your build system to the new version of MacOS.
<h3>Upgrade Your MacOS DevKit If Necessary</h3>
If you upgraded your version MacOS in the previous step, then you will need
to upgrade your DevKit as well. Often the MacOS upgrade utility does not do
this automatically so you may need to install the new DevKit explicitly.
<h3>Update mkosx.csh</h3>
At the top of <em>mkosx.csh</em> there is a line setting the
<em>defaultVersions</em> variable to the list of Maya versions currently
supported by Shave on MacOS. E.g:
<pre>
set defaultVersions=(2017 2018)
</pre>
Add the new Maya version to the end of this list. E.g:
<pre>
set defaultVersions=(2017 2018 2019)
</pre>
<h3>Build It</h3>
That's it, you're done. Try doing a build
<h2><a name="win">Microsoft Windows</a></h2>
<h3>Preparation, Build Machine</h3>
Install the required version of Maya onto the build system. If the install
consists of multiple parts, or has optional parts which can be selected, be
sure to include the development kit. The Maya documentation is not
necessary though obviously could be useful if you run into problems.
<p>
Set up an environment variable called <em>AUTODESK_LOCATION</em> which
points to the root directory under which the different versions of Maya
are installed. E.g. <em>C:\Program Files\Autodesk</em>.
<p>
Log out of your Windows account and back in for the environment variable to
take effect.
<h3>Create New Project Configurations</h3>
Separate Visual Studio solution and project files are kept for each version
of Visual Studio used to build Shave. These are tagged with Visual Studio's
major version number in their names. E.g:
<p>
<ul>
<li>mayaPlug/shaveHaircut-vs14.sln</li>
<li>mayaPlug/libShaveAPI-vs14.vcxproj</li>
</ul>
<p>
Note that the tags use Visual Studio's internal version number (i.e. the
one from its 'about' information) not the year for which the Visual Studio
version is named. For example, Visual Studio 2015 has internal version
number 14.xx so its project files are tagged with 'vs14'.
<p>
If project files already exist for the required version of Visual Studio
then add new debug and release project configurations for the new version
of Maya by copying configurations from the previous version of Maya and
modifying any properties which explicitly reference the Maya version
(e.g. additional compiler include paths and additional linker library
paths).
<p>
If the new version of Maya uses a new version of Visual Studio then you
will need to create new solution and project files, named with the appropriate
version tag. The simplest way to do this is as follows:
<p>
<ol>
<li>Copy the previous version's solution and project files, using the
new version tag for the new files. For example, if the new version of Visual
Studio has an internal major version number of '15' then you would copy
'shaveHaircut-vs14.sln' to 'shaveHaircut-vs15.sln', and
'libShaveAPI-vs14.vcxproj' to 'libShaveAPI-vs15.vcxproj'.</li>
<li>Using a text editor, modify the new solution file so that it references
the new 'vs15' projects instead of the old 'vs14' ones.</li>
<li>Start up the new version of Visual Studio and load the new solution
into it. When VS offers to convert it for you, say yes and save out the
converted files.</li>
<li>Add new debug and release project configurations for the new version
of Maya, as described above, and remove project configurations for the
older versions of Maya.</li>
</ol>
<h3>Update The Build Scripts</h3>
<h4>mkwinall.bat</h4>
This file determines which versions of Maya should be built. There is a block
of code for each version of Maya which looks something like this:
<pre>
if exist "%AUTODESK_LOCATION%\Maya2018\include\maya\MTypes.h" (
if %errorlevel%==0 call mkwinversion 2018 Release %reuseLibexe%
set reuseLibexe=y
) else (
echo Maya 2018 not installed. Skipping build for Maya 2018
)
</pre>
<p>
Make a copy of the code for the most recent version of Maya, replacing all
occurrences of the old version number with the new one, and paste it at
the end of the code blocks.
<h4>mkwinVVVV.bat</h4>
For convenience there is a batch file for each version of Maya which can be
used to build the plugin simply by double-clicking on it from Windows
Explorer. The file is named
<em>mkwinVVVV.bat</em> where 'VVVV' is the Maya version number (e.g.
<em>mkwin2018.bat</em>). Make a copy of the most recent version of the file
and rename it to use the new version number (e.g. <em>mkwin2019.bat</em>).
Edit the new file and change all occurrances of the old version number to
the new one.
<h3>Build It</h3>
That's it, you're done. Try doing a build.
</body>
</html>
|