fix build.rs on windows, take 2

refs: https://github.com/wez/wezterm/issues/3390
This commit is contained in:
Wez Furlong committed 2023-03-28 19:45:52 -07:00
1 parent d5e5bf43d1
commit 9fc762a66b
2 files changed
+14 -2

No files matched your search

+7 -1
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);
+7 -1
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);