Add Windows version resource to avrdude project

This commit is contained in:
Marius Greuel
2020-10-06 21:04:13 +02:00
parent 37aeb31e53
commit 283da3fafa
7 changed files with 197 additions and 18 deletions

BIN
msvc/avrdude.rc Normal file

Binary file not shown.

16
msvc/res/resource.rc2 Normal file
View File

@@ -0,0 +1,16 @@
//
// resource.rc2
// Copyright (C) 2020 Marius Greuel. All rights reserved.
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
#pragma code_page(1252)
//////////////////////////////////////////////////////////////////////////// Version
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#include "version.rc2"

102
msvc/res/version.rc2 Normal file
View File

@@ -0,0 +1,102 @@
//
// Version.rc2
// Copyright (C) 2020 Marius Greuel. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////
#include "..\version.h"
#define _STR(s) #s
#define _VER_STR(a, b, c, d) _STR(a) "." _STR(b) "." _STR(c) "." _STR(d)
#ifndef VER_FILEVERSION
#define VER_FILEVERSION VER_MAJOR,VER_MINOR,VER_BUILD,VER_REVISION
#endif
#ifndef VER_FILEVERSION_STR
#define VER_FILEVERSION_STR _VER_STR(VER_MAJOR, VER_MINOR, VER_BUILD, VER_REVISION)
#endif
#ifndef VER_PRODUCTVERSION
#define VER_PRODUCTVERSION VER_FILEVERSION
#endif
#ifndef VER_PRODUCTVERSION_STR
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
#endif
#ifndef VER_COMPANYNAME_STR
#define VER_COMPANYNAME_STR "Marius Greuel"
#endif
#ifndef VER_FILEDESCRIPTION_STR
#define VER_FILEDESCRIPTION_STR "AVRDUDE"
#endif
#ifndef VER_PRODUCTNAME_STR
#define VER_PRODUCTNAME_STR "AVRDUDE"
#endif
#ifndef VER_INTERNALNAME_STR
#define VER_INTERNALNAME_STR "avrdude.exe"
#endif
#ifndef VER_LEGALCOPYRIGHT_STR
#define VER_LEGALCOPYRIGHT_STR "\251 2020 The AVRDUDE authors."
#endif
#ifndef VER_ORIGINALFILENAME_STR
#define VER_ORIGINALFILENAME_STR VER_INTERNALNAME_STR
#endif
#ifndef VER_FILETYPE
#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE 0
#endif
#ifdef RC_INVOKED
#ifdef DEBUG
#define VER_DEBUG VS_FF_DEBUG
#else
#define VER_DEBUG 0
#endif
#define VER_FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#define VER_FILEOS VOS__WINDOWS32
#define VER_FILEFLAGS (VER_DEBUG)
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK VER_FILEFLAGSMASK
FILEFLAGS VER_FILEFLAGS
FILEOS VER_FILEOS
FILETYPE VER_FILETYPE
FILESUBTYPE VER_FILESUBTYPE
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" // LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP
BEGIN
#ifdef VER_COMMENTS_STR
VALUE "Comments", VER_COMMENTS_STR
#endif
VALUE "CompanyName", VER_COMPANYNAME_STR
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200 //LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP
END
END
#endif // RC_INVOKED

BIN
msvc/resource.h Normal file

Binary file not shown.

14
msvc/version.h Normal file
View File

@@ -0,0 +1,14 @@
//
// version.h
// Copyright (C) 2020 Marius Greuel. All rights reserved.
//
#define PRD_MAJOR 6
#define PRD_MINOR 3
#define PRD_BUILD 1
#define PRD_REVISION 0
#define VER_MAJOR PRD_MAJOR
#define VER_MINOR PRD_MINOR
#define VER_BUILD PRD_BUILD
#define VER_REVISION PRD_REVISION