Compile on Linux: Difference between revisions
No edit summary |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Docnav | {{Docnav | ||
|[[ | |[[Compile_on_Windows|Compile on Windows]] | ||
|[[ | |[[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> | ||
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: | ||
<pre>git clone https://github.com/LabRPS/LabRPS.git</pre> | |||
git clone https://github.com/LabRPS/LabRPS.git | |||
==Building LabRPS== | ==Building LabRPS== | ||
<ol> | |||
<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> | |||
<li>Open a terminal window.</li> | |||
<li>Get [http://qwt.sourceforge.net/index.html Qwt (>=5.1.0)] sources and unpack them to the 3rdparty folder:</li> | |||
<pre> LabRPS-X.X.X/3rdparty tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2</pre> | |||
<li>Rename the new directory to {{incode|qwt:}}</li> | |||
<pre>mv qwt-Y.Y.Y qwt</pre> | |||
<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> | |||
<pre>CONFIG += QwtDll</pre> | |||
<li>Build Qwt:</li> | |||
<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. | |||
<li>Get [http://qwtplot3d.sourceforge.net/ QwtPlot3D] sources and also unpack them to LabRPS-X.X.X/3rdparty:</li> | |||
<pre>tar -xvzf qwtplot3d-Z.Z.Z.tgz</pre> | |||
<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> | |||
<pre>CONFIG += staticlib</pre> at a convenient place (say, below the other CONFIG line). | |||
<li>Build qwtplot3d:</li> | |||
<pre>cd qwtplot3d; qmake && make; cd ..</pre> | |||
<li>Go to the directory LabRPS-X.X.X/LabRPS:</li> | |||
<pre>cd ../LabRPS</pre> | |||
Open LabRPS.pro in a text editor and remove the comment marker (#) from the line | <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 {{incode|include( python.pri )}}.</li><br> | |||
<li>Build LabRPS:</li> | |||
<pre>qmake && make</pre> | |||
<li>You should now be able to run LabRPS by entering</li> | |||
<pre>./LabRPS</pre> | |||
<li>Optionally, install LabRPS on your system (you need root priviliges):</li> | |||
<pre>sudo make install</pre> or, alternatively, | |||
< | <pre>su -c "make install"</pre> | ||
</ol> | |||
==Additional information== | ==Additional information== | ||
Line 101: | Line 98: | ||
{{Docnav | {{Docnav | ||
|[[ | |[[Compile_on_Windows|Compile on Windows]] | ||
|[[ | |[[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:
- 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.
- 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
- 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).
- Open a terminal window.
- Get Qwt (>=5.1.0) sources and unpack them to the 3rdparty folder:
- Rename the new directory to
qwt:
- 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
- Build Qwt:
- Get QwtPlot3D sources and also unpack them to LabRPS-X.X.X/3rdparty:
- We also want to build a static version here, so open qwtplot3d/qwtplot3d.pro in your favorite text editor and add the line
- Build qwtplot3d:
- Go to the directory LabRPS-X.X.X/LabRPS:
- 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 )
. - Build LabRPS:
- You should now be able to run LabRPS by entering
- Optionally, install LabRPS on your system (you need root priviliges):
LabRPS-X.X.X/3rdparty tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2
mv qwt-Y.Y.Y qwt
CONFIG += QwtDll
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.
tar -xvzf qwtplot3d-Z.Z.Z.tgz
CONFIG += staticlibat a convenient place (say, below the other CONFIG line).
cd qwtplot3d; qmake && make; cd ..
cd ../LabRPS
qmake && make
./LabRPS
sudo make installor, alternatively,
su -c "make install"
Additional information
- 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.
- 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.
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, AppImage
- Basics: About LabRPS, Interface, RPS Objects, Object name, Preferences, Workbenches, Document structure, Properties, Help LabRPS, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, WindLab, SeismicLab, SeaLab, UserLab, Spreadsheet, Plot, Web
- Hubs: User hub, Power users hub, Developer hub