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(
4444
4545 // This is just "major.minor.patch" and a "-dev", "-nightly" or similar suffix
4646 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 ( ) ) ;
4849
4950 // remove the suffix, if present and parse into [`ResourceVersion`]
5051 let version = parse_version ( rel_version. split ( "-" ) . next ( ) . unwrap_or ( "0.0.0" ) )
@@ -80,6 +81,13 @@ pub fn compile_windows_resource_file(
8081 res_path
8182}
8283
84+ fn product_name ( channel : String ) -> String {
85+ format ! (
86+ "Rust Compiler{}" ,
87+ if channel == "stable" { "" . to_string( ) } else { format!( " ({})" , channel) }
88+ )
89+ }
90+
8391/// Windows resources store versions as four 16-bit integers.
8492struct ResourceVersion {
8593 major : u16 ,
You can’t perform that action at this time.
0 commit comments