diff --git a/ext/gosu/extconf.rb b/ext/gosu/extconf.rb index 8dc98110d..fafa654b7 100644 --- a/ext/gosu/extconf.rb +++ b/ext/gosu/extconf.rb @@ -1,10 +1,10 @@ #!/usr/bin/env ruby -WINDOWS_HINTS = %w(-win32 win32- mswin mingw32) - -if RUBY_PLATFORM =~ /mswin|mingw32|mingw64|win32\-|\-win32/ then - puts 'This gem is not meant to be installed on Windows. Instead, please use:' - puts 'gem install gosu --platform=i386-mingw32' +if RUBY_PLATFORM =~ /mswin$|mingw32|mingw64|win32\-|\-win32/ then + platform = (RUBY_PLATFORM =~ /^x64-/ ? 'x64-mingw32' : 'i386-mingw32') + + puts "This gem is not meant to be installed on Windows. Instead, please use:" + puts "gem install gosu --platform=#{platform}" exit 1 end diff --git a/lib/gosu.rb b/lib/gosu.rb index 1b74298c4..01568ca06 100644 --- a/lib/gosu.rb +++ b/lib/gosu.rb @@ -1,6 +1,6 @@ require 'rbconfig' -if RUBY_PLATFORM =~ /mswin$|mingw32|win32-|-win32/ then +if RUBY_PLATFORM =~ /mswin$|mingw32|mingw64|win32\-|\-win32/ then binary_path = File.dirname(__FILE__) # 64-bit builds of Windows use "x64-mingw32" as RUBY_PLATFORM binary_path += '64' if RUBY_PLATFORM =~ /^x64-/