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:
parent
d5e5bf43d1
commit
9fc762a66b
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user