3 # script for pulling together a Linux app bundle.
5 # This will create a bundle for a single architecture.
6 # Execute this scirpt on both x86 and x86_64 and then use
7 # package to merge the 2 bundles into a final package with the
8 # installer. See "noderun" for a complete build script.
10 # where the GTK stack is installed
11 GTKSTACK_ROOT=$HOME/gtk/inst
12 # where the Ardour dependencies are installed
13 ARDOURSTACK_ROOT=$HOME/a3/inst
14 # the waf build tree to use when copying built/generated files
15 BUILD_ROOT=../../build
17 . ../define_versions.sh
19 # where harvid and xjadeo binaries are cached
20 if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
38 NOSTRIP="libsuil|libserd|libsord|liblilv|libsratom|liblrdf|libardour|libpbd|libevoral"
41 if [ $# -eq 0 ] ; then
43 echo "ERROR - Please specify build type"
50 while [ $# -gt 0 ] ; do
55 # top level build targets
80 --test) WITH_LADSPA=; STRIP= ; shift ;;
83 # specific build flags
86 --nojack) INTERNAL_JACK= ; shift ;;
87 --noladspa) WITH_LADSPA= ; shift ;;
88 --strip) STRIP=$2 ; shift ; shift ;;
89 --sysdeps) PRINT_SYSDEPS=1; shift ;;
90 --nls) WITH_NLS=1 ; shift ;;
91 --harvid) WITH_HARVID=1 ; shift ;;
92 --gcc5abi) GCC5ABI=true ; shift ;;
95 #catch all for unknown arguments
97 echo "!!! ERROR !!! - Unknown argument $1"
104 if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
105 echo "Unknown strip option \"$STRIP\""
106 echo "Legal values are: all, none, some"
110 . ../define_versions.sh
112 echo "Version is $release_version"
113 if [ "x$commit" != "x" ] ; then
114 info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
116 info_string="$release_version built on `hostname` by `whoami` on `date`"
118 echo "Info string is $info_string"
120 # Figure out our CPU type
122 i[3456789]86|x86|i86pc)
123 echo "Architecture is x86"
128 MULTIARCH='i386-linux-gnu'
131 echo "Architecture is x86_64"
136 MULTIARCH='x86_64-linux-gnu'
140 echo "ERROR - Unknown architecture `uname -m`"
146 if [ x$DEBUG = xT ]; then
148 if [ x$STRIP = xall ] ; then
149 echo "A debug build with --strip all makes no sense - STRIP reset to \"some\""
154 # setup directory structure
156 if [ -z "${BUILDTYPE}" ]; then
157 APPDIR=${APPNAME}_${ARCH}-${release_version}
158 APP_VER_NAME=${APPNAME}-${release_version}
160 APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE}
161 APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE}
170 Plugins=$APPLIB/plugins
171 Surfaces=$APPLIB/surfaces
172 Panners=$APPLIB/panners
173 Backends=$APPLIB/backends
175 Templates=$Shared/templates
176 ExportFormats=$Shared/export
177 Locale=$Shared/locale
178 MidiMaps=$Shared/midi_maps
179 PatchFiles=$Shared/patchfiles
180 MackieControl=$Shared/mcp
182 if [ x$PRINT_SYSDEPS != x ] ; then
184 # print system dependencies
187 for file in $APPBIN/* $Libraries/* $Plugins/*.so ; do
188 if ! file $file | grep -qs Mach-O ; then
191 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
196 echo "Removing old $APPDIR tree ..."
199 echo "Building new app directory structure ..."
201 # only bother to make the longest paths
212 mkdir -p $MackieControl
213 mkdir -p $ExportFormats
219 # maybe set variables
220 ENVIRONMENT=environment
224 if test x$MIXBUS != x ; then
225 echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
227 # current default for MIXBUS version is US keyboard layout without a keypad
229 echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
230 echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
234 # if we're not going to bundle JACK, make sure we can find
235 # jack in the places where it might be
238 echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
240 # create startup helper script
241 if test -d $BUILD_ROOT/vst; then
244 echo export INSTALL_DIR >> $ENVIRONMENT
249 sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/;s/%EXENAME%/'"${EXENAME}"'/;s/%WINE%/'"$WINEEXE"'/' < ardour.sh.in > $APPBIN/${EXENAME}${major_version}
250 rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version}
252 echo "Copying ardour executable ...."
253 if test -d $BUILD_ROOT/vst; then
254 #cp -v $BUILD_ROOT/gtk2_ardour/libgtk2_ardour.so $APPLIB/
255 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}-vst.exe.so $APPBIN/${EXENAME}-${release_version}
257 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}* $APPBIN/${EXENAME}-${release_version}
260 if test x$STRIP = xall ; then
261 strip -s $APPBIN/${EXENAME}-${release_version}
265 # note that at present(feb 2011), the .mo files end up in the source tree which is
266 # not really as it should be.
267 if test x$WITH_NLS != x ; then
268 echo "NLS support ..."
269 echo "I hope you remembered to run scons msgupdate!"
272 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
273 files=`find ../../$pkg -name "*.mo"`
276 # the package name is appended with a number so that
277 # it can be parallel installed during a regular install
278 # with older (and newer) versions. it is just the major
279 # number of the release (i.e. leading digits)
282 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
284 if [ -z "$files" ]; then
286 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
293 lang=`basename $file | sed 's/\.mo//'`
294 mkdir -p $Locale/$lang/LC_MESSAGES
295 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
296 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
297 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
300 LINGUAS="$LINGUAS $lang"
305 GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
306 LOCALEROOT=$GTKSTACK_ROOT/share/locale
308 for l in $LINGUAS ; do
309 echo "Copying GTK i18n files for $l..."
310 for MO in $GTK_MESSAGES ; do
311 if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
312 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
314 # try with just the language spec
315 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
316 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
317 cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
323 echo "Skipping NLS support"
327 # Copy stuff that may be dynamically loaded
330 cp -R $GTKSTACK_ROOT/etc/* $Etc
332 # We rely on clearlooks, so include a version from our own build tree
333 # this one is special - we will set GTK_PATH to $Libraries/gtkengines
335 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
336 mkdir -p $GTK_ENGINE_DIR
338 echo "Copying GTK engines ..."
339 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
340 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
342 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
343 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
346 if test x$WITH_LADSPA != x ; then
347 if test x$MIXBUS != x ; then
348 plugdir=mixbus_ladspa
352 echo "Copying `ls $plugdir | wc -l` plugins ..."
353 if [ -d $plugdir ] ; then
355 cp -r $plugdir/* $Plugins
360 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.so* $Surfaces
361 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp.so* $Libraries
364 # got to be careful with names here
365 for x in $BUILD_ROOT/../midi_maps/*.map ; do
370 # got to be careful with names here
371 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
376 # got to be careful with names here
377 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
378 cp "$x" $MackieControl
382 #for f in $BUILD_ROOT/../templates/* ; do
383 # if [ -d "$f" ] ; then
384 # echo Template: $f ; cp -r "$f" $Templates ;
389 # got to be careful with names here
390 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
391 cp "$x" $ExportFormats
395 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
398 for backend in jack alsa dummy wavesaudio ; do
399 cp $BUILD_ROOT/libs/backends/$backend/lib*.so* $Backends
402 # VAMP plugins that we use
403 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
405 # Suil modules (new dir 'build-stack')
406 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
407 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Libraries
410 # Suil modules (old dir 'build-ardour-stack')
411 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
412 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Libraries
415 # VST scanner app (both LXVST as well as WIN-VST, 2in1)
416 # (if build with wine: ardour-vst-scanner is a wrapper
417 # script for ardour-vst-scanner.exe.so, if VST is disabled
418 # neither binary nor script exists)
419 if test -d $BUILD_ROOT/libs/fst ; then
420 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $APPLIB || true
421 if test x$STRIP = xall ; then
422 strip -s $APPLIB/ardour-vst-scanner*
427 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
428 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $APPLIB
429 if test x$STRIP = xall ; then
430 strip -s $APPLIB/ardour-exec-wrapper
434 # ALSA device reservation tool (if available)
435 if test -f $BUILD_ROOT/libs/ardouralsautil/ardour-request-device; then
436 cp $BUILD_ROOT/libs/ardouralsautil/ardour-request-device $APPLIB/ || true
437 if test x$STRIP = xall ; then
438 strip -s $APPLIB/ardour-request-device
442 OURLIBDIR=$BUILD_ROOT/libs
443 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/canvas:$OURLIBDIR/libsndfile:$OURLIBDIR/evoral:$OURLIBDIR/evoral/src/libsmf:$OURLIBDIR/audiographer:$OURLIBDIR/timecode:$OURLIBDIR/taglib:$OURLIBDIR/libltc:$OURLIBDIR/qm-dsp:$OURLIBDIR/ardouralsautil:$OURLIBDIR/ptformat:$BUILD_ROOT/gtk2_ardour
445 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
452 filelist=`find $APPLIB/ -type f`
453 filelist="$APPBIN/${EXENAME}-${release_version} $filelist"
455 for file in $filelist ; do
456 if ! file $file | grep -qs ELF ; then
460 # speed this up a bit by not checking things multiple times.
461 for i in "${depCheckedList[@]}"; do
462 if [ $i == $file ]; then
466 depCheckedList[$checkIdx]=$file
467 checkIdx=$(($checkIdx + 1))
469 # ignore suil/qt wrappers - the plugin will pull in QT4.
470 if echo $file | grep -qs 'libsuil_.*qt4' ; then continue; fi
472 # do not include libjack
473 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | awk '{print $3}'`
476 for dep in $deps ; do
477 if test "not" = ${dep}; then
479 echo "!!! ERROR !!! - Missing dependant library for $file."
480 echo "Searched: " $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
482 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
484 echo "!!! ERROR !!! - See Above"
488 # don't use anything mapped at a specific address
489 if echo $dep | grep -qs '0x' ; then continue; fi
491 if echo $dep | grep -qs "^/lib/" ; then continue; fi
493 if echo $dep | grep -qs libjack ; then continue; fi
495 if echo $dep | grep -qs libasound ; then continue; fi
496 # don't include any X Window libraries
497 if echo $dep | grep -qs libX\. ; then continue; fi
498 if echo $dep | grep -qs libxcb ; then continue; fi
499 if echo $dep | grep -qs libICE\. ; then continue; fi
500 if echo $dep | grep -qs libSM\. ; then continue; fi
502 if echo $dep | grep -qs 'libc\.' ; then continue; fi
503 # don't include libstdc++
504 if echo $dep | grep -qs libstdc++ ; then continue; fi
505 # don't include libdbus
506 if echo $dep | grep -qs libdbus ; then continue; fi
509 if ! test -f $Libraries/$base; then
510 parent=$(basename ${file})
511 if echo $dep | grep -sq '^libs' ; then
512 echo "Copying dependant lib $BUILD_ROOT/$dep (required by ${parent})"
513 cp $BUILD_ROOT/$dep $Libraries
515 echo "Copying dependant lib $dep (required by ${parent})"
519 # reset RPATH so that the runtime linker never looks
520 # in places we don't want it to
522 chrpath -r foo $Libraries/`basename $dep`
523 if echo $dep | grep -sq '^/' ; then
524 # absolute path, candidate for stripping
525 deplibs="$deplibs $base"
531 if test x$missing = xfalse ; then
532 # everything has been found
539 if test x$STRIP = xall ; then
540 echo Stripping all libraries
541 # Must be writable so that we can strip
542 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod u+w
544 find $APPLIB/ -name "*.so*" -print0 | xargs -0 strip -s
545 elif test x$STRIP = xsome ; then
546 echo Stripping dependent libraries
547 for l in $deplibs ; do
548 if echo "$l" | grep -qE "$NOSTRIP"; then
555 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
557 echo "Copying other stuff to $APPDIR ..."
559 # these are all generated by waf
560 cp $BUILD_ROOT/gtk2_ardour/mnemonic-us.bindings $Etc
561 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
562 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
563 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
565 # Copied directly from source tree
567 cp ../../system_config $Etc/system_config
568 cp ../../gtk2_ardour/dark.colors $Etc
569 cp ../../instant.xml $Shared/instant.xml
570 cp ../../gtk2_ardour/step_editing.bindings $Etc
571 cp ../../gtk2_ardour/mixer.bindings $Etc
572 cp -r ../../gtk2_ardour/icons $Shared
573 cp -r ../../gtk2_ardour/pixmaps $Shared
574 cp -r ../../gtk2_ardour/splash.png $Shared
575 cp -r ../../gtk2_ardour/small-splash.png $Shared
576 cp -r ../../gtk2_ardour/ArdourMono.ttf $Shared
579 # put sooper sekrit ingredients here and they will be copied
582 if [ -d specialSauce ] ; then
583 cp -r specialSauce $Etc
586 # install bundled LV2s to <app>/lib/LV2/
587 cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
589 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
590 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
591 mkdir -p $APPLIB/LV2/lv2core.lv2
592 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
593 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
594 mkdir -p $APPLIB/LV2/lv2core.lv2
595 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
598 # go through and recursively remove any .svn dirs in the bundle
599 for svndir in `find $APPDIR -name .svn -type d`; do
604 ################################################################################
605 ### Mixbus plugins, etc
606 if test x$WITH_HARRISON_LV2 != x ; then
607 echo "Adding Harrison LV2s"
610 curl -s -S --fail -# \
611 -z "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
612 -o "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
613 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_lv2s.${HARCH}.zip"
614 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/harrison_lv2s.${HARCH}.zip"
617 if test -n "$MIXBUS"; then
618 echo "Adding Mixbus Channelstrip"
620 mkdir -p $APPLIB/ladspa/strip/
621 curl -s -S --fail -# \
622 -z "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
623 -o "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
624 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_channelstrip.${HARCH}.so"
626 cp "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
627 $APPLIB/ladspa/strip/harrison_channelstrip.so
628 chmod +x $APPLIB/ladspa/strip/harrison_channelstrip.so
631 if test x$WITH_X42_LV2 != x ; then
632 METERS_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-meters.latest.txt)
633 rsync -a -q --partial \
634 rsync://x42-plugins.com/x42/linux/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip \
635 "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
636 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
638 SETBFREE_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/setBfree.latest.txt)
639 rsync -a -q --partial \
640 rsync://x42-plugins.com/x42/linux/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip \
641 "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
642 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
644 MIDIFILTER_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-midifilter.latest.txt)
645 rsync -a -q --partial \
646 rsync://x42-plugins.com/x42/linux/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip \
647 "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
648 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
651 ################################################################################
654 if test x$WITH_HARVID != x ; then
656 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
657 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
660 rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
661 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
664 rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
665 "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
668 --exclude=README --exclude=harvid.1 --strip-components=1 \
669 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
672 --exclude=README --exclude=xjadeo.1 --strip-components=1 \
673 -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
679 # Add the uninstaller
681 sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
682 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
685 # Add the stage2.run script
687 sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}/;s/%REPLACE_WINE%/${USEWINE}/" < stage2.run.in > stage2.run
692 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
693 cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
695 echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
699 echo "Building tarball ..."
701 rm -f $APPDIR.tar.bz2
702 tar -cjf $APPDIR.tar.bz2 $APPDIR
704 echo "Calculating bundle size"
705 du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size
707 ( cd $APPDIR ; find . ) > file_list.txt