@@ -13,7 +13,7 @@ use std::{
1313use anyhow:: Context ;
1414use serde:: Deserialize ;
1515
16- use crate :: helpers:: { app_paths:: tauri_dir, config:: Config } ;
16+ use crate :: helpers:: { app_paths:: tauri_dir, config:: Config , manifest :: Manifest } ;
1717use tauri_bundler:: {
1818 AppCategory , BundleBinary , BundleSettings , DebianSettings , MacOsSettings , PackageSettings ,
1919 UpdaterSettings , WindowsSettings ,
@@ -163,8 +163,13 @@ impl AppSettings {
163163 & self . cargo_package_settings
164164 }
165165
166- pub fn get_bundle_settings ( & self , config : & Config ) -> crate :: Result < BundleSettings > {
166+ pub fn get_bundle_settings (
167+ & self ,
168+ config : & Config ,
169+ manifest : & Manifest ,
170+ ) -> crate :: Result < BundleSettings > {
167171 tauri_config_to_bundle_settings (
172+ manifest,
168173 config. tauri . bundle . clone ( ) ,
169174 config. tauri . system_tray . clone ( ) ,
170175 config. tauri . updater . clone ( ) ,
@@ -336,6 +341,7 @@ pub fn get_workspace_dir(current_dir: &Path) -> PathBuf {
336341}
337342
338343fn tauri_config_to_bundle_settings (
344+ manifest : & Manifest ,
339345 config : crate :: helpers:: config:: BundleConfig ,
340346 system_tray_config : Option < crate :: helpers:: config:: SystemTrayConfig > ,
341347 updater_config : crate :: helpers:: config:: UpdaterConfig ,
@@ -353,12 +359,21 @@ fn tauri_config_to_bundle_settings(
353359
354360 #[ allow( unused_mut) ]
355361 let mut resources = config. resources . unwrap_or_default ( ) ;
362+ #[ allow( unused_mut) ]
363+ let mut depends = config. deb . depends . unwrap_or_default ( ) ;
364+
356365 #[ cfg( target_os = "linux" ) ]
357366 {
358367 if let Some ( system_tray_config) = & system_tray_config {
359368 let mut icon_path = system_tray_config. icon_path . clone ( ) ;
360369 icon_path. set_extension ( "png" ) ;
361- resources. push ( icon_path. to_string_lossy ( ) . to_string ( ) ) ;
370+ depends. push ( "libappindicator3-1" . to_string ( ) ) ;
371+ }
372+
373+ depends. push ( "libwebkit2gtk-4.0" . to_string ( ) ) ;
374+ depends. push ( "libgtk-3-0" . to_string ( ) ) ;
375+ if manifest. features . contains ( & "menu" . into ( ) ) || system_tray_config. is_some ( ) {
376+ depends. push ( "libgtksourceview-3.0-1" . to_string ( ) ) ;
362377 }
363378 }
364379
@@ -382,7 +397,11 @@ fn tauri_config_to_bundle_settings(
382397 long_description : config. long_description ,
383398 external_bin : config. external_bin ,
384399 deb : DebianSettings {
385- depends : config. deb . depends ,
400+ depends : if depends. is_empty ( ) {
401+ None
402+ } else {
403+ Some ( depends)
404+ } ,
386405 use_bootstrapper : Some ( config. deb . use_bootstrapper ) ,
387406 files : config. deb . files ,
388407 } ,
0 commit comments