Compile on Windows
This page explains step by step how to compile LabRPS 0.001 or newer on Windows using using MinGW. For other platforms see Compiling.
Prerequisites
Compiling LabRPS on Windows 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
- Download the "Qt/Windows Open Source Edition" from
https://www.qt.io/
. It comes with a graphical installer. When the Qt installer asks you to install MinGW, say yes unless you already have it on your system. In that case you have to tell the Qt installer where to find it. In the case that PyQt (see blow) does not yet support the latest version of Qt, you can get older versions here:ftp://ftp.trolltech.com/qt/source/
- Download Python from
http://www.python.org/download/
and install it. - Download the source code of LabRPS from
http://LabRPS.sourceforge.net/download.html
and unpack it. - . Download the SIP source code for Windows from
http://www.riverbankcomputing.co.uk/software/sip/download
and unpack it into the 3rdparty subfolder of the LabRPS package. Rename the "sip-x.y" directory that gets created to "sip". - Download the PyQt v4 source code for Windows from
http://www.riverbankcomputing.co.uk/software/pyqt/download
and unpack it into the 3rdparty subfolder of the LabRPS package. Rename the "PyQt-win-gpl-x.y.z" directory that gets created to "PyQt-win-gpl". - Download the "Developer files" of the GSL from
http://gnuwin32.sourceforge.net/packages/gsl.htm
and unpack them into the 3rdparty subfolder of the LabRPS package. - Download the source code of the latest version of Qwt from
https://sourceforge.net/projects/qwt/files/
and unpack it into the 3rdparty subfolder of the LabRPS package. Rename the "qwt-x.y.z" directory that gets created to "qwt". - Download the source code of QwtPlot3D from
http://qwtplot3d.sourceforge.net/web/navigation/download_frame.html
and unpack it into the 3rdparty subfolder of the LabRPS package. - Download the source code of muParser from
https://sourceforge.net/projects/muparser/files/
and unpack it into the 3rdparty subfolder of the LabRPS package. Rename the "muparser_vxyz" directory that gets created to "muparser". - Open the start menu, find the folder created by the Qt SDK and start a "Qt Command Prompt". Execute "cd <directory containing LabRPS sources>", then "build". LabRPS and its dependencies should be built automatically and installed into the directory "output".
Windows(cross compile on linux using MXE)
MXE is a version of MinGW that has been compiled on Linux and acts as a cross-compilation environment targeting the Windows operating system. More details can be found at http://mxe.cc/
- Install all dependencies required for MXE according to your linux distro as described here
- Download current version of MXE(lets use the home directory $HOME)
- Install dependencies required by Labrps(this may take some time)
- Create a symbolic link of MXE version of qmake(qt4) & minGW and copy it to /bin directory Note:Qt 4 is in the "qt" subdirectory. Qt 5 is in the "qt5" subdirectory (use QT4)
- Download QWT5 sources from
https://sourceforge.net/projects/qwt/files/qwt/5.2.1/
, unpack, edit qwtconfig.pri & comment out the following lines: - open terminal, get in to qwt5 directory & start build
- Download qwtplot3d sources from
https://sourceforge.net/projects/qwtplot3d/
, unpack, edit qwtplot3d.pro & comment out the following lines: - open terminal, get in to qwtplot3d directory & start build
- Download latest sources of LabRPS(lets use the home directory $HOME)
- create include & lib directory inside ~/LabRPS/3rdparty/
- copy contents of src directory(only *.h files) inside qwtplot3d to ~/LabRPS/3rdparty/include
- copy contents of include directory inside qwtplot3d to ~/LabRPS/3rdparty/include
- copy lib/libqwt.a inside qwt to ~/LabRPS/3rdparty/lib
- copy lib/libqwtplot3d.a inside qwtplot3d to ~/LabRPS/3rdparty/lib
- now we can build LabRPS
cd ~ git clone https://github.com/mxe/mxe.git cd mxe
make qt gsl zlib muparser
sudo ln -sf ~/mxe/usr/i686-w64-mingw32.static/qt/bin/qmake /bin/mxe-qmake-qt4 sudo ln -sf ~/mxe/usr/BIN/i686-w64-mingw32.static-g++ /bin/i686-w64-mingw32.static-g++ sudo ln -sf ~/mxe/usr/BIN/i686-w64-mingw32.static-gcc-ar /bin/i686-w64-mingw32.static-gcc-ar
#CONFIG += thread #CONFIG += QwtDll
mxe-qmake-qt4 make
#win32:TEMPLATE = vclib #win32:CONFIG += dll exceptions #win32:dll:DEFINES += QT_DLL QWT3D_DLL QWT3D_MAKEDLL
Note: patches may be required.. for eg arch based systems may need https://projects.archlinux.org/svntogit/packages.git/tree/trunk/qwtplot3d-gcc44.patch?h=packages/qwtplot3d & https://projects.archlinux.org/svntogit/packages.git/tree/trunk/qwtplot3d-qt-4.8.0.patch?h=packages/qwtplot3d
mxe-qmake-qt4 make
cd ~ git clone https://github.com/LabRPS/LabRPS.git
cd ~/LabRPS mxe-qmake-qt4 make
After build process you will get LabRPS.exe inside ~/LabRPS/LabRPS directory...
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