Skip to content

Commit

Permalink
streamline version updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed Jan 7, 2017
1 parent 24820fb commit 5cee20e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions MUSHclient.cpp
Expand Up @@ -233,7 +233,7 @@ BOOL CMUSHclientApp::InitInstance()

char fullfilename [MAX_PATH];

MUSHCLIENT_VERSION = MUSHCLIENT_BASE_VERSION;
MUSHCLIENT_VERSION = VERSION_STRING;

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

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

if (version < THISVERSION) // THISVERSION is defined at start of this module
if (version < THISVERSION) // THISVERSION is defined in version.h
{

CWelcome1Dlg dlg; // Welcome to this version dialog
Expand Down
9 changes: 5 additions & 4 deletions MUSHclient.rc
@@ -1,6 +1,7 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#include "version.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -75,8 +76,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,0,5,0
PRODUCTVERSION 5,0,5,0
FILEVERSION VERSION_16WORDS
PRODUCTVERSION VERSION_16WORDS
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -94,14 +95,14 @@ BEGIN
VALUE "Comments", "MUSHclient - a client program for playing MUD games\0"
VALUE "CompanyName", "Nick Gammon\0"
VALUE "FileDescription", "MUSHclient\0"
VALUE "FileVersion", "5.05\0"
VALUE "FileVersion", VERSION_STRING
VALUE "InternalName", "MUSHCLIENT\0"
VALUE "LegalCopyright", "Copyright � 2016 Nick Gammon\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "MUSHCLIENT.EXE\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "MUSHclient\0"
VALUE "ProductVersion", "5.05\0"
VALUE "ProductVersion", VERSION_STRING
VALUE "SpecialBuild", "\0"
END
END
Expand Down
3 changes: 2 additions & 1 deletion MUSHclient.vcxproj
Expand Up @@ -177,7 +177,7 @@
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="CHATSOCK.CPP">
<ClCompile Include="chatsock.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
Expand Down Expand Up @@ -1429,6 +1429,7 @@
<ClInclude Include="luacom\tLuaVector.h" />
<ClInclude Include="luacom\tStringBuffer.h" />
<ClInclude Include="luacom\tUtil.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<None Include="res\cursor1.cur" />
Expand Down
14 changes: 2 additions & 12 deletions doc.h
Expand Up @@ -14,20 +14,10 @@
#include "paneline.h"
#include "miniwindow.h"
#include "plugins.h"
#include "version.h"

#define COMPRESS_BUFFER_LENGTH 1024 // size of decompression buffer

// ============================================================================

// New versions - things to change

#define THISVERSION 505 // Step 1.
const CString MUSHCLIENT_BASE_VERSION = "5.05"; // Step 2.

extern CString MUSHCLIENT_VERSION; // will have "-pre" appended by automatic builds

// Step 3. Don't forget VERSION resource in Resources tab
// Step 4. Remember: README.TXT
extern CString MUSHCLIENT_VERSION;

// ============================================================================

Expand Down
6 changes: 6 additions & 0 deletions version.h
@@ -0,0 +1,6 @@
#define THISVERSION 505
#define VERSION_16WORDS 5,0,5,0
#define VERSION_STRING "5.05"

// remember README

0 comments on commit 5cee20e

Please sign in to comment.