diff --git a/Tools/autotest/win_sitl/readme.txt b/Tools/autotest/win_sitl/readme.txt index d24199f44c..b056cc128d 100644 --- a/Tools/autotest/win_sitl/readme.txt +++ b/Tools/autotest/win_sitl/readme.txt @@ -1,30 +1,4 @@ -SITL for Windows Automatic Installation Scripts - -This is a collection of batch files to automatically install and run APM SITL required libraries (http://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html) on a Windows-based PC/laptop. - -The scripts are based on the SITL setup instructions here: http://ardupilot.org/dev/docs/sitl-native-on-windows.html -Prerequisites: - - None! The scripts will take care of everything. - You will need an Internet connection and an hour of time (will be less with a fast Internet connection) for the scripts to download and install everything. - -1) Assumptions: - - The scripts will install Cygwin (to C:\cygwin) and MAVProxy. So access to the C:\ drive is required. - - There are 2 options for installation: Just the development environment (2A) , or the development environment plus APM source code (2B). The first option is for users that already have the APM source code on their computer (or wish to have it in a particular folder). The second option will download and configure the APM source code too, which is easier for new users. - -2A) Installing just the Development Environment: - - Download and run the script "InstallDevEnvironment.ps1" (right click -> Run in Powershell). This will install Cygwin to C:\cygwin and MAVProxy to C:\Program Files (x86)\MAVProxy - -2B) Installing the Development Environment and APM source code: - - Download and run the script "InstallDevEnvironmentAndAPMSource.ps1" (right click -> Run in Powershell). This will install Cygwin to C:\cygwin and MAVProxy to C:\Program Files (x86)\MAVProxy. The APM source code will be in C:\cygwin\home\\ardupilot - -NOTE: When running the above script, you may recieve an error due to the default Windows security policy not allowing downloaded scripts to run. See https://www.howtogeek.com/106273/how-to-allow-the-execution-of-powershell-scripts-on-windows-7/ for details on how to disable this policy. - -3) Running SITL: +Running SITL: There are several options for running SITL. In all cases, SITL will output a mavlink stream on 127.0.0.1:14550 (UDP) for connection to any GCS software (Such as Mission Planner). diff --git a/Tools/environment_install/jsbsimAPM_install.sh b/Tools/environment_install/APM_install.sh similarity index 68% rename from Tools/environment_install/jsbsimAPM_install.sh rename to Tools/environment_install/APM_install.sh index 868b7c2828..c54b4d9e58 100644 --- a/Tools/environment_install/jsbsimAPM_install.sh +++ b/Tools/environment_install/APM_install.sh @@ -3,11 +3,6 @@ #A simple script to install the APM SITL environment into cygwin git clone git://github.com/ArduPilot/ardupilot.git -git clone git://github.com/tridge/jsbsim.git -cd jsbsim -./autogen.sh -make -cp src/JSBSim.exe /usr/local/bin cd ../ardupilot git submodule update --init --recursive ./modules/waf/waf-light configure --board=sitl diff --git a/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 b/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 index 3d5994abda..9f11924fa3 100644 --- a/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 +++ b/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 @@ -4,25 +4,22 @@ Import-Module BitsTransfer Write-Output "Starting Downloads" -Write-Output "Downloading MAVProxy (1/7)" +Write-Output "Downloading MAVProxy (1/6)" Start-BitsTransfer -Source "http://firmware.ardupilot.org/Tools/MAVProxy/MAVProxySetup-latest.exe" -Destination "$PSScriptRoot\MAVProxySetup-latest.exe" -Write-Output "Downloading Cygwin x64 (2/7)" +Write-Output "Downloading Cygwin x64 (2/6)" Start-BitsTransfer -Source "https://cygwin.com/setup-x86_64.exe" -Destination "$PSScriptRoot\setup-x86_64.exe" -Write-Output "Installing Cygwin x64 (3/7)" +Write-Output "Installing Cygwin x64 (3/6)" Start-Process -wait -FilePath $PSScriptRoot\setup-x86_64.exe -ArgumentList "--root=C:\cygwin --no-startmenu --local-package-dir=$env:USERPROFILE\Downloads --site=http://cygwin.mirror.constant.com --packages autoconf,automake,ccache,gcc-g++,git,libtool,make,gawk,libexpat-devel,libxml2-devel,python2,python2-future,python2-libxml2,python2-pip,libxslt-devel,python2-devel,procps-ng,zip,gdb,ddd --quiet-mode" -Write-Output "Copying JSBSim and APM install script to Cygwin (4/7)" -Start-BitsTransfer -Source "https://github.com/ArduPilot/ardupilot/raw/master/Tools/autotest/win_sitl/jsbsimAPM_install.sh" -Destination "C:\cygwin\home\jsbsimAPM_install.sh" - -Write-Output "Downloading extra Python packages (5/7)" +Write-Output "Downloading extra Python packages (4/6)" Start-Process -wait -FilePath "C:\cygwin\bin\bash" -ArgumentList "--login -i -c 'pip2 install empy'" -Write-Output "Downloading and installing JSBSim, then downloading APM source (6/7)" -Start-Process -wait -FilePath "C:\cygwin\bin\bash" -ArgumentList "--login -i -c ../jsbsimAPM_install.sh" +Write-Output "Downloading APM source (5/6)" +Start-Process -wait -FilePath "C:\cygwin\bin\bash" -ArgumentList "--login -i -c ../APM_install.sh" -Write-Output "Installing MAVProxy (7/7)" +Write-Output "Installing MAVProxy (6/6)" & $PSScriptRoot\MAVProxySetup-latest.exe /SILENT | Out-Null Write-Host "Finished. Press any key to continue ..." diff --git a/Tools/environment_install/install-prereqs-windows.ps1 b/Tools/environment_install/install-prereqs-windows.ps1 index 32228cb0c7..b27d93f11a 100644 --- a/Tools/environment_install/install-prereqs-windows.ps1 +++ b/Tools/environment_install/install-prereqs-windows.ps1 @@ -4,25 +4,19 @@ Import-Module BitsTransfer Write-Output "Starting Downloads" -Write-Output "Downloading MAVProxy (1/7)" +Write-Output "Downloading MAVProxy (1/5)" Start-BitsTransfer -Source "http://firmware.ardupilot.org/Tools/MAVProxy/MAVProxySetup-latest.exe" -Destination "$PSScriptRoot\MAVProxySetup-latest.exe" -Write-Output "Downloading Cygwin x64 (2/7)" +Write-Output "Downloading Cygwin x64 (2/5)" Start-BitsTransfer -Source "https://cygwin.com/setup-x86_64.exe" -Destination "$PSScriptRoot\setup-x86_64.exe" -Write-Output "Installing Cygwin x64 (3/7)" +Write-Output "Installing Cygwin x64 (3/5)" Start-Process -wait -FilePath $PSScriptRoot\setup-x86_64.exe -ArgumentList "--root=C:\cygwin --no-startmenu --local-package-dir=$env:USERPROFILE\Downloads --site=http://cygwin.mirror.constant.com --packages autoconf,automake,ccache,gcc-g++,git,libtool,make,gawk,libexpat-devel,libxml2-devel,python2,python2-future,python2-libxml2,python2-pip,libxslt-devel,python2-devel,procps-ng,zip,gdb,ddd --quiet-mode" -Write-Output "Copying JSBSim install script to Cygwin (4/7)" -Start-BitsTransfer -Source "https://github.com/ArduPilot/ardupilot/raw/master/Tools/autotest/win_sitl/jsbsim_install.sh" -Destination "C:\cygwin\home\jsbsim_install.sh" - -Write-Output "Downloading extra Python packages (5/7)" +Write-Output "Downloading extra Python packages (4/5)" Start-Process -wait -FilePath "C:\cygwin\bin\bash" -ArgumentList "--login -i -c 'pip2 install empy'" -Write-Output "Downloading and installing JSBSim (6/7)" -Start-Process -wait -FilePath "C:\cygwin\bin\bash" -ArgumentList "--login -i -c ../jsbsim_install.sh" - -Write-Output "Installing MAVProxy (7/7)" +Write-Output "Installing MAVProxy (5/5)" & $PSScriptRoot\MAVProxySetup-latest.exe /SILENT | Out-Null Write-Host "Finished. Press any key to continue ..." diff --git a/Tools/environment_install/jsbsim_install.sh b/Tools/environment_install/jsbsim_install.sh deleted file mode 100644 index 2aecce0926..0000000000 --- a/Tools/environment_install/jsbsim_install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -#A simple script to install the APM SITL environment into cygwin - -git clone git://github.com/tridge/jsbsim.git -cd jsbsim -./autogen.sh -make -cp src/JSBSim.exe /usr/local/bin