sprout-as2-bundle 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Sprout
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 20
6
+ TINY = 21
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  MAJOR_MINOR = [MAJOR, MINOR].join('.')
@@ -21,7 +21,7 @@ class ProjectGenerator < Sprout::Generator::NamedBase # :nodoc:
21
21
  m.template 'rakefile.rb', File.join(base, "rakefile.rb")
22
22
  m.template 'README.txt', File.join(base, "README.txt")
23
23
 
24
- m.template 'generate', File.join(base, 'script', "generate"), :chmod => 0755
24
+ m.template 'generate', generate_script_path, :chmod => 0755
25
25
 
26
26
  m.template 'MainClass.as', File.join(base, 'src', "#{class_name}.as")
27
27
  m.template 'TestRunner.as', File.join(base, 'test', "#{class_name}Runner.as")
@@ -0,0 +1,112 @@
1
+ module Sprout
2
+ class MTASCTask < ToolTask
3
+ # Add a directory path to the class path. This is the list of directories that MTASC will use to look for .as files. You can add as many class_path values as you like. This parameter is an Array, so be sure to append rather than overwrite.
4
+ #
5
+ # Even though the official MTASC compiler accepts the +cp+ paramter, we have aliased it as +class_path+, you can use either name in your scripts.
6
+ #
7
+ # mtasc 'bin/SomeProject.swf' do |t|
8
+ # t.class_path << 'lib/somelib'
9
+ # t.class_path << 'lib/otherlib'
10
+ # # The following is not correct:
11
+ # # t.class_path = 'lib/somelib'
12
+ # end
13
+ def cp=(paths)
14
+ @cp = paths
15
+ end
16
+
17
+ # Exclude code generation of classes listed in specified file (format is one full class path per line).
18
+ def exclude=(file)
19
+ @exclude = file
20
+ end
21
+
22
+ # Export AS2 classes into target frame of swf.
23
+ def frame=(number)
24
+ @frame = number
25
+ end
26
+
27
+ # Merge classes into one single clip (this will reduce SWF size but might cause some problems if you're using -keep or -mx).
28
+ def group=(boolean)
29
+ @group = boolean
30
+ end
31
+
32
+ # width:height:fps:bgcolor: Create a new swf containing only compiled code and using provided header informations. bgcolor is optional and should be 6 digits hexadecimal value.
33
+ def header=(string)
34
+ @header = string
35
+ end
36
+
37
+ # Add type inference for initialized local variables.
38
+ def infer=(boolean)
39
+ @infer = boolean
40
+ end
41
+
42
+ # Keep AS2 classes compiled by MCC into the SWF (this could cause some classes to be present two times if also compiled with MTASC).
43
+ def keep=(boolean)
44
+ @keep = boolean
45
+ end
46
+
47
+ # Will automaticaly call static function main once all classes are registered.
48
+ def main=(boolean)
49
+ @main = boolean
50
+ end
51
+
52
+ # Use Microsoft Visual Studio errors style formating instead of Java style (for file names and line numbers).
53
+ def msvc=(boolean)
54
+ @msvc = boolean
55
+ end
56
+
57
+ # Use precompiled MX classes (see section on V2 components below).
58
+ def mx=(boolean)
59
+ @mx = boolean
60
+ end
61
+
62
+ # The SWF file that should be generated, use only in addition to the -swf parameter if you want to generate a separate SWF from the one being loaded
63
+ def out=(file)
64
+ @out = file
65
+ end
66
+
67
+ # Compile all the files contained in specified package - not recursively (eg to compile files in c: lashdemypp do mtasc -cp c: lashde -pack my/app).
68
+ def pack=(paths)
69
+ @pack = paths
70
+ end
71
+
72
+ # Use strict compilation mode which require that all variables are explicitely typed.
73
+ def strict=(boolean)
74
+ @strict = boolean
75
+ end
76
+
77
+ # Specify the swf that should be generated, OR the input SWF which contains assets.
78
+ #
79
+ # If this parameter is not set, the MTASCTask will do the following:
80
+ # * Iterate over it's prerequisites and set the -swf parameter to the output of the first SWFMillTask found
81
+ # * If no SWFMillTask instances are in this task prerequisites and the -swf parameter has not been set, it will be set to the same as the -out parameter
82
+ def swf=(file)
83
+ @swf = file
84
+ end
85
+
86
+ # Specify a custom trace function. (see Trace Facilities), or no disable all the traces.
87
+ def trace=(string)
88
+ @trace = string
89
+ end
90
+
91
+ # Specify SWF version : 6 to generate Player 6r89 compatible SWF or 8 to access Flash8 features.
92
+ def version=(number)
93
+ @version = number
94
+ end
95
+
96
+ # Activate verbose mode, printing some additional information about compiling process. This parameter has been aliased as +verbose+
97
+ def v=(boolean)
98
+ @v = boolean
99
+ end
100
+
101
+ # Adds warnings for import statements that are not used in the file.
102
+ def wimp=(boolean)
103
+ @wimp = boolean
104
+ end
105
+
106
+ # Main source file to send compiler
107
+ def input=(file)
108
+ @input = file
109
+ end
110
+
111
+ end
112
+ end
@@ -0,0 +1,31 @@
1
+ module Sprout
2
+ class SWFMillTask < ToolTask
3
+ # Set the SWFMill simple flag. This setting will determine what kind of xml document the compiler expects. Unless you really know what you're doing with SWFMill, this setting will usually be left alone.
4
+ def simple=(boolean)
5
+ @simple = boolean
6
+ end
7
+
8
+ # The input can be one of the following
9
+ # * SWFMill XML document: Create and manually manage an input file as described at http://www.swfmill.org
10
+ # * Directory: if you point at a directory, this task will automatically include all files found forward of that directory. As it descends into child directories, the items found will be exposed in the library using period delimiters as follows:
11
+ #
12
+ # The file:
13
+ # yourcompany/yourproject/SomeFile.png
14
+ # Will be available in the compiled swf with a linkage identifier of:
15
+ # yourcompany.yourproject.SomeFile
16
+ def input=(string)
17
+ @input = string
18
+ end
19
+
20
+ # The output parameter should not be set from outside of this task, the output file should be the task name
21
+ def output=(file)
22
+ @output = file
23
+ end
24
+
25
+ # An ERB template to send to the generated SWFMillInputTask. This template can be used to generate an XML input document based on the contents of a directory. If no template is provided, one will be created for you after the first run, and once created, you can configure it however you wish.
26
+ def template=(file)
27
+ @template = file
28
+ end
29
+
30
+ end
31
+ end
data/rakefile.rb CHANGED
@@ -58,7 +58,7 @@ spec = Gem::Specification.new do |s|
58
58
  s.rdoc_options << '-i' << '.'
