Version Control
Links:
- CsSetVerInfo - Tool for maintaining version information for ConSys projects.
- CsVerDoc - Tool for generating Web page based on information created by CsSetVerInfo
Overview:
All source code in the ConSys project is under version control. Up to September 2008, Ragnarok was used for revision control. From September 2008 we are using Subversion. The CollabNet Subversion server is used on the server, and TortoiseSVN on clients.
The ConSys program version numbers includes the SVN version numbers. The version numbers contain four numbers in the format:
X.X.X.X
1' number: ConSys major version only changed in case of a major change in the ConSys project.
2' number: ConSys minor version. This number is incremented by one for every ConSys release. The ConSys install scripts are denoted by this number.
3' number: The SubVersion version number.
4' number: The application/library (Ragnarok component) version number.
Maintaining the version numbers
The application/library version numbers are defined in header files included into the programs. The 3' version number are automatically updated by hook scripts to TortoiseSVN on commit and update. The 4' version is updated by CsSetVerInfo when the version number is incremented. The 1' and 2' ConSys version number must be updated manually for each release version before check in of the ConSys project.
Installation of TortoiseSVN (ver. 1.5.2) on client computers:
After installation of TortoiseSVN, create a working directory and Update to newest version of code. Before doing more, change settings as described in 'TortoiseConfiguration.txt' found in the root of the working directory.
Version definition in the rc2 file
Example from the Console component - substitute 'Console' with your project name:
#include "ConsoleVersion.h"
#include "..\..\ConSysVersion.h"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION ConSys_MAJOR_VERSION,ConSys_MINOR_VERSION,ConSys_ROOT_VERSION,Console_VERSION
PRODUCTVERSION ConSys_MAJOR_VERSION,ConSys_MINOR_VERSION,ConSys_ROOT_VERSION,Console_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", "ISA\0"
VALUE "FileDescription", "CONSOLE MFC Application\0"
VALUE "FileVersion", ConSys_VERSION_STR "." Console_VERSION_STR "\0"
VALUE "InternalName", "$Id: Console.rc2 1.2 1998/07/02 07:39:54 tw Exp $\0"
VALUE "LegalCopyright", "ISA © 1998\0"
VALUE "OriginalFilename", "CONSOLE.EXE\0"
VALUE "ProductName", "CONSOLE Application\0"
VALUE "ProductVersion", ConSys_VERSION_STR "." Console_VERSION_STR "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
Version information in the About dialog
Example from the Console component:
Create an about dialog box with a static text box. Create a member variable m_version for this static using the class wizard. Change the code according to the following;
CAboutDialog::CAboutDialog(CWnd* pParent /*=NULL*/) : CDialog(CAboutDialog::IDD, pParent) { //{{AFX_DATA_INIT(CAboutDialog) m_version = _T(""); //}}AFX_DATA_INIT DWORDLONG ver = CLibrary::FileVersion(_T("Console.exe")); m_version.Format("Console version : %d.%d.%d.%d", (UINT)((ver >> 48) & 0xFFFF), (UINT)((ver >> 32) & 0xFFFF), (UINT)((ver >> 16) & 0xFFFF), (UINT)((ver >> 0) & 0xFFFF) ); } void CAboutDialog::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAboutDialog) DDX_Text(pDX, IDC_CONSOLEVERSION, m_version); //}}AFX_DATA_MAP }
Last Modified 14 January 2019