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