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
81 --test) WITH_LADSPA=; STRIP= ; shift ;;
84 # specific build flags
87 --nojack) INTERNAL_JACK= ; shift ;;
88 --noladspa) WITH_LADSPA= ; shift ;;
89 --strip) STRIP=$2 ; shift ; shift ;;
90 --sysdeps) PRINT_SYSDEPS=1; shift ;;
91 --nls) WITH_NLS=1 ; shift ;;
92 --harvid) WITH_HARVID=1 ; shift ;;
93 --gcc5abi) GCC5ABI=true ; shift ;;
94 --chanstrip) HARRISONCHANNELSTRIP=$2 ; shift; shift ;;
97 #catch all for unknown arguments
99 echo "!!! ERROR !!! - Unknown argument $1"
106 if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
107 echo "Unknown strip option \"$STRIP\""
108 echo "Legal values are: all, none, some"
112 . ../define_versions.sh
114 echo "Version is $release_version"
115 if [ "x$commit" != "x" ] ; then
116 info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
118 info_string="$release_version built on `hostname` by `whoami` on `date`"
120 echo "Info string is $info_string"
122 # Figure out our CPU type
124 i[3456789]86|x86|i86pc)
125 echo "Architecture is x86"
130 MULTIARCH='i386-linux-gnu'
133 echo "Architecture is x86_64"
138 MULTIARCH='x86_64-linux-gnu'
142 echo "ERROR - Unknown architecture `uname -m`"
148 if [ x$DEBUG = xT ]; then
150 if [ x$STRIP = xall ] ; then
151 echo "A debug build with --strip all makes no sense - STRIP reset to \"some\""
156 # setup directory structure
158 if [ -z "${BUILDTYPE}" ]; then
159 APPDIR=${APPNAME}_${ARCH}-${release_version}
160 APP_VER_NAME=${APPNAME}-${release_version}
162 APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE}
163 APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE}
172 Plugins=$APPLIB/plugins
173 Surfaces=$APPLIB/surfaces
174 Panners=$APPLIB/panners
175 Backends=$APPLIB/backends
177 Templates=$Shared/templates
178 ExportFormats=$Shared/export
179 Locale=$Shared/locale
180 MidiMaps=$Shared/midi_maps
181 PatchFiles=$Shared/patchfiles
182 LuaScripts=$Shared/scripts
183 MackieControl=$Shared/mcp
185 if [ x$PRINT_SYSDEPS != x ] ; then
187 # print system dependencies
190 for file in $APPBIN/* $Libraries/* $Plugins/*.so ; do
191 if ! file $file | grep -qs Mach-O ; then
194 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
199 echo "Removing old $APPDIR tree ..."
202 echo "Building new app directory structure ..."
204 # only bother to make the longest paths
216 mkdir -p $MackieControl
217 mkdir -p $ExportFormats
223 # maybe set variables
224 ENVIRONMENT=environment
228 if test x$MIXBUS != x ; then
229 echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
231 # current default for MIXBUS version is US keyboard layout without a keypad
233 echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
234 echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
238 # if we're not going to bundle JACK, make sure we can find
239 # jack in the places where it might be
242 echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
244 # create startup helper script
245 if test -d $BUILD_ROOT/vst; then
248 echo export INSTALL_DIR >> $ENVIRONMENT
253 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}
254 rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version}
256 echo "Copying ardour executable ...."
257 if test -d $BUILD_ROOT/vst; then
258 #cp -v $BUILD_ROOT/gtk2_ardour/libgtk2_ardour.so $APPLIB/
259 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}-vst.exe.so $APPBIN/${EXENAME}-${release_version}
261 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}* $APPBIN/${EXENAME}-${release_version}
264 if test x$STRIP = xall ; then
265 strip -s $APPBIN/${EXENAME}-${release_version}
269 # note that at present(feb 2011), the .mo files end up in the source tree which is
270 # not really as it should be.
271 if test x$WITH_NLS != x ; then
272 echo "NLS support ..."
273 echo "I hope you remembered to run scons msgupdate!"
276 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
277 files=`find ../../$pkg -name "*.mo"`
280 # the package name is appended with a number so that
281 # it can be parallel installed during a regular install
282 # with older (and newer) versions. it is just the major
283 # number of the release (i.e. leading digits)
286 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
288 if [ -z "$files" ]; then
290 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
297 lang=`basename $file | sed 's/\.mo//'`
298 mkdir -p $Locale/$lang/LC_MESSAGES
299 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
300 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
301 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
304 LINGUAS="$LINGUAS $lang"
309 GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
310 LOCALEROOT=$GTKSTACK_ROOT/share/locale
312 for l in $LINGUAS ; do
313 echo "Copying GTK i18n files for $l..."
314 for MO in $GTK_MESSAGES ; do
315 if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
316 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
318 # try with just the language spec
319 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
320 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
321 cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
327 echo "Skipping NLS support"
331 # Copy stuff that may be dynamically loaded
334 cp -R $GTKSTACK_ROOT/etc/* $Etc
336 # We rely on clearlooks, so include a version from our own build tree
337 # this one is special - we will set GTK_PATH to $Libraries/gtkengines
339 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
340 mkdir -p $GTK_ENGINE_DIR
342 echo "Copying GTK engines ..."
343 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
344 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
346 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
347 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
350 if test x$WITH_LADSPA != x ; then
351 if test x$MIXBUS != x ; then
352 plugdir=mixbus_ladspa
356 echo "Copying `ls $plugdir | wc -l` plugins ..."
357 if [ -d $plugdir ] ; then
359 cp -r $plugdir/* $Plugins
364 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.so* $Surfaces
365 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp.so* $Libraries
368 # got to be careful with names here
369 for x in $BUILD_ROOT/../midi_maps/*.map ; do
374 # got to be careful with names here
375 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
380 # got to be careful with names here
381 for x in $BUILD_ROOT/../scripts/*.lua ; do
386 # got to be careful with names here
387 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
388 cp "$x" $MackieControl
392 #for f in $BUILD_ROOT/../templates/* ; do
393 # if [ -d "$f" ] ; then
394 # echo Template: $f ; cp -r "$f" $Templates ;
399 # got to be careful with names here
400 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
401 cp "$x" $ExportFormats
405 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
408 for backend in jack alsa dummy wavesaudio ; do
409 cp $BUILD_ROOT/libs/backends/$backend/lib*.so* $Backends
412 # VAMP plugins that we use
413 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
415 # Suil modules (new dir 'build-stack')
416 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
417 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Libraries
420 # Suil modules (old dir 'build-ardour-stack')
421 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
422 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Libraries
425 # VST scanner app (both LXVST as well as WIN-VST, 2in1)
426 # (if build with wine: ardour-vst-scanner is a wrapper
427 # script for ardour-vst-scanner.exe.so, if VST is disabled
428 # neither binary nor script exists)
429 if test -d $BUILD_ROOT/libs/fst ; then
430 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $APPLIB || true
431 if test x$STRIP = xall ; then
432 strip -s $APPLIB/ardour-vst-scanner*
437 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
438 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $APPLIB
439 if test x$STRIP = xall ; then
440 strip -s $APPLIB/ardour-exec-wrapper
444 # ALSA device reservation tool (if available)
445 if test -f $BUILD_ROOT/libs/ardouralsautil/ardour-request-device; then
446 cp $BUILD_ROOT/libs/ardouralsautil/ardour-request-device $APPLIB/ || true
447 if test x$STRIP = xall ; then
448 strip -s $APPLIB/ardour-request-device
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/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
455 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
462 filelist=`find $APPLIB/ -type f`
463 filelist="$APPBIN/${EXENAME}-${release_version} $filelist"
465 for file in $filelist ; do
466 if ! file $file | grep -qs ELF ; then
470 # speed this up a bit by not checking things multiple times.
471 for i in "${depCheckedList[@]}"; do
472 if [ $i == $file ]; then
476 depCheckedList[$checkIdx]=$file
477 checkIdx=$(($checkIdx + 1))
479 # ignore suil/qt wrappers - the plugin will pull in QT4.
480 if echo $file | grep -qs 'libsuil_.*qt4' ; then continue; fi
482 # do not include libjack, nor libwine
483 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | grep -v libwine.so | awk '{print $3}'`
486 for dep in $deps ; do
487 if test "not" = ${dep}; then
489 echo "!!! ERROR !!! - Missing dependant library for $file."
490 echo "Searched: " $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
492 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
494 echo "!!! ERROR !!! - See Above"
498 # don't use anything mapped at a specific address
499 if echo $dep | grep -qs '0x' ; then continue; fi
501 if echo $dep | grep -qs "^/lib/" ; then continue; fi
503 if echo $dep | grep -qs libjack ; then continue; fi
505 if echo $dep | grep -qs libasound ; then continue; fi
506 # don't include any X Window libraries
507 if echo $dep | grep -qs libX\. ; then continue; fi
508 if echo $dep | grep -qs libxcb ; then continue; fi
509 if echo $dep | grep -qs libICE\. ; then continue; fi
510 if echo $dep | grep -qs libSM\. ; then continue; fi
512 if echo $dep | grep -qs 'libc\.' ; then continue; fi
513 # don't include libstdc++
514 if echo $dep | grep -qs libstdc++ ; then continue; fi
515 # don't include libdbus
516 if echo $dep | grep -qs libdbus ; then continue; fi
519 if ! test -f $Libraries/$base; then
520 parent=$(basename ${file})
521 if echo $dep | grep -sq '^libs' ; then
522 echo "Copying dependant lib $BUILD_ROOT/$dep (required by ${parent})"
523 cp $BUILD_ROOT/$dep $Libraries
525 echo "Copying dependant lib $dep (required by ${parent})"
529 # reset RPATH so that the runtime linker never looks
530 # in places we don't want it to
532 chrpath -r foo $Libraries/`basename $dep`
533 if echo $dep | grep -sq '^/' ; then
534 # absolute path, candidate for stripping
535 deplibs="$deplibs $base"
541 if test x$missing = xfalse ; then
542 # everything has been found
549 if test x$STRIP = xall ; then
550 echo Stripping all libraries
551 # Must be writable so that we can strip
552 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod u+w
554 find $APPLIB/ -name "*.so*" -print0 | xargs -0 strip -s
555 elif test x$STRIP = xsome ; then
556 echo Stripping dependent libraries
557 for l in $deplibs ; do
558 if echo "$l" | grep -qE "$NOSTRIP"; then
565 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
567 echo "Copying other stuff to $APPDIR ..."
569 # these are all generated by waf
570 cp $BUILD_ROOT/gtk2_ardour/ardour.keys $Etc
571 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
572 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
573 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
575 # Copied directly from source tree
577 cp ../../system_config $Etc/system_config
578 cp ../../gtk2_ardour/*.colors $Etc
579 cp ../../instant.xml $Shared/instant.xml
580 cp -r ../../gtk2_ardour/icons $Shared
581 cp -r ../../gtk2_ardour/pixmaps $Shared
582 cp -r ../../gtk2_ardour/splash.png $Shared
583 cp -r ../../gtk2_ardour/small-splash.png $Shared
584 cp -r ../../gtk2_ardour/ArdourMono.ttf $Shared
587 # put sooper sekrit ingredients here and they will be copied
590 if [ -d specialSauce ] ; then
591 cp -r specialSauce $Etc
594 # install bundled LV2s to <app>/lib/LV2/
595 cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
597 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
598 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
599 mkdir -p $APPLIB/LV2/lv2core.lv2
600 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
601 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
602 mkdir -p $APPLIB/LV2/lv2core.lv2
603 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
606 # go through and recursively remove any .svn dirs in the bundle
607 for svndir in `find $APPDIR -name .svn -type d`; do
612 ################################################################################
613 ### Mixbus plugins, etc
614 if test x$WITH_HARRISON_LV2 != x ; then
615 echo "Adding Harrison LV2s"
618 curl -s -S --fail -# \
619 -z "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
620 -o "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
621 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_lv2s.${HARCH}.zip"
622 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/harrison_lv2s.${HARCH}.zip"
625 if test -n "$MIXBUS"; then
626 echo "Adding Mixbus Channelstrip"
628 mkdir -p $APPLIB/ladspa/strip/
629 curl -s -S --fail -# \
630 -z "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
631 -o "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
632 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONCHANNELSTRIP}.${HARCH}.so"
634 cp "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
635 $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
636 chmod +x $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
639 if test x$WITH_X42_LV2 != x ; then
640 METERS_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-meters.latest.txt)
641 rsync -a -q --partial \
642 rsync://x42-plugins.com/x42/linux/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip \
643 "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
644 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
646 EQ_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-eq.latest.txt)
647 rsync -a -q --partial \
648 rsync://x42-plugins.com/x42/linux/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip \
649 "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
650 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
652 SETBFREE_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/setBfree.latest.txt)
653 rsync -a -q --partial \
654 rsync://x42-plugins.com/x42/linux/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip \
655 "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
656 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip"
658 MIDIFILTER_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-midifilter.latest.txt)
659 rsync -a -q --partial \
660 rsync://x42-plugins.com/x42/linux/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip \
661 "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
662 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-midifilter-lv2-linux-${WARCH}-${MIDIFILTER_VERSION}.zip"
665 ################################################################################
668 if test x$WITH_HARVID != x ; then
670 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
671 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
674 rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
675 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
678 rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
679 "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
682 --exclude=README --exclude=harvid.1 --strip-components=1 \
683 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
686 --exclude=README --exclude=xjadeo.1 --strip-components=1 \
687 -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
693 # Add the uninstaller
695 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
696 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
699 # Add the stage2.run script
701 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
706 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
707 cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
709 echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
713 echo "Building tarball ..."
715 rm -f $APPDIR.tar.bz2
716 tar -cjf $APPDIR.tar.bz2 $APPDIR
718 echo "Calculating bundle size"
719 du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size
721 ( cd $APPDIR ; find . ) > file_list.txt