Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (33 sloc) 1.301 kB
WAX_FILES = FileList["*"].exclude(/^(examples|xcode-template|framework|tools)/)
TARGET_XCODE_TEMPLATE = "#{ENV['HOME']}/Library/Application Support/Developer/Shared/Xcode/Project Templates/Wax/Wax iPhone App"
WAX_ROOT = File.expand_path("..", __FILE__)
task :default => :install
desc "Install wax xcode templates"
task :install => "template:create"
namespace :template do
task :create => :clean do
mkdir_p File.dirname(TARGET_XCODE_TEMPLATE)
cp_r "xcode-template", TARGET_XCODE_TEMPLATE
# Copy the wax files into the template
template_wax_path = "#{TARGET_XCODE_TEMPLATE}/wax"
mkdir_p template_wax_path
cp_r WAX_FILES, template_wax_path
`chmod +x "#{TARGET_XCODE_TEMPLATE}/wax/lib/build-scripts/copy-scripts.sh"`
# Create the default run script
puts
puts "Wax Xcode Template Installed!"
puts "-----------------------------"
puts
end
desc "Prepare xcode template for editing"
task :edit => :clean do
ln_s WAX_ROOT, "xcode-template/wax"
`open xcode-template/___PROJECTNAME___.xcodeproj`
end
desc "Cleans up xcode template for packaging"
task :clean do
rm_r File.dirname(TARGET_XCODE_TEMPLATE), :force => true
rm_r "xcode-template/wax", :force => true
rm_r "xcode-template/build", :force => true
end
end
Jump to Line
Something went wrong with that request. Please try again.