remove __TAURI_WORKSPACE__ workaround

This commit is contained in:
Lucas Nogueira
2023-05-26 00:10:32 -03:00
parent a3c22e9216
commit 84b2dcfe3c
2 changed files with 0 additions and 29 deletions

View File

@@ -1,2 +0,0 @@
[env]
__TAURI_WORKSPACE__ = "true"

View File

@@ -57,14 +57,6 @@ fn main() {
)
.expect("failed to write checked_features file");
// workaround needed to prevent `STATUS_ENTRYPOINT_NOT_FOUND` error
// see https://github.com/tauri-apps/tauri/pull/4383#issuecomment-1212221864
let target_env = std::env::var("CARGO_CFG_TARGET_ENV");
let is_tauri_workspace = std::env::var("__TAURI_WORKSPACE__").map_or(false, |v| v == "true");
if is_tauri_workspace && target_os == "windows" && Ok("msvc") == target_env.as_deref() {
add_manifest();
}
if target_os == "android" {
if let Ok(kotlin_out_dir) = std::env::var("WRY_ANDROID_KOTLIN_FILES_OUT_DIR") {
fn env_var(var: &str) -> String {
@@ -132,22 +124,3 @@ fn main() {
}
}
}
fn add_manifest() {
static WINDOWS_MANIFEST_FILE: &str = "window-app-manifest.xml";
let manifest = std::env::current_dir()
.unwrap()
.join("../tauri-build/src")
.join(WINDOWS_MANIFEST_FILE);
println!("cargo:rerun-if-changed={}", manifest.display());
// Embed the Windows application manifest file.
println!("cargo:rustc-link-arg=/MANIFEST:EMBED");
println!(
"cargo:rustc-link-arg=/MANIFESTINPUT:{}",
manifest.to_str().unwrap()
);
// Turn linker warnings into errors.
println!("cargo:rustc-link-arg=/WX");
}