a few tweaks and cleanups for the linux build bundle stuff

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7914 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-10-22 01:13:22 +00:00
parent 3dfde7f054
commit 1bfb94d1b5
3 changed files with 40 additions and 58 deletions

View file

@ -271,8 +271,7 @@ fixup_bundle_environment (int argc, char* argv[])
}
Glib::ustring exec_path = argv[0];
cerr << "!! EXEC OF " << exec_path << endl;
Glib::ustring dir_path = Glib::path_get_dirname (exec_path);
Glib::ustring dir_path = Glib::path_get_dirname (Glib::path_get_dirname (exec_path));
Glib::ustring path;
const char *cstr = getenv ("PATH");
@ -281,34 +280,36 @@ fixup_bundle_environment (int argc, char* argv[])
elsewhere in PATH
*/
path = dir_path;
/* note that this function is POSIX/Linux specific, so using / as
a dir separator in this context is just fine.
*/
path = dir_path;
path += "/../etc:";
path += "/etc:";
path += dir_path;
path += "/../lib/surfaces:";
path += "/lib/surfaces:";
path += dir_path;
path += "/../lib/panners:";
path += "/lib/panners:";
setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1);
path = get_user_ardour_path ();
path += ':';
path += dir_path;
path += "/../etc/icons:";
path += "/etc/icons:";
path += dir_path;
path += "/../etc/pixmaps:";
path += "/etc/pixmaps:";
path += dir_path;
path += "/../share:";
path += "/share:";
path += dir_path;
path += "/../etc";
path += "/etc";
setenv ("ARDOUR_PATH", path.c_str(), 1);
setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1);
setenv ("ARDOUR_DATA_PATH", path.c_str(), 1);
path = dir_path;
path += "/../etc";
path += "/etc";
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
cstr = getenv ("LADSPA_PATH");
@ -319,7 +320,7 @@ fixup_bundle_environment (int argc, char* argv[])
path = "";
}
path += dir_path;
path += "/../lib/plugins";
path += "/lib/plugins";
setenv ("LADSPA_PATH", path.c_str(), 1);
@ -331,7 +332,7 @@ fixup_bundle_environment (int argc, char* argv[])
path = "";
}
path += dir_path;
path += "/../lib";
path += "/lib";
setenv ("VAMP_PATH", path.c_str(), 1);
@ -343,7 +344,7 @@ fixup_bundle_environment (int argc, char* argv[])
path = "";
}
path += dir_path;
path += "/../lib/surfaces";
path += "/lib/surfaces";
setenv ("ARDOUR_CONTROL_SURFACE_PATH", path.c_str(), 1);
@ -355,19 +356,19 @@ fixup_bundle_environment (int argc, char* argv[])
path = "";
}
path += dir_path;
path += "/../lib/plugins";
path += "/lib/plugins";
setenv ("LV2_PATH", path.c_str(), 1);
path = dir_path;
path += "/../lib/clearlooks";
path += "/lib/clearlooks";
setenv ("GTK_PATH", path.c_str(), 1);
if (!ARDOUR::translations_are_disabled ()) {
path = dir_path;
path += "/../shared/locale";
path += "/shared/locale";
localedir = strdup (path.c_str());
setenv ("GTK_LOCALEDIR", localedir, 1);

View file

@ -711,10 +711,13 @@ Crossfade::set_state (const XMLNode& node)
nframes_t val;
if ((prop = node.property ("position")) != 0) {
sscanf (prop->value().c_str(), "%" PRIu32, &val);
if (val != _position) {
_position = val;
what_changed = Change (what_changed | PositionChanged);
if (sscanf (prop->value().c_str(), "%" PRIu32, &val) == 1) {
if (val != _position) {
_position = val;
what_changed = Change (what_changed | PositionChanged);
}
} else {
warning << _("can't read value from crossfade position property") << endmsg;
}
} else {
warning << _("old-style crossfade information - no position information") << endmsg;
@ -751,12 +754,14 @@ Crossfade::set_state (const XMLNode& node)
if ((prop = node.property ("length")) != 0) {
sscanf (prop->value().c_str(), "%" PRIu32, &val);
if (val != _length) {
_length = atol (prop->value().c_str());
what_changed = Change (what_changed | LengthChanged);
if (sscanf (prop->value().c_str(), "%" PRIu32, &val) == 1) {
if (val != _length) {
_length = atol (prop->value().c_str());
what_changed = Change (what_changed | LengthChanged);
}
} else {
warning << _("can't read value from crossfade length property") << endmsg;
}
} else {
/* XXX this branch is legacy code from before

View file

@ -25,7 +25,6 @@ while [ $# -gt 0 ] ; do
INTERNAL_JACK=1;
WITH_LADSPA=1;
STRIP= ;
PRODUCT_PKG_DIR=ArdourSAE.pkg ;
APPNAME=Ardour ;
shift ;;
--mixbus) MIXBUS=1;
@ -34,7 +33,6 @@ while [ $# -gt 0 ] ; do
INTERNAL_JACK=;
WITH_LADSPA=;
STRIP= ;
PRODUCT_PKG_DIR=MixBus.pkg;
APPNAME=Mixbus ;
shift ;;
--public) WITH_NLS=1 ;
@ -42,7 +40,6 @@ while [ $# -gt 0 ] ; do
INTERNAL_JACK=;
WITH_LADSPA=1;
STRIP= ;
PRODUCT_PKG_DIR=Ardour.pkg;
APPNAME=Ardour ;
shift ;;
--allinone) SAE= ;
@ -50,7 +47,6 @@ while [ $# -gt 0 ] ; do
INTERNAL_JACK=1;
WITH_LADSPA=1;
STRIP= ;
PRODUCT_PKG_DIR=Ardour.pkg ;
shift ;;
--test) SAE= ; INTERNAL_JACK=; WITH_LADSPA=; STRIP= ; shift ;;
@ -162,7 +158,7 @@ echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
# create startup helper script
sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' < ardour.sh.in > $APPBIN/ardour2
chmod 775 $APPBIN/ardour2
rm $ENVIRONMENT && chmod 775 $APPBIN/ardour2
MAIN_EXECUTABLE=ardour-$release_version
echo "Copying ardour executable ...."
@ -369,53 +365,33 @@ done
# and now ... the DMG
#
rm -rf $PRODUCT_PKG_DIR
mkdir $PRODUCT_PKG_DIR
if [ x$SAE != x ] ; then
# SAE packaging
echo "Creating SAE packaging directory"
mv $APPDIR $PRODUCT_PKG_DIR/Ardour2-SAE.app
cp HowToInstallArdourSAE.pdf "$PRODUCT_PKG_DIR/How To Install Ardour SAE.pdf"
cp SAE-de-keypad.pdf "$PRODUCT_PKG_DIR/Ardour SAE Shortcuts (keypad).pdf"
cp SAE-de-nokeypad.pdf "$PRODUCT_PKG_DIR/Ardour SAE Shortcuts.pdf"
cp HowToInstallArdourSAE.pdf "$APPDIR/How To Install Ardour SAE.pdf"
cp SAE-de-keypad.pdf "$APPDIR/Ardour SAE Shortcuts (keypad).pdf"
cp SAE-de-nokeypad.pdf "$APPDIR/Ardour SAE Shortcuts.pdf"
elif [ x$MIXBUS != x ] ; then
# Mixbus packaging
echo "Creating Mixbus packaging directory"
mv $APPDIR $PRODUCT_PKG_DIR/
cp MixBus_Install_QuickStart.pdf "$PRODUCT_PKG_DIR/Mixbus Install & Quick Start Guide.pdf"
cp MixBus_Install_QuickStart.pdf "$APPDIR/Mixbus Install & Quick Start Guide.pdf"
if [ -x $EXTERNAL_JACK != x ] ; then
cp $EXTERNAL_JACK $PRODUCT_PKG_DIR
fi
# create dmg
else
echo "Creating $APPNAME packaging directory"
mv $APPDIR $PRODUCT_PKG_DIR/
fi
echo "Building DMG ..."
echo "Building tarball ..."
# UC_DMG=$APPNAME-${release_version}-${svn_version}-UC.dmg
# FINAL_DMG=$APPNAME-${release_version}-${svn_version}.dmg
UC_DMG=$APPNAME-${release_version}-${svn_version}.dmg
#rm -f $UC_DMG
#echo hdiutil create $UC_DMG -volname $APPNAME-$release_version -fs HFS+ -srcfolder $PRODUCT_PKG_DIR
#hdiutil create $UC_DMG -volname $APPNAME-$release_version -fs HFS+ -srcfolder $PRODUCT_PKG_DIR
# compress it
# echo "Compressing DMG ..."
# rm -f $FINAL_DMG
# hdiutil convert $UC_DMG -format UDBZ -o $FINAL_DMG
rm -f $APPNAME-$release_version.tar.bz2
tar -jcf $APPNAME-$release_version.tar.bz2 $APPDIR
echo "Done."