Module: QtDeployWin::Cli
- Defined in:
- lib/qt-deploy-win/cli.rb
Class Method Summary collapse
Class Method Details
.exec ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/qt-deploy-win/cli.rb', line 22 def self.exec target, dist_dir = ARGV.shift, ARGV.shift unless target && dist_dir print_extended_usage exit 2 end builder = ::QtDeployWin::Builder.new( executable: target, dist_dir: dist_dir, qt_dir: ENV["QTDIR"], windeployqt_args: ARGV.to_a ) unless builder.valid? print_usage puts puts "The following errors occured:" builder.errors.each do |err| puts " " + err end exit end builder.build end |
.print_extended_usage ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/qt-deploy-win/cli.rb', line 9 def self.print_extended_usage print_usage puts puts "Pass an executable as a first argument" + " and it will be copied to the directoy passed" + " as a second argument along with all dependencies." puts puts "You should also specify a correct path to the Qt" + " installation directroy." puts "Current ENV['QTDIR']: #{ENV['QTDIR']}" puts "Example ENV['QTDIR']: C:/Qt/5.5/msvc2013" end |
.print_usage ⇒ Object
5 6 7 |
# File 'lib/qt-deploy-win/cli.rb', line 5 def self.print_usage puts "Usage: #{$0} some-qt-app.exe dist-dir" end |