Skip to content

Commit

Permalink
adds file to automatically install Windows dependencies if using Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Mar 8, 2010
1 parent 2ec9a62 commit 64dedb0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ext/mkrf_conf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'rubygems'
require 'rubygems/command.rb'
require 'rubygems/dependency_installer.rb'
STDERR.puts "Actually, there aren't any native extensions. I'm just dynamically installing dependencies based off of your operating system"
begin
Gem::Command.build_args = ARGV
rescue NoMethodError
end
inst = Gem::DependencyInstaller.new
begin
inst.install "rake"
inst.install "win32-process", "~> 0.6.1" if RUBY_PLATFORM =~ /mswin|mingw/
rescue
exit(1)
end

f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w") # create dummy rakefile to indicate success
f.write("task :default\n")
f.close

1 comment on commit 64dedb0

@Milhouse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I was just playing with a mkrf file today for compiling the rsruby gem native code.

Please sign in to comment.