From facf63d0248fbe656e6fa54f8e93c747778f0a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Wed, 6 Aug 2014 11:29:16 +0200 Subject: [PATCH] [osx] Merge all Info.plist data in one place and ensure there's always a principal class. --- lib/motion/project/template/osx/config.rb | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index fba374db..0ed319b5 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -154,14 +154,22 @@ module Motion; module Project; File.expand_path(File.join('~/Library/Containers', identifier, "Data/rubymotion-repl-#{Time.now.to_i}")) end - def info_plist_data(platform) - Motion::PropertyList.to_s({ + def generic_info_plist + super.merge({ 'NSHumanReadableCopyright' => copyright, 'NSPrincipalClass' => 'NSApplication', 'CFBundleIconFile' => (icon or ''), 'LSMinimumSystemVersion' => deployment_target, 'LSApplicationCategoryType' => (@category.start_with?('public.app-category') ? @category : 'public.app-category.' + @category) - }.merge(generic_info_plist).merge(dt_info_plist).merge(info_plist)) + }) + end + + def merged_info_plist + generic_info_plist.merge(dt_info_plist).merge(info_plist) + end + + def info_plist_data(platform) + Motion::PropertyList.to_s(merged_info_plist) end def strip_args @@ -239,17 +247,17 @@ EOS end main_txt << <