Refactorized resource files:

- Stored global information about cppcheck version and copyright string in a single resource.h file.
- Use macros of windows.h instead of numeric values for filetype, etc.
- Added versioninfo metadata to lib (#4275)
- Removed VS resource editor code from resource files - these files shouldn't be modified with it to avoid information loss
- Renamed files to version.h/rc
- Encoded files as ANSI again - use escape sequences for unicode characters in literals (#4281)
This commit is contained in:
PKEuS 2012-10-14 10:21:22 +02:00
parent 8324de1dc0
commit fc53b15fa4
11 changed files with 86 additions and 23 deletions

View File

@ -27,8 +27,8 @@ HEADERS += cppcheckexecutor.h \
threadexecutor.h
win32 {
RC_FILE = cppcheck.rc
HEADERS += resource.h
RC_FILE = version.rc
HEADERS += ../lib/version.h
}
# Enable STL checking in GCC debug builds

View File

@ -354,7 +354,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="cppcheck.rc" />
<ResourceCompile Include="version.rc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\externals\tinyxml\tinystr.h" />
@ -364,7 +364,6 @@
<ClInclude Include="cppcheckexecutor.h" />
<ClInclude Include="filelister.h" />
<ClInclude Include="pathmatch.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="threadexecutor.h" />
</ItemGroup>
<ItemGroup>

View File

@ -32,9 +32,6 @@
<ClInclude Include="pathmatch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\externals\tinyxml\tinystr.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -75,7 +72,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="cppcheck.rc">
<ResourceCompile Include="version.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>

Binary file not shown.

View File

@ -1,14 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by cppcheck.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

34
cli/version.rc Normal file
View File

@ -0,0 +1,34 @@
#include "..\lib\version.h"
#include "winresrc.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION CPPCHECK_VERSION
PRODUCTVERSION CPPCHECK_VERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS (0x1L|VS_FF_PRERELEASE)
#else
FILEFLAGS (0x0L|VS_FF_PRERELEASE)
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "cppcheck Application"
VALUE "FileVersion", CPPCHECK_VERSION_STRING
VALUE "InternalName", "cppcheck"
VALUE "LegalCopyright", LEGALCOPYRIGHT
VALUE "OriginalFilename", "cppcheck.exe"
VALUE "ProductName", "cppcheck Application"
VALUE "ProductVersion", CPPCHECK_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

Binary file not shown.

View File

@ -107,6 +107,10 @@
<ClInclude Include="token.h" />
<ClInclude Include="tokenize.h" />
<ClInclude Include="tokenlist.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C183DB5B-AD6C-423D-80CA-1F9549555A1A}</ProjectGuid>

View File

@ -223,5 +223,11 @@
<ClInclude Include="checkleakautovar.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc" />
</ItemGroup>
</Project>

3
lib/version.h Normal file
View File

@ -0,0 +1,3 @@
#define CPPCHECK_VERSION_STRING "1.57 dev"
#define CPPCHECK_VERSION 0,0,0,0
#define LEGALCOPYRIGHT "Copyright (C) 2007-2012 Daniel Marjam\xE4ki and Cppcheck team."

34
lib/version.rc Normal file
View File

@ -0,0 +1,34 @@
#include "version.h"
#include "winresrc.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION CPPCHECK_VERSION
PRODUCTVERSION CPPCHECK_VERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS (0x1L|VS_FF_PRERELEASE)
#else
FILEFLAGS (0x0L|VS_FF_PRERELEASE)
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "cppcheck core library"
VALUE "FileVersion", CPPCHECK_VERSION_STRING
VALUE "InternalName", "cppcheck"
VALUE "LegalCopyright", LEGALCOPYRIGHT
VALUE "OriginalFilename", "cppcheck.exe"
VALUE "ProductName", "cppcheck core library"
VALUE "ProductVersion", CPPCHECK_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END