291 lines
11 KiB
Groff
291 lines
11 KiB
Groff
.TH "qwtinstall" 3 "Sun Jul 18 2021" "Version 6.2.0" "Qwt User's Guide" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
qwtinstall \- Installing Qwt
|
|
|
|
.SH "Download"
|
|
.PP
|
|
Stable Qwt releases are available from the Qwt \fCproject page\fP\&.
|
|
.PP
|
|
Qwt-6\&.2\&.0 consists of 4 files:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
qwt-6\&.2\&.0\&.zip
|
|
.br
|
|
Zip file with the Qwt sources and the html documentation for Windows
|
|
.IP "\(bu" 2
|
|
qwt-6\&.2\&.0\&.tar\&.bz2
|
|
.br
|
|
Compressed tar file with the Qwt sources and the html documentation for UNIX systems ( Linux, Mac, \&.\&.\&. )
|
|
.IP "\(bu" 2
|
|
qwt-6\&.2\&.0\&.pdf
|
|
.br
|
|
Qwt documentation as PDF document\&.
|
|
.IP "\(bu" 2
|
|
qwt-6\&.2\&.0\&.qch
|
|
.br
|
|
Qwt documentation as Qt Compressed Help document, that can be loaded into the Qt Assistant or Creator\&. In the Qt Creator context sensitive help will be available like for Qt classes\&.
|
|
.PP
|
|
.PP
|
|
Precompiled Qwt Designer plugins, that are compatible with some binary packages of the Qt Creator:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
qwtdesigner-6\&.2\&.0-*\&.zip
|
|
.PP
|
|
.SH "Installing Qwt"
|
|
.PP
|
|
Beside headers, libraries and the html version of the class documentation a proper Qwt installation contains a Designer plugin and a Qwt features file for building applications using Qwt\&.
|
|
.PP
|
|
All files will be copied to an installation directory, that is configurable by editing qwtconfig\&.pri\&. Its default settings is:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
Windows
|
|
.br
|
|
C:\\Qwt-6\&.2\&.0
|
|
.IP "\(bu" 2
|
|
Unix like systems
|
|
.br
|
|
/usr/local/qwt-6\&.2\&.0
|
|
.PP
|
|
.PP
|
|
For the rest of the document this install path will be written as \fI${QWT_ROOT}\fP and needs to be replaced by the real path in all commands below\&.
|
|
.PP
|
|
It is not unlikely, to have more than one installation of Qwt on the same system\&. F\&.e for using the Qwt Designer plugin in the Qt Creator a version of Qwt is necessary with the same Qt and compiler combination, that had been used for building the Qt Creator ( see 'Help->About Qt Creator \&.\&.\&.' )\&.
|
|
.PP
|
|
Installing Qwt is done in 3 steps, that are quite common on UNIX systems\&.
|
|
.PP
|
|
.IP "1." 4
|
|
Configuration
|
|
.br
|
|
In the configuration step all parameters are set to control how to build and install Qwt
|
|
.IP "2." 4
|
|
Build
|
|
.br
|
|
In the build step binaries are built from the source files\&.
|
|
.IP "3." 4
|
|
Installation
|
|
.br
|
|
The installation copies and rearranges all files that are necessary to build Qwt applications to a target directory\&.
|
|
.PP
|
|
.PP
|
|
The installation doesn't modify the system beside copying files to a directory in a proper way\&. After removing build and installation directories the system is in the same state as it was before\&.
|
|
.SS "Configuration"
|
|
Configuring Qwt has to be done by editing the Project files used for building:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
qwtbuild\&.pri
|
|
.br
|
|
qwtbuild\&.pri contains settings for how to build Qwt\&. All settings of this file are only for building Qwt itself and doesn't have an impact on how an application using Qwt is built\&. Usually its default settings doesn't need to be modified\&.
|
|
.IP "\(bu" 2
|
|
qwtconfig\&.pri
|
|
.br
|
|
qwtconfig\&.pri defines what modules of Qwt will be built and where to install them\&. qwtconfig\&.pri gets installed together with the Qwt features file qwt\&.prf and all its settings are known to project files for building Qwt applications\&.
|
|
.PP
|
|
.PP
|
|
In qwtconfig\&.pri the meaning of each option is explained in detail - it's worth reading it before running into problems later\&.
|
|
.SS "Build and installation"
|
|
The Qt Creator is a graphical frontend for calling qmake/make and - technically - it could be used for building and installing Qwt\&. But as this way requires a lot more understanding of details the following step by step instructions are for the easier way using the command line\&.
|
|
.SS "Unix-like systems"
|
|
The first step before creating the Makefile is to check that the correct version of qmake is used\&. F\&.e\&. on older Linux distribution you often find a Qt3 qmake and in the path\&.
|
|
.PP
|
|
The default setting of qmake is to generate a makefile that builds Qwt for the same environment where the version of qmake has been built for\&. So creating a makefile usually means something like:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
cd qwt-6\&.2\&.0
|
|
/usr/local/Qt-5\&.0\&.1/bin/qmake qwt\&.pro
|
|
.fi
|
|
.PP
|
|
.PP
|
|
The generated Makefile includes all paths related to the chosen Qt version and the next step is:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
make
|
|
.fi
|
|
.PP
|
|
( On multicore systems you can speed up building the Qwt libraries with running several jobs simultaneously: f\&.e\&. 'make -j4' on a dual core\&. )
|
|
.PP
|
|
Finally you have to install everything below the directories you have specified in qwtconfig\&.pri\&. Usually this is one of the system directories ( /usr/local, /opt, \&.\&.\&. ) where you don't have write permission and then the installation needs to be done as root:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
sudo make install
|
|
.fi
|
|
.PP
|
|
( On systems where sudo is not supported you can do the same with: su -c 'make install' )
|
|
.SS "Windows"
|
|
Qt packages offer a command line interface, that can be found in the Qt application menu: f\&.e 'All Programs -> Qt -> Command Prompt'\&. It is not mandatory to use it, but probably the easiest way as it offers an environment, where everything is initialized for a version of Qt ( f\&.e qmake is in the PATH )\&.
|
|
.PP
|
|
Creating a makefile usually means something like:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
cd qwt-6\&.2\&.0
|
|
qmake qwt\&.pro
|
|
.fi
|
|
.PP
|
|
.PP
|
|
The generated makefile includes all paths related to the chosen Qt version\&.
|
|
.SS "MinGW"
|
|
For MinGW builds the name of the make tool is 'mingw32-make'
|
|
.PP
|
|
.PP
|
|
.nf
|
|
mingw32-make
|
|
.fi
|
|
.PP
|
|
( On multicore systems you can speed up building the Qwt libraries with running several jobs simultaneously: 'mingw32-make -j' )
|
|
.PP
|
|
Finally you have to install everything below the directories you have specified in qwtconfig\&.pri\&.
|
|
.PP
|
|
.PP
|
|
.nf
|
|
mingw32-make install
|
|
.fi
|
|
.PP
|
|
.SS "MSVC"
|
|
For MSVC builds the name of the make tool is 'nmake'\&. Alternatively it is possible to use 'jom' ( https://wiki.qt.io/Jom ), that is usually included in a Qt Creator package\&.
|
|
.PP
|
|
.PP
|
|
.nf
|
|
nmake
|
|
.fi
|
|
.PP
|
|
.PP
|
|
Finally you have to install everything below the directories you have specified in qwtconfig\&.pri\&.
|
|
.PP
|
|
.PP
|
|
.nf
|
|
nmake install
|
|
.fi
|
|
.PP
|
|
.SH "Qwt and the Qt tool chain"
|
|
.PP
|
|
.SS "Designer plugin"
|
|
The Designer plugin and the corresponding Qwt library ( if the plugin has not been built self containing ) have to be compatible with Qt version of the application loading it ( usually the Qt Creator ) - what is often a different version of the Qt libraries you want to build your application with\&. F\&.e on Windows the Qt Creator is usually built with a MSVC compiler - even if included in a MinGW package !
|
|
.PP
|
|
To help Qt Designer/Creator with locating the Qwt Designer plugin you have to set the environment variable QT_PLUGIN_PATH, modify qt\&.conf - or install the plugin to one of the application default paths\&.
|
|
.PP
|
|
The Qt documentation explains all options in detail:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
https://doc.qt.io/qt-5/deployment-plugins.html
|
|
.IP "\(bu" 2
|
|
https://doc.qt.io/qtcreator/adding-plugins.html
|
|
.PP
|
|
.PP
|
|
F\&.e\&. on a Linux system you could add the following lines to \&.bashrc:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
QT_PLUGIN_PATH="${QWT_ROOT}/plugins:$QT_PLUGIN_PATH"
|
|
export QT_PLUGIN_PATH
|
|
.fi
|
|
.PP
|
|
.PP
|
|
When the plugin has not been built including the Qwt library ( see QwtDesignerSelfContained in qwtconfig\&.pri ) the Qt Designer/Creator also needs to locate the Qwt libraries\&. On Unix systems the path to the installed library is compiled into the plugin ( see rpath, ldd ), but on Windows the Qt Creator needs to be configured ( ( \fBRunning a Qwt application\fP ) in the same way as for any application using Qwt\&.
|
|
.PP
|
|
In case of problems the diagnostics of Qt Creator and Designer are very limited ( usually none ), but setting the environment variable QT_DEBUG_PLUGINS might help\&. In the Qt Creator it is possible to check which plugins were loaded successfully and for certain problems it also lists those that were recognized but failed ( \fITools > Form Editor > About Qt Designer Plugins\fP )\&.
|
|
.SS "Online Help"
|
|
The Qwt class documentation can be loaded into the Qt Creator:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
open the settings dialog from the \fITools->Options\fP menu
|
|
.IP "\(bu" 2
|
|
raise the tab 'Help->Documentation'\&.
|
|
.IP "\(bu" 2
|
|
press the \fIAdd\fP button and select qwt-6\&.2\&.0\&.qch\&.
|
|
.PP
|
|
.PP
|
|
Now the context sensitive help ( \fIF1\fP ) works for Qwt classes\&.
|
|
.PP
|
|
For browsing the documentation in the Qt Assistant:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
open the settings dialog from the \fIEdit->Preferences\fP menu
|
|
.IP "\(bu" 2
|
|
raise the tab \fIDocumentation\fP\&.
|
|
.IP "\(bu" 2
|
|
press the \fIAdd\fP button and select qwt-6\&.2\&.0\&.qch\&.
|
|
.PP
|
|
.SH "Building a Qwt application"
|
|
.PP
|
|
All flags and settings that are necessary to compile and link an application using Qwt can be found in the file ${QWT_ROOT}/features/qwt\&.prf\&.
|
|
.PP
|
|
When using qmake it can included from the application project file in 2 different ways:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
Adding Qwt as qmake feature
|
|
.br
|
|
|
|
.br
|
|
When using the qmake feature mechanism you can bind a special version of qmake to a special installation of Qwt without having to add this dependency to the application project\&. How to add Qwt as feature is documented in the \fCqmake docs\fP\&.
|
|
.PP
|
|
After adding Qwt as a feature f\&.e on Linux as a persistent property \&.\&.\&.\&.
|
|
.PP
|
|
.nf
|
|
qmake -set QMAKEFEATURES ${QWT_ROOT}/features
|
|
|
|
.fi
|
|
.PP
|
|
\&.\&. the following line can be added to the application project file:
|
|
.PP
|
|
.nf
|
|
CONFIG += qwt
|
|
|
|
.fi
|
|
.PP
|
|
|
|
.IP "\(bu" 2
|
|
Including qwt\&.prf in the application project file
|
|
.br
|
|
|
|
.br
|
|
Instead of using qwt\&.prf as qmake feature it can be included from the application project file:
|
|
.br
|
|
|
|
.br
|
|
.PP
|
|
.nf
|
|
include ( ${QWT_ROOT}/features/qwt\&.prf )
|
|
.fi
|
|
.PP
|
|
|
|
.br
|
|
The advantage of using a direct include is, that all settings of qwt\&.prf are known to the application project file ( qmake features are included after the application project file has been parsed ) and it can be implemented depending on - f\&.e\&. settings made in qwtconfig\&.pri\&.
|
|
.PP
|
|
.PP
|
|
On Unix platforms it is possible to link a runtime path into the executable, so that the location of the Qwt libraries can be found without having to configure a runtime environment:
|
|
.IP "\(bu" 2
|
|
\fCQMAKE_LFLAGS_RPATH\fP
|
|
.IP "\(bu" 2
|
|
\fCQMAKE_RPATH\fP
|
|
.IP "\(bu" 2
|
|
\fCQMAKE_RPATHDIR\fP
|
|
.PP
|
|
.SH "Running a Qwt application"
|
|
.PP
|
|
When using Qwt as shared library ( DLL ) the \fCdynamic linker\fP has to find it according to the rules of the operating system\&.
|
|
.SS "Windows"
|
|
The only reasonable way to configure the runtime environment - without having to copy the Qwt libraries around - is to modify the PATH variable\&. F\&.e\&. this could be done by adding the following line to some batch file:
|
|
.PP
|
|
.PP
|
|
.nf
|
|
set PATH=%PATH%;${QWT_ROOT}\lib
|
|
.fi
|
|
.PP
|
|
.SS "GNU/Linux"
|
|
Read the documentation about:
|
|
.PP
|
|
.IP "\(bu" 2
|
|
\fIldconfig\fP
|
|
.IP "\(bu" 2
|
|
\fI/etc/ld\&.so\&.conf\fP
|
|
.IP "\(bu" 2
|
|
\fILD_LIBRARY_PATH\fP
|
|
.PP
|
|
.PP
|
|
Using the \fIldd\fP command a configuration can be tested\&.
|