mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
remove plist argument from Context
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user