Bug 1597 - Enh: Greater clarity over status of versions needed

- For ALPHA builds we do a check version with the Welcome screen (if welcome screen is enabled).
- A 'Check Online' in the About box provides a new route to check version
- Check Version now passes CommitId and Build Date/Time to identify a version.

To actually close the bug we need the javascript on the server page to put up informative messages.
This commit is contained in:
James Crook 2017-02-25 22:30:23 +00:00
parent 43291687a5
commit c53e2dbb77
9 changed files with 67 additions and 27 deletions

1
.gitignore vendored
View File

@ -56,6 +56,7 @@ lib-src/twolame/doc/html/Doxyfile
lib-src/twolame/libtwolame/config.h lib-src/twolame/libtwolame/config.h
locale/POTFILES locale/POTFILES
src/audacity.desktop src/audacity.desktop
src/RevisionIdent.h
src/configunix.h src/configunix.h
src/configwin.h src/configwin.h
*.pc *.pc

View File

@ -8,7 +8,7 @@ addons:
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -y libwxgtk3.0-dev libgtk2.0-dev - sudo apt-get install -y libwxgtk3.0-dev libgtk2.0-dev
- git show -s --format="wxT(\"[[http://github.com/audacity/audacity/commit/%H|%h]] of %cd\")" | tee ./src/RevisionIdent.h - git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee ./src/RevisionIdent.h
- export CXX="g++-4.9" CC="gcc-4.9" - export CXX="g++-4.9" CC="gcc-4.9"
- FLAGS="-w -std=gnu++11" - FLAGS="-w -std=gnu++11"
- export CFLAGS="$CFLAGS $FLAGS" - export CFLAGS="$CFLAGS $FLAGS"

View File

@ -1,2 +1,2 @@
git show -s --format="wxT(\"[[http://github.com/audacity/audacity/commit/%H|%h]] of %cd\")" | tee ../src/RevisionIdent.h git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee ../src/RevisionIdent.h
touch ../src/AboutDialog.cpp touch ../src/AboutDialog.cpp

View File

@ -45,9 +45,37 @@ hold information about one contributor to Audacity.
#include "AllThemeResources.h" #include "AllThemeResources.h"
#include "../images/AudacityLogoWithName.xpm" #include "../images/AudacityLogoWithName.xpm"
#include "RevisionIdent.h"
// RevisionIdent.h may contain #defines like these ones:
//#define REV_LONG "28864acb238cb3ca71dda190a2d93242591dd80e"
//#define REV_TIME "Sun Apr 12 12:40:22 2015 +0100"
#ifndef REV_TIME
#define REV_TIME "unknown date and time"
#endif
#ifdef REV_LONG
#define REV_IDENT wxString( "[[http://github.com/audacity/audacity/commit/" )+ REV_LONG + "|" + wxString( REV_LONG ).Left(6) + "]] of " + REV_TIME
#else
#define REV_IDENT wxT("No revision identifier was provided")
#endif
extern wxString FormatHtmlText( const wxString & Text ); extern wxString FormatHtmlText( const wxString & Text );
// Function to give the xtra arguments to put on the version check string.
const wxString VerCheckArgs(){
wxString result = wxString("from_ver=") + AUDACITY_VERSION_STRING;
#ifdef REV_LONG
wxString timeStr = wxString( __DATE__ ) + wxString( __TIME__ );
result += wxString("&ComitId=")+wxString(REV_LONG).Left(6) + "&Time=" + timeStr;
#endif
result.Replace(" ","");
return result;
}
void AboutDialog::CreateCreditsList() void AboutDialog::CreateCreditsList()
{ {
// The Audacity Team: developers and support // The Audacity Team: developers and support
@ -409,6 +437,13 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
informationStr = wxT("<h2><center>"); informationStr = wxT("<h2><center>");
informationStr += _("Build Information"); informationStr += _("Build Information");
informationStr += wxT("</center></h2>\n"); informationStr += wxT("</center></h2>\n");
// Only for debug builds, for now.
#if __WXDEBUG__
informationStr += wxT("<center>");
informationStr += wxString("[[http://www.audacityteam.org/download/?") + VerCheckArgs() + "|" +
_("Check Online") + "]]";
informationStr += wxT("</center>\n");
#endif
// top level heading // top level heading
informationStr += wxT("<h3>"); informationStr += wxT("<h3>");
informationStr += _("File Format Support"); informationStr += _("File Format Support");
@ -583,15 +618,7 @@ void AboutDialog::PopulateInformationPage( ShuttleGui & S )
// Current date // Current date
AddBuildinfoRow(&informationStr, _("Program build date: "), __TDATE__); AddBuildinfoRow(&informationStr, _("Program build date: "), __TDATE__);
AddBuildinfoRow(&informationStr, _("Commit Id:"), REV_IDENT );
// Uncomment the next two lines to test hyperlinks work from here.
// AddBuildinfoRow(&informationStr, wxT("Link Test:"),
// wxT("[[https:www.audacityteam.org|Click bait]]") );
AddBuildinfoRow(&informationStr, _("Commit Id:"),
#include "RevisionIdent.h"
);
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
AddBuildinfoRow(&informationStr, _("Build type:"), _("Debug build")); AddBuildinfoRow(&informationStr, _("Build type:"), _("Debug build"));
#else #else

View File

@ -18,6 +18,8 @@
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include "widgets/wxPanelWrapper.h" #include "widgets/wxPanelWrapper.h"
extern const wxString VerCheckArgs();
class ShuttleGui; class ShuttleGui;
struct AboutDialogCreditItem { struct AboutDialogCreditItem {

View File

@ -1519,8 +1519,12 @@ bool AudacityApp::OnInit()
} }
} }
if( project->mShowSplashScreen ) if( project->mShowSplashScreen ){
// This may do a check-for-updates at every start up.
// Mainly this is to tell users of ALPHAS who don't know that they have an ALPHA.
project->MayCheckForUpdates();
project->OnHelpWelcome(); project->OnHelpWelcome();
}
// JKC 10-Sep-2007: Enable monitoring from the start. // JKC 10-Sep-2007: Enable monitoring from the start.
// (recommended by lprod.org). // (recommended by lprod.org).

