-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmacrelease.sh
executable file
·333 lines (283 loc) · 5.53 KB
/
macrelease.sh
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
#!/bin/sh
#
# To use this release script,
#
# Using sudo ./macrelease.sh is strongly recommended.
# Qt qmake for the target Qt version must be in your path.
#
NAME=SimpleIDE
APP=${NAME}.app
PKG=${NAME}.zip
PROPGCC=/opt/parallax
APPGCC=${NAME}.app/Contents/propeller-gcc
APPWRK=${NAME}.app/Contents/Workspace
APPMOS=${NAME}.app/Contents/MacOS
CLEAN=$1
if [ -e ${PKG} ]; then
rm -rf ${PKG}
fi
QMAKE=`which qmake`
QT5QMAKE=`echo ${QMAKE} | grep -i 'Qt5'`
grep -i 'Qt5' ${QMAKE}
if test $? != 0 ; then
echo "The qmake program may not be a Qt5 vintage."
echo "Please adjust PATH to include a Qt5 build if necessary."
sleep 5
fi
echo `pwd`
if [ ! -e ./openspin ]
then
echo "Openspin not found. Openspin is in github:"
echo "git clone https://github.com/parallaxinc/OpenSpin.git openspin"
git clone https://github.com/parallaxinc/OpenSpin.git openspin
fi
#
# update openspin
#
cd openspin
git fetch
if test $? != 0; then
echo "openspin fetch failed."
exit 1
fi
git pull
if test $? != 0; then
echo "openspin pull failed."
exit 1
fi
make
if test $? != 0; then
echo "openspin make failed."
exit 1
fi
cp -f build/openspin /opt/parallax/bin
if test $? != 0; then
echo "copy openspin failed."
exit 1
fi
cd ..
if [ ! -e ./Workspace ]
then
echo "SimpleIDE Workspace not found. Add it with this command:"
echo "git clone https://github.com/parallaxinc/Simple-Libraries.git Workspace"
exit 1
fi
#
# update workspace
#
rm -rf ${VERSION}/parallax/Workspace
cd Workspace
git fetch
if test $? != 0; then
echo "workspace fetch failed."
exit 1
fi
git pull
if test $? != 0; then
echo "workspace pull failed."
exit 1
fi
cd ..
if [ ! -e ./proploader ]
then
echo "proploader not found. Add it with this command:"
echo "git clone https://github.com/parallaxinc/proploader.git proploader"
git clone https://github.com/parallaxinc/proploader.git proploader
fi
cd proploader
git fetch
if test $? != 0; then
echo "proploader fetch failed."
exit 1
fi
git pull
if test $? != 0; then
echo "proploader pull failed."
exit 1
fi
make OS=macosx
if test $? != 0; then
echo "proploader make failed."
exit 1
fi
cd ..
#
# useful for script debug
#
if [ 1 == 1 ]; then
#
# Build the IDE first
#
mkdir -p release
#cp -r propside/* release
DIR=`pwd`
XFILES=`find propside/*`
for XF in $XFILES ; do
BF=`echo $XF | sed 's/propside\//release\//g'`
if [ ! -e $BF ] ; then
echo $DIR/$BF
ln -s $DIR/$XF release
fi
if [ $? -ne 0 ] ; then
exit 1
fi
done
cd release
qmake -config release
if test $? != 0; then
echo "qmake config failed."
exit 1
fi
if [ x$CLEAN != xnoclean ]; then
rm -rf ${APP}
make clean
fi
make -j 8
if test $? != 0; then
echo "make failed."
exit 1
fi
cd ..
fi
rm -rf ${NAME}
mkdir -p ${NAME}
if test $? != 0; then
echo "mkdir ${NAME} failed."
exit 1
fi
#######################################################################
# go to ./SimpleIDE folder
#
cd ${NAME}
rm -rf ${NAME}.app
cp -r ../release/${NAME}.app .
if test $? != 0; then
echo "copy ${NAME}.app failed."
exit 1
fi
macdeployqt ${NAME}.app
if test $? != 0; then
echo "macdeployqt ${NAME}.app failed."
exit 1
fi
cp ../release/myInfo.plist ${NAME}.app/Contents/Info.plist
if test $? != 0; then
echo "copy myInfo.plist to ${NAME}.app failed."
exit 1
fi
rm -rf ${APPGCC}
mkdir -p ${APPGCC}
cp -r ${PROPGCC}/* ${APPGCC}
if test $? != 0; then
echo "copy ${PROPGCC} failed."
exit 1
fi
cp ../SimpleIDE-User-Guide.pdf ${APPGCC}/bin
if test $? != 0; then
echo "copy User Guide failed."
exit 1
fi
cp ../boards.txt ${APPGCC}/propeller-load
if test $? != 0; then
echo "copy boards.txt filter failed."
exit 1
fi
if [ ! -e ../ctags-5.8/ctags ]
then
pushd `pwd`
cd ../ctags-5.8
./configure
make
popd
fi
cp ../ctags-5.8/ctags ${APPGCC}/bin
if test $? != 0; then
echo "copy ctags failed."
exit 1
fi
PROPLOADER=../proploader-macosx-build/bin/proploader
if [ ! -e $PROPLOADER ]
then
echo "$PROPLOADER not found."
exit 1
fi
cp $PROPLOADER $APPMOS
#cp -r ../propside-demos/ demos
#if test $? != 0; then
# echo "copy propside-demos failed."
# exit 1
#fi
#
# copy workspace
#
cp -r ../Workspace ${APPWRK}
if test $? != 0; then
echo "copy Workspace failed."
exit 1
fi
#
# remove workspace if any from parallax folder
#
rm -rf ${APPGCC}/Workspace
#
# move Workspace
#
#mv Workspace parallax
#if test $? != 0; then
# echo "mv Workspace failed."
# exit 1
#fi
mkdir -p license
pwd
cp -r ../propside/IDE_LICENSE.txt license
if test $? != 0; then
echo "copy license failed."
exit 1
fi
cp -r ../icons/24x24-free-application-icons/readme.txt license/aha-soft-readme.txt
if test $? != 0; then
echo "copy aha-soft license failed."
exit 1
fi
cp -r ../ctags-5.8/COPYING license/ctags-COPYING.txt
if test $? != 0; then
echo "copy ctags copying failed."
exit 1
fi
cp -r ../ctags-5.8/README license/ctags-README.txt
if test $? != 0; then
echo "copy ctags readme failed."
exit 1
fi
cp -r ${PROPGCC}/propeller-elf/lib/COPYING* license
if test $? != 0; then
echo "copy propgcc license failed."
exit 1
fi
cp -r ${PROPGCC}/propeller-elf/lib/LIB_LICENSE.txt* license
if test $? != 0; then
echo "copy propgcc lib license failed."
exit 1
fi
#
# remove license if any from parallax folder
#
rm -rf ${APPGCC}/license
#
# move license
#
mv license ${APPGCC}
if test $? != 0; then
echo "mv license failed."
exit 1
fi
#
# no zip now. use mack PackageMaker
#
cd ..
#zip ${PKG} -r ${NAME}
#if test $? != 0; then
# echo "Zip failed."
# exit 1
#fi
exit 0