Module: CapybaraWebkitBuilder
- Extended by:
- CapybaraWebkitBuilder
- Included in:
- CapybaraWebkitBuilder
- Defined in:
- lib/capybara_webkit_builder.rb
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
29 30 31 32 33 34 |
# File 'lib/capybara_webkit_builder.rb', line 29 def build system(make_bin) or return false FileUtils.mkdir("bin") unless File.directory?("bin") FileUtils.cp("src/webkit_server", "bin", :preserve => true) end |
#build_all ⇒ Object
36 37 38 39 40 |
# File 'lib/capybara_webkit_builder.rb', line 36 def build_all makefile && qmake && build end |
#make_bin ⇒ Object
7 8 9 10 |
# File 'lib/capybara_webkit_builder.rb', line 7 def make_bin make_binaries = ['gmake', 'make'] make_binaries.detect { |make| system("which #{make}") } end |
#makefile ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/capybara_webkit_builder.rb', line 12 def makefile qmake_binaries = ['qmake', 'qmake-qt4'] qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") } case RbConfig::CONFIG['host_os'] when /linux/ system("#{qmake} -spec linux-g++") when /freebsd/ system("#{qmake} -spec freebsd-g++") else system("#{qmake} -spec macx-g++") end end |
#qmake ⇒ Object
25 26 27 |
# File 'lib/capybara_webkit_builder.rb', line 25 def qmake system("#{make_bin} qmake") end |