Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move Xcode Template setup to ruby_install_xcode_support

So that it can be easily redone if the framework moves.
  • Loading branch information...
commit 2f660e8f704f8bb1717810b197e3f9996921be63 1 parent 18039d9
@ferrous26 ferrous26 authored
Showing with 11 additions and 8 deletions.
  1. +11 −2 bin/ruby_install_xcode_support
  2. +0 −6 rakelib/install.rake
View
13 bin/ruby_install_xcode_support
@@ -42,8 +42,9 @@ end
require 'fileutils'
require 'rbconfig'
-version = RbConfig::CONFIG['INSTALL_VERSION']
-FRAMEWORK = RbConfig::CONFIG['prefix'].sub /#{version}.+$/, 'Current'
+version = RbConfig::CONFIG['INSTALL_VERSION']
+FRAMEWORK = RbConfig::CONFIG['prefix'].sub(/#{version}.+$/, 'Current')
+INSTDIR = FRAMEWORK.sub(/\/MacRuby.framework\/Versions.+$/, '')
NSLog("Installing IB support")
@@ -72,6 +73,14 @@ else
# File.exist? will return false if the file is a broken symlink
FileUtils.rm_f(NIBTOOL_DEST) # so we remove it no matter what
File.symlink(TEMPLATE_SRC, TEMPLATE_DEST)
+
+ # 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@@@/, INSTDIR)
+ end
end
NSLog("MacRuby Xcode integration successfully installed")
View
6 rakelib/install.rake
@@ -323,12 +323,6 @@ 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'
Please sign in to comment.
Something went wrong with that request. Please try again.