File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
compiler/rustc_windows_rc/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ pub fn compile_windows_resource_file(
44
44
45
45
// This is just "major.minor.patch" and a "-dev", "-nightly" or similar suffix
46
46
let rel_version = env:: var ( "CFG_RELEASE" ) . unwrap ( ) ;
47
- let product_name = format ! ( "Rust {}" , & rel_version) ;
47
+
48
+ let product_name = product_name ( env:: var ( "CFG_RELEASE_CHANNEL" ) . unwrap ( ) ) ;
48
49
49
50
// remove the suffix, if present and parse into [`ResourceVersion`]
50
51
let version = parse_version ( rel_version. split ( "-" ) . next ( ) . unwrap_or ( "0.0.0" ) )
@@ -80,6 +81,13 @@ pub fn compile_windows_resource_file(
80
81
res_path
81
82
}
82
83
84
+ fn product_name ( channel : String ) -> String {
85
+ format ! (
86
+ "Rust Compiler{}" ,
87
+ if channel == "stable" { "" . to_string( ) } else { format!( " ({})" , channel) }
88
+ )
89
+ }
90
+
83
91
/// Windows resources store versions as four 16-bit integers.
84
92
struct ResourceVersion {
85
93
major : u16 ,
You can’t perform that action at this time.
0 commit comments