Added principal_class support to Rake task. Fixed loading bundles with new platform-aware code.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-03-22 20:30:31 -07:00
1 parent 65d9df9c54
commit 6b1180caa4
2 files changed
+17 -3

No files matched your search

+10 -1
View File
@@ -122,7 +122,16 @@
{
info = CPPropertyListCreateFromData([CPData dataWithString:data]);
[CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:[self bundlePath] + "/" + [self objectForInfoDictionaryKey:"CPBundleExecutable"]] delegate:self];
var platform = '/',
platforms = [self objectForInfoDictionaryKey:"CPBundlePlatforms"];
if (platforms)
{
platform = [platforms firstObjectCommonWithArray:OBJJ_PLATFORMS];
platform = platform ? '/' + platform + ".platform/" : '/';
}
[CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:[self bundlePath] + platform + [self objectForInfoDictionaryKey:"CPBundleExecutable"]] delegate:self];
}
else
{
+7 -2
View File
@@ -197,6 +197,7 @@ module ObjectiveJ
attributes :email, :homepage, :github_project, :description, :license_file, :license
attributes :build_path, :intermediates_path
attribute :principal_class
# attributes :autorequire, :default_executable
# attribute :platform, Gem::Platform::RUBY
@@ -410,8 +411,12 @@ module ObjectiveJ
info_plist_path = build_path + '/Info.plist'
info_plist = { 'CPBundleName' => name, 'CPBundleIdentifier' => identifier, 'CPBundleInfoDictionaryVersion' => 6.0, 'CPBundleVersion' => version, 'CPBundlePackageType' => Bundle::Type.code_string(type) }
info_plist['CPBundlePlatforms'] = platforms;
info_plist['CPBundlePlatforms'] = platforms;
if principal_class
info_plist['CPPrincipalClass'] = principal_class
end
file_d info_plist_path do
File.open(info_plist_path, 'w') do |file|
file.puts info_plist.to_plist