forked from MattijsKneppers/IMI-Max-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_install.command
157 lines (127 loc) · 5.18 KB
/
_install.command
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
#!/bin/bash
# This file must be saved in UTF-8 (because of the shortcuts)
# Based on the eijes installer, thanks !
####################################
# IMI Max patches Installation v1.2
# Nicolas Marechal
# n.marechal@lcc.arts.ac.uk
####################################
function do5Installation {
echo "- Installing IMI tools for Max";
echo ""
echo "- Quitting Max..."
killall MaxMSP;
killall Max;
echo ""
sleep 1;
doInstallation;
}
function doInstallation {
if [ -e "$C74Examples" ] ; then
if [[ ! -e "$IMIpatches" ]] ; then
mkdir "$IMIpatches";
fi
cd "$IMIpatches";
echo -ne "- Install IMI patches folder in ($IMIpatches)\n";
cp -R "$InstallFolder/Computer Vision" "$IMIpatches" && echo -ne "... Computer Vision.\n";
cp -R "$InstallFolder/CV objects" "$IMIpatches" && echo -ne "... CV objects.\n";
cp -R "$InstallFolder/DbN2D" "$IMIpatches" && echo -ne "... DbN2D.\n";
cp -R "$InstallFolder/DbN3D" "$IMIpatches" && echo -ne "... DbN3D.\n";
cp -R "$InstallFolder/DbN3D.2" "$IMIpatches" && echo -ne "... DbN3D.2.\n";
cp -R "$InstallFolder/DbNDemo" "$IMIpatches" && echo -ne "... DbNDemo.\n";
cp -R "$InstallFolder/Effects" "$IMIpatches" && echo -ne "... Effects.\n";
cp -R "$InstallFolder/Exhibition" "$IMIpatches" && echo -ne "... Exhibition.\n";
cp -R "$InstallFolder/Global" "$IMIpatches" && echo -ne "... Global.\n";
cp -R "$InstallFolder/Grab" "$IMIpatches" && echo -ne "... Grab.\n";
cp -R "$InstallFolder/iCinema" "$IMIpatches" && echo -ne "... iCinema.\n";
cp -R "$InstallFolder/IMI max" "$IMIpatches" && echo -ne "... IMI max.\n";
cp -R "$InstallFolder/Internet" "$IMIpatches" && echo -ne "... Internet.\n";
cp -R "$InstallFolder/Introduction" "$IMIpatches" && echo -ne "... Introduction.\n";
cp -R "$InstallFolder/LCD" "$IMIpatches" && echo -ne "... LCD.\n";
cp -R "$InstallFolder/Matrix" "$IMIpatches" && echo -ne "... Matrix.\n";
cp -R "$InstallFolder/Network" "$IMIpatches" && echo -ne "... Network.\n";
cp -R "$InstallFolder/Plugins_tools" "$IMIpatches" && echo -ne "... Plugins_tools.\n";
cp -R "$InstallFolder/Projection" "$IMIpatches" && echo -ne "... Projection.\n";
cp -R "$InstallFolder/Sensor" "$IMIpatches" && echo -ne "... Sensor.\n";
cp -R "$InstallFolder/Sensor_Interfaces" "$IMIpatches" && echo -ne "... Sensor_Interfaces.\n";
cp -R "$InstallFolder/Sound" "$IMIpatches" && echo -ne "... Sound.\n";
cp -R "$InstallFolder/Text" "$IMIpatches" && echo -ne "... Text.\n";
cp -R "$InstallFolder/Toolbox" "$IMIpatches" && echo -ne "... Toolbox.\n";
cp -R "$InstallFolder/Video" "$IMIpatches" && echo -ne "... Video.\n";
cp -R "$InstallFolder/z" "$IMIpatches";
cp -R "$InstallFolder/zpatches" "$IMIpatches";
cp "$InstallFolder/_IMI_Read me.rtf" "$IMIpatches" && echo -ne "... Read me file.\n";
if [ -e "$IMIextra/_IMI_help.maxpat" ] ; then
rm "$IMIextra/_IMI_help.maxpat";
rm -r -f "$IMIextra/_IMI";
echo ""
fi
echo -ne "- Install IMI help files in ($IMIextra)";
cp -R "$InstallFolder/IMIextra/" "$IMIextra" && echo -ne "... done.\n";
echo ""
if [ -e "/Applications/Max5/_abstract/IMIpatches" ] ; then
cp -R "/Applications/Max5/_abstract/IMIpatches/Media files" "$IMIpatches";
cp -R "/Applications/Max5/_abstract/IMIpatches/Plugins_anim" "$IMIpatches";
cp -R "/Applications/Max5/_abstract/IMIpatches/Plugins_communication" "$IMIpatches";
cp -R "/Applications/Max5/_abstract/IMIpatches/Plugins_janoma" "$IMIpatches";
cp -R "/Applications/Max5/_abstract/IMIpatches/Plugins_sound" "$IMIpatches";
cp -R "/Applications/Max5/_abstract/IMIpatches/Plugins_tools" "$IMIpatches";
rm -r -f "/Applications/Max5/_abstract/IMIpatches";
echo -ne "- Copy the alumni files into the example folder";
fi
echo -ne "\n";
fi
}
################################
# Installation process
################################
clear
echo "------------------------"
echo "-- IMI Installation --"
echo "------------------------"
echo ""
echo ""
################################
# making PATH
################################
InstallFolderPath=$0
InstallFolder=$(dirname "$InstallFolderPath")
################################
# Version checking
################################
whichVersion=0;
if [ -e "/Applications/Max5" ]; then
whichVersion=1; # got Max 5
fi
if [ -e "/Applications/Max5/_abstract/IMIpatches" ]; then
whichVersion=2; # alumni version
fi
if [[ $whichVersion == 0 ]]; then
echo "Max 5 is not installed in the Applications folder. The automatic installation is not possible.";
exit 1;
fi
echo -ne "- Checking version... ";
if [[ $whichVersion == 1 ]]; then
echo "Max 5 is installed.";
echo ""
maxAppFolder="/Applications/Max5";
C74Examples="$maxAppFolder/examples/";
IMIpatches="$maxAppFolder/examples/IMIpatches";
IMIextra="$maxAppFolder/patches/extras/";
do5Installation;
fi
if [[ $whichVersion == 2 ]]; then
echo "Max 5 is installed, this is the alumni version.";
echo ""
maxAppFolder="/Applications/Max5";
C74Examples="$maxAppFolder/examples";
IMIpatches="$maxAppFolder/_abstract/IMIpatches";
IMIextra="$maxAppFolder/patches/extras/";
do5Installation;
fi
################################
# End of the installation
echo -ne "\nend of the installation... enjoy!\n"
echo -ne "(you can quit the Terminal now...)\n"
sleep 5;
exit 0;