Method: SensibleSwing::MainWindow#check_for_various_dependencies

Defined in:
lib/gui/sensible-cinema-base.rb

#check_for_various_dependenciesObject



511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/gui/sensible-cinema-base.rb', line 511

def check_for_various_dependencies
  if we_are_in_create_mode        
    if !check_for_exe('vendor/cache/mencoder/mencoder.exe', 'mencoder')
      require_blocking_license_accept_dialog 'mplayer', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: mplayer with mencoder."
      download_zip_file_and_extract "Mplayer/mencoder (6MB)", "http://sourceforge.net/projects/mplayer-win32/files/MPlayer%20and%20MEncoder/revision%2033883/MPlayer-rtm-svn-33883.7z", "mencoder"
    end
  end

  # runtime dependencies, at least as of today...
  ffmpeg_exe_loc = File.expand_path('vendor/cache/ffmpeg/ffmpeg.exe')
  if !check_for_exe(ffmpeg_exe_loc, 'ffmpeg')
    require_blocking_license_accept_dialog 'ffmpeg', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: ffmpeg."
    download_zip_file_and_extract "ffmpeg (5MB)", "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-git-335bbe4-win32-static.7z", "ffmpeg"
  end
  if OS.mac?
    check_for_exe("mplayer", "mplayer") # mencoder and mplayer are separate for mac... [this checks for mac's mplayerx, too]
  else      
    path = RubyWhich.new.which('smplayer_portable')
    if(path.length == 0)
      # this one has its own installer...
      show_blocking_message_dialog("It appears that you need to install a pre-requisite dependency: MPlayer for Windows (MPUI).
      Click ok to be directed to its download website, where you can download and install it (recommend: MPUI....Full-Package.exe), 
      then restart sensible cinema.  NB that it takes awhile to install.  Sorry about that.", 
      "Lacking dependency", JOptionPane::ERROR_MESSAGE)
      open_url_to_view_it_non_blocking "http://code.google.com/p/mulder/downloads/list?can=2&q=MPlayer&sort=-uploaded&colspec=Filename%20Summary%20Type%20Uploaded%20Size%20DownloadCount"
      System.exit 0
    end
  end
end