-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrakefile.rb
85 lines (69 loc) · 1.85 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
require 'rubygems'
require 'bundler'
require 'bundler/setup'
require 'rake/clean'
require 'flashsdk'
require 'asunit4'
require "./asmock.rb"
##
# 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
##############################
# Debug
# Compile the debug swf
mxmlc "bin/URLEncodeRunner-debug.swf" do |t|
t.input = "src/urlencode/URIString.as"
t.source_path << "src"
t.static_link_runtime_shared_libraries = true
t.debug = true
end
desc "Compile and run the debug swf"
flashplayer :run => "bin/URLEncodeRunner-debug.swf"
##############################
# Test
library :asunit4
library :asmock
library :asmock_asunit_integration
# Compile the test swf
mxmlc "bin/URLEncodeRunner-test.swf" => [:asunit4,:asmock,:asmock_asunit_integration] do |t|
t.input = "src/URLEncodeRunner.as"
t.includes << "asmock.integration.asunit.ASMockRunner"
t.static_link_runtime_shared_libraries = true
t.source_path << 'test'
t.debug = true
end
desc "Compile and run the test swf"
flashplayer :test => "bin/URLEncodeRunner-test.swf"
##############################
# SWC
compc "bin/urlencode.swc" do |t|
t.input_class = "URIString"
t.static_link_runtime_shared_libraries = true
t.source_path << 'src'
end
desc "Compile the SWC file"
task :swc => 'bin/urlencode.swc'
##############################
# DOC
desc "Generate documentation at doc/"
asdoc 'doc' do |t|
t.doc_sources << "src"
t.exclude_sources << "src/URLEncodeRunner.as"
end
##############################
# DEFAULT
# task :default => :run
task :default => :test