59
59
  s.files = PKG_LIST.to_a
60
60
 
61
- s.add_dependency('sprout', '>= 0.7.158')
61
+ s.add_dependency('sprout', '>= 0.7.182')
62
62
  s.add_dependency('sprout-flashplayer-bundle')
63
63
  end
64
64
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprout-as2-bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pattern Park
@@ -9,7 +9,7 @@ autorequire: sprout/as2
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-24 00:00:00 -08:00
12
+ date: 2008-05-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.7.158
22
+ version: 0.7.182
23
23
  version:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: sprout-flashplayer-bundle
@@ -40,6 +40,7 @@ extra_rdoc_files:
40
40
  - README
41
41
  files:
42
42
  - lib
43
+ - pkg
43
44
  - rakefile.rb
44
45
  - README
45
46
  - samples
@@ -83,9 +84,11 @@ files:
83
84
  - lib/sprout/generators/test/USAGE
84
85
  - lib/sprout/tasks
85
86
  - lib/sprout/tasks/mtasc_doc.rb
87
+ - lib/sprout/tasks/mtasc_rdoc.rb
86
88
  - lib/sprout/tasks/mtasc_task.rb
87
89
  - lib/sprout/tasks/swfmill_doc.rb
88
90
  - lib/sprout/tasks/swfmill_input_task.rb
91
+ - lib/sprout/tasks/swfmill_rdoc.rb
89
92
  - lib/sprout/tasks/swfmill_task.rb
90
93
  has_rdoc: true
91
94
  homepage: http://www.projectsprouts.org