Created
June 28, 2012 22:40
-
-
Save headius/3014429 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/rakelib/installer.rake b/rakelib/installer.rake | |
index 3b91678..551f1d8 100644 | |
--- a/rakelib/installer.rake | |
+++ b/rakelib/installer.rake | |
@@ -15,18 +15,18 @@ UNINSTALLER_PMDOC = 'JRuby-uninstaller.pmdoc/01uninstaller.xml' | |
UNINSTALLER_SCRIPT = 'scripts/uninstaller.postinstall' | |
UNINSTALLER_WELCOME= 'Welcome.uninstaller.rtf' | |
-pkgmaker = `mdfind "kMDItemDisplayName=='PackageMaker*'"`.chomp | |
-if pkgmaker == "" | |
- warn 'PackageMaker not found' | |
-else | |
- PKGMAKER=File.join(pkgmaker, 'Contents', 'MacOS', 'PackageMaker') | |
-end | |
- | |
task :installer => [:macos_installer, :windows_installer] | |
task :macos_installer do | |
next unless RbConfig::CONFIG['target_os'] =~ /darwin/ | |
- next unless defined? PKGMAKER | |
+ | |
+ pkgmaker = `mdfind "kMDItemDisplayName=='PackageMaker*'"`.chomp | |
+ if pkgmaker == "" | |
+ warn 'PackageMaker not found, skipping OS X Installer' | |
+ next | |
+ else | |
+ pkgmaker=File.join(pkgmaker, 'Contents', 'MacOS', 'PackageMaker') | |
+ end | |
puts "\nBuilding OS X Installer" | |
@@ -50,8 +50,8 @@ task :macos_installer do | |
puts "- Building package" | |
mkdir_p PKG_DIR | |
- sh "time #{PKGMAKER} --no-recommend -v --doc JRuby-installer.pmdoc --out #{PKG_DIR}/JRuby-#{VERSION_JRUBY}.pkg --version #{VERSION_JRUBY}" | |
- sh "time #{PKGMAKER} --no-recommend -v --doc JRuby-uninstaller.pmdoc --out #{PKG_DIR}/JRuby-uninstaller-#{VERSION_JRUBY}.pkg --version #{VERSION_JRUBY}" | |
+ sh "time #{pkgmaker} --no-recommend -v --doc JRuby-installer.pmdoc --out #{PKG_DIR}/JRuby-#{VERSION_JRUBY}.pkg --version #{VERSION_JRUBY}" | |
+ sh "time #{pkgmaker} --no-recommend -v --doc JRuby-uninstaller.pmdoc --out #{PKG_DIR}/JRuby-uninstaller-#{VERSION_JRUBY}.pkg --version #{VERSION_JRUBY}" | |
rm DMG if File.exist? DMG = File.join(BASE_DIR, DIST_DIR, "JRuby-#{VERSION_JRUBY}.dmg") | |
sh "time hdiutil create #{DMG} -volname JRuby-#{VERSION_JRUBY} -fs HFS+ -srcfolder #{PKG_DIR}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment