Permalink
Browse files

Dynamically set the Xcode template Framework Search Path at install time

This is so that MacRuby.framework installations to a location other than
/Library/Frameworks can still make use of the Xcode templates without
having to manually change the search path.
  • Loading branch information...
1 parent ee43920 commit 18039d928439da8aa26d1e189053edd75fbb8d67 @ferrous26 ferrous26 committed Sep 24, 2012
@@ -21,7 +21,7 @@
<key>ARCHS</key>
<string>x86_64</string>
<key>FRAMEWORK_SEARCH_PATHS</key>
- <string>&quot;$(LOCAL_LIBRARY_DIR)/Frameworks&quot;</string>
+ <string>&quot;@@@FRAMEWORK_INSTDIR@@@&quot;</string>
</dict>
<!--
Don't forget to include MacRuby
View
@@ -323,6 +323,12 @@ namespace :install do
end
install_recursive 'misc/xcode4-templates', "#{FRAMEWORK_RESOURCES}/Templates", :mode => prog_mode
+ # We need to set the correct search path for new projects
+ template_settings = "#{FRAMEWORK_RESOURCES}/Templates/Project Templates/Base/MacRuby Application.xctemplate/TemplateInfo.plist"
+ input = File.read(template_settings)
+ File.open(template_settings, 'w') do |fd|
+ fd.write input.gsub(/@@@FRAMEWORK_INSTDIR@@@/, FRAMEWORK_INSTDIR)
+ end
end
desc 'Install all Xcode related things'

0 comments on commit 18039d9

Please sign in to comment.