Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions lib/rtoolsHCK.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# rtoolsHCK version extend to class
class RToolsHCK
# Current rtoolsHCK version
VERSION = '0.6.0'
VERSION = '0.6.1'
end
2 changes: 1 addition & 1 deletion tools/toolsHCK.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ($env:WTTSTDIO -like "*\Hardware Certification Kit\*") {
}

##
$Version = "0.6.0"
$Version = "0.6.1"
$MaxJsonDepth = 6
##

Expand Down