Skip to content

Commit

Permalink
Vagrant fixes (mavlink#3598)
Browse files Browse the repository at this point in the history
* Qt5.5.1 link corrected.

* Qt5.5.1 tarball saves to project's root directory
since qt_deps_tarball used to have prefix of /vagrant.

* Add requests to update machine setup for both Travis and Vagrant

* Vagrant: use config variable in place of static string

* Vagrant: init and update submodules
  • Loading branch information
peterbarker authored and dagar committed Jun 21, 2016
1 parent 4609fbe commit 504d55a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# if you update this file, please consider updating Vagrantfile too

language: cpp

git:
Expand Down
6 changes: 4 additions & 2 deletions .vagrantconfig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
configs:
dev:
'qt_deps_tarball': '/vagrant/Qt5.5.1-linux.tar.bz2'
'qt_deps_tarball': 'Qt5.5.1-linux.tar.bz2'
'qt_deps_unpack_parent_dir': '/tmp'

'qt_deps_unpack_dir': '/tmp/Qt'
Expand All @@ -9,6 +9,8 @@ configs:
'qt_deps_plugins_unpack_dir': '/tmp/Qt/5.5/gcc_64/plugins'
'qt_deps_qml_unpack_dir': '/tmp/Qt/5.5/gcc_64/qml'

'project_root_dir': '/vagrant'

'qt_deps_dir': '/vagrant/shadow-build/release/Qt'
'qt_deps_bin_dir': '/vagrant/shadow-build/release/Qt/bin'
'qt_deps_lib_dir': '/vagrant/shadow-build/release/Qt/libs'
Expand All @@ -18,4 +20,4 @@ configs:
'spec': 'linux-g++-64'
'shadow_build_dir': '/vagrant/shadow-build'
'pro': '/vagrant/qgroundcontrol.pro'
'deps_url': 'https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies'
'deps_url': 'https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux.tar.bz2'
13 changes: 10 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# if you update this file, please consider updating .travis.yml too

require 'yaml'

current_dir = File.dirname(File.expand_path(__FILE__))
Expand All @@ -24,14 +26,18 @@ Vagrant.configure(2) do |config|
sudo apt-get dist-upgrade -y
sudo apt-get install -y git build-essential
sudo apt-get install -y espeak libespeak-dev libudev-dev libsdl1.2-dev
sudo apt-get install -y doxygen
sudo apt-get install -y doxygen
sudo apt-get install -y gstreamer1.0* libgstreamer1.0*
# taken from travis.yml
su - vagrant -c 'wget --continue -q %{deps_url}/%{qt_deps_tarball}'
echo 'Initialising submodules'
su - vagrant -c 'cd %{project_root_dir}; git submodule init && git submodule update'
echo 'Saving %{qt_deps_tarball} from %{deps_url} to %{project_root_dir}'
su - vagrant -c 'wget --continue -q %{deps_url} -P %{project_root_dir}'
su - vagrant -c 'rm -rf %{qt_deps_unpack_dir}'
su - vagrant -c 'mkdir -p %{qt_deps_unpack_parent_dir}'
su - vagrant -c 'tar jxf "%{qt_deps_tarball}" -C %{qt_deps_unpack_parent_dir}'
su - vagrant -c 'cd %{project_root_dir}; tar jxf "%{qt_deps_tarball}" -C %{qt_deps_unpack_parent_dir}'
su - vagrant -c 'rm -rf %{shadow_build_dir}'
su - vagrant -c 'mkdir -p %{shadow_build_dir}'
su - vagrant -c "cd %{shadow_build_dir}; LD_LIBRARY_PATH=%{qt_deps_lib_unpack_dir} PATH=%{qt_deps_bin_unpack_dir}:\$PATH qmake -r %{pro} -spec %{spec}"
Expand All @@ -52,6 +58,7 @@ Vagrant.configure(2) do |config|
:spec => yaml_config['spec'],
:deps_url => yaml_config['deps_url'],

:project_root_dir => yaml_config['project_root_dir'],
:qt_deps_unpack_parent_dir => yaml_config['qt_deps_unpack_parent_dir'],
:qt_deps_unpack_dir => yaml_config['qt_deps_unpack_dir'],
:qt_deps_bin_unpack_dir => yaml_config['qt_deps_bin_unpack_dir'],
Expand Down

0 comments on commit 504d55a

Please sign in to comment.