sprout-flashplayer-bundle 10.22.0 → 10.22.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,12 +28,22 @@ class CLIXFlashPlayer
28
28
  end
29
29
 
30
30
  setup_trap
31
+
31
32
  @thread = Thread.new {
32
33
  @player_pid = open4.popen4("#{player.split(' ').join('\ ')}")[0]
33
- raise "clix_wrapper.rb could not be found at: #{wrapper}" if !File.exists?($CLIX_WRAPPER_TARGET)
34
- command = "ruby #{$CLIX_WRAPPER_TARGET} '#{player}' '#{swf}'"
35
- @activate_pid = open4.popen4(command)[0]
36
- Process.wait(@player_pid)
34
+ begin
35
+ raise "clix_wrapper.rb could not be found at: #{wrapper}" if !File.exists?($CLIX_WRAPPER_TARGET)
36
+ command = "ruby #{$CLIX_WRAPPER_TARGET} '#{player}' '#{swf}'"
37
+ @activate_pid, stdin, stdout, stderr = open4.popen4(command)
38
+ puts stdout.read
39
+ error = stderr.read
40
+ raise error if !error.nil?
41
+ puts "after error"
42
+ # Process.wait(@player_pid)
43
+ rescue StandardError => e
44
+ kill
45
+ raise e
46
+ end
37
47
  }
38
48
  end
39
49
 
@@ -42,7 +52,9 @@ class CLIXFlashPlayer
42
52
  end
43
53
 
44
54
  def join
45
- @thread.join
55
+ if(@thread.alive?)
56
+ @thread.join
57
+ end
46
58
  end
47
59
 
48
60
  def alive?
data/lib/clix_wrapper.rb CHANGED
@@ -1,24 +1,22 @@
1
1
  #!/usr/bin/ruby
2
2
  require 'rubygems'
3
- require 'appscript'
4
3
 
5
4
  player = ARGV[0]
6
5
  swf = ARGV[1]
7
6
 
8
- if(player.nil?)
9
- raise "CLIXWrapper requires 'player' argument like:\nruby clix_wrapper [player] [swf]"
10
- end
7
+ raise "CLIXWrapper requires 'player' argument like:\nruby clix_wrapper [player] [swf]" if(player.nil?)
8
+ raise "CLIXWrapper could not find player at '#{player}'" if !File.exists?(player)
11
9
 
12
- if(swf.nil?)
13
- raise "CLIXWrapper requires 'swf' argument like:\nruby clix_wrapper [player] [swf]"
14
- end
10
+ raise "CLIXWrapper requires 'swf' argument like:\nruby clix_wrapper [player] [swf]" if(swf.nil?)
11
+ raise "CLIXWrapper could not find swf at '#{swf}'" if !File.exists?(swf)
15
12
 
16
13
  begin
14
+ require 'appscript'
17
15
  # Give the player focus:
18
16
  Appscript.app(player).activate
19
17
  # Open the SWF:
20
18
  Appscript.app(player).open(MacTypes::Alias.path(swf))
21
19
  rescue LoadError => e
22
- raise 'You must install the rb-appscript gem to use the desktop debug Flash Player'
20
+ raise "\n\n[ERROR] You must install the rb-appscript gem to use the desktop debug Flash Player, you do this by running:\n\nsudo gem install rb-appscript"
23
21
  end
24
22
 
@@ -3,7 +3,7 @@ module Sprout
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 10
5
5
  MINOR = 22
6
- TINY = 0
6
+ TINY = 2
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
@@ -271,7 +271,7 @@ module Sprout
271
271
  if(usr.is_a?(WinUser))
272
272
  Thread.kill(@thread)
273
273
  elsif(usr.is_a?(OSXUser))
274
- @thread.kill
274
+ @clix_player.kill
275
275
  else
276
276
  Process.kill("SIGALRM", @player_pid)
277
277
  end
data/rakefile.rb CHANGED
@@ -43,10 +43,6 @@ spec = Gem::Specification.new do |s|
43
43
 
44
44
  s.add_dependency('sprout', '>= 0.7.189')
45
45
  s.add_dependency('sprout-flashplayer-tool', '>= 10.22.0')
46
-
47
- if RUBY_PLATFORM.match('darwin')
48
- s.add_dependency('rb-appscript', '>= 0.5.1')
49
- end
50
46
  end
51
47
 
52
48
  Rake::GemPackageTask.new(spec) do |p|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout-flashplayer-bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.22.0
4
+ version: 10.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pattern Park
@@ -32,16 +32,6 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.22.0
34
34
  version:
35
- - !ruby/object:Gem::Dependency
36
- name: rb-appscript
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 0.5.1
44
- version:
45
35
  description: Shared Project to support the Flash Player task
46
36
  email: projectsprouts@googlegroups.com
47
37
  executables: []