Permalink
Browse files

add post install script for package, because can't make symbolic link…

… of rb_nibtool if package building and end-users are different Xcode environment
  • Loading branch information...
1 parent 33f18a3 commit c38e96dd04dcdd28746eb2674475745a9788e13e @Watson1978 Watson1978 committed Feb 20, 2012
Showing with 9 additions and 1 deletion.
  1. +8 −0 misc/release/package_script/postinstall
  2. +1 −1 rakelib/packager.rake
View
8 misc/release/package_script/postinstall
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+NIBTOOL=/Library/Frameworks/MacRuby.framework/Versions/Current/usr/bin/rb_nibtool
+XCODE_DIR=`xcode-select -print-path`
@seanlilmateus
seanlilmateus Feb 21, 2012

I believe that the new Xcode version (4.3) select no folder for 'xcode-select',
if you run **xcode-select -printf-path, you will get an error:

xcode-select: Error: No Xcode folder is set. Run xcode-select -switch to set the path to the Xcode folder.

@ferrous26
ferrous26 Feb 21, 2012

Hmm. This is a bit of a dilemma. If it is not set, would it be better to ask the user to do this first, or should we try and detect where Xcode is and set the path as part of the script

+
+ln -s $NIBTOOL $XCODE_DIR/Tools/rb_nibtool
+
+exit 0
View
2 rakelib/packager.rake
@@ -24,7 +24,7 @@ task :nightly do
package_dir = ["#{ENV['HOME']}/tmp", "#{ENV['HOME']}/Desktop", '/tmp'].find { |dir| File.exist?(dir) }
package_date = Time.now.strftime("%Y-%m-%d")
package = "#{package_dir}/macruby_nightly-#{package_date}.pkg"
- `/Developer/usr/bin/packagemaker --doc #{File.expand_path(File.dirname(__FILE__))}/../misc/release/macruby_nightly.pmdoc/ --out #{package} --version #{package_date}-nightly`
+ `/Developer/usr/bin/packagemaker --doc #{File.expand_path(File.dirname(__FILE__))}/../misc/release/macruby_nightly.pmdoc/ --out #{package} --scripts #{File.expand_path(File.dirname(__FILE__))}/../misc/release/package_script --version #{package_date}-nightly`
if $?.success?
puts "Package saved to #{package}"
else

3 comments on commit c38e96d

@Watson1978
MacRuby member

@seanlilmateus so, I wrote a note about using Xcode 4.3 in README.
I think everyone should report "should configure 'xcode-select' when installed Xcode 4.3" to Apple :)

@ferrous26
MacRuby member

Yes, Apple setting that value at install time would be nice. :)

But what do we do until that happens? How many people will see the README before they install MacRuby?

@Watson1978
MacRuby member

OK, We need to improve the Installer. I filed the ticket as #1467

Please sign in to comment.