Please visit our homepage for more information.

# 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).

QwtPlot3D and Qwt must be compiled against Qt 4.x! If these are compiled with Qt3, the application will crash! See below for how to ensure this.

# Linux

1. 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).
2. Open a terminal window.
3. 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`
4. Rename the new directory to `qwt`:
   `mv qwt-Y.Y.Y qwt`
5. 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`
6. Build Qwt:
   `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.
7. Get QwtPlot3D sources and also unpack them to scidavis-X.X.X/3rdparty:
   `tar -xvzf qwtplot3d-Z.Z.Z.tgz`
8. 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).
9. Build qwtplot3d:
   `cd qwtplot3d; qmake && make; cd ..`
10. Go to the directory scidavis-X.X.X/scidavis:
    `cd ../scidavis`
11. 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 line `include( python.pri )`.
12. Build SciDAVis:
    `qmake && make`
13. You should now be able to run SciDAVis by entering
    `./scidavis`
14. Optionally, install SciDAVis on your system (you need root priviliges):
    `sudo make install`
    or, alternatively,
    `su -c "make install"`

# Windows

1. 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/.
2. Download Python from http://www.python.org/download/ and install it.
3. 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.
4. Download the SIP source code for Windows from http://www.riverbankcomputing.co.uk/software/sip/download and unpack it.
5. Download the PyQt v4 source code for Windows from http://www.riverbankcomputing.co.uk/software/pyqt/download and unpack it.
6. Download the "Developer files" of the GSL from http://gnuwin32.sourceforge.net/packages/gsl.htm and unpack them.
7. Download the "Developer files" of zlib from http://gnuwin32.sourceforge.net/packages/zlib.htm and unpack them.
8. Download the source code of the latest version of Qwt from http://sourceforge.net/project/showfiles.php?group_id=13693 an unpack it.
9. Download the source code of QwtPlot3D from http://qwtplot3d.sourceforge.net/web/navigation/download_frame.html and unpack it.
10. Download the source code of muParser from http://sourceforge.net/project/showfiles.php?group_id=137191 and unpack it.
11. 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.
12. Compile Qwt: First edit the qwtconfig.pri file. Comment out the line `CONFIG += QwtDll` by prepending a '#'. You can also comment out the line `CONFIG += QwtWidgets` since the Qwt widgets are not used in SciDAVis. The same is true for the Qt designer plugin (comment out `CONFIG QwtDesigner`). If you want, change the line `INSTALLBASE = 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 the `cd` command. Then type `qmake`. If everything goes right, no message will be displayed and a "Makefile" will be created. Next execute `make` and wait for Qwt to compile. Finally type `make install` to install Qwt in the folder specified by `INSTALLBASE`.
13. 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 line `CONFIG += .... debug`. Replace the word `debug` with `release`. Secondly, comment out the line containing `vclib`. Then go to your DOS prompt to the directory containing qwtplot3d.pro and type `qmake` followed by `make`.
14. Compile SIP and PyQt: Go to the directory where you unpacked the SIP source code. Execute `python configure.py -p win32-g++` followed by `make` and `make install`. Now go to the directory where you unpacked PyQt and execute `python configure.py` (accept the license by typing "yes"), `make`, and `make install`.
15. Compile muParser: Go the "build" directory and execute `make -fmakefile.mingw` there.
16. 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 with `win32:INCLUDEPATH` and `win32:LIBS`. To enable the Python support, remove the "#" before `include( python.pri )`. You can also customize where to install SciDAVis by replacing `c:/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\` and `fitPlugins/fitRational1` in the main .pro file. Then go to the base directory of the SciDAVis source and execute `qmake`, `make`, and `make install`.
17. 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:

1. 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)
2. GSL: ftp://ftp.gnu.org/gnu/gsl/ (the current version at the time of writing: 1.11)
3. 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)
4. 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)
5. 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:

1. Open the image file and install Qt for Mac.
2. 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.
3. Type " tar -xzf gsl-x.xx.tar.gz" to extract the files
4. Type "cd gsl-x.xx"
5. Type "./configure".
6. Type " sudo make" and enter your password as prompted.
7. 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".
8. Change to the directory which the muparser*.tar.gz locates and type " tar -xzf muparser*.tar.gz" to extract the files.
9. Type "cd muparser".
10. Type "./configure --enable-shared=no" because scidavis requires static library.
11. Type "make".
12. Type "sudo make install". The same options of make in (7) are still applicable.
13. Change to the directory which the qwt*.zip locates and type "unzip qwt*.zip" to extract the files.
14. Change to the directory which the qwtplot3d*.zip locates and type "unzip qwtplot3d*.zip" to extract the files.
15. Change to the directory which the scidavis*.zip locates and type "unzip scidavis*.zip" to extract the files.
16. Copy both qwt-*.*.* and qwtplot3d folders into scidavis_*/3rdparty/, and change the folder name qwt-*.*.* into qwt
17. Change to the newly created directory scidavis*/3rdparty/qwt
18. Open qwtconfig.pri with any text editor and add "#" at the beginning of the line "CONFIG += QwtDll" for building static library.
19. Type "qmake -spec macx-g++" to create make file for gcc compilier instead of xcode.
20. Type "make". The same option "clean" of make in (7) is still applicable here.
21. Change to the newly created directory scidavis*/3rdparty/qwtplot3d
22. Open qwtplot3d.pro with any text editor and add a line "CONFIG += staticlib" next to the line "QT += opengl" for building static library.
23. Type "qmake -spec macx-g++" to create make file for gcc compilier instead of xcode.
24. Type "make". The same option "clean" of make in (7) is still applicable here.
25. Change to the directory scidavis*/ and type "qmake -spec macx-g++"
26. Type "sudo make"
27. 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.

(II) Building Universal Binaries (UB):
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:

1. Porting UNIX/Linux Applications to Mac OS X: Compiling for Multiple CPU Architectures
2. Building Universal Binaries from "configure"-based Open Source Projects
3. qmake Platform Notes
4. 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.

1. Building GSL in UB

1. Change to the root directory of GSL source and type "./configure --disable-dependency-tracking"
2. 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.
3. Same as (I).(7).

2. Building muParser in UB

1. Change to the root directory of GSL source and type "./configure --enable-shared=no --disable-dependency-tracking".
2. 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.
3. Same as (I).(12).

3. Building Qwt and QwtPlot3D in UB

1. Change to scidavis*/3rdparty/qwt and open qwtconfig.pri with text editor.
2. Adding the block
`macx {
CONFIG += x86 ppc
}
` after "CONFIG += thread". In fact, this location is somewhat arbitrary and not necessary to be here.
3. Same as (I).(18)--(20)
4. Change to scidavis*/3rdparty/qwtplot3d and open qwtplot3d.pro with text editor.
5. Adding the block
   `macx {
   CONFIG += x86 ppc
   }` after "QT += opengl". In fact, this location is somewhat arbitrary and not necessary to be here.
6. Same as (I).(22)--(24)

4. Building SciDavis in UB

1. Change to scidavis*/scidavis and open scidavis.pro with text editor.
2. Adding the block
   `macx {
   CONFIG += x86 ppc
   }` in the section for "Default settings for Linux / Mac OS X"
3. Same as (I).(25)--(35)

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.

That said, SciDAVis 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. See here for why we can do this and why we're working on SciDAVis.
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.