-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds file to automatically install Windows dependencies if using Windows
- Loading branch information
1 parent
2ec9a62
commit 64dedb0
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
64dedb0
There was a problem hiding this comment.
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.