Skip to content

Commit cf41127

Browse files
committed
change version number macros
1 parent b5704f4 commit cf41127

7 files changed

Lines changed: 14 additions & 50 deletions

File tree

Source/AboutDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ BOOL CAboutDlg::OnInitDialog()
151151
CString aboutString;
152152

153153
#ifdef WIP
154-
aboutString.Format(_T("FamiTracker version %i.%i.%i beta %i"), VERSION_MAJ, VERSION_MIN, VERSION_REV, VERSION_WIP);
154+
aboutString.Format(_T("FamiTracker version %i.%i.%i.%i beta"), VERSION);
155155
#else
156156
CString str;
157157
str.Format(_T("%i.%i.%i.%i"), VERSION);

Source/Exception.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,13 @@ static CString GetDumpFilename(int counter)
5454
// App version
5555
filename.AppendFormat(_T("-v%i_%i_%i_%i"), VERSION); // // //
5656
#ifdef WIP
57-
filename.AppendFormat(_T("_b%i"), VERSION_WIP);
57+
filename.Append(_T("_beta"));
5858
#endif
5959

6060
// Counter
6161
if (counter > 0)
6262
filename.AppendFormat(_T("(%i)"), counter);
6363

64-
#ifndef RELEASE_BUILD
65-
filename.Append(_T("-custom"));
66-
#endif /* RELEASE_BUILD */
67-
6864
filename.Append(MINIDUMP_FILE_END);
6965

7066
return filename;

Source/FamiTracker.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ const DWORD SHARED_MEM_SIZE = 256;
4747
#define new DEBUG_NEW
4848
#endif
4949

50-
#ifdef RELEASE_BUILD
51-
#pragma message("Building SVN release build...")
52-
#endif /* RELEASE_BUILD */
53-
5450
// CFamiTrackerApp
5551

5652
BEGIN_MESSAGE_MAP(CFamiTrackerApp, CWinApp)
@@ -210,7 +206,7 @@ BOOL CFamiTrackerApp::InitInstance()
210206
EnableShellOpen();
211207

212208
// Skip this if in wip/beta mode
213-
#if /*!defined(WIP) &&*/ !defined(_DEBUG)
209+
#if !defined(WIP) && !defined(_DEBUG)
214210
// Add shell options
215211
RegisterShellFileTypes(); // // //
216212
static const LPCTSTR FILE_ASSOC_NAME = _T("0CC-FamiTracker Module");
@@ -288,7 +284,6 @@ BOOL CFamiTrackerApp::InitInstance()
288284
RegisterSingleInstance();
289285

290286
#ifndef _DEBUG
291-
// WIP
292287
m_pMainWnd->GetMenu()->GetSubMenu(4)->RemoveMenu(ID_MODULE_CHANNELS, MF_BYCOMMAND); // // //
293288
#endif
294289

@@ -430,7 +425,7 @@ void CFamiTrackerApp::LoadLocalization()
430425
WORD Major, Minor, Build, Revision;
431426

