source: installer/vagrant/Vagrantfile-browser-vbox @ a6d6d6f

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since a6d6d6f was 28d0df2, checked in by ramon <ramongomez@…>, 9 years ago

#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

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[28d0df2]1# Vagrantfile to compile OpenGnsys Browser using VirtualBox provider.
2
3VAGRANTFILE_API_VERSION = "2"
4# VM provider: Oracle VM VirtualBox.
5ENV['VAGRANT_DEFAULT_PROVIDER'] = "virtualbox"
6# Language.
7LANGUAGE = "es_ES"
8ENV['LC_ALL'] = LANGUAGE + ".UTF-8"
9# Amount of memory VM.
10VMMEM = 2048
11VMCPUS = 2
12# OpenGnsys boot-tools environment provisioning script.
13SCRIPT = <<EOT
14# Set language.
15export LANG="#{LANGUAGE}.UTF-8"
16echo "LANG=\"$LANG\"" > /etc/default/locale
17echo "LANG=\"$LANG\"" >> /etc/environment
18locale-gen --lang #{LANGUAGE}
19sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard
20dpkg-reconfigure -fnoninteractive console-setup
21# Update repositories.
22# Install main dependencies.
23apt-get update
24apt-get install -y build-essential gettext libssl-dev libucommon-dev libxtst-dev subversion
25# Compile Qt-Embedded 4.8 (aceptar la licencia Open Source).
26wget http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
27tar xvzf qt-everywhere-opensource-src-4.8.7.tar.gz
28cd qt-everywhere-opensource-src-4.8.7
29echo "yes" | ./configure -opensource -embedded x86 -webkit -openssl -qt-gfx-vnc -qvfb -prefix /usr/local/ -nomake demos -nomake examples
30make
31make install
32# Compile Browser.
33svn export http://opengnsys.es/svn/branches/version1.1/client/browser ../browser
34cd browser
35qmake browser.pro
36make
37strip browser
38# Instructions.
39echo "Browser's code is in /home/vagrant/browser directory."
40echo "To compile a new Browser, run as root user:"
41echo "    cd /home/vagrant/browser && qmake browser.pro && make"
42echo "Do not forget to copy all Browser's files to OpenGnsys Server:"
43echo " - Browser binary to /opt/opengnsys/client/bin directory on server."
44echo " - Qt linked libraries to /opt/opengnsys/client/lib/qtlibs directory."
45EOT
46
47Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
48
49  # OpenGnsys boot-tools environment VM definition.
50  config.vm.define "ogBrowser" do |br|
51    # Specific VirtualBox configuration.
52    br.vm.provider "virtualbox" do |vb|
53      # VM name, memory and CPUs.
54      vb.name = "ogBrowser"
55      vb.memory = VMMEM
56      vb.cpus = VMCPUS
57      vb.gui = true
58    end
59    # VM base and host name.
60    br.vm.box = "ubuntu/trusty32"
61    br.vm.hostname = "ogBrowser"
62    # Disable synced folder.
63    #br.vm.synced_folder ".", "/vagrant", disabled: true
64    # Launch provisioning script.
65    br.vm.provision "shell", inline: SCRIPT
66  end
67
68end
69
Note: See TracBrowser for help on using the repository browser.