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"
39 : ${HARRISONCHANNELSTRIP=harrison_channelstrip}
42 if [ $# -eq 0 ] ; then
44 echo "ERROR - Please specify build type"
51 while [ $# -gt 0 ] ; do
56 # top level build targets
93 --test) WITH_LADSPA=; STRIP= ; shift ;;
96 # specific build flags
99 --nojack) INTERNAL_JACK= ; shift ;;
100 --noladspa) WITH_LADSPA= ; shift ;;
101 --strip) STRIP=$2 ; shift ; shift ;;
102 --sysdeps) PRINT_SYSDEPS=1; shift ;;
103 --nls) WITH_NLS=1 ; shift ;;
104 --harvid) WITH_HARVID=1 ; shift ;;
105 --gcc5abi) GCC5ABI=true ; shift ;;
106 --chanstrip) HARRISONCHANNELSTRIP=$2 ; shift; shift ;;
109 #catch all for unknown arguments
111 echo "!!! ERROR !!! - Unknown argument $1"
118 if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
119 echo "Unknown strip option \"$STRIP\""
120 echo "Legal values are: all, none, some"
124 . ../define_versions.sh
126 echo "Version is $release_version"
127 if [ "x$commit" != "x" ] ; then
128 info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
130 info_string="$release_version built on `hostname` by `whoami` on `date`"
132 echo "Info string is $info_string"
134 # Figure out our CPU type
136 i[3456789]86|x86|i86pc)
137 echo "Architecture is x86"
142 MULTIARCH='i386-linux-gnu'
145 echo "Architecture is x86_64"
150 MULTIARCH='x86_64-linux-gnu'
154 echo "ERROR - Unknown architecture `uname -m`"
160 if [ x$DEBUG = xT ]; then
162 if [ x$STRIP = xall ] ; then
163 echo "A debug build with --strip all makes no sense - STRIP reset to \"some\""
168 # setup directory structure
170 if [ -z "${BUILDTYPE}" ]; then
171 APPDIR=${APPNAME}_${ARCH}-${release_version}
172 APP_VER_NAME=${APPNAME}-${release_version}
174 APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE}
175 APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE}
184 Plugins=$APPLIB/plugins
185 Surfaces=$APPLIB/surfaces
186 Panners=$APPLIB/panners
187 Backends=$APPLIB/backends
189 Templates=$Shared/templates
190 ExportFormats=$Shared/export
191 Locale=$Shared/locale
192 MidiMaps=$Shared/midi_maps
193 PatchFiles=$Shared/patchfiles
194 LuaScripts=$Shared/scripts
195 MackieControl=$Shared/mcp
197 if [ x$PRINT_SYSDEPS != x ] ; then
199 # print system dependencies
202 for file in $APPBIN/* $Libraries/* $Plugins/*.so ; do
203 if ! file $file | grep -qs Mach-O ; then
206 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
211 echo "Removing old $APPDIR tree ..."
214 echo "Building new app directory structure ..."
216 # only bother to make the longest paths
228 mkdir -p $MackieControl
229 mkdir -p $ExportFormats
235 # maybe set variables
236 ENVIRONMENT=environment
240 if test x$MIXBUS != x ; then
241 echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
243 # current default for MIXBUS version is US keyboard layout without a keypad
245 echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
246 echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
250 # if we're not going to bundle JACK, make sure we can find
251 # jack in the places where it might be
254 echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
256 # create startup helper script
257 if test -d $BUILD_ROOT/vst; then
260 echo export INSTALL_DIR >> $ENVIRONMENT
265 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}
266 rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version}
268 echo "Copying ardour executable ...."
269 if test -d $BUILD_ROOT/vst; then
270 #cp -v $BUILD_ROOT/gtk2_ardour/libgtk2_ardour.so $APPLIB/
271 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}-vst.exe.so $APPBIN/${EXENAME}-${release_version}
273 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}* $APPBIN/${EXENAME}-${release_version}
276 if test x$STRIP = xall ; then
277 strip -s $APPBIN/${EXENAME}-${release_version}
281 # note that at present(feb 2011), the .mo files end up in the source tree which is
282 # not really as it should be.
283 if test x$WITH_NLS != x ; then
284 echo "NLS support ..."
285 echo "I hope you remembered to run scons msgupdate!"
288 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
289 files=`find ../../$pkg -name "*.mo"`
292 # the package name is appended with a number so that
293 # it can be parallel installed during a regular install
294 # with older (and newer) versions. it is just the major
295 # number of the release (i.e. leading digits)
298 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
300 if [ -z "$files" ]; then
302 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
309 lang=`basename $file | sed 's/\.mo//'`
310 mkdir -p $Locale/$lang/LC_MESSAGES
311 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
312 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
313 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
316 LINGUAS="$LINGUAS $lang"
321 GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
322 LOCALEROOT=$GTKSTACK_ROOT/share/locale
324 for l in $LINGUAS ; do
325 echo "Copying GTK i18n files for $l..."
326 for MO in $GTK_MESSAGES ; do
327 if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
328 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
330 # try with just the language spec
331 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
332 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
333 cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
339 echo "Skipping NLS support"
343 # Copy stuff that may be dynamically loaded
346 cp -R $GTKSTACK_ROOT/etc/* $Etc
348 # We rely on clearlooks, so include a version from our own build tree
349 # this one is special - we will set GTK_PATH to $Libraries/gtkengines
351 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
352 mkdir -p $GTK_ENGINE_DIR
354 echo "Copying GTK engines ..."
355 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
356 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
358 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
359 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
362 if test x$WITH_LADSPA != x ; then
363 if test x$MIXBUS != x ; then
364 plugdir=mixbus_ladspa
368 echo "Copying `ls $plugdir | wc -l` plugins ..."
369 if [ -d $plugdir ] ; then
371 cp -r $plugdir/* $Plugins
376 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.so* $Surfaces
377 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp.so* $Libraries
380 # got to be careful with names here
381 for x in $BUILD_ROOT/../midi_maps/*.map ; do
386 # got to be careful with names here
387 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
392 # got to be careful with names here
393 for x in $BUILD_ROOT/../scripts/*.lua ; do
398 # got to be careful with names here
399 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
400 cp "$x" $MackieControl
404 #for f in $BUILD_ROOT/../templates/* ; do
405 # if [ -d "$f" ] ; then
406 # echo Template: $f ; cp -r "$f" $Templates ;
411 # got to be careful with names here
412 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
413 cp "$x" $ExportFormats
417 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
420 for backend in jack alsa dummy wavesaudio ; do
421 cp $BUILD_ROOT/libs/backends/$backend/lib*.so* $Backends
424 # VAMP plugins that we use
425 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
427 # Suil modules (new dir 'build-stack')
428 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
429 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Libraries
432 # Suil modules (old dir 'build-ardour-stack')
433 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
434 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Libraries
437 # VST scanner app (both LXVST as well as WIN-VST, 2in1)
438 # (if build with wine: ardour-vst-scanner is a wrapper
439 # script for ardour-vst-scanner.exe.so, if VST is disabled
440 # neither binary nor script exists)
441 if test -d $BUILD_ROOT/libs/fst ; then
442 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $APPLIB || true
443 if test x$STRIP = xall ; then
444 strip -s $APPLIB/ardour-vst-scanner*
449 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
450 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $APPLIB
451 if test x$STRIP = xall ; then
452 strip -s $APPLIB/ardour-exec-wrapper
456 # ALSA device reservation tool (if available)
457 if test -f $BUILD_ROOT/libs/ardouralsautil/ardour-request-device; then
458 cp $BUILD_ROOT/libs/ardouralsautil/ardour-request-device $APPLIB/ || true
459 if test x$STRIP = xall ; then
460 strip -s $APPLIB/ardour-request-device
464 OURLIBDIR=$BUILD_ROOT/libs
465 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
467 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
474 filelist=`find $APPLIB/ -type f`
475 filelist="$APPBIN/${EXENAME}-${release_version} $filelist"
477 for file in $filelist ; do
478 if ! file $file | grep -qs ELF ; then
482 # speed this up a bit by not checking things multiple times.
483 for i in "${depCheckedList[@]}"; do
484 if [ $i == $file ]; then
488 depCheckedList[$checkIdx]=$file
489 checkIdx=$(($checkIdx + 1))
491 # ignore suil/qt wrappers - the plugin will pull in QT4.
492 if echo $file | grep -qs 'libsuil_.*qt4' ; then continue; fi
494 # do not include libjack, nor libwine
495 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | grep -v libwine.so | awk '{print $3}'`
498 for dep in $deps ; do
499 if test "not" = ${dep}; then
501 echo "!!! ERROR !!! - Missing dependant library for $file."
502 echo "Searched: " $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
504 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
506 echo "!!! ERROR !!! - See Above"
510 # don't use anything mapped at a specific address
511 if echo $dep | grep -qs '0x' ; then continue; fi
513 if echo $dep | grep -qs "^/lib/" ; then continue; fi
515 if echo $dep | grep -qs libjack ; then continue; fi
517 if echo $dep | grep -qs libasound ; then continue; fi
518 # don't include any X Window libraries
519 if echo $dep | grep -qs libX\. ; then continue; fi
520 if echo $dep | grep -qs libxcb ; then continue; fi
521 if echo $dep | grep -qs libICE\. ; then continue; fi
522 if echo $dep | grep -qs libSM\. ; then continue; fi
524 if echo $dep | grep -qs 'libc\.' ; then continue; fi
525 # don't include libstdc++
526 if echo $dep | grep -qs libstdc++ ; then continue; fi
527 # don't include libdbus
528 if echo $dep | grep -qs libdbus ; then continue; fi
531 if ! test -f $Libraries/$base; then
532 parent=$(basename ${file})
533 if echo $dep | grep -sq '^libs' ; then
534 echo "Copying dependant lib $BUILD_ROOT/$dep (required by ${parent})"
535 cp $BUILD_ROOT/$dep $Libraries
537 echo "Copying dependant lib $dep (required by ${parent})"
541 # reset RPATH so that the runtime linker never looks
542 # in places we don't want it to
544 chrpath -r foo $Libraries/`basename $dep`
545 if echo $dep | grep -sq '^/' ; then
546 # absolute path, candidate for stripping
547 deplibs="$deplibs $base"
553 if test x$missing = xfalse ; then
554 # everything has been found
561 if test x$STRIP = xall ; then
562 echo Stripping all libraries
563 # Must be writable so that we can strip
564 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod u+w
566 find $APPLIB/ -name "*.so*" -print0 | xargs -0 strip -s
567 elif test x$STRIP = xsome ; then
568 echo Stripping dependent libraries
569 for l in $deplibs ; do
570 if echo "$l" | grep -qE "$NOSTRIP"; then
577 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
579 echo "Copying other stuff to $APPDIR ..."
581 # these are all generated by waf
582 cp $BUILD_ROOT/gtk2_ardour/ardour.keys $Etc
583 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
584 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
585 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
587 # Copied directly from source tree
589 cp ../../system_config $Etc/system_config
590 cp ../../gtk2_ardour/*.colors $Etc
591 cp ../../instant.xml $Shared/instant.xml
592 cp -r ../../gtk2_ardour/icons $Shared
593 cp -r ../../gtk2_ardour/pixmaps $Shared
594 cp -r ../../gtk2_ardour/splash.png $Shared
595 cp -r ../../gtk2_ardour/small-splash.png $Shared
596 cp -r ../../gtk2_ardour/ArdourMono.ttf $Shared
599 # put sooper sekrit ingredients here and they will be copied
602 if [ -d specialSauce ] ; then
603 cp -r specialSauce $Etc
606 # install bundled LV2s to <app>/lib/LV2/
607 cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
609 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
610 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
611 mkdir -p $APPLIB/LV2/lv2core.lv2
612 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
613 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
614 mkdir -p $APPLIB/LV2/lv2core.lv2
615 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
618 # go through and recursively remove any .svn dirs in the bundle
619 for svndir in `find $APPDIR -name .svn -type d`; do
624 ################################################################################
625 ### Mixbus plugins, etc
626 if test x$WITH_HARRISON_LV2 != x ; then
627 echo "Adding Harrison LV2s"
630 curl -s -S --fail -# \
631 -z "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
632 -o "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
633 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_lv2s.${HARCH}.zip"
634 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/harrison_lv2s.${HARCH}.zip"
637 if test -n "$MIXBUS"; then
638 echo "Adding Mixbus Channelstrip"
640 mkdir -p $APPLIB/ladspa/strip/
641 curl -s -S --fail -# \
642 -z "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
643 -o "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
644 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONCHANNELSTRIP}.${HARCH}.so"
646 cp "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
647 $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
648 chmod +x $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
651 if test x$WITH_X42_LV2 != x ; then
652 METERS_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-meters.latest.txt)
653 rsync -a -q --partial \
654 rsync://x42-plugins.com/x42/linux/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip \
655 "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
656 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
658 EQ_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-eq.latest.txt)
659 rsync -a -q --partial \
660 rsync://x42-plugins.com/x42/linux/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip \
661 "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
662 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
664 SETBFREE_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/setBfree.latest.txt)
665 rsync -a -q --partial \
666 rsync://x42-plugins.com/x42/linux/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip \
667 "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
668 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
670 MIDIFILTER_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-midifilter.latest.txt)
671 rsync -a -q --partial \
672 rsync://x42-plugins.com/x42/linux/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip \
673 "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
674 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
677 ################################################################################
680 if test x$WITH_HARVID != x ; then
682 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
683 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
686 rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
687 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
690 rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
691 "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
694 --exclude=README --exclude=harvid.1 --strip-components=1 \
695 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
698 --exclude=README --exclude=xjadeo.1 --strip-components=1 \
699 -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
705 # Add the uninstaller
707 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
708 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
711 # Add the stage2.run script
713 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
718 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
719 cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
721 echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
725 echo "Building tarball ..."
727 rm -f $APPDIR.tar.bz2
728 tar -cjf $APPDIR.tar.bz2 $APPDIR
730 echo "Calculating bundle size"
731 du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size
733 ( cd $APPDIR ; find . ) > file_list.txt