|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | + |
| 4 | +echo "`nInstalling prerequisites. Please leave the window open until the installation completes." |
| 5 | + |
| 6 | +$cmake_path = 'https://github.com/Kitware/CMake/releases/download/v3.18.3' |
| 7 | +$cmake_file = 'cmake-3.18.3-win32-x86.msi' |
| 8 | +$cmake_name = 'CMake v3.18.3' |
| 9 | +$cmake_hash = 'F39D53371F5330F0C18C544A78F9654B9F799050B157783BD9E0E20F28F27821' |
| 10 | + |
| 11 | +$gccarm_path = 'https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4' |
| 12 | +$gccarm_file = 'gcc-arm-none-eabi-9-2019-q4-major-win32-sha2.exe' |
| 13 | +$gccarm_name = 'GCC-ARM 9-2019q4-major' |
| 14 | +$gccarm_hash = '3580550590B3D2C0998DCF01673EBAD7D9DFD4F6F0436F86CF2C507539C62450' |
| 15 | + |
| 16 | +$termite_path = 'https://www.compuphase.com/software' |
| 17 | +$termite_file = 'termite-3.4.exe' |
| 18 | +$termite_name = 'Termite v3.4' |
| 19 | +$termite_hash = 'CA440B6C7F6EAA812BA5F8BF42AED86E02022CA50A1C72585168C9B671D0FE19' |
| 20 | + |
| 21 | +$iot_explorer_path = 'https://github.com/Azure/azure-iot-explorer/releases/download/v0.11.4' |
| 22 | +$iot_explorer_file = 'Azure.IoT.Explorer.preview.0.11.4.msi' |
| 23 | +$iot_explorer_name = 'Azure IoT Explorer v0.11.4' |
| 24 | +$iot_explorer_hash = '8CAA36336C1C4C55C70D868904639263F56D5D20CB59DC0A18F6817DC0AEC900' |
| 25 | + |
| 26 | +echo "`nDownloading packages..." |
| 27 | + |
| 28 | +echo "(1/4) $cmake_name" |
| 29 | +if ( -not (Test-Path "$env:TEMP\$cmake_file") -Or ((Get-FileHash "$env:TEMP\$cmake_file").Hash -ne $cmake_hash)) |
| 30 | +{ |
| 31 | + (New-Object System.Net.WebClient).DownloadFile("$cmake_path\$cmake_file", "$env:TEMP\$cmake_file") |
| 32 | +} |
| 33 | + |
| 34 | +echo "(2/4) $gccarm_name" |
| 35 | +if ( -not (Test-Path "$env:TEMP\$gccarm_file") -Or ((Get-FileHash "$env:TEMP\$gccarm_file").Hash -ne $gccarm_hash)) |
| 36 | +{ |
| 37 | + (New-Object System.Net.WebClient).DownloadFile("$gccarm_path\$gccarm_file", "$env:TEMP\$gccarm_file") |
| 38 | +} |
| 39 | + |
| 40 | +echo "(3/4) $termite_name" |
| 41 | +if ( -not (Test-Path "$env:TEMP\$termite_file") -Or ((Get-FileHash "$env:TEMP\$termite_file").Hash -ne $termite_hash)) |
| 42 | +{ |
| 43 | + (New-Object System.Net.WebClient).DownloadFile("$termite_path\$termite_file", "$env:TEMP\$termite_file") |
| 44 | +} |
| 45 | + |
| 46 | +echo "(4/4) $iot_explorer_name" |
| 47 | +if ( -not (Test-Path "$env:TEMP\$iot_explorer_file") -Or ((Get-FileHash "$env:TEMP\$iot_explorer_file").Hash -ne $iot_explorer_hash)) |
| 48 | +{ |
| 49 | + (New-Object System.Net.WebClient).DownloadFile("$iot_explorer_path\$iot_explorer_file", "$env:TEMP\$iot_explorer_file") |
| 50 | +} |
| 51 | + |
| 52 | +echo "`nInstalling packages..." |
| 53 | + |
| 54 | +echo "(1/4) $cmake_name" |
| 55 | +Start-Process -wait -FilePath "$env:TEMP\$cmake_file" -ArgumentList "ADD_CMAKE_TO_PATH=System /passive" |
| 56 | + |
| 57 | +echo "(2/4) $gccarm_name" |
| 58 | +Start-Process -wait -FilePath "$env:TEMP\$gccarm_file" -ArgumentList "/S /P /R" |
| 59 | + |
| 60 | +echo "(3/4) $termite_name" |
| 61 | +Start-Process -wait -FilePath "$env:TEMP\$termite_file" -ArgumentList "/S" |
| 62 | + |
| 63 | +echo "(4/4) $iot_explorer_name" |
| 64 | +Start-Process -wait -FilePath "$env:TEMP\$iot_explorer_file" -ArgumentList "/passive" |
| 65 | + |
| 66 | +echo "`nInstallation complete!" |
| 67 | + |
| 68 | +echo "`nPress any key to continue..." |
| 69 | +Read-Host |
0 commit comments