Skip to content

Commit 5cee20e

Browse files
committed
streamline version updates
1 parent 24820fb commit 5cee20e

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

MUSHclient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ BOOL CMUSHclientApp::InitInstance()
233233

234234
char fullfilename [MAX_PATH];
235235

236-
MUSHCLIENT_VERSION = MUSHCLIENT_BASE_VERSION;
236+
MUSHCLIENT_VERSION = VERSION_STRING;
237237

238238
#if _MSC_VER == 1900 // 1200 for Visual Studio 6, 1900 for MSVC 2015
239239
MUSHCLIENT_VERSION += "-pre";
@@ -843,7 +843,7 @@ BOOL CMUSHclientApp::InitInstance()
843843

844844
version = db_get_int ("control", "Version", 0);
845845

846-
if (version < THISVERSION) // THISVERSION is defined at start of this module
846+
if (version < THISVERSION) // THISVERSION is defined in version.h
847847
{
848848

849849
CWelcome1Dlg dlg; // Welcome to this version dialog

MUSHclient.rc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//Microsoft Developer Studio generated resource script.
22
//
33
#include "resource.h"
4+
#include "version.h"
45

56
#define APSTUDIO_READONLY_SYMBOLS
67
/////////////////////////////////////////////////////////////////////////////
@@ -75,8 +76,8 @@ END
7576
//
7677

7778
VS_VERSION_INFO VERSIONINFO
78-
FILEVERSION 5,0,5,0
79-
PRODUCTVERSION 5,0,5,0
79+
FILEVERSION VERSION_16WORDS
80+
PRODUCTVERSION VERSION_16WORDS
8081
FILEFLAGSMASK 0x3fL
8182
#ifdef _DEBUG
8283
FILEFLAGS 0x1L
@@ -94,14 +95,14 @@ BEGIN
9495
VALUE "Comments", "MUSHclient - a client program for playing MUD games\0"
9596
VALUE "CompanyName", "Nick Gammon\0"
9697
VALUE "FileDescription", "MUSHclient\0"
97-
VALUE "FileVersion", "5.05\0"
98+
VALUE "FileVersion", VERSION_STRING
9899
VALUE "InternalName", "MUSHCLIENT\0"
99100
VALUE "LegalCopyright", "Copyright � 2016 Nick Gammon\0"
100101
VALUE "LegalTrademarks", "\0"
101102
VALUE "OriginalFilename", "MUSHCLIENT.EXE\0"
102103
VALUE "PrivateBuild", "\0"
103104
VALUE "ProductName", "MUSHclient\0"
104-
VALUE "ProductVersion", "5.05\0"
105+
VALUE "ProductVersion", VERSION_STRING
105106
VALUE "SpecialBuild", "\0"
106107
END
107108
END

MUSHclient.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
178178
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
179179
</ClCompile>
180-
<ClCompile Include="CHATSOCK.CPP">
180+
<ClCompile Include="chatsock.cpp">
181181
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
182182
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
183183
</ClCompile>
@@ -1429,6 +1429,7 @@
14291429
<ClInclude Include="luacom\tLuaVector.h" />
14301430
<ClInclude Include="luacom\tStringBuffer.h" />
14311431
<ClInclude Include="luacom\tUtil.h" />
1432+
<ClInclude Include="version.h" />
14321433
</ItemGroup>
14331434
<ItemGroup>
14341435
<None Include="res\cursor1.cur" />

doc.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,10 @@
1414
#include "paneline.h"
1515
#include "miniwindow.h"
1616
#include "plugins.h"
17+
#include "version.h"
1718

1819
#define COMPRESS_BUFFER_LENGTH 1024 // size of decompression buffer
19-
20-
// ============================================================================
21-
22-
// New versions - things to change
23-
24-
#define THISVERSION 505 // Step 1.
25-
const CString MUSHCLIENT_BASE_VERSION = "5.05"; // Step 2.
26-
27-
extern CString MUSHCLIENT_VERSION; // will have "-pre" appended by automatic builds
28-
29-
// Step 3. Don't forget VERSION resource in Resources tab
30-
// Step 4. Remember: README.TXT
20+
extern CString MUSHCLIENT_VERSION;
3121

3222
// ============================================================================
3323

version.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#define THISVERSION 505
2+
#define VERSION_16WORDS 5,0,5,0
3+
#define VERSION_STRING "5.05"
4+
5+
// remember README
6+

0 commit comments

Comments
 (0)