Compile on Linux: Difference between revisions

From LabRPS Documentation
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Docnav
{{Docnav
|[[Licence|Licence]]
|[[Compile_on_Windows|Compile on Windows]]
|[[Compile_on_Linux|Compile on Linux]]
|[[Compile_on_MacOS|Compile on MacOS]]
}}
}}


Line 37: Line 37:
# Create a new folder where the source code will be downloaded.
# Create a new folder where the source code will be downloaded.
# Right-click on this folder in the Windows file explorer and select '''Git Clone''' in the context menu.
# Right-click on this folder in the Windows file explorer and select '''Git Clone''' in the context menu.
# A dialog will appear. In it, enter the URL for the LabRPS Git repository
# A dialog will appear. In it, enter the URL for the LabRPS Git repository: {{URL|https://github.com/LabRPS/LabRPS.git}}.<br>
 
''https://github.com/LabRPS/LabRPS.git''


and click '''OK'''.
and click '''OK'''.
Line 49: Line 47:
To create a local tracking branch and download the source code, open a terminal (command prompt) and switch there to the directory you want the source, then type:
To create a local tracking branch and download the source code, open a terminal (command prompt) and switch there to the directory you want the source, then type:


{{Code|code=
<pre>git clone https://github.com/LabRPS/LabRPS.git</pre>
git clone https://github.com/LabRPS/LabRPS.git
}}


