Skip to content

Commit c651970

Browse files
committed
Added resource version info to all executable files
`FileVersion` and `ProductVersion` fields are automatically updated using the current build version `LegalCopyright` period is automatically extended to the current year
1 parent b29e52c commit c651970

File tree

19 files changed

+438
-3
lines changed

19 files changed

+438
-3
lines changed

Contrib/MakeLangId/SConscript

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ libs = Split("""
1818
comctl32
1919
""")
2020

21+
Import('env WriteResourceVersion')
22+
WriteResourceVersion('resource.rc', env['VER_MAJOR'], env['VER_MINOR'], env['VER_REVISION'], env['VER_BUILD'])
23+
2124
Import('BuildUtil')
2225

2326
BuildUtil(target, files, libs, res = res, resources = resources, entry = 'NSISWinMainNOCRT', nodeflib = True)

Contrib/MakeLangId/resource.rc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,44 @@ END
8585
1 RT_MANIFEST "MakeLangId.xml"
8686

8787

88+
/////////////////////////////////////////////////////////////////////////////
89+
//
90+
// Version
91+
//
92+
93+
VS_VERSION_INFO VERSIONINFO
94+
FILEVERSION 1,0,0,0
95+
PRODUCTVERSION 1,0,0,0
96+
FILEFLAGSMASK 0x17L
97+
#ifdef _DEBUG
98+
FILEFLAGS 0x1L
99+
#else
100+
FILEFLAGS 0x0L
101+
#endif
102+
FILEOS 0x4L
103+
FILETYPE 0x1L
104+
FILESUBTYPE 0x0L
105+
BEGIN
106+
BLOCK "StringFileInfo"
107+
BEGIN
108+
BLOCK "040904b0"
109+
BEGIN
110+
VALUE "CompanyName", "NSIS Project"
111+
VALUE "FileDescription", "MakeLangID"
112+
VALUE "FileVersion", "1.0.0.0"
113+
VALUE "LegalCopyright", "(C)1999-2025 Nullsoft and Contributors"
114+
VALUE "OriginalFilename", "MakeLangId.exe"
115+
VALUE "ProductName", "NSIS"
116+
VALUE "ProductVersion", "1.0.0.0"
117+
END
118+
END
119+
BLOCK "VarFileInfo"
120+
BEGIN
121+
VALUE "Translation", 0x409, 1200
122+
END
123+
END
124+
125+
88126
/////////////////////////////////////////////////////////////////////////////
89127
//
90128
// DESIGNINFO

Contrib/Makensisw/SConscript

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ docs = Split("""
5151
Readme.txt
5252
""")
5353

54+
Import('env WriteResourceVersion')
55+
WriteResourceVersion('resource.rc', env['VER_MAJOR'], env['VER_MINOR'], env['VER_REVISION'], env['VER_BUILD'])
56+
5457
Import('BuildUtil')
5558