View File

@ -6848,7 +6848,16 @@ void AudacityProject::OnManual()
void AudacityProject::OnCheckForUpdates() void AudacityProject::OnCheckForUpdates()
{ {
::OpenInDefaultBrowser( wxString( wxT("http://audacityteam.org/download/?from_ver=")) + AUDACITY_VERSION_STRING ); wxString Args = VerCheckArgs();
::OpenInDefaultBrowser( wxString( wxT("http://audacityteam.org/download/?")) + Args);
}
// Only does the update checks if it's an ALPHA build and not disabled by preferences.
void AudacityProject::MayCheckForUpdates()
{
#if IS_ALPHA
OnCheckForUpdates();
#endif
} }
void AudacityProject::OnShowLog() void AudacityProject::OnShowLog()

View File

@ -417,6 +417,7 @@ void OnAbout();
void OnQuickHelp(); void OnQuickHelp();
void OnManual(); void OnManual();
void OnCheckForUpdates(); void OnCheckForUpdates();
void MayCheckForUpdates();
void OnShowLog(); void OnShowLog();
void OnHelpWelcome(); void OnHelpWelcome();
void OnBenchmark(); void OnBenchmark();

View File

@ -11,22 +11,18 @@
\file RevisionIdent.h \file RevisionIdent.h
This entire file will be replaced by the revision identifier string This entire file will be replaced by the revision identifier #defines
based on the branch SHA when the automated build system builds These will be used by Audacity to:
Audacity. That striing will look something like: a) Give a link to the commit in the about box
b) Identify the revision for Update checking.
"<a href=\"https://github.com/audacity/audacity/commit/
7f2e83995596367aeed69f3086ac9fd2039795a3\">7f2e839</a> of
Thu Apr 9 20:03:11 2015 +0100"
*//********************************************************************/ *//********************************************************************/
// The commented out string below is like the one the build servers // The commented out #defines below are like the one the build servers
// will replace this file with. // will replace this file with:
//wxT("<a href=\"http://github.com/audacity/audacity/commit/28864acb238cb3ca71dda190a2d93242591dd80e\">28864ac</a> of Sun Apr 12 12:40:22 2015 +0100") // #define REV_LONG "28864acb238cb3ca71dda190a2d93242591dd80e"
// #define REV_TIME "Sun Apr 12 12:40:22 2015 +0100"
// If the above are not defined, Audacity will say:
// The string below is what you get if // "No revision identifier was provided"
// the build system does not replace this file.
wxT("No revision identifier was provided")