==Building LabRPS==
==Building LabRPS==
# Install [http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp Qt(>=4.3)], [http://sources.redhat.com/gsl/ GSL], [http://muparser.sourceforge.net muParser] and [http://www.zlib.net/ zlib]; either from your package manager or from the sources. If you are using precompiled packages, make sure you also install the corresponding development packages (*-dev or *-devel). If you want to display the manual from within LabRPS (you can also view it with your favorite browser), you need to have the Qt Assistant installed, which sometimes comes in a separate package (qt4-dev-tools for Ubuntu edgy).
<ol>
# Open a terminal window.
  <li>Install [http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp Qt(>=4.3)], [http://sources.redhat.com/gsl/ GSL], [http://muparser.sourceforge.net muParser] and [http://www.zlib.net/ zlib]; either from your package manager or from the sources. If you are using precompiled packages, make sure you also install the corresponding development packages (*-dev or *-devel). If you want to display the manual from within LabRPS (you can also view it with your favorite browser), you need to have the Qt Assistant installed, which sometimes comes in a separate package (qt4-dev-tools for Ubuntu edgy).</li>
# Get [http://qwt.sourceforge.net/index.html Qwt (>=5.1.0)] sources and unpack them to the 3rdparty folder:
  <li>Open a terminal window.</li>
{{Code|code=
  <li>Get [http://qwt.sourceforge.net/index.html Qwt (>=5.1.0)] sources and unpack them to the 3rdparty folder:</li>
cd LabRPS-X.X.X/3rdparty tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2}} 
  <pre> LabRPS-X.X.X/3rdparty tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2</pre>
# Rename the new directory to <code><nowiki>qwt</nowiki></code>: 
  <li>Rename the new directory to {{incode|qwt:}}</li>
    <code><nowiki>mv qwt-Y.Y.Y qwt</nowiki></code>  
  <pre>mv qwt-Y.Y.Y qwt</pre>  
# We want to build the static version of Qwt in order to avoid potential conflicts with an already installed version. Open the file qwt/qwtconfig.pri and comment out the line
  <li>We want to build the static version of Qwt in order to avoid potential conflicts with an already installed version. Open the file qwt/qwtconfig.pri and comment out the line</li>
    <code><nowiki>CONFIG += QwtDll</nowiki></code>
  <pre>CONFIG += QwtDll</pre>
# Build Qwt:
  <li>Build Qwt:</li>
    <code><nowiki>cd qwt; qmake && make; cd ..</nowiki></code> 
  <pre>cd qwt; qmake && make; cd ..</pre> On some systems (such as Debian, Ubuntu, ...) the {{incode|qmake}}-Tool for Qt 4.x is called {{incode|qmake-qt4}}. Make sure you don't use the version that belongs to Qt 3.x.
    On some systems (such as Debian, Ubuntu, ...) the <code><nowiki>qmake</nowiki></code>-Tool for Qt 4.x is called <code><nowiki>qmake-qt4</nowiki></code>. Make sure you don't use the version that belongs to Qt 3.x.
 
# Get [http://qwtplot3d.sourceforge.net/ QwtPlot3D] sources and also unpack them to LabRPS-X.X.X/3rdparty:
  <li>Get [http://qwtplot3d.sourceforge.net/ QwtPlot3D] sources and also unpack them to LabRPS-X.X.X/3rdparty:</li>
    <code><nowiki>tar -xvzf qwtplot3d-Z.Z.Z.tgz</nowiki></code>
  <pre>tar -xvzf qwtplot3d-Z.Z.Z.tgz</pre>
# We also want to build a static version here, so open qwtplot3d/qwtplot3d.pro in your favorite text editor and add the line
  <li>We also want to build a static version here, so open qwtplot3d/qwtplot3d.pro in your favorite text editor and add the line</li>
    <code><nowiki>CONFIG += staticlib</nowiki></code> 
  <pre>CONFIG += staticlib</pre> at a convenient place (say, below the other CONFIG line).
    at a convenient place (say, below the other CONFIG line).
 
# Build qwtplot3d:
  <li>Build qwtplot3d:</li>
    <code><nowiki>cd qwtplot3d; qmake && make; cd ..</nowiki></code>
  <pre>cd qwtplot3d; qmake && make; cd ..</pre>
# Go to the directory LabRPS-X.X.X/LabRPS:
  <li>Go to the directory LabRPS-X.X.X/LabRPS:</li>
    <code><nowiki>cd ../LabRPS</nowiki></code>
  <pre>cd ../LabRPS</pre>
# If you want to use Python expressions and scripts, make sure you have the following additional dependencies installed: [http://www.python.org/ Python] (>=2.5), [http://www.riverbankcomputing.co.uk/software/sip/intro SIP] (>=4.6), [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt] (>=4.2). Other versions as those indicated above may or may not work. Specifically, there are known issues with a number of SIP versions and a given version of PyQt will only work with a limited range of SIP versions.   
  <li>If you want to use Python expressions and scripts, make sure you have the following additional dependencies installed: [http://www.python.org/ Python] (>=2.5), [http://www.riverbankcomputing.co.uk/software/sip/intro SIP] (>=4.6), [http://www.riverbankcomputing.co.uk/software/pyqt/intro PyQt] (>=4.2). Other versions as those indicated above may or may not work. Specifically, there are known issues with a number of SIP versions and a given version of PyQt will only work with a limited range of SIP versions.   
     Open LabRPS.pro in a text editor and remove the comment marker (#) from the line <code><nowiki>include( python.pri )</nowiki></code>.
     Open LabRPS.pro in a text editor and remove the comment marker (#) from the line {{incode|include( python.pri )}}.</li><br>
# Build LabRPS:
  <li>Build LabRPS:</li>
    <code><nowiki>qmake && make</nowiki></code>
  <pre>qmake && make</pre>
# You should now be able to run LabRPS by entering
  <li>You should now be able to run LabRPS by entering</li>
    <code><nowiki>./LabRPS</nowiki></code>
  <pre>./LabRPS</pre>
# Optionally, install LabRPS on your system (you need root priviliges):
  <li>Optionally, install LabRPS on your system (you need root priviliges):</li>
    <code><nowiki>sudo make install</nowiki></code>   
  <pre>sudo make install</pre>  or, alternatively,   
    or, alternatively,   
     <pre>su -c "make install"</pre>
     <code><nowiki>su -c "make install"</nowiki></code>
</ol>


==Additional information==
==Additional information==
Line 102: Line 98:


{{Docnav
{{Docnav
|[[Licence|Licence]]
|[[Compile_on_Windows|Compile on Windows]]
|[[Compile_on_Linux|Compile on Linux]]
|[[Compile_on_MacOS|Compile on MacOS]]
}}
}}



Latest revision as of 00:23, 25 August 2022

This page explains step by step how to compile LabRPS 0.001 or newer on Linux. For other platforms see Compiling.

Prerequisites

Compiling LabRPS on Linux requires several tools and libraries.

  • A compiler. LabRPS is tested with MinGW—other compilers may work, but instructions for their use are not included here. More details in #Compiler, below.

QwtPlot3D and Qwt must be compiled against Qt 5.x! If these are compiled with Qt3 or Qt4, the application might crash.

Source code

Now you can get the source code of LabRPS:

Using a frontend

When using the Git frontend TortoiseGit:

  1. Create a new folder where the source code will be downloaded.
  2. Right-click on this folder in the Windows file explorer and select Git Clone in the context menu.
  3. A dialog will appear. In it, enter the URL for the LabRPS Git repository: https://github.com/LabRPS/LabRPS.git.

and click OK.

The latest source code will be downloaded from the LabRPS Git repository and the folder will be tracked by Git.

Using the command line

To create a local tracking branch and download the source code, open a terminal (command prompt) and switch there to the directory you want the source, then type:

git clone https://github.com/LabRPS/LabRPS.git

Building LabRPS

  1. Install Qt(>=4.3), GSL, muParser and zlib; either from your package manager or from the sources. If you are using precompiled packages, make sure you also install the corresponding development packages (*-dev or *-devel). If you want to display the manual from within LabRPS (you can also view it with your favorite browser), you need to have the Qt Assistant installed, which sometimes comes in a separate package (qt4-dev-tools for Ubuntu edgy).
  2. Open a terminal window.
  3. Get Qwt (>=5.1.0) sources and unpack them to the 3rdparty folder:
  4.  LabRPS-X.X.X/3rdparty tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2
  5. Rename the new directory to qwt:
  6. mv qwt-Y.Y.Y qwt
  7. We want to build the static version of Qwt in order to avoid potential conflicts with an already installed version. Open the file qwt/qwtconfig.pri and comment out the line
  8. CONFIG += QwtDll
  9. Build Qwt:
  10. cd qwt; qmake && make; cd ..
    On some systems (such as Debian, Ubuntu, ...) the qmake-Tool for Qt 4.x is called qmake-qt4. Make sure you don't use the version that belongs to Qt 3.x.
  11. Get QwtPlot3D sources and also unpack them to LabRPS-X.X.X/3rdparty:
  12. tar -xvzf qwtplot3d-Z.Z.Z.tgz
  13. We also want to build a static version here, so open qwtplot3d/qwtplot3d.pro in your favorite text editor and add the line
  14. CONFIG += staticlib
    at a convenient place (say, below the other CONFIG line).
  15. Build qwtplot3d:
  16. cd qwtplot3d; qmake && make; cd ..
  17. Go to the directory LabRPS-X.X.X/LabRPS:
  18. cd ../LabRPS
  19. If you want to use Python expressions and scripts, make sure you have the following additional dependencies installed: Python (>=2.5), SIP (>=4.6), PyQt (>=4.2). Other versions as those indicated above may or may not work. Specifically, there are known issues with a number of SIP versions and a given version of PyQt will only work with a limited range of SIP versions. Open LabRPS.pro in a text editor and remove the comment marker (#) from the line include( python.pri ).

  20. Build LabRPS:
  21. qmake && make
  22. You should now be able to run LabRPS by entering
  23. ./LabRPS
  24. Optionally, install LabRPS on your system (you need root priviliges):
  25. sudo make install
    or, alternatively,
    su -c "make install"

Additional information

  1. Forums and mailing lists If you want to discuss LabRPS with other users (or the developers) or if you are insterested in its further development, you can go to the LabRPS forum.
  2. License LabRPS is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license is provided in the file `gpl.txt`.

Thus it is "free software". "Free software" is a matter of liberty, not price. To understand the concept, you should think of "free" as in "free speech", not as in "free beer". "Free software" is also often called Open Source, FOSS, or FLOSS. When we say that LabRPS is "free", we are talking about

  • The freedom to run the program, for any purpose (freedom 0).
  • The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to improve the program, and release your improvements to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this.

That said, LabRPS is also free as in "free beer". We do not charge money for anything you can download on our homepage and we will not do so in the future. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.