13
0
This commit is contained in:
Paul Davis 2013-03-18 18:57:21 -04:00
commit 719818b569
10 changed files with 45 additions and 44 deletions

3
.gitignore vendored
View File

@ -29,6 +29,7 @@ depcomp
# misc editor/tools
*~
*.swp
*.kdev4
.gdb_history
core
cscope.files
@ -62,7 +63,7 @@ tags
# /libs/ardour/
/libs/ardour/version.cc
/libs/ardour/ardour/version.h
/libs/ardour/svn_revision.cc
/libs/ardour/revision.cc
/libs/ardour/config_text.cc
# /libs/gtkmm2ext/

View File

@ -27,7 +27,7 @@
#include "pbd/file_utils.h"
#include "ardour/svn_revision.h"
#include "ardour/revision.h"
#include "ardour/version.h"
#include "ardour/filesystem_paths.h"
@ -582,7 +582,7 @@ About::About ()
set_website_label (_("http://ardour.org/"));
set_version ((string_compose(_("%1\n(built from revision %2)"),
VERSIONSTRING,
svn_revision)));
revision)));
Gtk::Button* config_button = manage (new Button (_("Config")));

View File

@ -38,7 +38,7 @@
#include <jack/jack.h>
#include "ardour/svn_revision.h"
#include "ardour/revision.h"
#include "ardour/version.h"
#include "ardour/ardour.h"
#include "ardour/audioengine.h"
@ -485,7 +485,7 @@ int main (int argc, char *argv[])
cout << PROGRAM_NAME
<< VERSIONSTRING
<< _(" (built using ")
<< svn_revision
<< revision
#ifdef __GNUC__
<< _(" and GCC version ") << __VERSION__
#endif

View File

@ -17,11 +17,11 @@
*/
#ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__
#ifndef __ardour_revision_h__
#define __ardour_revision_h__
namespace ARDOUR {
extern const char* svn_revision;
extern const char* revision;
}
#endif

View File

@ -25,7 +25,7 @@
#include <glibmm.h>
#include "ardour/svn_revision.h"
#include "ardour/revision.h"
#include "ardour/session.h"
#include "ardour/session_metadata.h"
@ -89,7 +89,7 @@ BroadcastInfo::set_originator_ref_from_session (Session const & /*session*/)
/* Serial number is 12 chars */
std::ostringstream serial_number;
serial_number << "ARDOUR" << "r" << std::setfill('0') << std::right << std::setw(5) << svn_revision;
serial_number << "ARDOUR" << "r" << std::setfill('0') << std::right << std::setw(5) << revision;
snprintf_bounded_null_filled (info->originator_reference, sizeof (info->originator_reference), "%2s%3s%12s%02d%02d%02d%9d",
SessionMetadata::Metadata()->country().c_str(),

View File

@ -204,7 +204,7 @@ libardour_sources = [
'source_factory.cc',
'speakers.cc',
'strip_silence.cc',
'svn_revision.cc',
'revision.cc',
'tape_file_matcher.cc',
'template_utils.cc',
'tempo.cc',

View File

@ -88,9 +88,9 @@ if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
fi
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{ print $3 }' | sed "s/'//g"`
svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d'"' -f 2`
echo "Version is $release_version / $svn_version"
info_string="$release_version/$svn_version built on `hostname` by `whoami` on `date`"
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2`
echo "Version is $release_version / $revision"
info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
echo "Info string is $info_string"
# Figure out our CPU type
@ -131,11 +131,11 @@ fi
# setup directory structure
if [ -z "${BUILDTYPE}" ]; then
APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}
APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}
APPDIR=${APPNAME}_${ARCH}-${release_version}_${revision}
APP_VER_NAME=${APPNAME}-${release_version}_${revision}
else
APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}-${BUILDTYPE}
APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}
APPDIR=${APPNAME}_${ARCH}-${release_version}_${revision}-${BUILDTYPE}
APP_VER_NAME=${APPNAME}-${release_version}_${revision}-${BUILDTYPE}
fi
APPBIN=$APPDIR/bin
@ -535,7 +535,7 @@ done
#
# Add the uninstaller
#
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${svn_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${revision}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
#Sanity Check file

View File

@ -63,10 +63,10 @@ if [ x$DEBUG = xT ]; then
fi
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d'"' -f 2`
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2`
X86_BUNDLE="${APPNAME}_x86-${release_version}_${svn_version}"
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}_${svn_version}"
X86_BUNDLE="${APPNAME}_x86-${release_version}_${revision}"
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}_${revision}"
if [ ! -z ${BUILDTYPE} ]; then
X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}"
@ -122,22 +122,22 @@ fi
if [ -z ${BUILDTYPE} ]; then
if [ "${SINGLE_ARCH}" = "T" ]; then
if [ "${X86_BUNDLE_OK}" = "T" ]; then
PACKAGE="${APPNAME}_32bit-${release_version}_${svn_version}"
PACKAGE="${APPNAME}_32bit-${release_version}_${revision}"
else
PACKAGE="${APPNAME}_64bit-${release_version}_${svn_version}"
PACKAGE="${APPNAME}_64bit-${release_version}_${revision}"
fi
else
PACKAGE="${APPNAME}-${release_version}_${svn_version}"
PACKAGE="${APPNAME}-${release_version}_${revision}"
fi
else
if [ "${SINGLE_ARCH}" = "T" ]; then
if [ "${X86_BUNDLE_OK}" = "T" ]; then
PACKAGE="${APPNAME}_32bit-${release_version}_${svn_version}-${BUILDTYPE}"
PACKAGE="${APPNAME}_32bit-${release_version}_${revision}-${BUILDTYPE}"
else
PACKAGE="${APPNAME}_64bit-${release_version}_${svn_version}-${BUILDTYPE}"
PACKAGE="${APPNAME}_64bit-${release_version}_${revision}-${BUILDTYPE}"
fi
else
PACKAGE="${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}"
PACKAGE="${APPNAME}-${release_version}_${revision}-${BUILDTYPE}"
fi
fi

