1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Changed the conditional compilation for alpha/beta/release...

... In particular, don't put the extra information in MIDI device info for Beta

But still link to the Alpha manual.
This commit is contained in:
Paul Licameli 2017-09-11 00:08:31 -04:00
parent 5a29660266
commit 954a974422
5 changed files with 35 additions and 16 deletions

View File

@ -34,12 +34,30 @@
// We only do alpha builds, beta builds, and release versions. // We only do alpha builds, beta builds, and release versions.
// Most of the time we're in development, so IS_ALPHA should be defined // Most of the time we're in development, so AUDACITY_BUILD_LEVEL should be
// to 1. // defined to 0.
// Its value may be more than 1 for pre-release "Beta" builds that differ only in the // Its value may be more than 0 for pre-release "Beta" builds that differ only
// welcome screen. // in the welcome screen, and hiding of some development menu commands, but
// Use "#if IS_ALPHA" not #ifdef // still link to the alpha manual online.
#define IS_ALPHA 2 #define AUDACITY_BUILD_LEVEL 1
// used #ifdef not #if for IS_ALPHA, IS_BETA, IS_RELEASE, USE_ALPHA_MANUAL
#undef IS_ALPHA
#undef IS_BETA
#undef IS_RELEASE
#undef USE_ALPHA_MANUAL
#if AUDACITY_BUILD_LEVEL == 0
#define IS_ALPHA
#define USE_ALPHA_MANUAL
#elif AUDACITY_BUILD_LEVEL == 1
#define IS_BETA
#define USE_ALPHA_MANUAL
#else
#define IS_RELEASE
#endif
// Increment as appropriate every time we release a NEW version. // Increment as appropriate every time we release a NEW version.
#define AUDACITY_VERSION 2 #define AUDACITY_VERSION 2
@ -47,9 +65,9 @@
#define AUDACITY_REVISION 0 #define AUDACITY_REVISION 0
#define AUDACITY_MODLEVEL 0 #define AUDACITY_MODLEVEL 0
#if IS_ALPHA > 1 #if defined(IS_BETA)
#define AUDACITY_SUFFIX wxT("-beta-") __TDATE__ #define AUDACITY_SUFFIX wxT("-beta-") __TDATE__
#elif IS_ALPHA #elif defined(IS_ALPHA)
#define AUDACITY_SUFFIX wxT("-alpha-") __TDATE__ #define AUDACITY_SUFFIX wxT("-alpha-") __TDATE__
#else #else
#define AUDACITY_SUFFIX wxT("") // for a stable release #define AUDACITY_SUFFIX wxT("") // for a stable release
@ -147,7 +165,7 @@ void QuitAudacity();
// Put extra symbol information in the release build, for the purpose of gathering // Put extra symbol information in the release build, for the purpose of gathering
// profiling information (as from Windows Process Monitor), when there otherwise // profiling information (as from Windows Process Monitor), when there otherwise
// isn't a need for AUDACITY_DLL_API. // isn't a need for AUDACITY_DLL_API.
#if IS_ALPHA #ifdef IS_ALPHA
#define PROFILE_DLL_API AUDACITY_DLL_API #define PROFILE_DLL_API AUDACITY_DLL_API
#else #else
#define PROFILE_DLL_API #define PROFILE_DLL_API

View File

@ -3498,6 +3498,7 @@ wxString AudioIO::GetMidiDeviceInfo()
s << wxT("No MIDI playback device found for '") << playDevice << wxT("'.") << e; s << wxT("No MIDI playback device found for '") << playDevice << wxT("'.") << e;
} }
// Mention our conditional compilation flags for Alpha only
#ifdef IS_ALPHA #ifdef IS_ALPHA
s << wxT("==============================") << e; s << wxT("==============================") << e;

View File

