blob: fb1d6b0ed845fb3f9287d2d7cfe772dab09f116a (
plain) (
blame)
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
|
#!/bin/sh
# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962
log=$$.log
checkFailure() {
if [ $? -ne 0 ]; then
cat $log
rm -f $log
echo "mkosx:error: Exiting due to errors building $1 for Maya $maya."
exit 1
fi
}
maya=
reuseLibexe=n
while [ "$1" != "" ]; do
if [ "$1" = "reuseLibexe" ]; then
reuseLibexe=y
else
maya=$1
fi
shift
done
if [ -d /Applications/Autodesk/maya${maya} ]; then
export MAYA_LOCATION=/Applications/Autodesk/maya${maya}
else
export MAYA_LOCATION=/Applications/Alias/maya${maya}
fi
if [ ! -d $MAYA_LOCATION ]; then
echo "mkosx:error: Maya version ${maya} does not appear to be installed."
exit 2
fi
source getosxvars.sh
cd libexe
#
# If we're reusing libexe we still do the make, we just don't do the clean
# beforehand. That way if it's all up-to-date then nothing will happen but
# if anything is out of date we'll build it.
#
if [ "${reuseLibexe}" = "n" ]; then
make -f Makefile.mayaosx clean >/dev/null 2>&1
fi
echo "mkosx:status: building shaveLibAW.o for Maya ${maya}"
make -f Makefile.mayaosx all
checkFailure "shaveLibAW.o"
cd ../mayaPlug
make -f Makefile.osx Clean >/dev/null 2>&1
echo "mkosx:status: building Shave plugin for Maya ${maya}"
make -f Makefile.osx -j 4 all >$log 2>&1
checkFailure "Shave plugin"
# Build Arnold plugin & shaders.
#
cd ../arnold
echo "mkosx:status: building Arnold plugin & shaders for Maya ${maya}"
./mkosx.sh ${maya} >$log 2>&1
checkFailure "Arnold plugin and shaders"
cd ..
#
# Build V-Ray shaders.
#
cd vrayPlug
echo "mkosx:status: building V-Ray plugins & shaders for Maya ${maya}"
./mkosx.sh ${maya} >$log 2>&1
checkFailure "V-Ray shaders"
cd ..
echo "mkosx:status: creating package & zip for Maya ${maya}"
./pkgosx.sh
checkFailure "package"
rm -f $log
zipfile=`echo "${pkgName}.zip" | sed 's/\.mpkg\./.pkg./'`
echo "mkosx:done: ${zipfile}"
exit 0
|