sprout-air-bundle 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +23 -0
- data/lib/sprout/air.rb +6 -0
- data/lib/sprout/air/version.rb +12 -0
- data/lib/sprout/generators/project/project_generator.rb +36 -0
- data/lib/sprout/generators/project/templates/META/Application-Debug-app.xml +136 -0
- data/lib/sprout/generators/project/templates/META/Application-app.xml +136 -0
- data/lib/sprout/generators/project/templates/META/cert.p12 +0 -0
- data/lib/sprout/generators/project/templates/META/cert_readme.txt +3 -0
- data/lib/sprout/generators/project/templates/MainClass.mxml +27 -0
- data/lib/sprout/generators/project/templates/MainStyle.css +0 -0
- data/lib/sprout/generators/project/templates/ProjectSprouts.png +0 -0
- data/lib/sprout/generators/project/templates/README.txt +59 -0
- data/lib/sprout/generators/project/templates/generate +25 -0
- data/lib/sprout/generators/project/templates/rakefile.rb +162 -0
- data/rakefile.rb +57 -0
- metadata +107 -0
data/README
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
-------------------------------------
|
2
|
+
Adobe AIR bundle for Project Sprout
|
3
|
+
-------------------------------------
|
4
|
+
|
5
|
+
In order to create a project call:
|
6
|
+
|
7
|
+
sprout -n air ProjectName
|
8
|
+
|
9
|
+
After that, cd into the created directory. There you may edit the application description files (copyright or app id...).
|
10
|
+
|
11
|
+
The following rake tasks are available:
|
12
|
+
|
13
|
+
* rake debug
|
14
|
+
* rake run
|
15
|
+
* rake certificate (creates an certificate; have a look at the task in the rakefile and change the password if you want)
|
16
|
+
* rake package
|
17
|
+
* rake doc
|
18
|
+
|
19
|
+
The following items are on the todo list:
|
20
|
+
|
21
|
+
* integrate testing with flexunit 4 or whatever
|
22
|
+
* integrate ci testing
|
23
|
+
* integrate testing for the bundle
|
data/lib/sprout/air.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
class ProjectGenerator < Sprout::Generator::NamedBase # :nodoc:
|
3
|
+
|
4
|
+
def manifest
|
5
|
+
record do |m|
|
6
|
+
base = class_name
|
7
|
+
m.directory base
|
8
|
+
m.directory File.join(base, 'bin')
|
9
|
+
m.directory File.join(base, 'bin-debug')
|
10
|
+
m.directory File.join(base, 'package')
|
11
|
+
m.directory File.join(base, 'script')
|
12
|
+
m.directory File.join(base, 'src')
|
13
|
+
m.directory File.join(base, 'src/assets/')
|
14
|
+
m.directory File.join(base, 'src/assets/skins', project_name)
|
15
|
+
m.directory File.join(base, 'lib')
|
16
|
+
m.directory File.join(base, 'cert')
|
17
|
+
m.directory File.join(base, 'doc')
|
18
|
+
|
19
|
+
m.file 'ProjectSprouts.png', File.join(base, 'src/assets/skins', project_name, 'ProjectSprouts.png')
|
20
|
+
m.template 'rakefile.rb', File.join(base, "rakefile.rb")
|
21
|
+
m.template 'README.txt', File.join(base, "README.txt")
|
22
|
+
|
23
|
+
m.template 'generate', generate_script_path, :chmod => 0755
|
24
|
+
|
25
|
+
m.template 'META/Application-app.xml', File.join(base, 'src', "#{class_name}-app.xml")
|
26
|
+
m.template 'META/Application-Debug-app.xml', File.join(base, 'src', "#{class_name}-Debug-app.xml")
|
27
|
+
m.template 'MainStyle.css', File.join(base, 'src', "#{class_name}Skin.css")
|
28
|
+
m.template 'MainClass.mxml', File.join(base, 'src', "#{class_name}.mxml")
|
29
|
+
|
30
|
+
m.template 'META/cert.p12', File.join(base, 'cert', "cert.p12")
|
31
|
+
m.template 'META/cert_readme.txt', File.join(base, 'cert', "cert_readme.txt")
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Header for old AIR-Version <application xmlns="http://ns.adobe.com/air/application/1.0"> -->
|
3
|
+
<application xmlns="http://ns.adobe.com/air/application/1.5">
|
4
|
+
|
5
|
+
<!-- Adobe AIR Application Descriptor File Template.
|
6
|
+
|
7
|
+
Specifies parameters for identifying, installing, and launching AIR applications.
|
8
|
+
|
9
|
+
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
|
10
|
+
The last segment of the namespace specifies the version
|
11
|
+
of the AIR runtime required for this application to run.
|
12
|
+
|
13
|
+
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
|
14
|
+
the application. Optional.
|
15
|
+
-->
|
16
|
+
|
17
|
+
<!-- The application identifier string, unique to this application. Required. -->
|
18
|
+
<id><%= project_name.downcase %></id>
|
19
|
+
|
20
|
+
<!-- Used as the filename for the application. Required. -->
|
21
|
+
<filename><%= project_name %></filename>
|
22
|
+
|
23
|
+
<!-- The name that is displayed in the AIR application installer.
|
24
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
25
|
+
<name><%= project_name %></name>
|
26
|
+
|
27
|
+
<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
|
28
|
+
<version>0.1</version>
|
29
|
+
|
30
|
+
<!-- Description, displayed in the AIR application installer.
|
31
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
32
|
+
<!-- <description></description> -->
|
33
|
+
|
34
|
+
<!-- Copyright information. Optional -->
|
35
|
+
<!-- <copyright></copyright> -->
|
36
|
+
|
37
|
+
<!-- Settings for the application's initial window. Required. -->
|
38
|
+
<initialWindow>
|
39
|
+
<!-- The main SWF or HTML file of the application. Required. -->
|
40
|
+
<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
|
41
|
+
<content>bin-debug/<%= project_name.downcase %>.swf</content>
|
42
|
+
|
43
|
+
<!-- The title of the main window. Optional. -->
|
44
|
+
<title><%= project_name %></title>
|
45
|
+
|
46
|
+
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
|
47
|
+
<!-- <systemChrome>standard</systemChrome> -->
|
48
|
+
|
49
|
+
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
|
50
|
+
<!-- <transparent></transparent> -->
|
51
|
+
|
52
|
+
<!-- Whether the window is initially visible. Optional. Default false. -->
|
53
|
+
<visible>true</visible>
|
54
|
+
|
55
|
+
<!-- Whether the user can minimize the window. Optional. Default true. -->
|
56
|
+
<!-- <minimizable></minimizable> -->
|
57
|
+
|
58
|
+
<!-- Whether the user can maximize the window. Optional. Default true. -->
|
59
|
+
<!-- <maximizable></maximizable> -->
|
60
|
+
|
61
|
+
<!-- Whether the user can resize the window. Optional. Default true. -->
|
62
|
+
<!-- <resizable></resizable> -->
|
63
|
+
|
64
|
+
<!-- The window's initial width. Optional. -->
|
65
|
+
<!-- <width></width> -->
|
66
|
+
|
67
|
+
<!-- The window's initial height. Optional. -->
|
68
|
+
<!-- <height></height> -->
|
69
|
+
|
70
|
+
<!-- The window's initial x position. Optional. -->
|
71
|
+
<!-- <x>50</x> -->
|
72
|
+
|
73
|
+
<!-- The window's initial y position. Optional. -->
|
74
|
+
<!-- <y>50</y> -->
|
75
|
+
|
76
|
+
<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
|
77
|
+
<!-- <minSize></minSize> -->
|
78
|
+
|
79
|
+
<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
|
80
|
+
<!-- <maxSize></maxSize> -->
|
81
|
+
</initialWindow>
|
82
|
+
|
83
|
+
<!-- The subpath of the standard default installation location to use. Optional. -->
|
84
|
+
<!-- <installFolder></installFolder> -->
|
85
|
+
|
86
|
+
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
|
87
|
+
<!-- <programMenuFolder></programMenuFolder> -->
|
88
|
+
|
89
|
+
<!-- The icon the system uses for the application. For at least one resolution,
|
90
|
+
specify the path to a PNG file included in the AIR package. Optional. -->
|
91
|
+
<!-- <icon>
|
92
|
+
<image16x16></image16x16>
|
93
|
+
<image32x32></image32x32>
|
94
|
+
<image48x48></image48x48>
|
95
|
+
<image128x128></image128x128>
|
96
|
+
</icon> -->
|
97
|
+
|
98
|
+
<!-- Whether the application handles the update when a user double-clicks an update version
|
99
|
+
of the AIR file (true), or the default AIR application installer handles the update (false).
|
100
|
+
Optional. Default false. -->
|
101
|
+
<!-- <customUpdateUI></customUpdateUI> -->
|
102
|
+
|
103
|
+
<!-- Whether the application can be launched when the user clicks a link in a web browser.
|
104
|
+
Optional. Default false. -->
|
105
|
+
<!-- <allowBrowserInvocation>true</allowBrowserInvocation> -->
|
106
|
+
|
107
|
+
<!-- Listing of file types for which the application can register. Optional. -->
|
108
|
+
<!-- <fileTypes> -->
|
109
|
+
|
110
|
+
<!-- Defines one file type. Optional. -->
|
111
|
+
<!-- <fileType> -->
|
112
|
+
|
113
|
+
<!-- The name that the system displays for the registered file type. Required. -->
|
114
|
+
<!-- <name></name> -->
|
115
|
+
|
116
|
+
<!-- The extension to register. Required. -->
|
117
|
+
<!-- <extension></extension> -->
|
118
|
+
|
119
|
+
<!-- The description of the file type. Optional. -->
|
120
|
+
<!-- <description></description> -->
|
121
|
+
|
122
|
+
<!-- The MIME content type. -->
|
123
|
+
<!-- <contentType></contentType> -->
|
124
|
+
|
125
|
+
<!-- The icon to display for the file type. Optional. -->
|
126
|
+
<!-- <icon>
|
127
|
+
<image16x16></image16x16>
|
128
|
+
<image32x32></image32x32>
|
129
|
+
<image48x48></image48x48>
|
130
|
+
<image128x128></image128x128>
|
131
|
+
</icon> -->
|
132
|
+
|
133
|
+
<!-- </fileType> -->
|
134
|
+
<!-- </fileTypes> -->
|
135
|
+
|
136
|
+
</application>
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Header for old AIR-Version <application xmlns="http://ns.adobe.com/air/application/1.0"> -->
|
3
|
+
<application xmlns="http://ns.adobe.com/air/application/1.5">
|
4
|
+
|
5
|
+
<!-- Adobe AIR Application Descriptor File Template.
|
6
|
+
|
7
|
+
Specifies parameters for identifying, installing, and launching AIR applications.
|
8
|
+
|
9
|
+
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
|
10
|
+
The last segment of the namespace specifies the version
|
11
|
+
of the AIR runtime required for this application to run.
|
12
|
+
|
13
|
+
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
|
14
|
+
the application. Optional.
|
15
|
+
-->
|
16
|
+
|
17
|
+
<!-- The application identifier string, unique to this application. Required. -->
|
18
|
+
<id><%= project_name.downcase %></id>
|
19
|
+
|
20
|
+
<!-- Used as the filename for the application. Required. -->
|
21
|
+
<filename><%= project_name %></filename>
|
22
|
+
|
23
|
+
<!-- The name that is displayed in the AIR application installer.
|
24
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
25
|
+
<name><%= project_name %></name>
|
26
|
+
|
27
|
+
<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
|
28
|
+
<version>0.1</version>
|
29
|
+
|
30
|
+
<!-- Description, displayed in the AIR application installer.
|
31
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
32
|
+
<!-- <description></description> -->
|
33
|
+
|
34
|
+
<!-- Copyright information. Optional -->
|
35
|
+
<!-- <copyright></copyright> -->
|
36
|
+
|
37
|
+
<!-- Settings for the application's initial window. Required. -->
|
38
|
+
<initialWindow>
|
39
|
+
<!-- The main SWF or HTML file of the application. Required. -->
|
40
|
+
<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
|
41
|
+
<content>bin/<%= project_name.downcase %>.swf</content>
|
42
|
+
|
43
|
+
<!-- The title of the main window. Optional. -->
|
44
|
+
<title><%= project_name %></title>
|
45
|
+
|
46
|
+
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
|
47
|
+
<!-- <systemChrome>standard</systemChrome> -->
|
48
|
+
|
49
|
+
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
|
50
|
+
<!-- <transparent></transparent> -->
|
51
|
+
|
52
|
+
<!-- Whether the window is initially visible. Optional. Default false. -->
|
53
|
+
<visible>true</visible>
|
54
|
+
|
55
|
+
<!-- Whether the user can minimize the window. Optional. Default true. -->
|
56
|
+
<!-- <minimizable></minimizable> -->
|
57
|
+
|
58
|
+
<!-- Whether the user can maximize the window. Optional. Default true. -->
|
59
|
+
<!-- <maximizable></maximizable> -->
|
60
|
+
|
61
|
+
<!-- Whether the user can resize the window. Optional. Default true. -->
|
62
|
+
<!-- <resizable></resizable> -->
|
63
|
+
|
64
|
+
<!-- The window's initial width. Optional. -->
|
65
|
+
<!-- <width></width> -->
|
66
|
+
|
67
|
+
<!-- The window's initial height. Optional. -->
|
68
|
+
<!-- <height></height> -->
|
69
|
+
|
70
|
+
<!-- The window's initial x position. Optional. -->
|
71
|
+
<!-- <x>50</x> -->
|
72
|
+
|
73
|
+
<!-- The window's initial y position. Optional. -->
|
74
|
+
<!-- <y>50</y> -->
|
75
|
+
|
76
|
+
<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
|
77
|
+
<!-- <minSize></minSize> -->
|
78
|
+
|
79
|
+
<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
|
80
|
+
<!-- <maxSize></maxSize> -->
|
81
|
+
</initialWindow>
|
82
|
+
|
83
|
+
<!-- The subpath of the standard default installation location to use. Optional. -->
|
84
|
+
<!-- <installFolder></installFolder> -->
|
85
|
+
|
86
|
+
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
|
87
|
+
<!-- <programMenuFolder></programMenuFolder> -->
|
88
|
+
|
89
|
+
<!-- The icon the system uses for the application. For at least one resolution,
|
90
|
+
specify the path to a PNG file included in the AIR package. Optional. -->
|
91
|
+
<!-- <icon>
|
92
|
+
<image16x16></image16x16>
|
93
|
+
<image32x32></image32x32>
|
94
|
+
<image48x48></image48x48>
|
95
|
+
<image128x128></image128x128>
|
96
|
+
</icon> -->
|
97
|
+
|
98
|
+
<!-- Whether the application handles the update when a user double-clicks an update version
|
99
|
+
of the AIR file (true), or the default AIR application installer handles the update (false).
|
100
|
+
Optional. Default false. -->
|
101
|
+
<!-- <customUpdateUI></customUpdateUI> -->
|
102
|
+
|
103
|
+
<!-- Whether the application can be launched when the user clicks a link in a web browser.
|
104
|
+
Optional. Default false. -->
|
105
|
+
<!-- <allowBrowserInvocation>true</allowBrowserInvocation> -->
|
106
|
+
|
107
|
+
<!-- Listing of file types for which the application can register. Optional. -->
|
108
|
+
<!-- <fileTypes> -->
|
109
|
+
|
110
|
+
<!-- Defines one file type. Optional. -->
|
111
|
+
<!-- <fileType> -->
|
112
|
+
|
113
|
+
<!-- The name that the system displays for the registered file type. Required. -->
|
114
|
+
<!-- <name></name> -->
|
115
|
+
|
116
|
+
<!-- The extension to register. Required. -->
|
117
|
+
<!-- <extension></extension> -->
|
118
|
+
|
119
|
+
<!-- The description of the file type. Optional. -->
|
120
|
+
<!-- <description></description> -->
|
121
|
+
|
122
|
+
<!-- The MIME content type. -->
|
123
|
+
<!-- <contentType></contentType> -->
|
124
|
+
|
125
|
+
<!-- The icon to display for the file type. Optional. -->
|
126
|
+
<!-- <icon>
|
127
|
+
<image16x16></image16x16>
|
128
|
+
<image32x32></image32x32>
|
129
|
+
<image48x48></image48x48>
|
130
|
+
<image128x128></image128x128>
|
131
|
+
</icon> -->
|
132
|
+
|
133
|
+
<!-- </fileType> -->
|
134
|
+
<!-- </fileTypes> -->
|
135
|
+
|
136
|
+
</application>
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
|
3
|
+
xmlns:s="library://ns.adobe.com/flex/spark"
|
4
|
+
xmlns:mx="library://ns.adobe.com/flex/halo"
|
5
|
+
xmlns:local="*"
|
6
|
+
creationComplete="creationCompleteHandler(event)"
|
7
|
+
>
|
8
|
+
<fx:Script>
|
9
|
+
<![CDATA[
|
10
|
+
private function creationCompleteHandler(event:Event):void {
|
11
|
+
trace(">> CreationComplete");
|
12
|
+
}
|
13
|
+
]]>
|
14
|
+
</fx:Script>
|
15
|
+
<!-- Import StyleSheet -->
|
16
|
+
<fx:Style source="<%= project_name %>Skin.css" />
|
17
|
+
|
18
|
+
<fx:Declarations>
|
19
|
+
<!-- Place non-visual elements (e.g., services, value objects) here -->
|
20
|
+
</fx:Declarations>
|
21
|
+
|
22
|
+
<mx:VBox id="mainBox" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
|
23
|
+
<mx:Image autoLoad="true" source="@Embed(source='assets/skins/<%= project_name %>/ProjectSprouts.png')"/>
|
24
|
+
<mx:Label id="lLabel" text="...is good at air too!"/>
|
25
|
+
</mx:VBox>
|
26
|
+
</s:WindowedApplication>
|
27
|
+
|
File without changes
|
Binary file
|
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
########################################
|
3
|
+
This project was generated using Sprouts
|
4
|
+
http://projectsprouts.org
|
5
|
+
|
6
|
+
Please report any bugs to:
|
7
|
+
http://github.com/lukebayes/project-sprouts/issues
|
8
|
+
|
9
|
+
Please feel free to ask questions at:
|
10
|
+
http://groups.google.com/group/projectsprouts
|
11
|
+
|
12
|
+
Read the RDOCs at:
|
13
|
+
http://projectsprouts.org/rdoc
|
14
|
+
|
15
|
+
########################################
|
16
|
+
Using your favorite terminal, cd to this directory have fun!
|
17
|
+
|
18
|
+
########################################
|
19
|
+
To create a new ActionScript class, TestCase and rebuild all project TestSuites:
|
20
|
+
|
21
|
+
script/generate class -s utils.MathUtil
|
22
|
+
|
23
|
+
########################################
|
24
|
+
To create a new Interface begin the name with I + Capital letter (eg: ISomeName)
|
25
|
+
or end the name with 'able'
|
26
|
+
|
27
|
+
Name begins with Capital 'I' followed by another capital letter
|
28
|
+
script/generate class utils.ISomeName
|
29
|
+
|
30
|
+
or
|
31
|
+
|
32
|
+
Name ends with 'able'
|
33
|
+
script/generate class utils.Observable
|
34
|
+
|
35
|
+
or
|
36
|
+
|
37
|
+
Explicitly identify interface creation
|
38
|
+
script/generate interface utils.SomeInterface
|
39
|
+
|
40
|
+
########################################
|
41
|
+
To create a new TestCase only, enter the following:
|
42
|
+
|
43
|
+
script/generate test utils.SomeTest
|
44
|
+
|
45
|
+
########################################
|
46
|
+
To compile and launch your application:
|
47
|
+
|
48
|
+
rake
|
49
|
+
|
50
|
+
########################################
|
51
|
+
To compile and launch your test suites:
|
52
|
+
|
53
|
+
rake test
|
54
|
+
|
55
|
+
########################################
|
56
|
+
To see all available rake tasks:
|
57
|
+
|
58
|
+
rake -T
|
59
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'sprout'
|
4
|
+
sprout 'sprout-as3-bundle'
|
5
|
+
|
6
|
+
# Add a class name if TestSuites were generated
|
7
|
+
if(ARGV.size == 1 && ARGV[0] == 'suite')
|
8
|
+
ARGV << 'AllTests'
|
9
|
+
end
|
10
|
+
|
11
|
+
# Insert class type by default
|
12
|
+
if(ARGV.size == 1)
|
13
|
+
ARGV.unshift('class')
|
14
|
+
end
|
15
|
+
|
16
|
+
# Execute generators like this:
|
17
|
+
# script/generate class utils.MathUtil
|
18
|
+
# script/generate suite
|
19
|
+
# script/generate test utils.MathUtilTest
|
20
|
+
|
21
|
+
begin
|
22
|
+
Sprout::Sprout.generate('flex4', ARGV.shift, ARGV, File.dirname(File.dirname(__FILE__)))
|
23
|
+
rescue RubiGen::GeneratorError => e
|
24
|
+
Sprout::Sprout.generate('as3', ARGV.shift, ARGV, File.dirname(File.dirname(__FILE__)))
|
25
|
+
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
require 'sprout'
|
2
|
+
require 'sprout/flex4sdk/version'
|
3
|
+
#Comment out the above and uncomment the next line in order to use the flex3sdk
|
4
|
+
#require 'sprout/flex3sdk/version'
|
5
|
+
|
6
|
+
# Load gems from a server other than rubyforge:
|
7
|
+
set_sources 'http://gems.gemcutter.org'
|
8
|
+
sprout 'as3'
|
9
|
+
|
10
|
+
############################################
|
11
|
+
# Configure ProjectModel to be used by
|
12
|
+
# script/generate for appropriate bundles.
|
13
|
+
|
14
|
+
project_model :model do |m|
|
15
|
+
m.project_name = '<%= project_name %>'
|
16
|
+
m.language = 'mxml'
|
17
|
+
|
18
|
+
m.compiler_gem_name = 'sprout-flex4sdk-tool'
|
19
|
+
#Comment out the above and uncomment the next line in order to use the flex3sdk
|
20
|
+
#m.compiler_gem_name = 'sprout-flex3sdk-tool'
|
21
|
+
|
22
|
+
#if you want to use a specific version, uncomment and edit the following line
|
23
|
+
#m.compiler_gem_version = '>=4.0.0'
|
24
|
+
|
25
|
+
m.input = 'src/<%= project_name %>.mxml'
|
26
|
+
m.test_input = 'src/FlexUnitApplication.mxml'
|
27
|
+
#m.default_size = '970 550'
|
28
|
+
#m.default_background_color = '#ffffff'
|
29
|
+
m.debug = true
|
30
|
+
m.bin_dir = 'bin'
|
31
|
+
m.output = "#{m.bin_dir}/<%= project_name.downcase %>.swf"
|
32
|
+
m.debug_output = "#{m.bin_dir}-debug/<%= project_name.downcase %>.swf"
|
33
|
+
m.air_input = m.output
|
34
|
+
m.air_output_dir = "package/<%= project_name %>.air"
|
35
|
+
m.asset_dir = 'src/assets'
|
36
|
+
m.source_path = []
|
37
|
+
m.source_path << 'src'
|
38
|
+
m.source_path << m.asset_dir
|
39
|
+
m.library_path = "lib"
|
40
|
+
m.air_config_file = File.join(Sprout::Sprout.gem_file_cache('sprout-flex4sdk-tool', Sprout::Flex4SDK::VERSION::STRING), 'archive','frameworks','air-config.xml')
|
41
|
+
#Comment out the above and uncomment the next line in order to use the flex3sdk
|
42
|
+
# m.air_config_file = File.join(Sprout::Sprout.gem_file_cache('sprout-flex3sdk-tool', Sprout::Flex4SDK::VERSION::STRING), 'archive','frameworks','air-config.xml')
|
43
|
+
end
|
44
|
+
|
45
|
+
model = Sprout::ProjectModel.instance
|
46
|
+
|
47
|
+
### Basic tasks ###
|
48
|
+
|
49
|
+
desc 'Compile the optimized deployment'
|
50
|
+
mxmlc :compile do |t|
|
51
|
+
t.gem_name = model.compiler_gem_name
|
52
|
+
t.warnings = true
|
53
|
+
t.source_path = model.source_path
|
54
|
+
t.input = model.input
|
55
|
+
t.optimize = true
|
56
|
+
t.debug = false
|
57
|
+
t.output = model.output
|
58
|
+
t.load_config = model.air_config_file
|
59
|
+
#t.default_size = '800 600'
|
60
|
+
#t.default_background_color = "#FFFFFF"
|
61
|
+
|
62
|
+
#added lib directory as a library path
|
63
|
+
#so that swc files can be dropped in lib
|
64
|
+
#and automatically picked up
|
65
|
+
t.library_path << model.library_path
|
66
|
+
end
|
67
|
+
|
68
|
+
desc 'Compile the app for debugging'
|
69
|
+
mxmlc :compile_debug do |t|
|
70
|
+
t.gem_name = model.compiler_gem_name
|
71
|
+
t.warnings = true
|
72
|
+
t.source_path = model.source_path
|
73
|
+
t.input = model.input
|
74
|
+
t.optimize = true
|
75
|
+
t.debug = true
|
76
|
+
t.output = model.debug_output
|
77
|
+
t.verbose_stacktraces = true
|
78
|
+
t.load_config = model.air_config_file
|
79
|
+
#t.default_size = '800 600'
|
80
|
+
#t.default_background_color = "#FFFFFF"
|
81
|
+
|
82
|
+
#added lib directory as a library path
|
83
|
+
#so that swc files can be dropped in lib
|
84
|
+
#and automatically picked up
|
85
|
+
t.library_path << model.library_path
|
86
|
+
end
|
87
|
+
|
88
|
+
############################################
|
89
|
+
# Configure :debug
|
90
|
+
# http://projectsprouts.org/rdoc/classes/Sprout/ADLTask.html
|
91
|
+
desc 'Rake task to debug in air runtime'
|
92
|
+
adl :debug => [:compile_debug] do |t|
|
93
|
+
t.root_directory = "."
|
94
|
+
t.application_descriptor = "src/<%= project_name %>-Debug-app.xml"
|
95
|
+
t.gem_name = model.compiler_gem_name
|
96
|
+
# Uncomment this in order to use some features
|
97
|
+
# see http://projectsprouts.org/rdoc/classes/Sprout/ADLTask.html#M000431
|
98
|
+
# t.pubid = ""
|
99
|
+
end
|
100
|
+
|
101
|
+
# set :debug as the :default task
|
102
|
+
task :default => :debug
|
103
|
+
|
104
|
+
############################################
|
105
|
+
# Configure :run
|
106
|
+
# http://projectsprouts.org/rdoc/classes/Sprout/ADLTask.html
|
107
|
+
|
108
|
+
desc 'Rake task to run in air runtime'
|
109
|
+
adl :run => [:compile] do |t|
|
110
|
+
t.root_directory = "."
|
111
|
+
t.application_descriptor = "src/<%= project_name %>-app.xml"
|
112
|
+
t.gem_name = model.compiler_gem_name
|
113
|
+
# Uncomment this in order to use some features
|
114
|
+
# see http://projectsprouts.org/rdoc/classes/Sprout/ADLTask.html#M000431
|
115
|
+
# t.pubid = ""
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
############################################
|
120
|
+
# Configure :certificate
|
121
|
+
# http://projectsprouts.org/rdoc/classes/Sprout/AsDocTask.html
|
122
|
+
asdoc :doc => [:compile] do |t|
|
123
|
+
t.source_path = model.source_path
|
124
|
+
t.library_path << model.library_path
|
125
|
+
t.doc_classes = '<%= project_name %>'
|
126
|
+
t.main_title = '<%= project_name %>'
|
127
|
+
t.footer = ''
|
128
|
+
t.load_config = model.air_config_file
|
129
|
+
t.output = 'doc'
|
130
|
+
t.gem_name = model.compiler_gem_name
|
131
|
+
end
|
132
|
+
|
133
|
+
############################################
|
134
|
+
# Configure :certificate
|
135
|
+
# http://projectsprouts.org/rdoc/classes/Sprout/ADTCertTask.html
|
136
|
+
|
137
|
+
# have a look at the url in order to learn more about the possible options
|
138
|
+
adt_cert :certificate do |t|
|
139
|
+
t.cn = "Common name"
|
140
|
+
t.keytype = "1024-RSA"
|
141
|
+
t.keystore = "cert/cert.p12"
|
142
|
+
t.keypass = "secret"
|
143
|
+
t.gem_name = model.compiler_gem_name
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
############################################
|
148
|
+
# Configure :package
|
149
|
+
# http://projectsprouts.org/rdoc/classes/Sprout/ADTTask.html
|
150
|
+
|
151
|
+
desc 'Rake task package an .air file'
|
152
|
+
adt :package => [:compile, :certificate ] do |t|
|
153
|
+
t.storetype = "PKCS12"
|
154
|
+
#change keystore and storepass if you use your own key
|
155
|
+
t.keystore = "cert/cert.p12"
|
156
|
+
t.storepass = "secret"
|
157
|
+
t.output = model.air_output_dir
|
158
|
+
t.application_descriptor = "src/<%= project_name %>-app.xml"
|
159
|
+
t.files = [ model.output, model.asset_dir ]
|
160
|
+
t.gem_name = model.compiler_gem_name
|
161
|
+
end
|
162
|
+
|
data/rakefile.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'rake/gempackagetask'
|
2
|
+
require 'rake/clean'
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'lib/sprout/air/version'
|
5
|
+
|
6
|
+
SPROUT_HOME = ENV['SPROUT_HOME']
|
7
|
+
PROJECT = 'sprout'
|
8
|
+
NAME = 'sprout-air-bundle'
|
9
|
+
SUMMARY = 'Project and Code Generators for Air Development'
|
10
|
+
GEM_VERSION = Sprout::Air::VERSION::STRING
|
11
|
+
AUTHOR = 'Pattern Park'
|
12
|
+
EMAIL = 'projectsprouts@googlegroups.com'
|
13
|
+
HOMEPAGE = 'http://www.projectsprouts.org'
|
14
|
+
DESCRIPTION = "Code Generation and Rake Tasks for Air Development"
|
15
|
+
HOMEPATH = "http://#{PROJECT}.rubyforge.org"
|
16
|
+
RELEASE_TYPES = ["gem"]
|
17
|
+
|
18
|
+
require File.join(SPROUT_HOME, 'sprout/script/build_helpers')
|
19
|
+
|
20
|
+
PKG_LIST = FileList['[a-zA-Z]*',
|
21
|
+
'lib/**/*'
|
22
|
+
]
|
23
|
+
|
24
|
+
PKG_LIST.exclude('.svn')
|
25
|
+
PKG_LIST.exclude('artifacts')
|
26
|
+
PKG_LIST.each do |file|
|
27
|
+
task :package => file
|
28
|
+
end
|
29
|
+
|
30
|
+
spec = Gem::Specification.new do |s|
|
31
|
+
s.platform = Gem::Platform::RUBY
|
32
|
+
s.summary = SUMMARY
|
33
|
+
s.description = DESCRIPTION
|
34
|
+
s.name = NAME
|
35
|
+
s.version = GEM_VERSION
|
36
|
+
s.author = AUTHOR
|
37
|
+
s.email = EMAIL
|
38
|
+
s.homepage = HOMEPAGE
|
39
|
+
s.rubyforge_project = PROJECT
|
40
|
+
s.require_path = 'lib'
|
41
|
+
s.autorequire = 'sprout/air'
|
42
|
+
s.has_rdoc = true
|
43
|
+
s.extra_rdoc_files = %w( README )
|
44
|
+
s.rdoc_options << '--main' << 'README'
|
45
|
+
s.rdoc_options << '--title' << DESCRIPTION
|
46
|
+
s.rdoc_options << '--line-numbers' << '--inline-source'
|
47
|
+
s.rdoc_options << '--charset' << 'utf-8'
|
48
|
+
s.rdoc_options << '-i' << '.'
|
49
|
+
s.files = PKG_LIST.to_a
|
50
|
+
|
51
|
+
s.add_dependency('sprout', '>= 0.7.211')
|
52
|
+
s.add_dependency('sprout-as3-bundle', '>= 1.0.28')
|
53
|
+
s.add_dependency('sprout-flex4sdk-tool', '>= 4.2.10')
|
54
|
+
end
|
55
|
+
|
56
|
+
Rake::GemPackageTask.new(spec) do |p|
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sprout-air-bundle
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pattern Park
|
8
|
+
autorequire: sprout/air
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-02-16 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: sprout
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.7.211
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: sprout-as3-bundle
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.28
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: sprout-flex4sdk-tool
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 4.2.10
|
44
|
+
version:
|
45
|
+
description: Code Generation and Rake Tasks for Air Development
|
46
|
+
email: projectsprouts@googlegroups.com
|
47
|
+
executables: []
|
48
|
+
|
49
|
+
extensions: []
|
50
|
+
|
51
|
+
extra_rdoc_files:
|
52
|
+
- README
|
53
|
+
files:
|
54
|
+
- rakefile.rb
|
55
|
+
- README
|
56
|
+
- lib/sprout/air/version.rb
|
57
|
+
- lib/sprout/air.rb
|
58
|
+
- lib/sprout/generators/project/project_generator.rb
|
59
|
+
- lib/sprout/generators/project/templates/generate
|
60
|
+
- lib/sprout/generators/project/templates/MainClass.mxml
|
61
|
+
- lib/sprout/generators/project/templates/MainStyle.css
|
62
|
+
- lib/sprout/generators/project/templates/META/Application-app.xml
|
63
|
+
- lib/sprout/generators/project/templates/META/Application-Debug-app.xml
|
64
|
+
- lib/sprout/generators/project/templates/META/cert.p12
|
65
|
+
- lib/sprout/generators/project/templates/META/cert_readme.txt
|
66
|
+
- lib/sprout/generators/project/templates/ProjectSprouts.png
|
67
|
+
- lib/sprout/generators/project/templates/rakefile.rb
|
68
|
+
- lib/sprout/generators/project/templates/README.txt
|
69
|
+
has_rdoc: true
|
70
|
+
homepage: http://www.projectsprouts.org
|
71
|
+
licenses: []
|
72
|
+
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options:
|
75
|
+
- --main
|
76
|
+
- README
|
77
|
+
- --title
|
78
|
+
- Code Generation and Rake Tasks for Air Development
|
79
|
+
- --line-numbers
|
80
|
+
- --inline-source
|
81
|
+
- --charset
|
82
|
+
- utf-8
|
83
|
+
- -i
|
84
|
+
- .
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
92
|
+
version:
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: "0"
|
98
|
+
version:
|
99
|
+
requirements: []
|
100
|
+
|
101
|
+
rubyforge_project: sprout
|
102
|
+
rubygems_version: 1.3.5
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: Project and Code Generators for Air Development
|
106
|
+
test_files: []
|
107
|
+
|