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 @@
- <string>&quot;$(LOCAL_LIBRARY_DIR)/Frameworks&quot;</string>
+ <string>&quot;@@@FRAMEWORK_INSTDIR@@@&quot;</string>
Don't forget to include MacRuby
@@ -323,6 +323,12 @@ namespace :install do
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 =
+, 'w') do |fd|
+ fd.write input.gsub(/@@@FRAMEWORK_INSTDIR@@@/, FRAMEWORK_INSTDIR)
+ end
desc 'Install all Xcode related things'

0 comments on commit 18039d9

Please sign in to comment.