exe/photoapp in desoto-photoapp-0.3.13 vs exe/photoapp in desoto-photoapp-0.4.0

- old
+ new

@@ -28,27 +28,43 @@ system "cp -r #{Photoapp.gem_dir('assets/photoapp-process.workflow')} #{folder_actions_path}" end def actions system "open /System/Library/Image\\ Capture/Support/Application/AutoImporter.app" - system "open /System/Library/CoreServices/Folder\\ Actions\\ Setup.app" + + system 'open '+folder_actions_setup end def setup - if `brew list imagemagick` =~ /Error:/ - system "brew update && brew install imagemagick" - end - unless `ls /Library/Automator` =~ /Import Files into Photos/ system "say 'please install Automator actions for Photos app'" system "open #{Photoapp.gem_dir('assets/photos-action-installer.pkg')}" end update actions end +def folder_actions_setup + + @app_path ||= begin + app = 'Folder Actions Setup.app' + base = '/System/Library/CoreServices/' + + old = File.join( base, app ) + new = File.join( base, 'Applications', app ) + + path = if File.exist? old + old + elsif File.exist? new + new + end + + path.gsub(' ', '\ ') + end +end + if options['version'] puts Photoapp::VERSION abort end @@ -56,22 +72,22 @@ case cmd when 'config' case ARGV.shift when 'printer' + system 'open https://github.com/imathis/desoto-photoapp#default-printer-settings' + system 'say "Configure your printer according to these configurations"' + sleep 3 system 'open http://127.0.0.1:631/printers/' system 'say "Choose the printer you want to configure"' sleep 3 system 'say "Select Set Default Options from the Administration drop-down."' - sleep 3 - system 'say "then configure your printer based on the settings you see here"' - sleep 3 - system 'open https://github.com/imathis/desoto-photoapp#default-printer-settings' + system 'say "Then refer to the printer configurations listed ealier."' when 'import' system 'say "launching AutoImporter, press command comma to change settings"' system 'open /System/Library/Image\ Capture/Support/Application/AutoImporter.app' when 'action' - system 'open /System/Library/CoreServices/Folder\ Actions\ Setup.app' + system 'open '+folder_actions_setup system 'say "Add an action for the cave.pics/import folder and select the photoapp process workflow from the list. Then close the app."' end when 'test' path = ARGV.join('') session = Photoapp::Session.new(options)