Project

General

Profile

Linux setup » History » Version 13

Alexis Jeandet, 16/03/2016 11:53 AM

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