Class: TorQMLBuilder
- Inherits:
-
Object
- Object
- TorQMLBuilder
- Defined in:
- ext/TorQML/FrameGrabber/extconf.rb
Instance Method Summary collapse
- #build ⇒ Object
- #build_all ⇒ Object
- #find_deps ⇒ Object
- #makefile ⇒ Object
- #qmake ⇒ Object
- #sh(command) ⇒ Object
Instance Method Details
#build ⇒ Object
29 30 31 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 29 def build sh("#{@make_bin}") end |
#build_all ⇒ Object
33 34 35 36 37 38 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 33 def build_all find_deps makefile && qmake && build end |
#find_deps ⇒ Object
6 7 8 9 10 11 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 6 def find_deps @pkgconfig_bin = with_config('pkg-config') || ENV['PKGCONFIG'] || find_executable('pkg-config') @qt_path = with_config('qt-dir') ? Pathname(with_config('qt-dir')).realpath : nil @make_bin = ENV['MAKE'] || find_executable('make') @qmake_bin = @qt_path ? @qt_path + 'bin/qmake' : find_executable('qmake') end |
#makefile ⇒ Object
21 22 23 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 21 def makefile sh("#{@qmake_bin}") end |
#qmake ⇒ Object
25 26 27 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 25 def qmake sh("#{@make_bin} qmake") end |
#sh(command) ⇒ Object
13 14 15 16 17 18 19 |
# File 'ext/TorQML/FrameGrabber/extconf.rb', line 13 def sh(command) system(command) success = $?.exitstatus == 0 puts "Command '#{command}' not found." if $?.exitstatus == 127 puts "Command '#{command}' failed." unless success success end |