Skip to content

Project Sprouts is an open-source, cross-platform project generation and configuration tool for ActionScript 2, ActionScript 3, Adobe AIR Flash and Flex projects

License

Notifications You must be signed in to change notification settings

lancejpollard/project-sprouts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Sprouts

Project Sprouts is an open-source, cross-platform project generation and configuration tool for ActionScript 2, ActionScript 3, and Flex projects.

Project Sprouts provides everything you need to get up and running with SWF development instantly. The only prerequisites are Ruby and RubyGems.

Sprouts includes support for project and code templates, automated build scripts, remote managed libraries, and automatic installation of dependencies like the Flash VM and a variety of compilers and tools.

Sprouts works on OS X, Windows XP, Windows Vista and many flavors of Linux.

Installation

  1. Install Ruby
  2. Install RubyGems
  3. Install the Sprout gem:
gem install sprout

(If prompted, select the appropriate gem for your platform.)

Instructions for the more advanced local installation are below.

Getting Started

Open a terminal and enter the following commands:

Create a new ActionScript 3 project and move into it:

sprout -n as3 SomeProject
cd SomeProject

Resolve all dependencies, compile and launch the SWF:

rake

Generate a new class, test case and test suite:

script/generate utils.MathUtil

Compile and launch the test harness:

rake test

Compile a SWC file:

rake swc

Generate documentation using AsDoc:

rake doc

Execute the test harness, emit a JUnit-compatible test results document, and close the Flash Player when complete or after encountering an uncaught exception:

rake cruise

Display all available Rake tasks:

rake -T

Some Simple, Sample Rake Tasks

Sprouts brings the power of the Rake build language to SWF development. Rake is similar to Make and Ant, but harnesses the full power and flexibility of Ruby to help us describe the structure and automate the behavior of any build, from the simplest to the most complex.

Following are some simple examples of the Rake tasks that Sprouts provides:

ActionScript 3 and MXML Projects:


mxmlc :debug do |t|
  t.input = 'src/SomeProject.as'
  t.output = 'bin/SomeProject.swf'
  t.trace do |player, line|
    if line =~ /END_OF_FILE/ # or whatever the delimiter is
	    player.close
    else
      puts "[trace] #{line}"
    end
	end
end

compc :deploy do |t|
t.input = ‘src/SomeProject.as’
t.output = ‘bin/SomeProject.swc’
end

asdoc :doc do |t|
t.doc_classes = ‘SomeProject’
t.source_path = ‘src’
end

flashplayer :run do |t|
t.swf = ‘bin/SomeProject.swf’
end

ActionScript 2 Projects:

mtasc :debug do |t|
	t.main = true
	t.header = '800:600:24'
	t.input = 'src/SomeProject.as'
	t.output = 'bin/SomeProject.swf'
end

swfmill :skin do |t|
t.input = ‘assets/skins/SomeProjectSkin’
t.output = ‘assets/skins/SomeProjectSkin.swf’
end

flashplayer :run do |t|
t.swf = ‘bin/SomeProject.swf’
end

Some Links

Local Gem Installation (and Flex 4 Project)

Assuming you have a local gem environment setup:


git clone git://github.com/lukebayes/project-sprouts.git
cd project-sprouts
rake install:sprout
rake install:flex4sdk

Then add this to the bottom of your ~/.bash_profile file (ENV variables):


# -- start ProjectSprouts config -- #
export SPROUT_FLEX_2_SDK="/Applications/Adobe\ Flex\ Builder\ 3/sdks/2.0.1" # or wherever it is
export SPROUT_FLEX_3_SDK="/Applications/Adobe\ Flex\ Builder\ 3/sdks/3.2.0" # same
export SPROUT_FLEX_4_SDK="/Applications/Adobe\ Flex\ Builder\ 3/sdks/4.0.0" # same
export SPROUT_HOME="/path/to/project-sprouts"
# -- end ProjectSprouts config -- #

Then generate a sample Flex 4 project and compile:


sprout -n flex4 Flex4Project
cd Flex4Project
rake debug

Assuming you have your ENV variables set, it should find your sdk and compile your app!

This allows you to use your existing Flex SDKs, and to easily contribute to the ProjectSprouts project.

MIT License

Copyright (c) 2007, 2008, 2009 Pattern Park

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Project Sprouts is an open-source, cross-platform project generation and configuration tool for ActionScript 2, ActionScript 3, Adobe AIR Flash and Flex projects

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Ruby 81.0%
  • ActionScript 19.0%