432427
if (GetFileVersion(DLL_NAME, Major, Minor, Revision, Build)) {
433-
if (Major != VERSION_MAJ || Minor != VERSION_MIN || Revision != VERSION_REV || Build != VERSION_WIP) // // //
428+
if (Major != VERSION_API || Minor != VERSION_MAJ || Revision != VERSION_MIN || Build != VERSION_REV) // // //
434429
return;
435430

436431
m_hInstResDLL = ::LoadLibrary(DLL_NAME);

Source/FamiTracker.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ enum {
4040
IPC_LOAD_PLAY
4141
};
4242

43-
#ifdef RELEASE_BUILD
44-
// Always disable export test for release builds
45-
#undef EXPORT_TEST
46-
#endif /* RELEASE_BUILD */
43+
// #define EXPORT_TEST
4744

4845
// Custom command line reader
4946
class CFTCommandLineInfo : public CCommandLineInfo

Source/MainFrm.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,10 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
459459
m_strTitle.Append(_T(" [BETA]"));
460460
#endif
461461

462-
#ifndef RELEASE_BUILD
463-
if (AfxGetResourceHandle() != AfxGetInstanceHandle()) {
462+
if (AfxGetResourceHandle() != AfxGetInstanceHandle()) { // // //
464463
// Prevent confusing bugs while developing
465464
m_strTitle.Append(_T(" [Localization enabled]"));
466465
}
467-
#endif
468466

469467
return 0;
470468
}

Source/PatternEditor.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -542,12 +542,6 @@ void CPatternEditor::DrawScreen(CDC *pDC, CFamiTrackerView *pView)
542542
pDC->TextOut(m_iWinWidth - 70, 42, _T("DEBUG"));
543543
pDC->TextOut(m_iWinWidth - 70, 62, _T("DEBUG"));
544544
pDC->TextOut(m_iWinWidth - 70, 82, _T("DEBUG"));
545-
#else
546-
#ifndef RELEASE_BUILD
547-
//pDC->SetBkColor(DEFAULT_COLOR_SCHEME.CURSOR);
548-
//pDC->SetTextColor(DEFAULT_COLOR_SCHEME.TEXT_HILITE);
549-
//pDC->TextOut(m_iWinWidth - 110, m_iWinHeight - 20 * Line++, _T("Release build"));
550-
#endif
551545
#endif
552546
#ifdef BENCHMARK
553547

@@ -600,17 +594,12 @@ void CPatternEditor::DrawScreen(CDC *pDC, CFamiTrackerView *pView)
600594
// Display the BETA text
601595
CString Text;
602596
int line = 0;
603-
int offset = m_iWinWidth - 160;
604-
Text.Format(_T("BETA %i (%s)"), VERSION_WIP, __DATE__);
597+
int offset = m_iWinWidth - 200; // // //
598+
Text.Format(_T("Revision %i beta (%s)"), VERSION_REV, __DATE__);
605599
pDC->SetTextColor(0x00FFFF);
606600
pDC->SetBkMode(TRANSPARENT);
607601
pDC->TextOut(offset, m_iWinHeight - 24 - 18 * line++, Text);
608602

609-
#ifndef RELEASE_BUILD
610-
Text.Format(_T("Dev build"));
611-
pDC->TextOut(offset, m_iWinHeight - 24 - 18 * line++, Text);
612-
#endif
613-
614603
#endif
615604

616605
#endif

version.h

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
** FamiTracker - NES/Famicom sound tracker
33
** Copyright (C) 2005-2014 Jonathan Liss
44
**
5-
** 0CC-FamiTracker is (C) 2014-2015 HertzDevil
5+
** 0CC-FamiTracker is (C) 2014-2016 HertzDevil
66
**
77
** This program is free software; you can redistribute it and/or modify
88
** it under the terms of the GNU General Public License as published by
@@ -29,20 +29,9 @@
2929
//#define WIP
3030

3131
// Version info
32-
#define VERSION_MAJ 0
33-
#define VERSION_MIN 3
34-
#define VERSION_REV 14
35-
36-
#define VERSION_WIP 0
37-
38-
#ifdef RELEASE_BUILD
39-
40-
#include "config.h"
41-
#define VERSION VERSION_MAJ,VERSION_MIN,VERSION_REV,SVN_VERSION
42-
43-
#else
44-
45-
#define VERSION VERSION_MAJ,VERSION_MIN,VERSION_REV,VERSION_WIP
46-
47-
#endif /* RELEASE_BUILD */
32+
#define VERSION_API 0
33+
#define VERSION_MAJ 3
34+
#define VERSION_MIN 14
35+
#define VERSION_REV 0
4836

37+
#define VERSION VERSION_API,VERSION_MAJ,VERSION_MIN,VERSION_REV

0 commit comments

Comments
 (0)