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
8 misc/release/package_script/postinstall
@@ -0,0 +1,8 @@
+XCODE_DIR=`xcode-select -print-path`
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 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
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 ="%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}"

3 comments on commit c38e96d

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 :)

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?

MacRuby member

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

Please sign in to comment.