2017-06-11 23:58:45 -03:00
|
|
|
#Powershell script to download and configure the APM SITL environment
|
|
|
|
|
|
|
|
Import-Module BitsTransfer
|
|
|
|
|
|
|
|
Write-Output "Starting Downloads"
|
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Downloading MAVProxy (1/6)"
|
2019-12-07 16:44:14 -04:00
|
|
|
Start-BitsTransfer -Source "https://firmware.ardupilot.org/Tools/MAVProxy/MAVProxySetup-latest.exe" -Destination "$PSScriptRoot\MAVProxySetup-latest.exe"
|
2017-06-11 23:58:45 -03:00
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Downloading Cygwin x64 (2/6)"
|
2017-06-11 23:58:45 -03:00
|
|
|
Start-BitsTransfer -Source "https://cygwin.com/setup-x86_64.exe" -Destination "$PSScriptRoot\setup-x86_64.exe"
|
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Installing Cygwin x64 (3/6)"
|
2021-05-12 07:28:18 -03:00
|
|
|
Start-Process -wait -FilePath $PSScriptRoot\setup-x86_64.exe -ArgumentList "--root=C:\cygwin64 --no-startmenu --local-package-dir=$env:USERPROFILE\Downloads --site=http://cygwin.mirror.constant.com --packages autoconf,automake,ccache,cygwin32-gcc-g++,gcc-g++,git,libtool,make,gawk,libexpat-devel,libxml2-devel,python37,python37-future,python37-lxml,python37-pip,libxslt-devel,python37-devel,procps-ng,zip,gdb,ddd --quiet-mode"
|
|
|
|
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/python3.7 /usr/bin/python'"
|
|
|
|
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/pip3.7 /usr/bin/pip'"
|
2017-06-11 23:58:45 -03:00
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Downloading extra Python packages (4/6)"
|
2020-04-14 22:52:12 -03:00
|
|
|
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy pyserial pymavlink'"
|
2018-05-08 00:45:06 -03:00
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Downloading APM source (5/6)"
|
2019-04-30 07:19:09 -03:00
|
|
|
Copy-Item "APM_install.sh" -Destination "C:\cygwin64\home"
|
|
|
|
Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c ../APM_install.sh"
|
2017-06-11 23:58:45 -03:00
|
|
|
|
2019-03-31 04:06:59 -03:00
|
|
|
Write-Output "Installing MAVProxy (6/6)"
|
2017-06-11 23:58:45 -03:00
|
|
|
& $PSScriptRoot\MAVProxySetup-latest.exe /SILENT | Out-Null
|
|
|
|
|
|
|
|
Write-Host "Finished. Press any key to continue ..."
|
2019-04-30 07:19:09 -03:00
|
|
|
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|