remove plist argument from Context

This commit is contained in:
Chip Reed
2023-05-08 19:18:37 +02:00
parent d8fbdf489a
commit 0fc28118b7
3 changed files with 3 additions and 9 deletions

View File

@@ -371,11 +371,9 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
.expect("failed to write Info.plist");
let info_plist_path = out_path.display().to_string();
quote!({
tauri::embed_plist::embed_info_plist!(#info_plist_path);
})
quote!(::tauri::embed_plist::embed_info_plist!(#info_plist_path))
} else {
quote!(())
quote!()
};
#[cfg(not(target_os = "macos"))]
let info_plist = quote!(());
@@ -422,6 +420,7 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
};
Ok(quote!({
#info_plist;
#[allow(unused_mut, clippy::let_and_return)]
let mut context = #root::Context::new(
#config,
@@ -429,7 +428,6 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
#default_window_icon,
#app_icon,
#package_info,
#info_plist,
#pattern,
);
#with_system_tray_icon_code

View File

@@ -540,7 +540,6 @@ pub struct Context<A: Assets> {
#[cfg(desktop)]
pub(crate) system_tray_icon: Option<Icon>,
pub(crate) package_info: PackageInfo,
pub(crate) _info_plist: (),
pub(crate) pattern: Pattern,
}
@@ -638,7 +637,6 @@ impl<A: Assets> Context<A> {
default_window_icon: Option<Icon>,
app_icon: Option<Vec<u8>>,
package_info: PackageInfo,
info_plist: (),
pattern: Pattern,
) -> Self {
Self {
@@ -649,7 +647,6 @@ impl<A: Assets> Context<A> {
#[cfg(desktop)]
system_tray_icon: None,
package_info,
_info_plist: info_plist,
pattern,
}
}

View File

@@ -65,7 +65,6 @@ pub fn mock_context<A: Assets>(assets: A) -> crate::Context<A> {
description: "Tauri test",
crate_name: "test",
},
_info_plist: (),
pattern: Pattern::Brownfield(std::marker::PhantomData),
}
}