1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-03 04:34:21 -05:00
alacritty/winpty/build.rs
Zac Pullar-Strecker 15e0deae2b Add support for Windows (#1374)
Initial support for Windows is implemented using the winpty translation
layer. Clipboard support for Windows is provided through the `clipboard`
crate, and font rasterization is provided by RustType.

The tty.rs file has been split into OS-specific files to separate
standard pty handling from the winpty implementation.

Several binary components are fetched via build script on windows
including libclang and winpty. These could be integrated more directly
in the future either by building those dependencies as part of the
Alacritty build process or by leveraging git lfs to store the artifacts.

Fixes #28.
2018-10-16 10:02:52 -07:00

12 lines
494 B
Rust

use std::fs::copy;
use std::path::Path;
fn main() {
// The working directory for `cargo test` is in the deps folder, not the debug/release root
if cfg!(test) && Path::new("target").exists() {
#[cfg(debug_assertions)]
copy("../assets/windows/x86_64/winpty-agent.exe", "target/debug/deps/winpty-agent.exe").unwrap();
#[cfg(not(debug_assertions))]
copy("../assets/windows/x86_64/winpty-agent.exe", "target/release/deps/winpty-agent.exe").unwrap();
}
}