Created
March 9, 2010 18:34
-
-
Save lukebayes/326914 to your computer and use it in GitHub Desktop.
Example Rakefile that uses the in-progress HaXe bundle sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sprout' | |
# Preliminary Haxe Bundle in vendor: | |
$:.push(File.dirname(__FILE__) + '/vendor/sprout-haxe-bundle/lib') | |
require 'sprout/haxe' | |
#################################### | |
# Configure Project values: | |
project_name = Sprout::Sprout.project_name = 'Waybeams' | |
swc_output = "bin/#{project_name}.swc" | |
debug_input = project_name | |
debug_output = "bin/#{project_name}.swf" | |
test_input = "#{project_name}Runner" | |
test_output = "bin/#{project_name}Runner.swf" | |
#################################### | |
# Set up Debug compile and run: | |
haxe debug_output do |t| | |
t.swf_version = 9 | |
t.input = "actionpack.#{project_name}" | |
t.debug = true | |
t.swf_header = '800:500:40:ffffff' | |
t.source_path << 'src' | |
end | |
desc 'Compile and run debug' | |
flashplayer :debug => debug_output | |
#################################### | |
# Compile swc file: | |
haxe swc_output do |t| | |
t.swf_version = 9 | |
t.input = "actionpack.#{project_name}" | |
t.source_path << 'src' | |
end | |
desc 'Compile SWC' | |
task :swc => swc_output | |
#################################### | |
# Set up Test compile and run: | |
haxe test_output do |t| | |
t.swf_version = 9 | |
t.input = test_input | |
t.debug = true | |
t.swf_header = '640:480:40:ffffff' | |
t.source_path << 'src' | |
t.source_path << 'test' | |
end | |
desc 'Compile and run test harness' | |
flashplayer :test => test_output | |
#################################### | |
task :default => :debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment