source: installer/ogagent-devel-installer.sh

qndtest
Last change on this file was 73c5e1c, checked in by Irina Gómez <irinagomez@…>, 23 months ago

#1066 Changes devel branch name.

  • Property mode set to 100755
File size: 2.9 KB
Line 
1#!/bin/bash
2#/**
3#@file     ogagent-devel-installer.sh
4#@brief    Script to download and prepare the environmnt to compile OGAgent packages.
5#@warning  Some operations need "root" privileges.
6#@note     This script will make the "ogagent" directory with 1.5 GiB approx.
7#@version  1.0 - Initial version for OpenGnsys 1.1.0.
8#@author   Ramón M. Gómez, ETSII Universidad de Sevilla
9#@date     2016-04-07
10#*/ ##
11
12
13# Variables.
14PROGDIR="$PWD/ogagent"
15BRANCH="main"
16SVNURL="https://github.com/opengnsys/ogAgent/branches/$BRANCH/"
17
18# Show prerequisites needed to build the environment.
19mkdir -p $PROGDIR || exit 1
20cat << EOT
21
22OGAgent devoloping environment installation
23
24Prerequisites:
25- Install packages, if needed:
26  - Subversion
27  - Wine for 32-bit (Winetricks may be required)
28  - Python 2.7 with pyqt4-dev-tools
29  - realpath
30  - dpkg-dev
31  - rpmbuild
32  - xar
33Press [Enter] key when ready to continue.
34EOT
35read
36
37# Importing OGAgent source code.
38svn export --force $SVNURL $PROGDIR || exit 1
39# Downloading Visual C++ Redistributable.
40wget --unlink https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe -O $PROGDIR/vcredist_x86.exe
41
42# Update PyQt components.
43pushd ogagent/src >/dev/null
44./update.sh
45popd >/dev/null
46
47# Showing instructions to configure Wine.
48cat << EOT
49
50Manual actions:
51- After all downloads, install Gecko for Wine, if needed.
52- Press [Esc] key or "Cancel" button on Winetricks screen, if needed.
53- Accept default settings for all other components.
54- Uncheck all options on "Completing NSIS Setup" screen.
55Press [Enter] key to init downloads.
56
57EOT
58read
59
60# Downloading and configuring Wine prerequisites.
61pushd ogagent/windows >/dev/null
62./py2exe-wine-linux.sh
63cp -a build.bat ogagent.nsi ..
64ln -s ../../.. wine/drive_c/ogagent
65popd >/dev/null
66
67# Download, compile and install bomutils.
68mkdir -p ogagent/macos/downloads
69svn export https://github.com/hogliux/bomutils.git/trunk ogagent/macos/downloads/bomutils
70pushd ogagent/macos/downloads/bomutils >/dev/null
71make && sudo make install
72popd >/dev/null
73
74# Build OGAgent for GNU/Linux.
75pushd $PROGDIR/linux >/dev/null
76sudo ./build-packages.sh
77popd >/dev/null
78
79# Build OGAgent for macOS.
80pushd $PROGDIR/macos >/dev/null
81./build-pkg.sh
82popd >/dev/null
83
84# Build OGAgent for Windows.
85pushd $PROGDIR/windows >/dev/null
86./build-windows.sh
87popd >/dev/null
88
89# Showing instructions to rebuild OGAgent packages.
90cat << EOT
91
92How to rebuild OGAgent packages
93-------------------------------
94OGAgent project source code is available in $PROGDIR/src directory.
95
96- Commands to update PyQt graphical components for OGAgnet:
97    cd $PROGDIR/src
98    ./update.sh
99
100- Commands to rebuild Linux packages:
101    cd $PROGDIR/linux
102    sudo ./build-packages.sh
103
104- Commands to rebuild macOS package:
105    cd $PROGDIR/macos
106    ./build-pkg.sh
107
108- Commands to rebuild Windows installer:
109    cd $PROGDIR/windows
110    ./build-windows.sh
111
112OGAgent packages will be created into $PROGDIR directory.
113
114EOT
115
Note: See TracBrowser for help on using the repository browser.