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 Themes=$Shared/themes
190 Templates=$Shared/templates
191 ExportFormats=$Shared/export
192 Locale=$Shared/locale
193 MidiMaps=$Shared/midi_maps
194 PatchFiles=$Shared/patchfiles
195 LuaScripts=$Shared/scripts
196 MackieControl=$Shared/mcp
198 if [ x$PRINT_SYSDEPS != x ] ; then
200 # print system dependencies
203 for file in $APPBIN/* $Libraries/* $Plugins/*.so ; do
204 if ! file $file | grep -qs Mach-O ; then
207 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
212 echo "Removing old $APPDIR tree ..."
215 echo "Building new app directory structure ..."
217 # only bother to make the longest paths
230 mkdir -p $MackieControl
231 mkdir -p $ExportFormats
237 # maybe set variables
238 ENVIRONMENT=environment
242 if test x$MIXBUS != x ; then
243 echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
245 # current default for MIXBUS version is US keyboard layout without a keypad
247 echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
248 echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
252 # if we're not going to bundle JACK, make sure we can find
253 # jack in the places where it might be
256 echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
258 # create startup helper script
259 if test -d $BUILD_ROOT/vst; then
262 echo export INSTALL_DIR >> $ENVIRONMENT
267 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}
268 rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version}
270 echo "Copying ardour executable ...."
271 if test -d $BUILD_ROOT/vst; then
272 #cp -v $BUILD_ROOT/gtk2_ardour/libgtk2_ardour.so $APPLIB/
273 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}-vst.exe.so $APPBIN/${EXENAME}-${release_version}
275 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}* $APPBIN/${EXENAME}-${release_version}
278 if test x$STRIP = xall ; then
279 strip -s $APPBIN/${EXENAME}-${release_version}
283 # note that at present(feb 2011), the .mo files end up in the source tree which is
284 # not really as it should be.
285 if test x$WITH_NLS != x ; then
286 echo "NLS support ..."
287 echo "I hope you remembered to run scons msgupdate!"
290 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
291 files=`find ../../$pkg -name "*.mo"`
294 # the package name is appended with a number so that
295 # it can be parallel installed during a regular install
296 # with older (and newer) versions. it is just the major
297 # number of the release (i.e. leading digits)
300 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
302 if [ -z "$files" ]; then
304 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
311 lang=`basename $file | sed 's/\.mo//'`
312 mkdir -p $Locale/$lang/LC_MESSAGES
313 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
314 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
315 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
318 LINGUAS="$LINGUAS $lang"
323 GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
324 LOCALEROOT=$GTKSTACK_ROOT/share/locale
326 for l in $LINGUAS ; do
327 echo "Copying GTK i18n files for $l..."
328 for MO in $GTK_MESSAGES ; do
329 if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
330 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
332 # try with just the language spec
333 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
334 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
335 cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
341 echo "Skipping NLS support"
345 # Copy stuff that may be dynamically loaded
348 cp -R $GTKSTACK_ROOT/etc/* $Etc
350 # We rely on clearlooks, so include a version from our own build tree
351 # this one is special - we will set GTK_PATH to $Libraries/gtkengines
353 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
354 mkdir -p $GTK_ENGINE_DIR
356 echo "Copying GTK engines ..."
357 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
358 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
360 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
361 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
364 if test x$WITH_LADSPA != x ; then
365 if test x$MIXBUS != x ; then
366 plugdir=mixbus_ladspa
370 echo "Copying `ls $plugdir | wc -l` plugins ..."
371 if [ -d $plugdir ] ; then
373 cp -r $plugdir/* $Plugins
378 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.so* $Surfaces
379 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp.so* $Libraries
382 # got to be careful with names here
383 for x in $BUILD_ROOT/../midi_maps/*.map ; do
388 # got to be careful with names here
389 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
394 # got to be careful with names here
395 for x in $BUILD_ROOT/../scripts/*.lua ; do
400 # got to be careful with names here
401 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
402 cp "$x" $MackieControl
406 #for f in $BUILD_ROOT/../templates/* ; do
407 # if [ -d "$f" ] ; then
408 # echo Template: $f ; cp -r "$f" $Templates ;
413 # got to be careful with names here
414 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
415 cp "$x" $ExportFormats
419 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
422 for backend in jack alsa dummy wavesaudio ; do
423 cp $BUILD_ROOT/libs/backends/$backend/lib*.so* $Backends
426 # VAMP plugins that we use
427 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
429 # Suil modules (new dir 'build-stack')
430 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
431 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Libraries
434 # Suil modules (old dir 'build-ardour-stack')
435 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
436 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Libraries
439 # VST scanner app (both LXVST as well as WIN-VST, 2in1)
440 # (if build with wine: ardour-vst-scanner is a wrapper
441 # script for ardour-vst-scanner.exe.so, if VST is disabled
442 # neither binary nor script exists)
443 if test -d $BUILD_ROOT/libs/fst ; then
444 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $APPLIB || true
445 if test x$STRIP = xall ; then
446 strip -s $APPLIB/ardour-vst-scanner*
451 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
452 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $APPLIB
453 if test x$STRIP = xall ; then
454 strip -s $APPLIB/ardour-exec-wrapper
458 # ALSA device reservation tool (if available)
459 if test -f $BUILD_ROOT/libs/ardouralsautil/ardour-request-device; then
460 cp $BUILD_ROOT/libs/ardouralsautil/ardour-request-device $APPLIB/ || true
461 if test x$STRIP = xall ; then
462 strip -s $APPLIB/ardour-request-device
466 OURLIBDIR=$BUILD_ROOT/libs
467 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
469 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
473 # these are dynamically loaded by NSS
474 deplibs="libfreeblpriv3.so libsoftokn3.so libnsspem.so"
475 cp -v $GTKSTACK_ROOT/lib/libsoftokn3.so $Libraries/
476 cp -v $GTKSTACK_ROOT/lib/libfreeblpriv3.so $Libraries/
477 cp -v $GTKSTACK_ROOT/lib/libnsspem.so $Libraries/
478 chrpath -r foo $Libraries/libsoftokn3.so
479 chrpath -r foo $Libraries/libfreeblpriv3.so
480 chrpath -r foo $Libraries/libnsspem.so
484 filelist=`find $APPLIB/ -type f`
485 filelist="$APPBIN/${EXENAME}-${release_version} $filelist"
487 for file in $filelist ; do
488 if ! file $file | grep -qs ELF ; then
492 # speed this up a bit by not checking things multiple times.
493 for i in "${depCheckedList[@]}"; do
494 if [ $i == $file ]; then
498 depCheckedList[$checkIdx]=$file
499 checkIdx=$(($checkIdx + 1))
501 # ignore suil/qt wrappers - the plugin will pull in QT4.
502 if echo $file | grep -qs 'libsuil_.*qt4' ; then continue; fi
504 # do not include libjack, nor libwine
505 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | grep -v libwine.so | awk '{print $3}'`
508 for dep in $deps ; do
509 if test "not" = ${dep}; then
511 echo "!!! ERROR !!! - Missing dependant library for $file."
512 echo "Searched: " $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
514 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
516 echo "!!! ERROR !!! - See Above"
520 # don't use anything mapped at a specific address
521 if echo $dep | grep -qs '0x' ; then continue; fi
523 if echo $dep | grep -qs "^/lib/" ; then continue; fi
525 if echo $dep | grep -qs libjack ; then continue; fi
527 if echo $dep | grep -qs libasound ; then continue; fi
528 # don't include any X Window libraries
529 if echo $dep | grep -qs libX\. ; then continue; fi
530 if echo $dep | grep -qs libxcb ; then continue; fi
531 if echo $dep | grep -qs libICE\. ; then continue; fi
532 if echo $dep | grep -qs libSM\. ; then continue; fi
534 if echo $dep | grep -qs 'libc\.' ; then continue; fi
535 # don't include libstdc++
536 if echo $dep | grep -qs libstdc++ ; then continue; fi
537 # don't include libdbus
538 if echo $dep | grep -qs libdbus ; then continue; fi
541 if ! test -f $Libraries/$base; then
542 parent=$(basename ${file})
543 if echo $dep | grep -sq '^libs' ; then
544 echo "Copying dependant lib $BUILD_ROOT/$dep (required by ${parent})"
545 cp $BUILD_ROOT/$dep $Libraries
547 echo "Copying dependant lib $dep (required by ${parent})"
551 # reset RPATH so that the runtime linker never looks
552 # in places we don't want it to
554 chrpath -r foo $Libraries/`basename $dep`
555 if echo $dep | grep -sq '^/' ; then
556 # absolute path, candidate for stripping
557 deplibs="$deplibs $base"
563 if test x$missing = xfalse ; then
564 # everything has been found
571 if test x$STRIP = xall ; then
572 echo Stripping all libraries
573 # Must be writable so that we can strip
574 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod u+w
576 find $APPLIB/ -name "*.so*" -print0 | xargs -0 strip -s
577 elif test x$STRIP = xsome ; then
578 echo Stripping dependent libraries
579 for l in $deplibs ; do
580 if echo "$l" | grep -qE "$NOSTRIP"; then
587 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
589 echo "Copying other stuff to $APPDIR ..."
591 # these are all generated by waf
592 cp $BUILD_ROOT/gtk2_ardour/ardour.keys $Etc
593 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
594 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
595 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
597 # Copied directly from source tree
599 mkdir ${Shared}/icons
600 mkdir ${Shared}/resources
601 cp ../../system_config $Etc/system_config
602 cp ../../instant.xml $Shared/instant.xml
603 cp ../../gtk2_ardour/icons/*.png ${Shared}/icons
604 cp -r ../../gtk2_ardour/icons/cursor_* ${Shared}/icons/
605 cp ../../gtk2_ardour/ArdourMono.ttf $Shared
606 cp ../../gtk2_ardour/resources/${APPNAME}-* ${Shared}/resources/
608 # Themes: only install those named for this app
609 lower_case_appname=`echo $APPNAME | tr '[:upper:]' '[:lower:]'`
610 cp ../../gtk2_ardour/themes/*-${lower_case_appname}.colors $Themes
613 # put sooper sekrit ingredients here and they will be copied
616 if [ -d specialSauce ] ; then
617 cp -r specialSauce $Etc
620 # install bundled LV2s to <app>/lib/LV2/
621 cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
623 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
624 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
625 mkdir -p $APPLIB/LV2/lv2core.lv2
626 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
627 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
628 mkdir -p $APPLIB/LV2/lv2core.lv2
629 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
632 # go through and recursively remove any .svn dirs in the bundle
633 for svndir in `find $APPDIR -name .svn -type d`; do
638 ################################################################################
639 ### Mixbus plugins, etc
640 if test x$WITH_HARRISON_LV2 != x ; then
641 echo "Adding Harrison LV2s"
644 curl -s -S --fail -# \
645 -z "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
646 -o "${CACHEDIR}/harrison_lv2s.${HARCH}.zip" \
647 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_lv2s.${HARCH}.zip"
648 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/harrison_lv2s.${HARCH}.zip"
651 if test -n "$MIXBUS"; then
652 echo "Adding Mixbus Channelstrip"
654 mkdir -p $APPLIB/ladspa/strip/
655 curl -s -S --fail -# \
656 -z "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
657 -o "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
658 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONCHANNELSTRIP}.${HARCH}.so"
660 cp "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
661 $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
662 chmod +x $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
664 echo "Adding Harrison Vamp Plugins"
666 if test "$GCC5ABI" = "true"; then
667 VAMPARCH="${HARCH}gcc5"
671 curl -s -S --fail -# \
672 -z "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
673 -o "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
674 "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_vamp.${VAMPARCH}.so"
676 cp "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
677 $APPLIB/harrison_vamp.so
678 chmod +x $APPLIB/harrison_vamp.so
681 if test x$WITH_X42_LV2 != x ; then
684 echo "Adding x42 Plugins"
686 for proj in x42-meters x42-midifilter x42-midimap x42-stereoroute x42-eq setBfree; do
687 X42_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/${proj}.latest.txt)
688 rsync -a -q --partial \
689 rsync://x42-plugins.com/x42/linux/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip \
690 "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
691 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
694 ################################################################################
697 if test x$WITH_HARVID != x ; then
699 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
700 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
703 rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
704 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
707 rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
708 "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
711 --exclude=README --exclude=harvid.1 --strip-components=1 \
712 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
715 --exclude=README --exclude=xjadeo.1 --strip-components=1 \
716 -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
722 # Add the uninstaller
724 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
725 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
728 # Add the stage2.run script
730 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
735 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
736 cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
738 echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
742 echo "Building tarball ..."
745 tar -cf $APPDIR.tar $APPDIR
747 echo "Calculating bundle size"
748 du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size
750 ( cd $APPDIR ; find . ) > file_list.txt