forked from streamroot/bemtv
-
Notifications
You must be signed in to change notification settings - Fork 10
/
rakefile.rb
86 lines (69 loc) · 2.24 KB
/
rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
require 'rubygems'
require 'bundler'
require 'bundler/setup'
require 'rake/clean'
require 'flashsdk'
Bundler.require :default
require File.expand_path('tasks/helpers', File.dirname(__FILE__))
Dir['tasks/**/*.rake'].each { |file| load file }
##
# Set USE_FCSH to true in order to use FCSH for all compile tasks.
#
# You can also set this value by calling the :fcsh task
# manually like:
#
# rake fcsh run
#
# These values can also be sent from the command line like:
#
# rake run FCSH_PKG_NAME=flex3
#
# ENV['USE_FCSH'] = true
# ENV['FCSH_PKG_NAME'] = 'flex4'
# ENV['FCSH_PKG_VERSION'] = '1.0.14.pre'
# ENV['FCSH_PORT'] = 12321
FlashSDK::MXMLC.add_param :swf_version, String
def configure_task t
t.target_player = "11.1.0"
t.swf_version = "11"
t.language = 'as3'
t.optimize = true
t.strict = true
t.library_path << 'player/lib/OSMF.swc'
t.library_path << 'player/assets'
t.static_link_runtime_shared_libraries = true
t.define_conditional << "CONFIG::LOGGING,false"
t.define_conditional << "CONFIG::FLASH_10_1,true"
t.define_conditional << "CONFIG::PLATFORM,true"
t.define_conditional << "CONFIG::MOCK,false"
t.default_size = '480,360'
end
##############################
# Debug
# Compile the debug swf
mxmlc "player/bin/StrobeMediaPlayback-debug.swf" => 'assets:copy' do |t|
t.input = "player/src/StrobeMediaPlayback.as"
t.debug = true
configure_task t
end
desc "Compile debug swf"
task :compile_debug => "player/bin/StrobeMediaPlayback-debug.swf"
task :debug => [:compile_debug, 'assets:rename_debug_swf']
desc "Compile and run the debug swf"
flashplayer :run => "player/bin/StrobeMediaPlayback-debug.swf"
##############################
# DOC
desc "Generate documentation at doc/"
asdoc 'doc' do |t|
t.doc_sources << "src"
t.exclude_sources << "player/src/StrobeMediaPlaybackRunner.as"
end
mxmlc "html/static/StrobeMediaPlayback.swf" do |t|
t.input = "player/src/StrobeMediaPlayback.as"
configure_task t
end
desc 'Compile the optimized deployment'
task :compile => "html/static/StrobeMediaPlayback.swf"
##############################
# DEFAULT
task :default => :debug