File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -375,18 +375,25 @@ fn create_fixes_section(builder: &Builder) -> gtk::Box {
375375 let dialog_tx_gaming = dialog_tx_gaming. clone ( ) ;
376376 // Spawn child process in separate thread.
377377 std:: thread:: spawn ( move || {
378- const alpm_package_name: & str = "cachyos-gaming-meta" ;
379- if !utils:: is_alpm_pkg_installed ( alpm_package_name) {
380- let _ = utils:: run_cmd_terminal ( format ! ( "pacman -S {alpm_package_name}" ) , true ) ;
381- } else {
378+ const ALPM_PACKAGE_NAMES : [ & str ; 2 ] = [ "cachyos-gaming-meta" , "cachyos-gaming-applications" ] ;
379+ let mut packages_to_install = Vec :: new ( ) ;
380+ for alpm_package_name in ALPM_PACKAGE_NAMES {
381+ if !utils:: is_alpm_pkg_installed ( alpm_package_name) {
382+ packages_to_install. push ( alpm_package_name) ;
383+ }
384+ }
385+ if packages_to_install. is_empty ( ) {
382386 dialog_tx_gaming
383387 . send ( DialogMessage {
384388 msg : fl ! ( "gaming-package-installed" ) ,
385389 msg_type : gtk:: MessageType :: Info ,
386390 action : Action :: InstallGaming ,
387391 } )
388392 . expect ( "Couldn't send data to channel" ) ;
389- }
393+ } else {
394+ let packages = packages_to_install. join ( " " ) ;
395+ let _ = utils:: run_cmd_terminal ( format ! ( "pacman -S {packages}" ) , true ) ;
396+ }
390397 } ) ;
391398 } ) ;
392399 install_snapper_btn. connect_clicked ( move |_| {
You can’t perform that action at this time.
0 commit comments