Skip to content

Commit e18c2b3

Browse files
committed
Add version info to EXEs and MUIs
1 parent 17c2490 commit e18c2b3

5 files changed

Lines changed: 67 additions & 14 deletions

File tree

config/OpenWithExConfig.vcxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
<GenerateDebugInformation>true</GenerateDebugInformation>
100100
<AdditionalManifestDependencies>"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'";%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
101101
</Link>
102+
<ResourceCompile>
103+
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
104+
</ResourceCompile>
102105
</ItemDefinitionGroup>
103106
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
104107
<ClCompile>
@@ -117,6 +120,9 @@
117120
<GenerateDebugInformation>true</GenerateDebugInformation>
118121
<AdditionalManifestDependencies>"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'";%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
119122
</Link>
123+
<ResourceCompile>
124+
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
125+
</ResourceCompile>
120126
</ItemDefinitionGroup>
121127
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
122128
<ClCompile>
@@ -131,6 +137,9 @@
131137
<GenerateDebugInformation>true</GenerateDebugInformation>
132138
<AdditionalManifestDependencies>"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'";%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
133139
</Link>
140+
<ResourceCompile>
141+
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
142+
</ResourceCompile>
134143
</ItemDefinitionGroup>
135144
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
136145
<ClCompile>
@@ -149,6 +158,9 @@
149158
<GenerateDebugInformation>true</GenerateDebugInformation>
150159
<AdditionalManifestDependencies>"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'";%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
151160
</Link>
161+
<ResourceCompile>
162+
<AdditionalIncludeDirectories>..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
163+
</ResourceCompile>
152164
</ItemDefinitionGroup>
153165
<ItemGroup>
154166
<ClCompile Include="openwithexconfig.cpp" />

config/openwithexconfig.rc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <windows.h>
22
#include "resource.h"
3+
#include "openwithex.h"
34

45
IDI_OPENWITHEXCONFIG ICON "res\\OpenWithExConfig.ico"
56

@@ -14,3 +15,20 @@ FONT 8, "MS Shell Dlg"
1415
PUSHBUTTON "Cancel", IDCANCEL, 86, 70, 50, 14
1516
PUSHBUTTON "&Apply", IDD_APPLY, 140, 70, 50, 14
1617
}
18+
19+
#include <ntverp.h>
20+
#define VER_FILETYPE VFT_APP
21+
#define VER_FILESUBTYPE VFT_UNKNOWN
22+
#undef VER_COMPANYNAME_STR
23+
#define VER_COMPANYNAME_STR "aubymori"
24+
#undef VER_PRODUCTNAME_STR
25+
#define VER_PRODUCTNAME_STR "OpenWithEx Configurator"
26+
#define VER_FILEDESCRIPTION_STR "OpenWithEx Configurator"
27+
#define VER_INTERNALNAME_STR "OpenWithExConfig"
28+
#define VER_LEGALCOPYRIGHT_YEARS "2025"
29+
#define VER_ORIGINALFILENAME_STR "OpenWithExConfig.exe"
30+
#undef VER_PRODUCTVERSION
31+
#define VER_PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_REVISION,0
32+
#undef VER_PRODUCTVERSION_STR
33+
#define VER_PRODUCTVERSION_STR VER_STRING
34+
#include <common.ver>

src/muiconfig.xml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<localization>
2-
<resources>
3-
<win32Resources fileType="Application">
4-
<neutralResources>
5-
</neutralResources>
6-
<localizedResources>
7-
<!-- RT_DIALOG -->
8-
<resourceType typeNameId="#5"/>
9-
<!-- RT_STRING -->
10-
<resourceType typeNameId="#6"/>
11-
</localizedResources>
12-
</win32Resources>
13-
</resources>
2+
<resources>
3+
<win32Resources fileType="Application">
4+
<neutralResources>
5+
<!-- RT_VERSION -->
6+
<resourceType typeNameId="#16"/>
7+
</neutralResources>
8+
<localizedResources>
9+
<!-- RT_DIALOG -->
10+
<resourceType typeNameId="#5"/>
11+
<!-- RT_STRING -->
12+
<resourceType typeNameId="#6"/>
13+
<!-- RT_VERSION -->
14+
<resourceType typeNameId="#16"/>
15+
</localizedResources>
16+
</win32Resources>
17+
</resources>
1418
</localization>

src/openwithex.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
#include <shobjidl.h>
66
#include "util.h"
77

8-
/* Uncomment to build with XP-style dialogs */
9-
//#define XP
8+
#define VER_MAJOR 1
9+
#define VER_MINOR 0
10+
#define VER_REVISION 0
11+
#define VER_STRING "1.0.0"
1012

1113
extern HMODULE g_hAppInstance;
1214
extern HMODULE g_hInst;

src/openwithex.rc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
and as such, when shown in the taskbar, had its icon. */
55
IDI_OPENWITH ICON "res/OpenWithEx.ico"
66

7+
#include <ntverp.h>
8+
#define VER_FILETYPE VFT_APP
9+
#define VER_FILESUBTYPE VFT_UNKNOWN
10+
#undef VER_COMPANYNAME_STR
11+
#define VER_COMPANYNAME_STR "aubymori"
12+
#undef VER_PRODUCTNAME_STR
13+
#define VER_PRODUCTNAME_STR "OpenWithEx"
14+
#define VER_FILEDESCRIPTION_STR "OpenWithEx"
15+
#define VER_INTERNALNAME_STR "OpenWithEx"
16+
#define VER_LEGALCOPYRIGHT_YEARS "2025"
17+
#define VER_ORIGINALFILENAME_STR "OpenWithEx.exe"
18+
#undef VER_PRODUCTVERSION
19+
#define VER_PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_REVISION,0
20+
#undef VER_PRODUCTVERSION_STR
21+
#define VER_PRODUCTVERSION_STR VER_STRING
22+
#include <common.ver>
23+
724
/**
825
* !!! DON'T INCLUDE OTHER LOCALES HERE !!!
926
* For whatever reason, if you compile an RC file with resources

0 commit comments

Comments
 (0)