Changes between Version 2 and Version 3 of DianaWindowsProgrammersGuide


Ignore:
Timestamp:
Mar 29, 2010, 3:23:49 PM (15 years ago)
Author:
ivanovy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DianaWindowsProgrammersGuide

    v2 v3  
    1 = [wiki:DianaWindowsProgrammersGuide] =
     1= [wiki:DianaWindowsProgrammersGuide "Programmer's Guide"] =
    22
    33Making Diana installer for Windows includes three steps:
     
    1717Download all Windows version of packages required for compiling Diana, and compile/install them.
    1818(I installed following components: xerces, swig, python, blas, lapack, cppunit, sundials, ufsparse.)
    19 I recommend to install all in C:\WinDiana. 
     19I recommend to install all in C:\!WinDiana. 
     20
     21Packages installation:[[BR]]
     22 * [http://xerces.apache.org/xerces-c/download.cgi "Xerces 2.8 (3 didn't work)"]
     23{{{/c/WinDiana/src/xerces-c-src_2_8_0}}}[[BR]]
     24{{{$ export XERCESCROOT=`pwd`}}}[[BR]]
     25{{{/c/WinDiana/src/xerces-c-src_2_8_0/src/xercesc}}}[[BR]]
     26{{{$ ./runConfigure -pmingw-msys -cgcc -xg++  -minmem -nwinsock -tnative -rpthread -P/WinDiana/xerces}}}[[BR]]
     27{{{/c/WinDiana/src/xerces-c-src_2_8_0/src/xercesc}}}[[BR]]
     28{{{$ make}}}[[BR]]
     29{{{/c/WinDiana/src/xerces-c-src_2_8_0/src/xercesc}}}[[BR]]
     30{{{$ make install}}}[[BR]]
     31 * [http://sourceforge.net/projects/swig/files/ "Swig 1.3.40"]
     32Requires additional installation of automake, bison.[[BR]]
     33{{{/c/WinDiana/src/swigwin-1.3.40}}}[[BR]]
     34{{{$ ./autogen.sh}}}[[BR]]
     35
     36{{{/c/WinDiana/src/swigwin-1.3.40}}}[[BR]]
     37{{{$ ./configure --prefix /c/WinDiana/}}}[[BR]]
     38
     39{{{/c/WinDiana/src/swigwin-1.3.40}}}[[BR]]
     40{{{$ make}}}[[BR]]
     41
     42{{{/c/WinDiana/src/swigwin-1.3.40}}}[[BR]]
     43{{{$ make install}}}[[BR]]
     44 * [http://www.python.org/ "Python 2.5.4"]
     45At the moment version 2.6.5(release) is avaible but I used 2.5.4 because 2.6.5 don't output error messages in cases of crash.[[BR]]
     46Installation: windows executable installer[[BR]]
     47
     48 * [http://www.netlib.org/lapack/ "BLAS/LAPACK 3.1.1"]
     49
     50Make following changes in make.inc:[[BR]]
     51{{{PLAT = }}}[[BR]]
     52[[BR]]
     53{{{FORTRAN  = gfortran}}}[[BR]]
     54{{{OPTS     = -funroll-all-loops -O3}}}[[BR]]
     55{{{DRVOPTS  = $(OPTS)}}}[[BR]]
     56{{{NOOPT    =}}}[[BR]]
     57{{{LOADER   = gfortran}}}[[BR]]
     58{{{LOADOPTS =}}}[[BR]]
     59[[BR]]
     60{{{TIMER     = NONE}}}[[BR]]
     61
     62{{{/c/WinDiana/src/lapack-3.1.1}}}[[BR]]
     63{{{$ make}}}[[BR]]
     64
     65 * [http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page "CppUnit 1.12.1"]
     66
     67{{{/c/WinDiana/src/cppunit-1.12.1}}}[[BR]]
     68{{{$ ./configure --disable-shared --prefix /c/WinDiana/}}}[[BR]]
     69
     70{{{/c/WinDiana/src/cppunit-1.12.1}}}[[BR]]
     71{{{$ make}}}[[BR]]
     72
     73 * [https://computation.llnl.gov/casc/sundials/download/download.html "Sundials 2.3.0"]
     74
     75{{{/WinDiana/src/sundials-2.3.0}}}[[BR]]
     76{{{$ ./configure --prefix=/WinDiana/sundials}}}[[BR]]
     77{{{/WinDiana/src/sundials-2.3.0}}}[[BR]]
     78{{{$ make}}}[[BR]]
     79
     80 *[http://www.cise.ufl.edu/research/sparse/umfpack/ "UMFPACK 5.4.0"]
     81
     82In UFconfig/UFconfig.mk change[[BR]]
     83{{{BLAS = -L/c/WinDiana/lib -lblas_LINUX -lgfortran -lgfortranbegin -lg2c}}}[[BR]]
     84{{{LAPACK = -llapack_LINUX}}}[[BR]]
     85{{{UMFPACK_CONFIG =}}}[[BR]]
     86
     87{{{/c/WinDiana/src/UMFPACK/UMFPACK}}}[[BR]]
     88{{{$ make}}}[[BR]]
     89----
     90Next step - download from svn Diana sources.
     91Compile Diana sources (configuring, making the same as in Linux).
     92In my case it was:
     93
     94{{{/c/WinDiana/src/diana-0.8.2}}}[[BR]]
     95{{{$ config/bootstrap}}}[[BR]]
     96{{{/c/WinDiana/src/diana-0.8.2}}}[[BR]]
     97{{{$ ./configure --with-xerces=/c/WinDiana/xerces --with-swig=/c/WinDiana/ --with-python=/c/Python25/ --with-blas=/c/WinDiana --with-lapack=/c/WinDiana/ --with-cppunit=/c/WinDiana --with-ufsparse=/c/WinDiana/src/UMFPACK/ --with-sundials=/c/WinDiana/ --prefix=/c/Diana/}}}[[BR]]
     98{{{/c/WinDiana/src/diana-0.8.2}}}[[BR]]
     99{{{$ make}}}[[BR]]
     100{{{ivanovy@PC745 /c/WinDiana/src/diana-0.8.2}}}[[BR]]
     101{{{$ make install}}}[[BR]]
     102
     103== Making installer(for Inno Setup) ==
     104[http://www.jrsoftware.org/isinfo.php "Inno Setup"] is free program for making installer with open sources.
     105I've written pascal-based script for Inno Setup that completely generates Diana installer and components(MinGW, promot, python).
     106Script provides that should be path {{{C:\WinDiana\MakeSetup}}}, which contains following dirs and files:
     107  * promot.exe – executable Promot installer wchich automatically runs after installion.
     108  * python-2.5.4.msi  – executable Python installer wchich automarically runs after installion.
     109  * scipy-0.7.1-win32-superpack-python2.5.exe, numpy-1.3.0-win32-superpack-python2.5.exe – utils for Python.
     110  * makefile-common-actions.mk, makefile-common-vars.mk, makefile-model-library.mk – are needed for work dianac, etc.
     111  * diana.bat, dianac.bat, !DianaConsole.bat, run.bat, mdl2diana.bat – Windows versions of Diana executable batch files.
     112  * include – all Diana includes and its components: xerces, swig, etc.
     113  * lib – all Diana libs and its components: xerces, swig, etc.
     114  * MinGW,msys – environment for compiling model sources (dianac).
     115  * LICENSE, packages – information files, they are shown during installation process. (GNU Public License and list of packages).
     116This structure can be changed in field {{{[Files]}}} in script.[[BR]]
     117All fields in script which contains program information, components list, etc. use special structure and functions of Inno-setup. Code in section {{{[Code]}}} developed on Pascal with using WinAPI to find components that had already installed in system and to add/delete required pathes to system PATH.