@@ -10,7 +10,7 @@ module ArduinoCI
10
10
class ArduinoDownloaderWindows < ArduinoDownloader
11
11
12
12
def powershell ( *args )
13
- encoded_cmd = Base64 . strict_encode64 ( ( args . shelljoin + " | Out-Null" ) . encode ( 'utf-16le' ) )
13
+ encoded_cmd = Base64 . strict_encode64 ( ( args . shelljoin + " | Out-Null" ) . encode ( 'utf-16le' ) )
14
14
system ( "powershell.exe" , "-encodedCommand" , encoded_cmd )
15
15
end
16
16
@@ -34,8 +34,8 @@ def downloader
34
34
# Download the package_url to package_file
35
35
# @return [bool] whether successful
36
36
def download
37
- puts 'Downloading from ' + package_url
38
37
# Turned off ssl verification
38
+ # This should be acceptable because it won't happen on a user's machine, just CI
39
39
open ( URI . parse ( package_url ) , ssl_verify_mode : 0 ) do |url |
40
40
File . open ( package_file , 'wb' ) { |file | file . write ( url . read ) }
41
41
end
@@ -44,11 +44,9 @@ def download
44
44
# Move the extracted package file from extracted_file to the force_install_location
45
45
# @return [bool] whether successful
46
46
def install
47
- puts 'Installing to ' + self . class . force_install_location
48
47
# Move only the content of the directory
49
48
powershell ( "Move-Item" , extracted_file + "\* " , self . class . force_install_location )
50
49
# clean up the no longer required root extracted folder
51
- puts 'Removing ' + package_file
52
50
powershell ( "Remove-Item" , extracted_file )
53
51
end
54
52
@@ -68,10 +66,8 @@ def extracter
68
66
# Extract the package_file to extracted_file
69
67
# @return [bool] whether successful
70
68
def extract
71
- puts 'Extracting ' + package_file + " to " + extracted_file
72
69
powershell ( "Expand-Archive" , "-Path" , package_file , "-DestinationPath" , extracted_file )
73
70
# clean up the no longer required zip
74
- puts 'Removing ' + package_file
75
71
powershell ( "Remove-Item" , package_file )
76
72
end
77
73
@@ -96,7 +92,6 @@ def self.existing_executable
96
92
Win32 ::Registry ::HKEY_LOCAL_MACHINE . open ( arduino_reg ) do |reg |
97
93
path = reg . read_s ( 'Install_Dir' )
98
94
exe = File . join ( path , "arduino_debug.exe" )
99
- puts "Using existing exe located at " + exe
100
95
return exe if File . exist? exe
101
96
end
102
97
rescue
@@ -107,7 +102,6 @@ def self.existing_executable
107
102
# @return [string]
108
103
def self . force_installed_executable
109
104
exe = File . join ( self . force_install_location , "arduino_debug.exe" )
110
- puts "Using force installed exe located at " + exe
111
105
return nil if exe . nil?
112
106
exe
113
107
end
0 commit comments