View File

@ -64,9 +64,9 @@ done
#release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d' ' -f 3 | sed "s/'//g"`
release_version=3.0
svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d' ' -f 8 | sed 's/[^0-9]//g'`
echo "Version is $release_version / $svn_version"
info_string="$release_version/$svn_version built on `hostname` by `whoami` on `date`"
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d' ' -f 8 | sed 's/[^0-9]//g'`
echo "Version is $release_version / $revision"
info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
echo "Info string is $info_string"
# setup directory structure
@ -166,12 +166,12 @@ env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</st
# edit plist
sed -e "s?@ENV@?$env?g" \
-e "s?@VERSION@?$release_version/$svn_version?g" \
-e "s?@VERSION@?$release_version/$revision?g" \
-e "s?@INFOSTRING@?$info_string?g" < Info.plist.in > Info.plist
# and plist strings
sed -e "s?@APPNAME@?$appname?" \
-e "s?@ENV@?$env?g" \
-e "s?@VERSION@?$release_version/$svn_version?g" \
-e "s?@VERSION@?$release_version/$revision?g" \
-e "s?@INFOSTRING@?$info_string?g" < InfoPlist.strings.in > Resources/InfoPlist.strings || exit 1
# copy static files
@ -497,9 +497,9 @@ fi
echo "Building DMG ..."
# 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
# UC_DMG=$APPNAME-${release_version}-${revision}-UC.dmg
# FINAL_DMG=$APPNAME-${release_version}-${revision}.dmg
UC_DMG=$APPNAME-${release_version}-${revision}.dmg
VOLNAME=$APPNAME-$release_version
# TODO use mktemp

16
wscript
View File

@ -84,22 +84,22 @@ def create_stored_revision():
if os.path.exists('.git'):
rev = fetch_git_revision();
print("ardour.git version: " + rev + "\n")
elif os.path.exists('libs/ardour/svn_revision.cc'):
print("Using packaged svn revision")
elif os.path.exists('libs/ardour/revision.cc'):
print("Using packaged revision")
return
else:
print("Missing libs/ardour/svn_revision.cc. Blame the packager.")
print("Missing libs/ardour/revision.cc. Blame the packager.")
sys.exit(-1)
try:
text = '#include "ardour/svn_revision.h"\n'
text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev
print('Writing revision info to libs/ardour/svn_revision.cc using ' + rev)
o = open('libs/ardour/svn_revision.cc', 'w')
text = '#include "ardour/revision.h"\n'
text += 'namespace ARDOUR { const char* revision = \"%s\"; }\n' % rev
print('Writing revision info to libs/ardour/revision.cc using ' + rev)
o = open('libs/ardour/revision.cc', 'w')
o.write(text)
o.close()
except IOError:
print('Could not open libs/ardour/svn_revision.cc for writing\n')
print('Could not open libs/ardour/revision.cc for writing\n')
sys.exit(-1)
def set_compiler_flags (conf,opt):