videojuicer-player-sdk 0.2 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -2,7 +2,7 @@ h1. Videojuicer Player SDK
2
2
 
3
3
  h2. Configuration
4
4
 
5
- You must create a `config.yml` to define the build tasks for the `playersdk` to use, the configuration file uses standard YAML syntaxs.
5
+ You must create a `config.yml` to define the build tasks for the `playersdk` to use, the configuration file uses standard "YAML":http://en.wikipedia.org/wiki/YAML syntaxs.
6
6
 
7
7
  ---
8
8
  # Flex SDK location
@@ -30,6 +30,6 @@ You must create a `config.yml` to define the build tasks for the `playersdk` to
30
30
 
31
31
  h2. TODO
32
32
 
33
- - Tests
34
- - Expand README
35
- - License
33
+ # Tests
34
+ # Expand README
35
+ License
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 2
4
- :patch: 0
3
+ :minor: 3
4
+ :patch: 5
@@ -19,10 +19,6 @@ module PlayerSDK
19
19
 
20
20
  puts "\n\n"
21
21
  puts "Completed #{tasks.length} tasks(s)"
22
-
23
- if self.config['player_src'] != ''
24
- #self.compiler.compile_mxmlc(self.config['player_source'], 'src/Main.mxml', true, true, false, 'vj-player.swf', self.config['build_dir'])
25
- end
26
22
  end
27
23
 
28
24
  def run_task(key, value)
@@ -36,7 +32,9 @@ module PlayerSDK
36
32
 
37
33
  puts "Optimizing engine swf .."
38
34
 
39
- self.compiler.optimize_swc(value['target'], self.config['build_dir'])
35
+ optimize_target = value['optimize_target'] != '' ? value['optimize_target'] : value['target']
36
+
37
+ self.compiler.optimize_swc(value['target'], optimize_target, self.config['build_dir'])
40
38
  when "addon"
41
39
  self.compiler.compile_mxmlc(value['src'], value['main'], value['sdk'], value['engine'], value['libs'], value['target'], self.config['build_dir'], self.config['deployment_url'])
42
40
  when "framework"
@@ -24,16 +24,16 @@ module PlayerSDK
24
24
  `#{command}`
25
25
  end
26
26
  end
27
-
27
+
28
28
  def compile_mxmlc(source_path, main_file, include_sdk, include_engine, include_libs, output_file, output_dir, deployment_url)
29
29
  command ="#{executable('mxmlc')} -compiler.source-path #{source_path} -file-specs #{source_path}/#{main_file} -static-link-runtime-shared-libraries=false"
30
30
 
31
31
  if include_sdk
32
- command += " -runtime-shared-library-path=#{config['flex_sdk']}/frameworks/libs/framework.swc,framework.swz,#{deployment_url}crossdomain.xml,framework.swf"
32
+ command += " -runtime-shared-library-path=#{config['flex_sdk']}/frameworks/libs/framework.swc,#{deployment_url}/framework.swz,#{config['crossdomain_url']}/crossdomain.xml,#{deployment_url}/framework.swf"
33
33
  end
34
34
 
35
35
  if include_engine
36
- command += " -runtime-shared-library-path=#{include_engine}.swc,#{deployment_url}#{output_file}"
36
+ command += " -runtime-shared-library-path=#{include_engine}.swc,#{deployment_url}/vj-player-engine.swf"
37
37
  end
38
38
 
39
39
  if include_libs
@@ -41,7 +41,7 @@ module PlayerSDK
41
41
  end
42
42
 
43
43
  command += " -use-network -benchmark -compiler.strict --show-actionscript-warnings=true -compiler.optimize -compiler.as3"
44
- command += " -output #{output_dir}/#{output_file}.swf"
44
+ command += " -output #{output_dir}/#{output_file}"
45
45
 
46
46
  run_command(command)
47
47
  end
@@ -50,11 +50,11 @@ module PlayerSDK
50
50
  command = "#{executable('compc')} -source-path #{source_path} -include-sources #{source_path}"
51
51
 
52
52
  if include_sdk
53
- command += " -runtime-shared-library-path=#{config['flex_sdk']}/#{config['flex_framework_swc']},#{deployment_url}/#{config['flex_framework_version']}.swz,#{deployment_url}crossdomain.xml,#{deployment_url}/#{config['flex_framework_version']}.swf"
53
+ command += " -runtime-shared-library-path=#{config['flex_sdk']}/#{config['flex_framework_swc']},#{deployment_url}/framework.swz,#{config['crossdomain_url']}/crossdomain.xml,#{deployment_url}/framework.swf"
54
54
  end
55
55
 
56
56
  if include_engine
57
- command += " -runtime-shared-library-path=#{include_engine}.swc,#{deployment_url}#{output_file}.swf"
57
+ command += " -runtime-shared-library-path=#{include_engine}.swc,#{deployment_url}/vj-player-engine.swf"
58
58
  end
59
59
 
60
60
  if include_libs
@@ -62,19 +62,22 @@ module PlayerSDK
62
62
  end
63
63
 
64
64
  command += " -use-network -benchmark -compiler.strict --show-actionscript-warnings=true -compiler.optimize -compiler.as3"
65
- command += " -output #{output_dir}/#{output_file}.swc"
65
+ command += " -output #{output_dir}/#{output_file}"
66
66
 
67
67
  run_command(command)
68
68
  end
69
69
 
70
- def optimize_swc(output_file, output_dir)
71
- self.unzip("#{output_dir}/#{output_file}.swc", "#{config['temp_dir']}")
70
+ def optimize_swc(input_swc, output_file, output_dir)
71
+ # extract
72
+ self.unzip("#{output_dir}/#{input_swc}", "#{config['temp_dir']}")
72
73
 
73
- command = "#{executable('optimizer')} -input #{config['temp_dir']}/library.swf -output #{output_dir}/#{output_file}.swf --keep-as3-metadata='Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient'"
74
+ # optimize
75
+ command = "#{executable('optimizer')} -input #{config['temp_dir']}/library.swf -output #{output_dir}/#{output_file} --keep-as3-metadata='Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient'"
74
76
 
75
77
  run_command(command)
76
78
 
77
- command = "#{executable('digest')} --digest.swc-path #{output_dir}/#{output_file}.swc --digest.rsl-file #{output_dir}/#{output_file}.swf"
79
+ # update digest information
80
+ command = "#{executable('digest')} --digest.swc-path #{output_dir}/#{input_swc} --digest.rsl-file #{output_dir}/#{output_file}"
78
81
 
79
82
  run_command(command)
80
83
  end
data/lib/playersdk.rb CHANGED
@@ -24,7 +24,8 @@ module PlayerSDK
24
24
  'flex_framework_swc' => 'frameworks/libs/framework.swc',
25
25
  'flex_framework_version' => '',
26
26
  'tasks' => '',
27
- 'verbose' => false
27
+ 'verbose' => false,
28
+ 'deployment_url' => ''
28
29
  }
29
30
 
30
31
  # Generate a Player SDK configuration Hash by merging the default options
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: videojuicer-player-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Livesley