Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better install UX and README instructions. Closes #511.

  • Loading branch information...
commit 371feefac3b0873b9608297f0a72d96b6cf24b3a 1 parent f6820c6
Brian Shirai brixen authored
Showing with 33 additions and 7 deletions.
  1. +5 −4 README
  2. +1 −1  Rakefile
  3. +15 −2 configure
  4. +12 −0 rakelib/install.rake
9 README
View
@@ -28,11 +28,12 @@ To install Rubinius, use the following steps:
3. cd rubinius
4. ./configure --prefix=/path/to/install/dir
5. rake install
- 6. Add /path/to/install/dir/bin to your PATH
- 7. Run 'rbx some_script.rb' or just 'rbx' to launch IRB.
-Once you have installed Rubinius, you can access the built-in documentation
-any time by running 'rbx docs'.
+When the install process finishes, follow the directions to add the Rubinius
+executable (bin) directory to you PATH.
+
+After installing Rubinius, you can access the built-in documentation at any
+time by running 'rbx docs'.
4. Version 1.1
2  Rakefile
View
@@ -27,7 +27,7 @@ end
require config_rb
BUILD_CONFIG = Rubinius::BUILD_CONFIG
-unless BUILD_CONFIG[:config_version] == 19
+unless BUILD_CONFIG[:config_version] == 20
STDERR.puts "Your configuration is outdated, please run ./configure first"
exit 1
end
17 configure
View
@@ -31,6 +31,7 @@ class Configure
# Compiler / build settings
@compiler = ENV['CC'] || 'gcc'
@rake = ENV['RAKE'] || 'rake'
+ @install = false
# LLVM settings
@use_llvm = true
@@ -69,7 +70,7 @@ class Configure
@libversion = "1.1"
@version = "#{@libversion}.0"
@release_date = "2010-09-23"
- @config_version = 19
+ @config_version = 20
if !ENV['RELEASE'] and File.directory?(root + "/.git")
@buildrev = `git rev-list --all | head -n1`.chomp
@@ -148,6 +149,7 @@ class Configure
o.doc "\n File system paths for installing Rubinius"
o.on "-P", "--prefix", "PATH", "Install Rubinius in subdirectories of PATH" do |dir|
+ @install = true
dir = File.expand_path dir
if !ENV['RELEASE'] and File.directory? dir and dir !~ /(rubinius|rbx)\/?$/
@@ -170,14 +172,17 @@ class Configure
end
o.on "-B", "--bindir", "PATH", "Install Rubinius executable in PATH" do |dir|
+ @install = true
@bindir = expand dir
end
o.on "-I", "--includedir", "PATH", "Install Rubinius C-API include files in PATH" do |dir|
+ @install = true
@includedir = expand dir
end
o.on "-L", "--libdir", "PATH", "Install Ruby library in PATH" do |dir|
+ @install = true
@libdir = expand(dir) + "/rubinius/#{@libversion}"
@runtime = @libdir + "/runtime"
@lib_path = @libdir + "/lib"
@@ -188,18 +193,22 @@ class Configure
end
o.on "-M", "--mandir", "PATH", "Install man pages in PATH" do |dir|
+ @install = true
@mandir = expand dir
end
o.on "-G", "--gemsdir", "PATH", "Install gems in PATH" do |dir|
+ @install = true
@gemsdir = expand dir
end
o.on "--sitedir", "PATH", "Install site-specific Ruby code in PATH" do |dir|
+ @install = true
@sitedir = expand dir
end
o.on "--vendordir", "PATH", "Install vendor-specific Ruby code in PATH" do |dir|
+ @install = true
@vendordir = expand dir
end
@@ -756,7 +765,11 @@ end
process
write_config
print_debug if @verbose
- @log.write "\nConfigured. Run 'rake' to build and run VM tests and rubyspecs"
+ if @install
+ @log.write "\nConfigured. Run 'rake install' to install Rubinius"
+ else
+ @log.write "\nConfigured. Run 'rake' to build and run VM tests and rubyspecs"
+ end
end
# Handles user output and logging while running configure.
12 rakelib/install.rake
View
@@ -136,6 +136,18 @@ namespace :install do
# Install the Rubinius executable
exe = "#{BUILD_CONFIG[:bindir]}/#{BUILD_CONFIG[:program_name]}"
install "vm/vm", install_dir(exe), :mode => 0755, :verbose => true
+
+ STDOUT.puts <<-EOM
+--------
+
+Successfully installed Rubinius #{BUILD_CONFIG[:version]}
+
+Add '#{BUILD_CONFIG[:bindir]}' to your PATH
+
+ 1. Run Ruby files with '#{BUILD_CONFIG[:program_name]} path/to/file.rb'
+ 2. Start IRB by running '#{BUILD_CONFIG[:program_name]}' with no arguments
+
+ EOM
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.