Project

General

Profile

Linux setup » History » Revision 4

Revision 3 (Alexis Jeandet, 27/05/2014 07:26 PM) → Revision 4/14 (Alexis Jeandet, 28/06/2014 02:36 PM)

h1. Linux setup 

 {{>toc}} 

 *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!* 

 Note also that we recently change from Qt4 to Qt5 so all the new SocExplorer code will be written for Qt5. 

 *If you are using Fedora you can directly install socexplorer from rpms look here news#4* 

 

 h2. Prerequisites 

 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! 

 * First you need a working linux machine with: 
 ** *Qt5 sdk* installed on it plus all the developments packages for Qt. Remember also to install modules such as QtWebkit. 
 ** *Python 2.6 or 2.7* with headers. 
 * 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 
 * To install PythonQt you just have to extract it somewhere, then from a terminal run: 
 <pre><code class="bash"> 
   qmake-qt5 
   make  
   sudo make install 
 </code></pre> 

 

 h2. Building SocExplorer 

 * To build SocExplorer, once PythonQt is correctly build and installed you can get SocExplorer source code from code repository with this command: 
 <pre><code class="bash"> 
   hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorer SocExplorer 
 </code></pre> 
 You will get a SocExplorer directory with all the source code inside. To build it you just have to run: 
 <pre><code class="bash"> 
   cd SocExplorer 
   qmake-qt5 
   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). 

 </code></pre> 

 * Now you can install SocExplorer, it will install the SocExplorer binary plus some libraries and desktop icon in your system, just run: 
 <pre><code class="bash"> 
   sudo make install 
   #this doesn't install the registers xml description file. 
   mkdir -p ~/.SocExplorer/config 
   cp ressources/Grlib.xml ~/.SocExplorer/config/Grlib.xml 
 </code></pre> 

 Affected folders are: 
 * /usr/bin for SocExplorer executables. 
 * QT_HEADERS_PATH/SocExplorer for SDK headers. 
 * QT_LIB_PATH for shared libraries. 
 * /usr/share/qtcreator/templates/wizards/SocExplorerPlugin for Qtcreator wizard. 
 * /usr/share/applications/ for desktop launcher. 
 * /etc/SocExplorer for global config files. 
 * ~/.SocExplorer for plugin and per user config files. 

 Now you should have a working SocExplorer, you can continue to install plugins or start write your own plugins. 


 h2. Building SocExplorer LPP's Plugins 

 If you are here it assume that you have an updated and working version of SocExplorer.  
 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. 

 * To clone: 
 <pre><code class="bash"> 
   hg clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/SocExplorerPlugins SocExplorerPlugins 
 </code></pre> 

 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: 

 The file was initially: 

 <pre><code class="bash"> 
 TEMPLATE = subdirs 
 CONFIG     += ordered 


 SUBDIRS = \ 
     ahbuartplugin \ 
     ambaplugin \ 
     APBUARTPLUGIN \ 
     dsu3plugin \ 
     genericrwplugin \ 
     memctrlrplugin \ 
     memcheckplugin 

 unix:SUBDIRS +=    spwplugin 

 </code></pre> 

 Then it become: 

 <pre><code class="bash"> 
 TEMPLATE = subdirs 
 CONFIG     += ordered 


 SUBDIRS = \ 
     ahbuartplugin \ 
     ambaplugin \ 
     APBUARTPLUGIN \ 
     dsu3plugin \ 
     genericrwplugin \ 
     memctrlrplugin  

 </code></pre> 



 * Then as for SocExplorer you just need to run: 
 <pre><code class="bash"> 
   cd SocExplorerPlugins 
   qmake-qt5 
   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). 

 </code></pre> 

 * If the compilation succeed then you can install as regular user: 
 <pre><code class="bash"> 
   make    install     # note here there is no sudo because plugin installation is per user installation. 

 </code></pre>