windows: maybe fix CI build

the environment we're using for the dir seems wonky in the CI
build, so try an alternative.
This commit is contained in:
Wez Furlong committed 2020-05-25 15:39:04 -07:00
1 parent 1e373c39c9
commit b8238ac123
1 file changed
+9 -5
+9 -5
View File
@@ -24,11 +24,15 @@ fn main() {
use std::path::Path;
let profile = std::env::var("PROFILE").unwrap();
let exe_output_dir = Path::new("target").join(profile);
let exe_src_dir = Path::new("assets/windows/conhost");
let windows_dir = std::env::current_dir()
.unwrap()
.join("assets")
.join("windows");
let conhost_dir = windows_dir.join("conhost");
for name in &["conpty.dll", "OpenConsole.exe"] {
let dest_name = exe_output_dir.join(name);
let src_name = exe_src_dir.join(name);
let src_name = conhost_dir.join(name);
if !dest_name.exists() {
std::fs::copy(src_name, dest_name).unwrap();
@@ -59,8 +63,8 @@ fn main() {
#include <winres.h>
// This ID is coupled with code in window/src/os/windows/window.rs
#define IDI_ICON 0x101
IDI_ICON ICON "{src}/assets/windows/terminal.ico"
APP_MANIFEST RT_MANIFEST "{src}/assets/windows/manifest.manifest"
IDI_ICON ICON "{win}\terminal.ico"
APP_MANIFEST RT_MANIFEST "{win}\manifest.manifest"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
@@ -90,7 +94,7 @@ BEGIN
END
END
"#,
src = std::env::var("CARGO_MANIFEST_DIR").unwrap(),
win = windows_dir,
version = version,
)
.unwrap();