@ -212,10 +212,10 @@ static wxString HelpTextBuiltIn( const wxString & Key )
/* i18n-hint: Preserve [[file:quick_help.html as it's the name of a file.*/ /* i18n-hint: Preserve [[file:quick_help.html as it's the name of a file.*/
wxString result = wxString result =
wxString(wxT("")) + wxString(wxT("")) +
#if IS_ALPHA #if defined(IS_ALPHA) || defined(IS_BETA)
wxT("<hr><center><h3>") + _("Get the Official Released Version of Audacity") + wxT("</h3></center>") + wxT("<hr><center><h3>") + _("Get the Official Released Version of Audacity") + wxT("</h3></center>") +
VerCheckHtml() + VerCheckHtml() +
#if IS_ALPHA == 1 #ifdef IS_ALPHA
alphamsg alphamsg
#else #else
betamsg betamsg
@ -246,7 +246,7 @@ static wxString HelpTextBuiltIn( const wxString & Key )
_("More:</b> Visit our [[http://wiki.audacityteam.org/index.php|Wiki]] for tips, tricks, extra tutorials and effects plug-ins.") + wxT("</p>"); _("More:</b> Visit our [[http://wiki.audacityteam.org/index.php|Wiki]] for tips, tricks, extra tutorials and effects plug-ins.") + wxT("</p>");
#endif #endif
#if IS_ALPHA #ifdef USE_ALPHA_MANUAL
result.Replace( "//manual.audacityteam.org/quick_help.html","//alphamanual.audacityteam.org/man/Quick_Help" ); result.Replace( "//manual.audacityteam.org/quick_help.html","//alphamanual.audacityteam.org/man/Quick_Help" );
result.Replace( "//manual.audacityteam.org/","//alphamanual.audacityteam.org/man/" ); result.Replace( "//manual.audacityteam.org/","//alphamanual.audacityteam.org/man/" );
#endif #endif

View File

@ -1224,7 +1224,7 @@ void AudacityProject::CreateMenusAndCommands()
// PRL: team consensus for 2.2.0 was, we let end users have this diagnostic, // PRL: team consensus for 2.2.0 was, we let end users have this diagnostic,
// as they used to in 1.3.x // as they used to in 1.3.x
//#if IS_ALPHA //#ifdef IS_ALPHA
// TODO: What should we do here? Make benchmark a plug-in? // TODO: What should we do here? Make benchmark a plug-in?
// Easy enough to do. We'd call it mod-self-test. // Easy enough to do. We'd call it mod-self-test.
@ -8285,7 +8285,7 @@ void AudacityProject::OnCheckForUpdates()
// Only does the update checks if it's an ALPHA build and not disabled by preferences. // Only does the update checks if it's an ALPHA build and not disabled by preferences.
void AudacityProject::MayCheckForUpdates() void AudacityProject::MayCheckForUpdates()
{ {
#if IS_ALPHA #ifdef IS_ALPHA
OnCheckForUpdates(); OnCheckForUpdates();
#endif #endif
} }

View File

@ -36,7 +36,7 @@
#include "ErrorDialog.h" #include "ErrorDialog.h"
#include "HelpSystem.h" #include "HelpSystem.h"
#if IS_ALPHA #ifdef USE_ALPHA_MANUAL
const wxString HelpSystem::HelpHostname = wxT("alphamanual.audacityteam.org"); const wxString HelpSystem::HelpHostname = wxT("alphamanual.audacityteam.org");
const wxString HelpSystem::HelpServerHomeDir = wxT("/man/"); const wxString HelpSystem::HelpServerHomeDir = wxT("/man/");
const wxString HelpSystem::HelpServerManDir = wxT("/man/"); const wxString HelpSystem::HelpServerManDir = wxT("/man/");
@ -354,7 +354,7 @@ void HelpSystem::ShowHelp(wxWindow *parent,
webHelpPath = wxT("https://")+HelpSystem::HelpHostname+HelpSystem::HelpServerManDir; webHelpPath = wxT("https://")+HelpSystem::HelpHostname+HelpSystem::HelpServerManDir;
} }
#if IS_ALPHA #ifdef USE_ALPHA_MANUAL
webHelpPage = webHelpPath + PageName; webHelpPage = webHelpPath + PageName;
#else #else
webHelpPage = webHelpPath + releasePageName; webHelpPage = webHelpPath + releasePageName;