mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-19 11:04:06 +00:00
Fix Windows builds from non-ASCII checkout paths (#64947)
## Summary Closes #64945. Add UTF-8 header to `rc_content` which is passed to rc.exe as args. ## Testing Before this change: build failed with `thread 'main' (7344) panicked at crates\windows_resources\src\windows_resources.rs:122:10: called `Result::unwrap()` on an `Err` value: Failed("RC.EXE failed to compile specified resource file")` Alfter this change: build success. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - N/A Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
This commit is contained in:
parent
0f9c923e67
commit
263fb11177
1 changed files with 7 additions and 1 deletions
|
|
@ -73,8 +73,14 @@ pub fn compile(manifest: bool) -> Result<(), Box<dyn std::error::Error>> {
|
|||
version_parts.next().unwrap_or(0),
|
||||
);
|
||||
|
||||
// The resource paths can contain non-ASCII characters (e.g. when the
|
||||
// repository lives under a path with such characters). Rust Strings are
|
||||
// encoded using UTF-8, but rc.exe decodes the .rc file using the ANSI code
|
||||
// page by default, which mangles those paths and makes it fail to find the
|
||||
// referenced files, so specify UTF-8 decoding.
|
||||
let rc_content = format!(
|
||||
r#"1 ICON "{icon_escaped}"
|
||||
r#"#pragma code_page(65001)
|
||||
1 ICON "{icon_escaped}"
|
||||
{manifest_line}
|
||||
|
||||
1 VERSIONINFO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue