Add version resource to wslc.exe (#41266)
AmirMS committed
Aug 6, 2026 at 09:28 UTC
9852281bcd68fa47016772a5bdb2fd51ff0809bb
3 files changed
+43
-1
src/windows/wslc/CMakeLists.txt
+1
-1
@@ -25,7 +25,7 @@ set_target_properties(wslclib PROPERTIES FOLDER windows)
25
# Create wslc.exe
26
# N.B. Linking wslclib (OBJECT library) brings both object files and
27
# transitive dependencies. Do not also use $<TARGET_OBJECTS:wslclib>.
28
-add_executable(wslc)
28
+add_executable(wslc main.rc resource.h)
29
30
target_link_libraries(wslc wslclib)
31
src/windows/wslc/main.rc
new
+27
@@ -0,0 +1,27 @@
1
+/*++
2
+
3
+Copyright (c) Microsoft. All rights reserved.
4
+
5
+Module Name:
6
+
7
+ main.rc
8
+
9
+Abstract:
10
+
11
+ This file contains resources for wslc.
12
+
13
+--*/
14
+
15
+#include <windows.h>
16
+#include "resource.h"
17
+#include "wslversioninfo.h"
18
+
19
+#define VER_INTERNALNAME_STR "wslc.exe"
20
+#define VER_ORIGINALFILENAME_STR "wslc.exe"
21
+
22
+#define VER_FILETYPE VFT_APP
23
+#define VER_FILESUBTYPE VFT2_UNKNOWN
24
+#define VER_FILEDESCRIPTION_STR "Windows Subsystem for Linux Container CLI"
25
+ID_ICON ICON PRELOAD DISCARDABLE "..\..\..\Images\wsl.ico"
26
+
27
+#include <common.ver>
src/windows/wslc/resource.h
new
+15
@@ -0,0 +1,15 @@
1
+/*++
2
+
3
+Copyright (c) Microsoft. All rights reserved.
4
+
5
+Module Name:
6
+
7
+ resource.h
8
+
9
+Abstract:
10
+
11
+ This file contains resource declarations for wslc.exe
12
+
13
+--*/
14
+
15
+#define ID_ICON 1