include step editing and mixer binding files in linux packages
[ardour.git] / tools / linux_packaging / build
1 #!/bin/bash
2
3 #
4
5 . ./buildenv
6
7 # script for pulling together a Linux app bundle.
8 #
9 # This will create a bundle for a single architecture.
10 # Execute this scirpt on both x86 and x86_64 and then use
11 # package to merge the 2 bundles into a final package with the
12 # installer.
13
14 MIXBUS=
15 WITH_LADSPA=0
16 STRIP=all
17 PRINT_SYSDEPS=
18 WITH_NLS=
19 EXTERNAL_JACK=
20 VENDOR=Ardour ;
21 BUILDTYPE=""
22
23 if [ $# -eq 0 ] ; then
24         echo ""  
25         echo "ERROR - Please specify build type"
26         echo "    --public"
27         echo "    --mixbus"
28         echo ""  
29         exit 1
30 fi
31
32 while [ $# -gt 0 ] ; do
33         echo "arg = $1"
34         case $1 in
35
36         #
37         # top level build targets
38         #
39
40         --mixbus)
41                 MIXBUS=1; 
42                 WITH_NLS=1 ; 
43                 WITH_LADSPA=; 
44                 STRIP=all
45                 APPNAME=Mixbus ;
46                 VENDOR=Harrison ;
47                 shift ;;
48         --public)
49                 WITH_NLS=1 ; 
50                 WITH_LADSPA=; 
51                 STRIP=all ; 
52                 APPNAME=Ardour ;
53                 shift ;;
54         --allinone)
55                 WITH_NLS= ; 
56                 WITH_LADSPA=1; 
57                 STRIP=all; 
58                 shift ;;
59         --test) WITH_LADSPA=; STRIP= ; shift ;;
60
61         #
62         # specific build flags
63         #
64
65         --nojack) INTERNAL_JACK= ; shift ;;
66         --noladspa) WITH_LADSPA= ; shift ;;
67         --strip) STRIP=$2 ; shift ; shift ;;
68         --sysdeps) PRINT_SYSDEPS=1; shift ;;
69         --nls) WITH_NLS=1 ; shift ;;
70
71         *)
72                 #catch all for unknown arguments
73                 echo ""
74                 echo "!!! ERROR !!! - Unknown argument $1"
75                 echo ""
76                 exit 1
77                 ;;
78         esac
79 done
80
81 if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
82     echo "Unknown strip option \"$STRIP\""
83     echo "Legal values are: all, none, some"
84     exit 1
85 fi
86
87 release_version=`grep -m 1 '^VERSION' ../../wscript | awk '{print $3}' | sed "s/'//g"`
88 svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d"'" -f 2`
89 echo "Version is $release_version / $svn_version"
90 info_string="$release_version/$svn_version built on `hostname` by `whoami` on `date`"
91 echo "Info string is $info_string"
92
93 # Figure out our CPU type
94 case `uname -m` in
95         i[3456789]86|x86|i86pc)
96                 echo "Architecture is x86"
97                 ARCH='x86'
98                 ARCH_BITS='32-bit'
99                 ;;
100         x86_64|amd64|AMD64)
101                 echo "Architecture is x86_64"
102                 ARCH='x86_64'
103                 ARCH_BITS='64-bit'
104                 ;;
105         *)
106                 echo ""
107                 echo "ERROR - Unknown architecture `uname -m`"
108                 echo ""
109                 exit 1
110                 ;;
111 esac
112
113 # Figure out the Build Type
114 if grep -q "DEBUG = True" ../../build/c4che/default.cache.py; then
115         DEBUG="T"
116 else
117         DEBUG="F"
118 fi
119
120 if [ x$DEBUG = xT ]; then
121     BUILDTYPE="dbg"
122     if [ x$STRIP = xall ] ; then
123         echo "A debug build with --strip all makes no sense - STRIP reset to \"some\""
124         STRIP=some
125     fi
126 fi
127
128 # the waf build tree to use when copying built/generated files
129
130 BUILD_ROOT=../../build
131
132 # setup directory structure
133
134 if [ -z "${BUILDTYPE}" ]; then
135         APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}
136         APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}
137 else
138         APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}-${BUILDTYPE}
139         APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}
140 fi
141
142 APPBIN=$APPDIR/bin
143 APPLIB=$APPDIR/lib
144 Libraries=$APPLIB
145 Etc=$APPDIR/etc
146 Shared=$APPDIR/share
147 Plugins=$APPLIB/plugins
148 Surfaces=$APPLIB/surfaces
149 Panners=$APPLIB/panners
150 ExportFormats=$Shared/export
151 Locale=$Shared/locale
152 MidiMaps=$Shared/midi_maps
153 Modules=$Libraries/modules
154 Loaders=$Libraries/loaders
155
156
157 if [ x$PRINT_SYSDEPS != x ] ; then
158 #
159 # print system dependencies
160 #
161
162         for file in $APPBIN/* $Libraries/* $Modules/* $Plugins/*.so ; do 
163                 if ! file $file | grep -qs Mach-O ; then
164                         continue
165                 fi
166                 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)" 
167         done | sort | uniq
168         exit 0
169 fi
170
171 echo "Removing old $APPDIR tree ..."
172 rm -rf $APPDIR/
173
174 echo "Building new app directory structure ..."
175
176 # only bother to make the longest paths
177
178 mkdir -p $APPDIR
179 mkdir -p $APPBIN
180 mkdir -p $APPLIB
181 mkdir -p $Etc
182 mkdir -p $Plugins
183 mkdir -p $Modules
184 mkdir -p $Loaders
185 mkdir -p $Shared
186 mkdir -p $Locale
187 mkdir -p $Surfaces
188 mkdir -p $MidiMaps
189 mkdir -p $ExportFormats
190 mkdir -p $Panners
191 mkdir -p $Shared/templates
192 mkdir -p $Shared/doc
193
194 # maybe set variables
195 ENVIRONMENT=environment
196 rm -f $ENVIRONMENT
197 touch $ENVIRONMENT
198
199 if test x$MIXBUS != x ; then
200         echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
201         #
202         # current default for MIXBUS version is US keyboard layout without a keypad
203         #
204         echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
205         echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
206         echo export ARDOUR3_UI_RC=ardour3_ui_dark.rc >> $ENVIRONMENT
207 fi
208
209 #
210 # if we're not going to bundle JACK, make sure we can find
211 # jack in the places where it might be
212 #
213
214 echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
215
216 # create startup helper script
217
218 sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/' < ardour.sh.in > $APPBIN/ardour3
219 rm $ENVIRONMENT && chmod 775 $APPBIN/ardour3
220 #MAIN_EXECUTABLE=ardour-$release_version
221 MAIN_EXECUTABLE=ardour-3.0
222
223 echo "Copying ardour executable ...."
224 cp $BUILD_ROOT/gtk2_ardour/$MAIN_EXECUTABLE $APPBIN
225 if test x$STRIP = xall ; then
226         strip $APPBIN/$MAIN_EXECUTABLE
227 fi
228
229 # copy locale files
230 # note that at present(feb 2011), the .mo files end up in the source tree which is
231 # not really as it should be.
232 if test x$WITH_NLS != x ; then
233         echo "NLS support ..."
234         echo "I hope you remembered to run scons msgupdate!"
235         LINGUAS=
236
237         for dl in gtk2_ardour libs/ardour libs/gtkmm2ext ; do 
238             files=`find ../../$dl -name "*.mo"`
239
240             if [ -z "$files" ]; then
241                 echo ""
242                 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$dl"
243                 echo ""
244             fi
245  
246             for file in $files 
247             do
248                 echo $file
249                 lang=`basename $file | sed 's/\.mo//'`
250                 mkdir -p $Locale/$lang/LC_MESSAGES
251                 cp $file $Locale/$lang/LC_MESSAGES/`basename $dl`
252                 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
253                     :
254                 else 
255                     LINGUAS="$LINGUAS $lang"
256                 fi
257             done
258         done
259
260         GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
261         LOCALEROOT=/usr/share/locale
262
263         for l in $LINGUAS ; do
264                 echo "Copying GTK i18n files for $l..."
265                 for MO in $GTK_MESSAGES ; do 
266                         if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
267                                 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
268                         else
269                                 # try with just the language spec
270                                 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
271                                 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
272                                         cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
273                                 fi
274                         fi
275                 done
276         done
277 else
278         echo "Skipping NLS support"
279 fi
280
281 ### Find gtk ###
282 GTKROOT=`pkg-config --libs-only-L gtk+-2.0 | sed -e "s/-L//" -e "s/[[:space:]]//g"`
283 if [ ! -z "$GTKROOT" ]; then
284         echo "Found GTKROOT using pkg-config"
285 elif [ -d /usr/lib/gtk-2.0 ]; then
286         GTKROOT="/usr/lib"
287 elif [ -d /usr/local/lib/gtk-2.0 ]; then
288         GTKROOT="/usr/local/lib"
289 else
290         echo ""
291         echo "!!! ERROR !!! - Unable to locate gtk-2.0 directory. Packager will exit"
292         echo ""
293         exit 1
294 fi
295
296 echo "GTKROOT is ${GTKROOT}"
297 versionDir=`ls ${GTKROOT}/gtk-2.0/ | grep "[0-9]*\.[0-9]*\.[0-9]*"`
298
299 num=0
300 for name in $versionDir ; do
301     num=$(($num + 1))
302 done
303
304 if [ $num -eq 1 ]; then
305         GTKLIB=${GTKROOT}/gtk-2.0/$versionDir
306         echo "GTKLIB is ${GTKLIB}"
307 else
308         echo ""
309         echo "!!! ERROR !!! - More than one gtk-2.0 version found in ${GTKROOT}/gtk-2.0/  ( $versionDir ). Packager will exit"
310         echo ""
311         exit 1
312 fi
313
314
315 ### Find pango ###
316 PANGOROOT=`pkg-config --libs-only-L pango | sed -e "s/-L//" -e "s/[[:space:]]//g"`
317 if [ ! -z "$PANGOROOT" ]; then
318         echo "Found PANGOROOT using pkg-config"
319 elif [ -d /usr/lib/pango ]; then
320         PANGOROOT="/usr/lib"
321 elif [ -d /usr/local/lib/pango ]; then
322         PANGOROOT="/usr/local/lib"
323 else
324         echo ""
325         echo "!!! ERROR !!! - Unable to locate pango directory. Packager will exit"
326         echo ""
327         exit 1
328 fi
329
330 echo "PANGOROOT is ${PANGOROOT}"
331 versionDir=`ls ${PANGOROOT}/pango/ | grep "[0-9]*\.[0-9]*\.[0-9]*"`
332
333 num=0
334 for name in $versionDir ; do
335         num=$(($num + 1))
336 done
337
338 if [ $num -eq 1 ]; then
339         PANGOLIB=${PANGOROOT}/pango/$versionDir
340         echo "PANGOLIB is ${PANGOLIB}"
341 else
342         echo ""
343         echo "!!! ERROR !!! - More than one pango version found in ${PANGOROOT}/pango/  ( $versionDir ). Packager will exit"
344         echo ""
345         exit 1
346 fi
347
348
349 ### Find gdk-pixbuf ###
350 GDKPIXBUFROOT=`pkg-config --libs-only-L gdk-pixbuf-2.0 | sed -e "s/-L//" -e "s/[[:space:]]//g"`
351 if [ ! -z "$GDKPIXBUFROOT" ]; then
352         echo "Found GDKPIXBUFROOT using pkg-config"
353 elif [ -d /usr/lib/gdk-pixbuf-2.0 ]; then
354         GDKPIXBUFROOT="/usr/lib/gdk-pixbuf-2.0"
355 elif [ -d /usr/local/lib/gdk-pixbuf-2.0 ]; then
356         GDKPIXBUFROOT="/usr/local/lib/gdk-pixbuf-2.0"
357 elif [ -d ${GTKLIB}/loaders ]; then  #odd ball case
358         GDKPIXBUFROOT=${GTKROOT}
359         GDKPIXBUFLIB=${GTKLIB}
360 else
361         echo ""
362         echo "!!! ERROR !!! - Unable to locate gdk-pixbuf-2.0 directory. Packager will exit"
363         echo ""
364         exit 1
365 fi
366
367 echo "GDKPIXBUFROOT is ${GDKPIXBUFROOT}"
368
369 if [ -z ${GDKPIXBUFLIB} ]; then
370         versionDir=`ls ${GDKPIXBUFROOT}/gdk-pixbuf-2.0/ | grep "[0-9]*\.[0-9]*\.[0-9]*"`
371
372         num=0
373         for name in $versionDir ; do
374             num=$(($num + 1))
375         done
376
377         if [ $num -eq 1 ]; then
378                 GDKPIXBUFLIB=${GDKPIXBUFROOT}/gdk-pixbuf-2.0/$versionDir
379                 echo "GDKPIXBUFLIB is ${GDKPIXBUFLIB}"
380         else
381                 echo ""
382                 echo "!!! ERROR !!! - More than one gdk-pixbuf-2.0 version found in ${GDKPIXBUFROOT}/pango/  ( $versionDir ). Packager will exit"
383                 echo ""
384                 exit 1
385         fi
386 fi
387
388
389
390 echo "Copying all Pango modules ..."
391 cp -R $PANGOLIB/modules/*.so $Modules
392
393 echo "Copying all GDK Pixbuf loaders ..."
394 cp -R $GDKPIXBUFLIB/loaders/*.so $Loaders
395
396 pango-querymodules | sed "s?$PANGOLIB/?@ROOTDIR@/?" > $Etc/pango.modules.in
397 gdk-pixbuf-query-loaders | sed "s?$GDKPIXBUFLIB/?@ROOTDIR@/?" > $Etc/gdk-pixbuf.loaders.in
398
399 # We sort of rely on clearlooks, so include a version
400 # this one is special - we will set GTK_PATH to $Libraries/clearlooks
401
402 if [ ! -e ${GTKLIB}/engines/libclearlooks.so ]; then
403         echo ""
404         echo "!!! ERROR !!! - not able to locate libclearlooks.so"
405         echo ""
406         echo "Packager with exit"
407         exit 1
408 fi
409
410 echo "Copying clearlooks ..."
411 cp ${GTKLIB}/engines/libclearlooks.so $Libraries
412 mkdir -p $Libraries/clearlooks/engines
413 (cd $Libraries/clearlooks/engines && ln -s ../../libclearlooks* libclearlooks.so )
414
415 # LADSPA
416 if test x$WITH_LADSPA != x ; then
417         if test x$MIXBUS != x ; then
418                 plugdir=mixbus_ladspa
419         else
420                 plugdir=ladspa
421         fi
422         echo "Copying `ls $plugdir | wc -l` plugins ..."
423         if [ -d $plugdir ] ; then
424                 cp -r $plugdir/* $Plugins
425         fi
426 fi
427
428 # Control Surfaces
429 cp $BUILD_ROOT/libs/surfaces/*/libardour*.so* $Surfaces
430 # hack ... move libardour_cp back into Libraries
431 mv $Surfaces/libardourcp.so* $Libraries
432
433 # MidiMaps
434 # got to be careful with names here
435 for x in $BUILD_ROOT/../midi_maps/*.map ; do
436     cp "$x" $MidiMaps
437     echo Copied MIDI map $x 
438 done
439
440 # ExportFormats
441 # got to be careful with names here
442 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
443     cp "$x" $ExportFormats
444 done
445
446 # Panners
447 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
448
449 # VAMP plugins that we use
450 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
451
452 OURLIBDIR=$BUILD_ROOT/libs
453 OURLIBS=$OURLIBDIR/vamp-sdk:$OURLIBDIR/surfaces/control_protocol:$OURLIBDIR/ardour:$OURLIBDIR/midi++2:$OURLIBDIR/pbd:$OURLIBDIR/rubberband:$OURLIBDIR/soundtouch:$OURLIBDIR/gtkmm2ext:$OURLIBDIR/sigc++2:$OURLIBDIR/glibmm2:$OURLIBDIR/gtkmm2/atk:$OURLIBDIR/gtkmm2/pango:$OURLIBDIR/gtkmm2/gdk:$OURLIBDIR/gtkmm2/gtk:$OURLIBDIR/libgnomecanvasmm:$OURLIBDIR/libsndfile:$OURLIBDIR/evoral:$OURLIBDIR/evoral/src/libsmf:$OURLIBDIR/audiographer:$OURLIBDIR/timecode:$OURLIBDIR/taglib:$OURLIBDIR/qm-dsp
454
455 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
456
457 checkedIdx=0
458 deplibs=
459
460 while [ true ] ; do 
461         missing=false
462         filelist=`find $APPLIB/ -type f`
463         filelist="$APPBIN/$MAIN_EXECUTABLE $filelist"
464
465         for file in $filelist  ; do 
466                 if ! file $file | grep -qs ELF ; then
467                         continue
468                 fi
469
470                 # speed this up a bit by not checking things multiple times.
471                 for i in "${depCheckedList[@]}"; do
472                         if [ $i == $file ]; then
473                                 continue 2
474                         fi
475                 done
476                 depCheckedList[$checkIdx]=$file
477                 checkIdx=$(($checkIdx + 1))
478                 
479                 # do not include libjack
480                 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | awk '{print $3}'`
481
482                 # LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | egrep "(/opt/|/local/|libs/|/usr/lib|/gtk)" | grep -v 'libjack\.'
483                 echo -n "."
484                 for dep in $deps ; do
485                         if test "not" = ${dep}; then 
486                                 echo ""
487                                 echo "!!! ERROR !!! - Missing dependant library for $file."
488                                 echo ""
489                                 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
490                                 echo ""
491                                 echo "!!! ERROR !!! - See Above"
492                                 exit 1
493                         fi
494
495                         # don't use anything mapped at a specific address
496                         if echo $dep | grep -qs '0x' ; then continue; fi
497                         # don't include /lib
498                         if echo $dep | grep -qs "^/lib/" ; then continue; fi
499                         # don't include jack
500                         if echo $dep | grep -qs libjack ; then continue; fi
501                         # don't include any X Window libraries
502                         if echo $dep | grep -qs libX ; then continue; fi  
503                         if echo $dep | grep -qs libxcb ; then continue; fi  
504                         # don't include libc
505                         if echo $dep | grep -qs 'libc\.' ; then continue; fi
506                         # don't include libstdc++
507                         if echo $dep | grep -qs libstdc++ ; then continue; fi
508
509                         base=`basename $dep`
510                         if ! test -f $Libraries/$base; then
511                                 parent=$(basename ${file})
512                                 if echo $dep | grep -sq '^libs' ; then
513                                         echo "Copying dependant lib $BUILD_ROOT/$dep    (required by ${parent})"
514                                         cp $BUILD_ROOT/$dep $Libraries
515                                 else
516                                         echo "Copying dependant lib $dep    (required by ${parent})"
517                                         cp $dep $Libraries
518                                 fi
519                                 if echo $dep | grep -sq '^/' ; then
520                                     # absolute path, candidate for stripping
521                                     deplibs="$deplibs $base"
522                                 fi
523                                 missing=true
524                         fi
525                 done
526         done
527         if test x$missing = xfalse ; then
528                 # everything has been found
529                 break
530         fi
531 done
532 echo
533
534 # strip libraries
535 if test x$STRIP = xall ; then
536     echo Stripping all libraries
537     find $APPLIB/ -name "*.so*" | xargs strip
538 elif test x$STRIP = xsome ; then
539     echo Stripping dependent libraries
540     for l in $deplibs ; do
541         strip $APPLIB/$l
542     done
543 fi
544 find $APPLIB/ -name "*.so*" | xargs chmod a+rx
545
546 echo "Copying other stuff to $APPDIR  ..."
547
548 # these are all generated by waf
549 #cp $BUILD_ROOT/gtk2_ardour/ergonomic-us.bindings       $Etc
550 cp $BUILD_ROOT/gtk2_ardour/mnemonic-us.bindings  $Etc
551 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
552 cp $BUILD_ROOT/ardour_system.rc $Etc/ardour_system.rc
553 cp $BUILD_ROOT/gtk2_ardour/ardour3*.rc $Etc
554
555 # these are copied straight from the source tree
556
557 cp ../../gtk2_ardour/ardour3_ui_default.conf $Etc/ardour3_ui.conf
558 cp ../../instant.xml $Etc/instant.xml
559 cp -r ../../gtk2_ardour/icons $Etc
560 cp -r ../../gtk2_ardour/pixmaps $Etc
561 cp ../../gtk2_ardour/step_editing.bindings $Etc
562 cp ../../gtk2_ardour/mixer.bindings $Etc
563
564
565 #
566 # put sooper sekrit ingredients here and they will be copied
567 #
568
569 if [ -d specialSauce ] ; then
570         cp -r specialSauce $Etc
571 fi
572
573 # share stuff
574
575 cp -R ../../gtk2_ardour/splash.png $Shared
576 # currently no templates
577 #cp ../../templates/*.template $Shared/templates/
578
579 # go through and recursively remove any .svn dirs in the bundle
580 for svndir in `find $APPDIR -name .svn -type d`; do
581         rm -rf $svndir
582 done
583
584 #
585 # Add the uninstaller
586 #
587 sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${svn_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
588 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
589
590 #Sanity Check file
591 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
592         cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
593 else
594         echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
595         exit 1
596 fi
597
598 echo "Building tarball ..."
599
600 rm -f $APPDIR.tar.bz2
601 tar -cjf $APPDIR.tar.bz2 $APPDIR
602
603 echo "Calculating bundle size"
604 du -sb $APPDIR/  | awk '{print $1}' > $APPDIR.size
605
606 rm -rf $APPDIR/
607
608 echo "Done."
609