Generic requirements
In order to compile SciDAVis, you need to install the following libraries:
- Qt for C++ (>=4.3),
- Qwt (>=5.1.0),
- QwtPlot3D (>=0.2.6),
- GSL (>=1.8),
- muParser (>=1.28) and
- zlib (>=1.2.3).
Linux
- 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 SciDAVis (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:
cd scidavis-X.X.X/3rdparty
tar -xvjf /path/to/qwt-Y.Y.Y.tar.bz2 - Rename the new directory to
qwt
:
mv qwt-Y.Y.Y 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
CONFIG += QwtDll
- Build Qwt:
cd qwt; qmake && make; cd ..
On some systems (such as Debian, Ubuntu, ...) theqmake
-Tool for Qt 4.x is calledqmake-qt4
. Make sure you don't use the version that belongs to Qt 3.x. - Get QwtPlot3D sources and also unpack them to scidavis-X.X.X/3rdparty:
tar -xvzf qwtplot3d-Z.Z.Z.tgz
- We also want to build a static version here, so open qwtplot3d/qwtplot3d.pro in your favorite text editor and add the line
CONFIG += staticlib
at a convenient place (say, below the other CONFIG line). - Build qwtplot3d:
cd qwtplot3d; qmake && make; cd ..
- Go to the directory scidavis-X.X.X/scidavis:
cd ../scidavis
- 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 scidavis.pro in a text editor and remove the comment marker (#) from the lineinclude( python.pri )
. - Build SciDAVis:
qmake && make
- You should now be able to run SciDAVis by entering
./scidavis
- Optionally, install SciDAVis on your system (you need root priviliges):
sudo make install
or, alternatively,su -c "make install"
Windows
- Download the "Qt/Windows Open Source Edition" from http://www.qtsoftware.com/downloads/opensource/appdev/windows-cpp. 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.
- Go to the control panel, open "system properties", go to the advanced tab and edit the environment variable "Path":
Append
;D:\Qt\4.3.3\bin;D:\MinGW\bin;D:\Python25
(use the paths where you installed Qt, Python, and MinGW) to the existing string there. - Download the SIP source code for Windows from http://www.riverbankcomputing.co.uk/software/sip/download and unpack it.
- Download the PyQt v4 source code for Windows from http://www.riverbankcomputing.co.uk/software/pyqt/download and unpack it.
- Download the "Developer files" of the GSL from http://gnuwin32.sourceforge.net/packages/gsl.htm and unpack them.
- Download the "Developer files" of zlib from http://gnuwin32.sourceforge.net/packages/zlib.htm and unpack them.
- Download the source code of the latest version of Qwt from http://sourceforge.net/project/showfiles.php?group_id=13693 an unpack it.
- Download the source code of QwtPlot3D from http://qwtplot3d.sourceforge.net/web/navigation/download_frame.html and unpack it.
- Download the source code of muParser from http://sourceforge.net/project/showfiles.php?group_id=137191 and unpack it.
- Download the source code of SciDAVis from
http://scidavis.sourceforge.net/download.html
and unpack it.
Now you have everything you need and you can start compiling. Make sure you compile everything with the same version of Qt, otherwise you may encounter problems. - Compile Qwt:
First edit the qwtconfig.pri file. Comment out the line
CONFIG += QwtDll
by prepending a '#'. You can also comment out the lineCONFIG += QwtWidgets
since the Qwt widgets are not used in SciDAVis. The same is true for the Qt designer plugin (comment outCONFIG QwtDesigner
). If you want, change the lineINSTALLBASE = C:/Qwt-5.1.0
to some other folder to install to. Now open a DOS prompt and go to the folder containing qwt.pro and qwtcontig.pri using thecd
command. Then typeqmake
. If everything goes right, no message will be displayed and a "Makefile" will be created. Next executemake
and wait for Qwt to compile. Finally typemake install
to install Qwt in the folder specified byINSTALLBASE
. - Compile QwtPlot3D:
Compiling QwtPlot3D statically is hard, maybe even impossible. Therefore the easiest way is to compile it as a dll and copy it into the folder containing scidavis.exe at the end.
Edit the
qwtplot3d.pro
file and look for the lineCONFIG += .... debug
. Replace the worddebug
withrelease
. Secondly, comment out the line containingvclib
. Then go to your DOS prompt to the directory containing qwtplot3d.pro and typeqmake
followed bymake
. - Compile SIP and PyQt:
Go to the directory where you unpacked the SIP source code. Execute
python configure.py -p win32-g++
followed bymake
andmake install
. Now go to the directory where you unpacked PyQt and executepython configure.py
(accept the license by typing "yes"),make
, andmake install
. - Compile muParser:
Go the "build" directory and execute
make -fmakefile.mingw
there. - Compile SciDAVis:
Edit the
scidavis/scidavis.pro
file. You have to change the paths there to the paths where you installed the libraries described above. The corresponding lines are the ones beginning withwin32:INCLUDEPATH
andwin32:LIBS
. To enable the Python support, remove the "#" beforeinclude( python.pri )
. You can also customize where to install SciDAVis by replacingc:/scidavis
in this line:win32: INSTALLBASE = c:/scidavis
. If you want the fit plugins, you will have to edit the paths to GSL in the .pro files there too. The corresponding lines are these:win32:INCLUDEPATH += c:/gsl/include win32:LIBS += c:/gsl/lib/libgsl.a win32:LIBS += c:/gsl/lib/libgslcblas.a
. If not, comment out or remove the lines "SUBDIRS += fitPlugins/fitRational0\
andfitPlugins/fitRational1
in the main .pro file. Then go to the base directory of the SciDAVis source and executeqmake
,make
, andmake install
. - Copy qwtplot3d.dll to the directory where you installed scidavis.exe.
Mac OS X
These instructions where kindly provided by Yu-Hung Lien.
Downloading the requirements:
Please download Qt, GSL, MuParser, Qwt and Qwt3D from their web sites before building:
- Qt: ftp://ftp.trolltech.com/qt/source/qt-mac-opensource-4.4.1.dmg (this is for version 4.4.1, the current one at the time of writing, there may be a newer)
- GSL: ftp://ftp.gnu.org/gnu/gsl/ (the current version at the time of writing: 1.11)
- muParser: http://downloads.sourceforge.net/muparser/muparser_v130.tar.gz?modtime=1219351493&big_mirror=0" (the current version at the time of writing: 1.30)
- Qwt: http://downloads.sourceforge.net/qwt/qwt-5.1.1.zip?modtime=1211655872&big_mirror=0 (the current version at the time of writing: 5.1.1)
- QwtPlot3D: http://prdownloads.sourceforge.net/qwtplot3d/qwtplot3d-0.2.7.zip?download (the current version at the time of writing: 0.2.7)
(I) Building the OS X binary on one's own platform:
- Open the image file and install Qt for Mac.
- Open Terminal and change to the directory which the gsl-x.xx.tar.gz locates. For example, type "cd Downloads", if gsl-x.xx.tar.gz locates in the downloads folder of your home directory.
- Type " tar -xzf gsl-x.xx.tar.gz" to extract the files
- Type "cd gsl-x.xx"
- Type "./configure".
- Type " sudo make" and enter your password as prompted.
- If there is no error occurring, then type "sudo make install" to install GSL. If you regret for the installation, you can type "sudo make uninstall". If there is any error occurs and you want to restart the process, please type "make clean".
- Change to the directory which the muparser*.tar.gz locates and type " tar -xzf muparser*.tar.gz" to extract the files.
- Type "cd muparser".
- Type "./configure --enable-shared=no" because scidavis requires static library.
- Type "make".
- Type "sudo make install". The same options of make in (7) are still applicable.
- Change to the directory which the qwt*.zip locates and type "unzip qwt*.zip" to extract the files.
- Change to the directory which the qwtplot3d*.zip locates and type "unzip qwtplot3d*.zip" to extract the files.
- Change to the directory which the scidavis*.zip locates and type "unzip scidavis*.zip" to extract the files.
- Copy both qwt-*.*.* and qwtplot3d folders into scidavis_*/3rdparty/, and change the folder name qwt-*.*.* into qwt
- Change to the newly created directory scidavis*/3rdparty/qwt
- Open qwtconfig.pri with any text editor and add "#" at the beginning of the line "CONFIG += QwtDll" for building static library.
- Type "qmake -spec macx-g++" to create make file for gcc compilier instead of xcode.
- Type "make". The same option "clean" of make in (7) is still applicable here.
- Change to the newly created directory scidavis*/3rdparty/qwtplot3d
- Open qwtplot3d.pro with any text editor and add a line "CONFIG += staticlib" next to the line "QT += opengl" for building static library.
- Type "qmake -spec macx-g++" to create make file for gcc compilier instead of xcode.
- Type "make". The same option "clean" of make in (7) is still applicable here.
- Change to the directory scidavis*/ and type "qmake -spec macx-g++"
- Type "sudo make"
- As the building ends up with no error, the scidavis application will be in scidavis*/scidavis. Unfortunately, the icon seems missed for some unknown reason and shows as a generic application icon.
The whole process is essentially same as above except some extra commands for universal binaries. The references for building universal binaries for typical unix make systems can be found at:
- Porting UNIX/Linux Applications to Mac OS X: Compiling for Multiple CPU Architectures
- Building Universal Binaries from "configure"-based Open Source Projects
- qmake Platform Notes
- Deploying an Application on Qt/Mac
The basic step for building UB is to pass the option "-arch ppc -arch i386" to compiler gcc and linker ld. Qt simply takes care this problem by adding the block
macx {
CONFIG += x86 ppc
}
in each source's *.pro file. However, it is somewhat different for unix "configure"-base stuffs. The followings are the procedure for reference.- Building GSL in UB
- Change to the root directory of GSL source and type "./configure --disable-dependency-tracking"
- Type "make CFLAGS="-g -O2 -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc"" to pass the desired option. The original values of CFLAGS and LDFLAGS in makefile after executing configure script are "-g -O2" and "", respectively. Therefore, I just append "-arch i386 -arch ppc" to the original values and put them after "make" to override.
- Same as (I).(7).
- Building muParser in UB
- Change to the root directory of GSL source and type "./configure --enable-shared=no --disable-dependency-tracking".
- Type "make CPPFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc"". I do not use CFLAGS variable becuase the makefile does not contain it. However, I find CPPFLAGS, which should stands for c++ flags, in makefile and then I use it to pass the desired option.
- Same as (I).(12).
- Building Qwt and QwtPlot3D in UB
- Change to scidavis*/3rdparty/qwt and open qwtconfig.pri with text editor.
- Adding the block
- Same as (I).(18)--(20)
- Change to scidavis*/3rdparty/qwtplot3d and open qwtplot3d.pro with text editor.
- Adding the block
macx {
after "QT += opengl". In fact, this location is somewhat arbitrary and not necessary to be here.
CONFIG += x86 ppc
} - Same as (I).(22)--(24)
- Building SciDavis in UB
- Change to scidavis*/scidavis and open scidavis.pro with text editor.
- Adding the block
macx {
in the section for "Default settings for Linux / Mac OS X"
CONFIG += x86 ppc
} - Same as (I).(25)--(35)
macx {
CONFIG += x86 ppc
}
after "CONFIG += thread". In fact, this location is somewhat arbitrary and not necessary to be here.
Closing remark: The described procedures are testes and built on OS X 10.5.4 and a macbook. The older OS such as 10.4.x and PPC machine might need to minor revision on the procedures. For example, "QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk" might need to be added into the *.pro, "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" need to be added into CFLAGS and LDFLAGS.
Good luck building scidavis on Mac OS X. - Yu-Hung Lien
Additional information
Forums and mailing lists:
If you want to discuss SciDAVis with other users (or the developers) or if you are insterested in its further development, you can go to the SciDAVis forum or subscribe to the SciDAVis mailing list.License:
SciDAVis 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 SciDAVis 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.
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.