Project

General

Profile

Linux setup » History » Version 2

Alexis Jeandet, 27/05/2014 07:26 PM

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