5659
BuildUtil(

Contrib/Makensisw/resource.rc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,43 @@ BEGIN
399399
IDS_LZMA_SOLID "LZMA (solid)"
400400
END
401401

402+
/////////////////////////////////////////////////////////////////////////////
403+
//
404+
// Version
405+
//
406+
407+
VS_VERSION_INFO VERSIONINFO
408+
FILEVERSION 1,0,0,0
409+
PRODUCTVERSION 1,0,0,0
410+
FILEFLAGSMASK 0x17L
411+
#ifdef _DEBUG
412+
FILEFLAGS 0x1L
413+
#else
414+
FILEFLAGS 0x0L
415+
#endif
416+
FILEOS 0x4L
417+
FILETYPE 0x1L
418+
FILESUBTYPE 0x0L
419+
BEGIN
420+
BLOCK "StringFileInfo"
421+
BEGIN
422+
BLOCK "040904b0"
423+
BEGIN
424+
VALUE "CompanyName", "NSIS"
425+
VALUE "FileDescription", "NSIS Compiler Interface"
426+
VALUE "FileVersion", "1.0.0.0"
427+
VALUE "LegalCopyright", "(C)1999-2025 Nullsoft and Contributors"
428+
VALUE "OriginalFilename", "makensisw.exe"
429+
VALUE "ProductName", "NSIS"
430+
VALUE "ProductVersion", "1.0.0.0"
431+
END
432+
END
433+
BLOCK "VarFileInfo"
434+
BEGIN
435+
VALUE "Translation", 0x409, 1200
436+
END
437+
END
438+
402439
#endif // English (U.S.) resources
403440
/////////////////////////////////////////////////////////////////////////////
404441

Contrib/SubStart/SConscript

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,25 @@ files = Split("""
66
substart.c
77
""")
88

9+
res = Split("""
10+
resource.rc
11+
""")
12+
13+
resources = Split("""
14+
manifest.xml
15+
""")
16+
917
libs = Split("""
1018
kernel32
1119
user32
1220
""")
1321

22+
Import('env WriteResourceVersion')
23+
WriteResourceVersion('resource.rc', env['VER_MAJOR'], env['VER_MINOR'], env['VER_REVISION'], env['VER_BUILD'])
24+
1425
Import('BuildUtil')
1526

16-
substart = BuildUtil(target, files, libs, cli = True, noinstall = True, nodeflib = True)
27+
substart = BuildUtil(target, files, libs, res = res, resources = resources, cli = True, noinstall = True, nodeflib = True)
1728

1829
if env['PLATFORM'] == 'win32':
1930
env.DistributeBin(substart, names=['makensis.exe'], alias='install-compiler') # install as makensis

Contrib/SubStart/manifest.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
4+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
5+
<application>
6+
<!-- Windows 10 -->
7+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
8+
<!-- Windows 8.1 -->
9+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
10+
<!-- Windows 8 -->
11+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
12+
<!-- Windows 7 -->
13+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
14+
<!-- Windows Vista -->
15+
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
16+
</application>
17+
</compatibility>
18+
19+
</assembly>

Contrib/SubStart/resource.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//{{NO_DEPENDENCIES}}
2+
// Used by resource.rc
3+
4+
#define IDR_MANIFEST 1
5+
6+
// Next default values for new objects
7+
//
8+
#ifdef APSTUDIO_INVOKED
9+
#ifndef APSTUDIO_READONLY_SYMBOLS
10+
#define _APS_NEXT_RESOURCE_VALUE 100
11+
#define _APS_NEXT_COMMAND_VALUE 40000
12+
#define _APS_NEXT_CONTROL_VALUE 1000
13+
#define _APS_NEXT_SYMED_VALUE 100
14+
#endif
15+
#endif

Contrib/SubStart/resource.rc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#include "resource.h"
2+
#include <windows.h>
3+
4+
/////////////////////////////////////////////////////////////////////////////
5+
// English (U.S.) resources
6+
7+
#ifdef _WIN32
8+
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
9+
#pragma code_page(1252)
10+
#endif
11+
12+
/////////////////////////////////////////////////////////////////////////////
13+
//
14+
// RT_MANIFEST
15+
//
16+
17+
1 RT_MANIFEST "manifest.xml"
18+
19+
20+
/////////////////////////////////////////////////////////////////////////////
21+
//
22+
// Version
23+
//
24+
25+
VS_VERSION_INFO VERSIONINFO
26+
FILEVERSION 1,0,0,0
27+
PRODUCTVERSION 1,0,0,0
28+
FILEFLAGSMASK 0x17L
29+
#ifdef _DEBUG
30+
FILEFLAGS 0x1L
31+
#else
32+
FILEFLAGS 0x0L
33+
#endif
34+
FILEOS 0x4L
35+
FILETYPE 0x1L
36+
FILESUBTYPE 0x0L
37+
BEGIN
38+
BLOCK "StringFileInfo"
39+
BEGIN
40+
BLOCK "040904b0"
41+
BEGIN
42+
VALUE "CompanyName", "NSIS Project"
43+
VALUE "FileDescription", "NSIS Compiler Launcher"
44+
VALUE "FileVersion", "1.0.0.0"
45+
VALUE "LegalCopyright", "(C)1999-2025 Nullsoft and Contributors"
46+
VALUE "OriginalFilename", "makensis.exe"
47+
VALUE "ProductName", "NSIS"
48+
VALUE "ProductVersion", "1.0.0.0"
49+
END
50+
END
51+
BLOCK "VarFileInfo"
52+
BEGIN
53+
VALUE "Translation", 0x409, 1200
54+
END
55+
END

Contrib/VPatch/Source/GenPat/SConscript

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,21 @@ files = Split("""
1212
POSIXUtil.cpp
1313
""")
1414

15+
res = Split("""
16+
resource.rc
17+
""")
18+
19+
resources = Split("""
20+
manifest.xml
21+
""")
22+
1523
libs = Split("""
1624
z
1725
""")
1826

27+
Import('env WriteResourceVersion')
28+
WriteResourceVersion('resource.rc', env['VER_MAJOR'], env['VER_MINOR'], env['VER_REVISION'], env['VER_BUILD'])
29+
1930
Import('BuildUtil')
2031

21-
BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True, cli = True)
32+
BuildUtil(target, files, libs, res = res, resources = resources, flags = ['$EXCEPTION_FLAG'], cross_platform = True, cli = True)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
4+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
5+
<application>
6+
<!-- Windows 10 -->
7+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
8+
<!-- Windows 8.1 -->
9+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
10+
<!-- Windows 8 -->
11+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
12+
<!-- Windows 7 -->
13+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
14+
<!-- Windows Vista -->
15+
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
16+
</application>
17+
</compatibility>
18+
19+
</assembly>

0 commit comments

Comments
 (0)