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 a "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. |
---|
14 | PROGDIR=$PWD/ogagent |
---|
15 | SVNURL=http://opengnsys.es/svn/branches/version1.1/admin/Sources/Clients/ogagent |
---|
16 | |
---|
17 | # Show prerequisites needed to build the environment. |
---|
18 | mkdir -p $PROGDIR || exit 1 |
---|
19 | cat << EOT |
---|
20 | |
---|
21 | OGAgent devoloping environment installation |
---|
22 | |
---|
23 | Prerequisites: |
---|
24 | - Install packages, if needed: |
---|
25 | - Wine for 32-bit with Winetricks |
---|
26 | - Python 2.7 with pyqt4-dev-tools |
---|
27 | - realpath |
---|
28 | - dpkg-dev |
---|
29 | - rpmbuild |
---|
30 | - Open a web browser and download Microsoft Visual C++ 2010 Redistributable Package (x86) from: http://www.microsoft.com/en-us/download/details.aspx?id=5555 |
---|
31 | - Copy or move "vcredist_x86.exe" file to $PROGDIR directory. |
---|
32 | Press [Enter] key when ready to continue. |
---|
33 | EOT |
---|
34 | read |
---|
35 | |
---|
36 | # Importing OGAgent source code. |
---|
37 | svn export --force $SVNURL $PROGDIR || exit 1 |
---|
38 | |
---|
39 | # Update PyQt components. |
---|
40 | pushd ogagent/src >/dev/null |
---|
41 | ./update.sh |
---|
42 | popd >/dev/null |
---|
43 | |
---|
44 | # Showing instructions to configure Wine. |
---|
45 | cat << EOT |
---|
46 | |
---|
47 | Manual actions: |
---|
48 | - After all downloads, install Gecko for Wine, if needed. |
---|
49 | - Press [Esc] key or "Cancel" button on Winetricks screen. |
---|
50 | - Accept default settings for all other components |
---|
51 | - Uncheck all options on "Completing NSIS Setup" screen. |
---|
52 | Press [Enter] key to init downloads. |
---|
53 | |
---|
54 | EOT |
---|
55 | read |
---|
56 | |
---|
57 | # Downloading and configuring Wine prerequisites. |
---|
58 | pushd ogagent/windows >/dev/null |
---|
59 | ./py2exe-wine-linux.sh |
---|
60 | cp -a build.bat ogagent.nsi .. |
---|
61 | ln -s ../../.. wine/drive_c/ogagent |
---|
62 | popd >/dev/null |
---|
63 | |
---|
64 | # Build OGAgent for GNU/Linux. |
---|
65 | pushd $PROGDIR/linux >/dev/null |
---|
66 | sudo ./build-packages.sh |
---|
67 | popd >/dev/null |
---|
68 | |
---|
69 | # Build OGAgent for Windows. |
---|
70 | pushd $PROGDIR/windows >/dev/null |
---|
71 | ./build-windows.sh |
---|
72 | popd >/dev/null |
---|
73 | |
---|
74 | # Showing instructions to rebuild OGAgent packages. |
---|
75 | cat << EOT |
---|
76 | |
---|
77 | How to rebuild OGAgent packages |
---|
78 | ------------------------------- |
---|
79 | OGAgent project source code is available in $PROGDIR/src directory. |
---|
80 | |
---|
81 | - Commands to update PyQt graphical components for OGAgnet: |
---|
82 | cd $PROGDIR/src |
---|
83 | ./update.sh |
---|
84 | |
---|
85 | - Commands to rebuild GNU/Linux packages: |
---|
86 | cd $PROGDIR/linux |
---|
87 | sudo ./build-packages.sh |
---|
88 | |
---|
89 | - Commands to rebuild Windows installer: |
---|
90 | cd $PROGDIR/windows |
---|
91 | ./build-windows.sh |
---|
92 | |
---|
93 | OGAgent packages will be created into $PROGDIR directory. |
---|
94 | |
---|
95 | EOT |
---|
96 | |
---|