From 59f0250a9bc79761f59746801028acd887bb46ca Mon Sep 17 00:00:00 2001 From: Jarred Holman Date: Thu, 9 Apr 2015 01:34:36 +0930 Subject: [PATCH] Let ruby load the devkit instead of trying to find it ourselves. --- Rakefile | 12 +++++++++++- appveyor.yml | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index e5d4690..c4935bc 100644 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,7 @@ task :checkout do end desc "compile v8 via the ruby extension mechanism" -task :compile do +task :compile => :devkit do sh "ruby ext/libv8/extconf.rb" end @@ -77,5 +77,15 @@ task :clean do sh "cd #{GYP_Source} && git checkout -f && git clean -dxf" end +task :devkit do + begin + if RUBY_PLATFORM =~ /mingw/ + require "devkit" + end + rescue LoadError => e + abort "Failed to activate RubyInstaller's DevKit required for compilation." + end +end + task :default => [:checkout, :compile, :spec] task :build => [:clean, :checkout] diff --git a/appveyor.yml b/appveyor.yml index 66dc79a..5d0454a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,6 @@ environment: # scripts that run after cloning repository install: - set PATH=C:\Ruby%ruby_version%\bin;%PATH% - - C:\Ruby%ruby_version%\DevKit\devkitvars.bat - git submodule update --init - ruby --version - gem --version