Skip to content

Instantly share code, notes, and snippets.

View devboy's full-sized avatar

Dominic Graefen devboy

View GitHub Profile
@devboy
devboy / buildfile
Created January 25, 2011 15:45
Parent project calls compile task with :mxmlc, but I would like it to ignore the compile/test goals
require "../buildr_as3/lib/buildr/as3"
repositories.remote << "http://artifacts.devboy.org"
VERSION_NUMBER = "1.0"
FLEX_SDK = Buildr::Compiler::Flex4SDK.new({:sdk_version => "4.1.0.16076"})
FLEX_SDK.default_options["compiler.incremental"] = "true"
desc "buildr-as3 example project"
define "buildr_as3_exampleproject" do
@devboy
devboy / DirectConnectionChannel
Created February 1, 2011 19:44
DirectConnectionChannel for HydraP2P >> not properly tested nor implemented in HydraP2P >> https://github.com/devboy/HydraP2P
package org.devboy.hydra.stream {
import flash.events.NetStatusEvent;
import flash.media.Video;
import flash.net.GroupSpecifier;
import flash.net.NetStream;
import org.devboy.hydra.HydraChannel;
import org.devboy.hydra.HydraEvent;
import org.devboy.hydra.HydraService;
@devboy
devboy / com.powerflasher.fdt.classpath
Created February 4, 2011 12:46
FDT Classpath creator -- doesn't work with absolute or releative paths outside the project.
<?xml version="1.0" encoding="UTF-8"?>
<AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/player/{playerVersion}/playerglobal.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/flex.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/textLayout.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/framework.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/framework.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/rpc.swc</AS3Classpath>
<AS3Classpath type="lib" sdkBased="true" useAsSharedCode="false" generateProblems="false">frameworks/libs/spark.swc<
@devboy
devboy / gist:919357
Created April 14, 2011 12:20
This should be the shortest way to discover if an as3/mxml project should be recompiled or not ;)
def needed?(sources, target, dependencies)
return true unless File.exist?(@project.get_as3_output)
Dir.glob(FileList[sources,dependencies].to_a.collect{ |file| file += "**/*" } ).
map{|file| File.stat(file).mtime}.max > File.stat(@project.get_as3_output).mtime
end
@devboy
devboy / gist:921681
Created April 15, 2011 13:29
FlexUnit4 output of buildr-as3
Devboys-MacBook-Pro:mxmlc_swf devboy$ buildr test
(in /Users/devboy/Development/Source/Ruby/buildr_as3_test, development)
Testing buildr_as3_test:mxmlc_swf
Compiling buildr_as3_test:mxmlc_swf into /Users/devboy/Development/Source/Ruby/buildr_as3_test/mxmlc_swf/target/bin
Loading configuration file /Users/devboy/.m2/repository/com/adobe/flex/sdk/4.1.0.16076/sdk-4.1.0.16076/frameworks/flex-config.xml
/Users/devboy/Development/Source/Ruby/buildr_as3_test/mxmlc_swf/src/main/as3/Test.as: Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option.
/Users/devboy/Development/Source/Ruby/buildr_as3_test/mxmlc_swf/target/bin/Test.swf (864 bytes)
[INFO] Apparat -- http://apparat.googlecode.com/
[INFO] Launching tool: Turbo Diesel Sport Injection
$ gem install buildr-as3
$ gem update buildr-as3
Successfully installed buildr-as3-0.2.2
Gems updated: buildr-as3
Installing ri documentation for buildr-as3-0.2.2...
Installing RDoc documentation for buildr-as3-0.2.2...
AdvancedExample
└── MyApplication
   └── src
      └── main
         └── as3
         └── MyApplication.as
AdvancedExample
└── MyApplication
└── buildfile