feat: add wintun.dll by default

This commit is contained in:
GyDi 2022-03-18 11:49:00 +08:00 committed by GitHub
parent ef314c1707
commit 7074bbc405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,4 +87,14 @@ pub fn init_app(package_info: &PackageInfo) {
if !mmdb_path.exists() && mmdb_tmpl.exists() {
fs::copy(mmdb_tmpl, mmdb_path).unwrap();
}
// copy the wintun.dll
#[cfg(target_os = "windows")]
{
let wintun_path = app_dir.join("wintun.dll");
let wintun_tmpl = res_dir.join("wintun.dll");
if !wintun_path.exists() && wintun_tmpl.exists() {
fs::copy(wintun_tmpl, wintun_path).unwrap();
}
}
}