1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 04:56:12 +03:00

fix build.rs on windows, take 2

refs: https://github.com/wez/wezterm/issues/3390
This commit is contained in:
Wez Furlong 2023-03-28 19:45:52 -07:00
parent d5e5bf43d1
commit 9fc762a66b
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 14 additions and 2 deletions

View File

@ -5,6 +5,13 @@ fn main() {
{
use std::io::Write;
use std::path::Path;
let repo_dir = std::env::current_dir()
.ok()
.and_then(|cwd| cwd.parent().map(|p| p.to_path_buf()))
.unwrap();
let windows_dir = repo_dir.join("assets").join("windows");
let rcfile_name = Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("resource.rc");
let mut rcfile = std::fs::File::create(&rcfile_name).unwrap();
write!(
@ -14,7 +21,6 @@ fn main() {
1 RT_MANIFEST "{win}\\console.manifest"
"#,
win = windows_dir.display().to_string().replace("\\", "\\\\"),
version = version,
)
.unwrap();
drop(rcfile);

View File

@ -5,6 +5,13 @@ fn main() {
{
use std::io::Write;
use std::path::Path;
let repo_dir = std::env::current_dir()
.ok()
.and_then(|cwd| cwd.parent().map(|p| p.to_path_buf()))
.unwrap();
let windows_dir = repo_dir.join("assets").join("windows");
let rcfile_name = Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("resource.rc");
let mut rcfile = std::fs::File::create(&rcfile_name).unwrap();
write!(
@ -14,7 +21,6 @@ fn main() {
1 RT_MANIFEST "{win}\\console.manifest"
"#,
win = windows_dir.display().to_string().replace("\\", "\\\\"),
version = version,
)
.unwrap();
drop(rcfile);