Project

General

Profile

Linux setup » History » Version 4

Alexis Jeandet, 28/06/2014 02:36 PM

1 1 Alexis Jeandet
h1. Linux setup
2
3
{{>toc}}
4
5 2 Alexis Jeandet
*Please note that SocExplorer is still under development, so things are supposed to move, it can fail to build sometimes or be buggy. Feel free to send us some bug reports!*
6 1 Alexis Jeandet
7
Note also that we recently change from Qt4 to Qt5 so all the new SocExplorer code will be written for Qt5.
8
9 4 Alexis Jeandet
*If you are using Fedora you can directly install socexplorer from rpms look here news#4*
10
11 1 Alexis Jeandet
h2. Prerequisites
12
13
All the next steps can be distribution dependent SocExplorer development is done on Fedora 19 and 20, but is should work with any other one, feedback are welcome!
14
15
* First you need a working linux machine with:
16 2 Alexis Jeandet
** *Qt5 sdk* installed on it plus all the developments packages for Qt. Remember also to install modules such as QtWebkit.
17
** *Python 2.6 or 2.7* with headers.
18 3 Alexis Jeandet
* Then you need to install *PythonQt*, a modified version for SocExplorer can be downloaded "here":https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/USERS/JEANDET/PythonQt/archive/tip.zip
19 1 Alexis Jeandet
* To install PythonQt you just have to extract it somewhere, then from a terminal run:
20
<pre><code class="bash">
21
  qmake-qt5
22
  make 
23
  sudo make install
24
</code></pre>
25
26
h2. Building SocExplorer
27
28
* To build SocExplorer, once PythonQt is correctly build and installed you can get SocExplorer source code from code repository with this command:
29
<pre><code class="bash">
30
  hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorer SocExplorer
31
</code></pre>
32
You will get a SocExplorer directory with all the source code inside. To build it you just have to run:
33
<pre><code class="bash">
34
  cd SocExplorer
35
  qmake-qt5
36
  make  #note that to speedup the make step you can use "make -j N" to parallelize on N process(replace N with the number of cores you have).
37
38
</code></pre>
39 2 Alexis Jeandet
40 1 Alexis Jeandet
* Now you can install SocExplorer, it will install the SocExplorer binary plus some libraries and desktop icon in your system, just run:
41
<pre><code class="bash">
42
  sudo make install
43
  #this doesn't install the registers xml description file.
44
  mkdir -p ~/.SocExplorer/config
45
  cp ressources/Grlib.xml ~/.SocExplorer/config/Grlib.xml
46
</code></pre>
47
48
Affected folders are:
49
* /usr/bin for SocExplorer executables.
50
* QT_HEADERS_PATH/SocExplorer for SDK headers.
51
* QT_LIB_PATH for shared libraries.
52
* /usr/share/qtcreator/templates/wizards/SocExplorerPlugin for Qtcreator wizard.
53
* /usr/share/applications/ for desktop launcher.
54
* /etc/SocExplorer for global config files.
55
* ~/.SocExplorer for plugin and per user config files.
56
57 2 Alexis Jeandet
Now you should have a working SocExplorer, you can continue to install plugins or start write your own plugins.
58
59
60
h2. Building SocExplorer LPP's Plugins
61
62
If you are here it assume that you have an updated and working version of SocExplorer. 
63
To get LPP's SocExplorer plugins you can either clone or download them from here":https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorerPlugins.
64
65
* To clone:
66
<pre><code class="bash">
67
  hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorerPlugins SocExplorerPlugins
68
</code></pre>
69
70
Then first you should build only the plugins you plan to use, for example the SpaceWire plugin rely on STAR-Dundee usb driver which isn't free so if you don't have it you can't build it. To disable a plugin you have to edit the top qmake project file "SocExplorer_Plugins.pro" and remove the plugin folder name inside or comment it. As example if we want to disable the SpwPlugin and the memcheckplugin:
71
72
The file was initially:
73
74
<pre><code class="bash">
75
TEMPLATE = subdirs
76
CONFIG   += ordered
77
78
79
SUBDIRS = \
80
    ahbuartplugin \
81
    ambaplugin \
82
    APBUARTPLUGIN \
83
    dsu3plugin \
84
    genericrwplugin \
85
    memctrlrplugin \
86
    memcheckplugin
87
88
unix:SUBDIRS +=  spwplugin
89
90
</code></pre>
91
92
Then it become:
93
94
<pre><code class="bash">
95
TEMPLATE = subdirs
96
CONFIG   += ordered
97
98
99
SUBDIRS = \
100
    ahbuartplugin \
101
    ambaplugin \
102
    APBUARTPLUGIN \
103
    dsu3plugin \
104
    genericrwplugin \
105
    memctrlrplugin 
106
107
</code></pre>
108
109
110
111
* Then as for SocExplorer you just need to run:
112
<pre><code class="bash">
113
  cd SocExplorerPlugins
114
  qmake-qt5
115
  make  #note that to speedup the make step you can use "make -j N" to parallelize on N process(replace N with the number of cores you have).
116
117
</code></pre>
118
119
* If the compilation succeed then you can install as regular user:
120
<pre><code class="bash">
121
  make  install   # note here there is no sudo because plugin installation is per user installation.
122
123
</code></pre>