Compile on Windows: Difference between revisions
(26 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
* 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. | * 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. | ||
* [ | * [https://www.qt.io/ Qt for C++ (>=4.3)]. | ||
* [http://qwt.sourceforge.net/index.html Qwt (>=5.1.0)]. | * [http://qwt.sourceforge.net/index.html Qwt (>=5.1.0)]. | ||
Line 22: | Line 22: | ||
* [http://www.gnu.org/software/gsl/ GSL (>=1.8)]. | * [http://www.gnu.org/software/gsl/ GSL (>=1.8)]. | ||
* [http://muparser | * [http://beltoforion.de/en/muparser/ muParser (>=1.28)]. | ||
* [http://www.zlib.net/ zlib (>=1.2.3)]. | * [http://www.zlib.net/ zlib (>=1.2.3)]. | ||
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 55: | Line 53: | ||
==Building LabRPS== | ==Building LabRPS== | ||
# Download the "Qt/Windows Open Source Edition" from | # Download the "Qt/Windows Open Source Edition" from {{URL|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: {{URL|ftp://ftp.trolltech.com/qt/source/}} | ||
# Download Python from | # Download Python from {{URL|http://www.python.org/download/}} and install it. | ||
# Download the source code of LabRPS from | # Download the source code of LabRPS from {{URL|http://LabRPS.sourceforge.net/download.html}} and unpack it. | ||
#. Download the SIP source code for Windows from | #. Download the SIP source code for Windows from {{URL|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 | # Download the PyQt v4 source code for Windows from {{URL|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 | # Download the "Developer files" of the GSL from {{URL|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 | # Download the source code of the latest version of Qwt from {{URL|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 | # Download the source code of QwtPlot3D from {{URL|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 | # Download the source code of muParser from {{URL|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". | # 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 {{URL|http://mxe.cc/}} | |||
<ol> | |||
<li>Install all dependencies required for MXE according to your linux distro as described [http://mxe.cc/#requirements here]</li> | |||
<li>Download current version of MXE(lets use the home directory $HOME)</li> | |||
{{Code|code= | |||
cd ~ | |||
git clone https://github.com/mxe/mxe.git | |||
cd mxe | |||
}} | |||
<li>Install dependencies required by Labrps(this may take some time)</li> | |||
{{Code|code= | |||
make qt gsl zlib muparser | |||
}} | |||
<li>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)</li> | |||
{{Code|code= | |||
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 | |||
}} | |||
## | <li>Download QWT5 sources from {{URL|https://sourceforge.net/projects/qwt/files/qwt/5.2.1/}}, unpack, edit qwtconfig.pri & comment out the following lines:</li> | ||
{{Code|code= | |||
#CONFIG += thread | |||
#CONFIG += QwtDll | |||
}} | |||
<li>open terminal, get in to qwt5 directory & start build</li> | |||
{{Code|code= | |||
mxe-qmake-qt4 | |||
make | |||
}} | |||
<li>Download qwtplot3d sources from {{URL|https://sourceforge.net/projects/qwtplot3d/}}, unpack, edit qwtplot3d.pro & comment out the following lines:</li> | |||
{{Code|code= | |||
#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-gcc44.patch?h=packages/qwtplot3d] & [https://projects.archlinux.org/svntogit/packages.git/tree/trunk/qwtplot3d-qt-4.8.0.patch?h=packages/qwtplot3d https://projects.archlinux.org/svntogit/packages.git/tree/trunk/qwtplot3d-qt-4.8.0.patch?h=packages/qwtplot3d] | |||
<li>open terminal, get in to qwtplot3d directory & start build</li> | |||
{{Code|code= | |||
mxe-qmake-qt4 | |||
make | |||
}} | |||
<li>Download latest sources of LabRPS(lets use the home directory $HOME)</li> | |||
{{Code|code= | |||
cd ~ | |||
git clone https://github.com/LabRPS/LabRPS.git | |||
}} | |||
<li>create include & lib directory inside ~/LabRPS/3rdparty/</li> | |||
<li>copy contents of src directory(only *.h files) inside qwtplot3d to ~/LabRPS/3rdparty/include</li> | |||
<li>copy contents of include directory inside qwtplot3d to ~/LabRPS/3rdparty/include</li> | |||
<li>copy lib/libqwt.a inside qwt to ~/LabRPS/3rdparty/lib</li> | |||
<li>copy lib/libqwtplot3d.a inside qwtplot3d to ~/LabRPS/3rdparty/lib</li> | |||
<li>now we can build LabRPS</li> | |||
{{Code|code= | |||
cd ~/LabRPS | |||
mxe-qmake-qt4 | |||
make | |||
}} | |||
After build process you will get LabRPS.exe inside ~/LabRPS/LabRPS directory... | |||
</ol> | |||
==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 [http://labrps.com/boards LabRPS forum]. | ||
# License LabRPS is distributed under the terms of the [http://www.gnu.org/licenses/gpl.html 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`. | |||
LabRPS is distributed under the terms of the [http://www.gnu.org/licenses/gpl.html 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 [http://www.fsf.org/licensing/essays/free-sw.html "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 [http://en.wikipedia.org/wiki/Alternative_terms_for_free_software Open Source, FOSS, or FLOSS]. When we say that LabRPS is "free", we are talking about | Thus it is [http://www.fsf.org/licensing/essays/free-sw.html "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 [http://en.wikipedia.org/wiki/Alternative_terms_for_free_software Open Source, FOSS, or FLOSS]. When we say that LabRPS is "free", we are talking about | ||
Line 83: | Line 139: | ||
* 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. | * 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. | 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. | 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. | ||
Latest revision as of 03:54, 25 August 2022
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
- Hubs: User hub, Power users hub, Developer hub