From 0c57019dca4b1ffec4f5faf22591589521d7fbf1 Mon Sep 17 00:00:00 2001 From: Moreno Date: Thu, 19 Apr 2012 14:23:19 +0200 Subject: [PATCH] Minimal compilation fix for Windows. --- lib/capybara_webkit_builder.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/capybara_webkit_builder.rb b/lib/capybara_webkit_builder.rb index 68aaa6e..4e6cf57 100644 --- a/lib/capybara_webkit_builder.rb +++ b/lib/capybara_webkit_builder.rb @@ -30,11 +30,20 @@ module CapybaraWebkitBuilder end def makefile - system("LANG='en_US.UTF-8' #{qmake_bin} -spec #{spec}") + system("#{make_env_variables} #{qmake_bin} -spec #{spec}") end def qmake - system("LANG='en_US.UTF-8' #{make_bin} qmake") + system("#{make_env_variables} #{make_bin} qmake") + end + + def make_env_variables + case RbConfig::CONFIG['host_os'] + when /mingw32/ + '' + else + "LANG='en_US.UTF-8'" + end end def path_to_binary