summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-04-22 12:22:57 +0000
committerramon <ramongomez@us.es>2016-04-22 12:22:57 +0000
commit28d0df2b46da91a2e1289438948ad1c17112884a (patch)
treec36e4a8c715283e7511adad4b99c0545a35710d9 /installer
parentc01bee2d933031caa506accc1794c16a88031f86 (diff)
#739: Nuevo fichero de configuraciĆ³n para crear entorno virtual para compilar el Browser del cliente.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4893 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer')
-rw-r--r--installer/vagrant/Vagrantfile-browser-vbox69
1 files changed, 69 insertions, 0 deletions
diff --git a/installer/vagrant/Vagrantfile-browser-vbox b/installer/vagrant/Vagrantfile-browser-vbox
new file mode 100644
index 00000000..32eb93d6
--- /dev/null
+++ b/installer/vagrant/Vagrantfile-browser-vbox
@@ -0,0 +1,69 @@
+# Vagrantfile to compile OpenGnsys Browser using VirtualBox provider.
+
+VAGRANTFILE_API_VERSION = "2"
+# VM provider: Oracle VM VirtualBox.
+ENV['VAGRANT_DEFAULT_PROVIDER'] = "virtualbox"
+# Language.
+LANGUAGE = "es_ES"
+ENV['LC_ALL'] = LANGUAGE + ".UTF-8"
+# Amount of memory VM.
+VMMEM = 2048
+VMCPUS = 2
+# OpenGnsys boot-tools environment provisioning script.
+SCRIPT = <<EOT
+# Set language.
+export LANG="#{LANGUAGE}.UTF-8"
+echo "LANG=\"$LANG\"" > /etc/default/locale
+echo "LANG=\"$LANG\"" >> /etc/environment
+locale-gen --lang #{LANGUAGE}
+sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard
+dpkg-reconfigure -fnoninteractive console-setup
+# Update repositories.
+# Install main dependencies.
+apt-get update
+apt-get install -y build-essential gettext libssl-dev libucommon-dev libxtst-dev subversion
+# Compile Qt-Embedded 4.8 (aceptar la licencia Open Source).
+wget http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
+tar xvzf qt-everywhere-opensource-src-4.8.7.tar.gz
+cd qt-everywhere-opensource-src-4.8.7
+echo "yes" | ./configure -opensource -embedded x86 -webkit -openssl -qt-gfx-vnc -qvfb -prefix /usr/local/ -nomake demos -nomake examples
+make
+make install
+# Compile Browser.
+svn export http://opengnsys.es/svn/branches/version1.1/client/browser ../browser
+cd browser
+qmake browser.pro
+make
+strip browser
+# Instructions.
+echo "Browser's code is in /home/vagrant/browser directory."
+echo "To compile a new Browser, run as root user:"
+echo " cd /home/vagrant/browser && qmake browser.pro && make"
+echo "Do not forget to copy all Browser's files to OpenGnsys Server:"
+echo " - Browser binary to /opt/opengnsys/client/bin directory on server."
+echo " - Qt linked libraries to /opt/opengnsys/client/lib/qtlibs directory."
+EOT
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+
+ # OpenGnsys boot-tools environment VM definition.
+ config.vm.define "ogBrowser" do |br|
+ # Specific VirtualBox configuration.
+ br.vm.provider "virtualbox" do |vb|
+ # VM name, memory and CPUs.
+ vb.name = "ogBrowser"
+ vb.memory = VMMEM
+ vb.cpus = VMCPUS
+ vb.gui = true
+ end
+ # VM base and host name.
+ br.vm.box = "ubuntu/trusty32"
+ br.vm.hostname = "ogBrowser"
+ # Disable synced folder.
+ #br.vm.synced_folder ".", "/vagrant", disabled: true
+ # Launch provisioning script.
+ br.vm.provision "shell", inline: SCRIPT
+ end
+
+end
+