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