Project

General

Profile

Linux setup » History » Version 2

Alexis Jeandet, 27/05/2014 07:26 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
h2. Prerequisites
10
11
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!
12
13
* First you need a working linux machine with:
14 2 Alexis Jeandet
** *Qt5 sdk* installed on it plus all the developments packages for Qt. Remember also to install modules such as QtWebkit.
15
** *Python 2.6 or 2.7* with headers.
16 1 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
17
* To install PythonQt you just have to extract it somewhere, then from a terminal run:
18
<pre><code class="bash">
19
  qmake-qt5
20
  make 
21
  sudo make install
22
</code></pre>
23
24
h2. Building SocExplorer
25
26
* To build SocExplorer, once PythonQt is correctly build and installed you can get SocExplorer source code from code repository with this command:
27
<pre><code class="bash">
28
  hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorer SocExplorer
29
</code></pre>
30
You will get a SocExplorer directory with all the source code inside. To build it you just have to run:
31
<pre><code class="bash">
32
  cd SocExplorer
33
  qmake-qt5
34
  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).
35
36
</code></pre>
37 2 Alexis Jeandet
38 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:
39
<pre><code class="bash">
40
  sudo make install
41
  #this doesn't install the registers xml description file.
42
  mkdir -p ~/.SocExplorer/config
43
  cp ressources/Grlib.xml ~/.SocExplorer/config/Grlib.xml
44
</code></pre>
45
46
Affected folders are:
47
* /usr/bin for SocExplorer executables.
48
* QT_HEADERS_PATH/SocExplorer for SDK headers.
49
* QT_LIB_PATH for shared libraries.
50
* /usr/share/qtcreator/templates/wizards/SocExplorerPlugin for Qtcreator wizard.
51
* /usr/share/applications/ for desktop launcher.
52
* /etc/SocExplorer for global config files.
53
* ~/.SocExplorer for plugin and per user config files.
54
55 2 Alexis Jeandet
Now you should have a working SocExplorer, you can continue to install plugins or start write your own plugins.
56
57
58
h2. Building SocExplorer LPP's Plugins
59
60
If you are here it assume that you have an updated and working version of SocExplorer. 
61
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.
62
63
* To clone:
64
<pre><code class="bash">
65
  hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorerPlugins SocExplorerPlugins
66
</code></pre>
67
68
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:
69
70
The file was initially:
71
72
<pre><code class="bash">
73
TEMPLATE = subdirs
74
CONFIG   += ordered
75
76
77
SUBDIRS = \
78
    ahbuartplugin \
79
    ambaplugin \
80
    APBUARTPLUGIN \
81
    dsu3plugin \
82
    genericrwplugin \
83
    memctrlrplugin \
84
    memcheckplugin
85
86
unix:SUBDIRS +=  spwplugin
87
88
</code></pre>
89
90
Then it become:
91
92
<pre><code class="bash">
93
TEMPLATE = subdirs
94
CONFIG   += ordered
95
96
97
SUBDIRS = \
98
    ahbuartplugin \
99
    ambaplugin \
100
    APBUARTPLUGIN \
101
    dsu3plugin \
102
    genericrwplugin \
103
    memctrlrplugin 
104
105
</code></pre>
106
107
108
109
* Then as for SocExplorer you just need to run:
110
<pre><code class="bash">
111
  cd SocExplorerPlugins
112
  qmake-qt5
113
  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).
114
115
</code></pre>
116
117
* If the compilation succeed then you can install as regular user:
118
<pre><code class="bash">
119
  make  install   # note here there is no sudo because plugin installation is per user installation.
120
121
</code></pre>