add device deployment support

This commit is contained in:
Laurent Sansonetti
2011-07-19 23:51:27 -07:00
parent ec2dc355f2
commit 10e008f4a9
8 changed files with 708 additions and 10 deletions

View File

@@ -27,8 +27,9 @@ end
desc "Run the simulator"
task :simulator => ['build:simulator'] do
app = Rubixir::CONFIG.app_bundle('iPhoneSimulator', true)
sim = File.join(Rubixir::CONFIG.platform_dir('iPhoneSimulator'), '/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator')
sh "\"#{sim}\" -SimulateApplication \"#{Rubixir::CONFIG.app_bundle('iPhoneSimulator', true)}\""
sh "\"#{sim}\" -SimulateApplication \"#{app}\""
end
desc "Create an .ipa package"
@@ -45,8 +46,9 @@ task :package => ['build:ios'] do
end
desc "Deploy on the device"
task :deploy do
# TODO
task :deploy => :package do
deploy = File.join(Rubixir::CONFIG.datadir, 'deploy')
sh "#{deploy} #{Rubixir::CONFIG.archive}"
end
desc "Clear build objects"

View File

@@ -1,7 +1,7 @@
module Rubixir
class Builder
def build(config, platform)
datadir = File.join(File.dirname(__FILE__), '../../../data')
datadir = config.datadir
libstatic = File.join(datadir, 'libmacruby-static.a')
archs = Dir.glob(File.join(datadir, platform, '*.bc')).map do |path|
path.scan(/kernel-(.+).bc$/)[0][0]

View File

@@ -16,6 +16,10 @@ module Rubixir
@bundle_signature = '????'
end
def datadir
File.expand_path(File.join(File.dirname(__FILE__), '../../../data'))
end
def platform_dir(platform)
File.join(@platforms_dir, platform + '.platform')
end