Created
August 10, 2009 00:44
-
-
Save itszero/164964 to your computer and use it in GitHub Desktop.
This file contains 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
zeros-macbook-pro-2:ZRChromaHash Zero$ ls -R . | |
Debug ZRChromaHashColorAnimation.j | |
Info.plist ZRChromaHashTextField.j | |
Rakefile ZRChromaHashView.j | |
Release licenses | |
ZRChromaHash | |
./Debug: | |
ZRChromaHash | |
./Debug/ZRChromaHash: | |
Info.plist browser.platform objj.platform | |
./Debug/ZRChromaHash/browser.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
./Debug/ZRChromaHash/objj.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
./Release: | |
ZRChromaHash | |
./Release/ZRChromaHash: | |
Info.plist browser.platform objj.platform | |
./Release/ZRChromaHash/browser.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
./Release/ZRChromaHash/objj.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j.tmp | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
ZRChromaHashTextField.j | |
./ZRChromaHash: | |
Info.plist browser.platform objj.platform | |
./ZRChromaHash/browser.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
./ZRChromaHash/objj.platform: | |
ZRChromaHash.sj ZRChromaHashTextField.j | |
ZRChromaHashColorAnimation.j ZRChromaHashView.j | |
./licenses: | |
MIT |
This file contains 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
#!/usr/bin/env ruby | |
require 'rake' | |
require 'objective-j' | |
require 'objective-j/bundletask' | |
module ZRChromaHash | |
module License | |
MIT = File.expand_path(File.join(File.dirname(File.dirname(__FILE__)), 'licenses', '/MIT')) | |
end | |
end | |
task :all => [:release, :debug] | |
task :default => [:all] | |
task :release do | |
ENV['CONFIG'] = 'Release' | |
spawn_rake('build') | |
end | |
task :debug do | |
ENV['CONFIG'] = 'Debug' | |
spawn_rake('build') | |
end | |
$CONFIGURATION = ENV['CONFIG'] | |
$CONFIGURATION = 'Release' unless $CONFIGURATION | |
$ENVIRONMENT_PRODUCT = File.join('.', 'ZRChromaHash') | |
$BUILD_PATH = File.join('.', $CONFIGURATION, 'ZRChromaHash') | |
task :build => [:ZRChromaHash, $ENVIRONMENT_PRODUCT] | |
ObjectiveJ::BundleTask.new(:ZRChromaHash) do |t| | |
t.name = 'ZRChromaHash' | |
t.identifier = 'idv.Zero.ZRChromaHash' | |
t.version = '0.2.2' | |
t.author = 'itsZero' | |
t.email = 'itsZero at gmail dot com' | |
t.summary = 'The Chroma-hash port in Cappuccino, a sexy, yet secure dynamic visualization of password field input.' | |
t.sources = FileList['**/*.j'] | |
t.resources = FileList['Resources/*'].to_a | |
t.license = ZRChromaHash::License::MIT | |
t.build_path = $BUILD_PATH | |
t.flag = '-DDEBUG -g' if $CONFIGURATION == 'Debug' | |
t.flag = '-O' if $CONFIGURATION == 'Release' | |
t.type = ObjectiveJ::Bundle::Type::Framework | |
t.platforms += [ObjectiveJ::Platform::Browser] | |
end | |
#Framework in environment directory | |
file_d $ENVIRONMENT_PRODUCT => [:ZRChromaHash] do | |
cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT) | |
end | |
CLOBBER.include($ENVIRONMENT_PRODUCT) | |
def spawn_rake(task_name) | |
system %{#{$serialized_env} #{$0} #{task_name}} | |
rake abort if ($? != 0) | |
end | |
def serialized_env | |
env = "" | |
env += %{CONFIG="#{ENV['CONFIG']}" } if ENV['CONFIG'] | |
env += %{BUILD_DIR="#{ENV['BUILD_DIR']}" } if ENV['BUILD_DIR'] | |
return env | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment