diff --git a/lib/rtoolsHCK.rb b/lib/rtoolsHCK.rb index 0519d41..9fd61aa 100755 --- a/lib/rtoolsHCK.rb +++ b/lib/rtoolsHCK.rb @@ -1301,13 +1301,15 @@ def replace_command(cmd, replacement_list) result end - def get_custom_command(r_directory, windows_path, custom_cmd) - replacement_list = { + def install_driver_list(r_directory, windows_path) + { '@driver_dir@' => r_directory, '@inf_path@' => windows_path } + end - replace_command(custom_cmd, replacement_list) + def get_custom_command(r_directory, windows_path, custom_cmd) + replace_command(custom_cmd, install_driver_list(r_directory, windows_path)) end def install_driver_command(r_directory, windows_path, install_method, custom_cmd = nil) @@ -1348,10 +1350,12 @@ def do_install_machine_driver_package(machine, force_install_cert = options[:force_install_cert] sys_file = options[:sys_file] - r_directory = do_upload_to_machine(machine, l_directory) - windows_path = "#{r_directory}/#{inf_file}".tr('/', '\\') + r_directory = do_upload_to_machine(machine, l_directory).tr('/', '\\') + windows_path = "#{r_directory}\\#{inf_file}" install_certificate(machine, windows_path, sys_file) if install_method.eql?('PNP') || force_install_cert machine_run(machine, install_driver_command(r_directory, windows_path, install_method, custom_cmd)) + + install_driver_list(r_directory, windows_path) end public @@ -1383,12 +1387,12 @@ def install_machine_driver_package(machine, file = File.join(l_directory, inf_file) raise 'Inf file not valid.' unless File.exist?(file) - do_install_machine_driver_package(machine, - install_method, - l_directory, - inf_file, - options) - @json ? { 'result' => 'Success' } : true + driver_info = do_install_machine_driver_package(machine, + install_method, + l_directory, + inf_file, + options) + @json ? { 'result' => 'Success', 'content' => driver_info } : driver_info end end diff --git a/lib/version.rb b/lib/version.rb index 2a45143..5c63925 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -3,5 +3,5 @@ # rtoolsHCK version extend to class class RToolsHCK # Current rtoolsHCK version - VERSION = '0.6.0' + VERSION = '0.6.1' end diff --git a/tools/toolsHCK.ps1 b/tools/toolsHCK.ps1 index 9e1d91d..8cc760c 100644 --- a/tools/toolsHCK.ps1 +++ b/tools/toolsHCK.ps1 @@ -40,7 +40,7 @@ if ($env:WTTSTDIO -like "*\Hardware Certification Kit\*") { } ## -$Version = "0.6.0" +$Version = "0.6.1" $MaxJsonDepth = 6 ##