Fixed a bug in build system. If info_plist is customized at except the setup block end, it might cause build error

ex)

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.info_plist['SomeVariable'] = 'SomeValue'
  app.name = 'test_plist'
end
This commit is contained in:
Watson
2012-09-25 10:52:08 +09:00
parent b8b154e114
commit 2e0a13b126
2 changed files with 9 additions and 5 deletions

2
NEWS
View File

@@ -2,6 +2,8 @@
* Fixed a bug when using Objective-C properties implemented using message
forwarding (ex. GKMatchRequest's maxPlayers).
* Fixed a bug in build system. If info_plist is customized at except the
setup block end, it might cause build error.
* Fixed a bug in Range evaluation order. Make sure evaluating a Range's begin
at first. (ex. (x = 0)..(x + 1) )
* Fixed a bug in Regexp which does not consider the octal literals.

View File

@@ -60,6 +60,7 @@ module Motion; module Project
def initialize(project_dir, build_mode)
@project_dir = project_dir
@files = Dir.glob(File.join(project_dir, 'app/**/*.rb'))
@info_plist = {}
@dependencies = {}
@frameworks = ['UIKit', 'Foundation', 'CoreGraphics']
@weak_frameworks = []
@@ -549,7 +550,11 @@ EOS
end
def info_plist
@info_plist ||= {
@info_plist
end
def info_plist_data
info_plist.merge!({
'BuildMachineOSBuild' => `sw_vers -buildVersion`.strip,
'MinimumOSVersion' => deployment_target,
'CFBundleDevelopmentRegion' => 'en',
@@ -584,10 +589,7 @@ EOS
'DTPlatformVersion' => '5.1',
'DTXcodeBuild' => '4E1019',
'DTPlatformBuild' => '9B176'
}
end
def info_plist_data
})
Motion::PropertyList.to_s(info_plist)
end