"Fossies" - the Fresh Open Source Software Archive

Member "scidavis-2.3.0/howto-compile-scidavis-1d8-installer-for-win32.txt" (12 Jun 2020, 11987 Bytes) of package /linux/misc/scidavis-2.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "howto-compile-scidavis-1d8-installer-for-win32.txt" see the Fossies "Dox" file reference documentation.

    1 How to compile an installer for SciDAVis (version 1.D8) in a 32-bit windows system.
    2 
    3 This process has been used successfully in these systems:
    4     Windows 7 Professional, 32bit, SP1, 4GB RAM
    5     Windows Vista Home Premium, 32-bit, 3GB RAM
    6 
    7 1)  Download and install "Microsoft Visual C++ Compiler for Python 2.7"
    8         http://www.microsoft.com/en-us/download/details.aspx?id=44266
    9         http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
   10     This is a special version of "Visual C++ 9.0" (from Visual Studio 2008)
   11 
   12 2)  Download and install cmake 3.2.2
   13         http://www.cmake.org/files/v3.2/cmake-3.2.2-win32-x86.exe
   14 
   15 3)  Download and install python 2.7.9
   16         https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi
   17 
   18 4)  Download and install Qt-4.8.6
   19         http://www.mirrorservice.org/sites/download.qt-project.org/archive/qt/4.8/4.8.6/qt-opensource-windows-x86-vs2008-4.8.6.exe
   20 
   21 5)  Download and install PyQt4-4.11.3
   22         http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt4-4.11.3-gpl-Py2.7-Qt4.8.6-x32.exe/download
   23     Installing PyQt4 adds an additional copy of some Qt4 executables and libs.
   24     Be careful to use the ones in c:\Qt\4.8.6\bin for compiling Qt4 programs.
   25 
   26 6)  Download and install 7zip
   27         http://www.7-zip.org/a/7z938.msi
   28 
   29 7)  Download and install "nullsoft NSIS 2.46"
   30         http://sourceforge.net/projects/nsis/files/NSIS%202/2.46/nsis-2.46-setup.exe/download
   31 
   32 8)  Download and install some GnuWin (http://gnuwin32.sourceforge.net) utils:
   33         http://sourceforge.net/projects/gnuwin32/files/wget/1.11.4-1/wget-1.11.4-1-setup.exe/download
   34         http://sourceforge.net/projects/gnuwin32/files/patch/2.5.9-7/patch-2.5.9-7-setup.exe/download
   35         http://sourceforge.net/projects/gnuwin32/files/tar/1.13-1/tar-1.13-1-bin.exe/download
   36         http://sourceforge.net/projects/gnuwin32/files/gzip/1.3.12-1/gzip-1.3.12-1-setup.exe/download
   37     When installing them, do not create "Start Menu" or "Desktop" shortcut entries, as the tools will
   38     be used only from a command prompt.
   39     NOTE: patch.exe, when run, will activate UAC and require consent or credentials to run it. See for instance
   40         http://stackoverflow.com/questions/533939/how-to-prevent-vista-from-requiring-elevation-on-patch-exe
   41         https://github.com/bmatzelle/gow/issues/156
   42     There are two possible workarounds
   43         a) copy patch.exe to a file with other name without 'patch' or 'install' in the name and use
   44         the new executable name instead of 'patch.exe'. For instance:
   45             copy patch.exe patx.exe
   46             patx.exe --help
   47         b) Add a 'patch.exe.manifest' manifest file in the same directory as 'patch.exe' ("c:\Program Files\GnuWin32\bin")
   48         You will need also Administrator credentials to copy the file to that directory.
   49         See the above URLs for examples of manifest files or use the attached 'patch.exe.manifest'.
   50 
   51 9)  Open a "Visual C++ 2008 32-bit Command Prompt".
   52     Add Qt, python and GnuWin to PATH:
   53         path c:\Python27;c:\Qt\4.8.6\bin;%PATH%;"c:\Program Files\GnuWin32\bin"
   54         set WORKDIR=%USERPROFILE%\wip
   55         mkdir %WORKDIR%
   56         cd %WORKDIR%
   57         mkdir download
   58         mkdir 3rdparty
   59 
   60 10) Download boost 1.58 source (not binary installer).
   61     Only a few boost header files are needed at compile time for "liborigin" library.
   62         cd %WORKDIR%\download
   63         wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.zip/download
   64         cd %WORKDIR%\3rdparty
   65         "c:\Program Files\7-Zip\7z" x %WORKDIR%\download\boost_1_58_0.zip
   66     Because boost is quite large, last command takes some time to complete. Be patient.
   67 
   68 11) Download GSL 1.16 library
   69         cd %WORKDIR%\download
   70         wget http://ftp.gul.es/gnu/ftp.gnu.org/gnu/gsl/gsl-1.16.tar.gz
   71 
   72         cd %WORKDIR%\3rdparty
   73         gzip -dc %WORKDIR%\download\gsl-1.16.tar.gz | tar x
   74     Get cmake files for GSL
   75         cd %WORKDIR%\3rdparty\gsl-1.16
   76         wget --no-check-certificate https://raw.githubusercontent.com/ampl/gsl/master/CMakeLists.txt
   77 
   78         mkdir cmake
   79         cd %WORKDIR%\3rdparty\gsl-1.16\cmake
   80         wget --no-check-certificate https://raw.githubusercontent.com/ampl/gsl/master/cmake/init.cmake
   81         wget --no-check-certificate https://raw.githubusercontent.com/ampl/gsl/master/cmake/run-cmake.bat
   82 
   83         cd %WORKDIR%\3rdparty\gsl-1.16
   84         mkdir build
   85         cd build
   86         "c:\Program Files\CMake\bin\cmake.exe" -D CMAKE_BUILD_TYPE=Release ..
   87         nmake
   88     It shows several (many) warnings but compiles to the end.
   89         nmake test
   90     Fails only with test 24:fft_test
   91 
   92 12) Download muparser 2.2.4
   93     Go to http://muparser.beltoforion.de/mup_download.html
   94     Download "muparser_v2_2_4.zip" to %WORKDIR%\download
   95 
   96         cd %WORKDIR%\3rdparty
   97         "c:\Program Files\7-Zip\7z.exe" x %WORKDIR%\download\muparser_v2_2_4.zip
   98         cd muparser_v2_2_4\build
   99         nmake -f makefile.vc
  100 
  101 13) Download sip 4.16.7
  102         cd %WORKDIR%\download
  103         wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/sip-4.16.7.zip/download
  104 
  105         cd %WORKDIR%\3rdparty
  106         "c:\Program Files\7-Zip\7z.exe" x %WORKDIR%\download\sip-4.16.7.zip
  107         cd sip-4.16.7
  108 
  109     Default configuration is already for msvc2008, but we have to change 'default_sip_dir', 
  110     the default location of '*.sip' files, because PyQt4 installation leaves them 
  111     at 'C:\Python27\Lib\site-packages\PyQt4\sip'. 
  112         c:\python27\python.exe configure.py --help
  113         c:\python27\python.exe configure.py -v c:\Python27\lib\site-packages\PyQt4\sip
  114         nmake
  115         nmake install
  116 
  117 14) Download Qwt-5.2.3
  118         cd %WORKDIR%\download
  119         wget http://sourceforge.net/projects/qwt/files/qwt/5.2.3/qwt-5.2.3.zip/download
  120 
  121         cd %WORKDIR%\3rdparty
  122         "c:\Program Files\7-Zip\7z.exe" x %WORKDIR%\download\qwt-5.2.3.zip
  123         cd qwt-5.2.3
  124     Compile a static library: edit "qwtconfig.pri" and comment out line 79.
  125         c:\Qt\4.8.6\bin\qmake.exe "CONFIG+=release"
  126         nmake release
  127     To test the library you can compile the code in 'examples' subdir
  128 
  129 15) Download QwtPlot3D
  130         cd %WORKDIR%\download
  131         wget http://sourceforge.net/projects/qwtplot3d/files/qwtplot3d/0.2.7/qwtplot3d-0.2.7.zip/download
  132 
  133         cd %WORKDIR%\3rdparty
  134         "c:\Program Files\7-Zip\7z.exe" x %WORKDIR%\download\qwtplot3d-0.2.7.zip
  135         cd qwtplot3d
  136     Compile a static library. That requires patching the source.
  137         patch -p1 < %WORKDIR%\download\qwtplot3d-static-build.patch
  138         c:\Qt\4.8.6\bin\qmake.exe "CONFIG+=release"
  139         nmake release
  140 
  141 16) Download zlib 1.2.8
  142         cd %WORKDIR%\download
  143         wget http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib128.zip/download
  144 
  145         cd %WORKDIR%\3rdparty
  146         "c:\Program Files\7-Zip\7z.exe" x %WORKDIR%\download\zlib128.zip
  147         cd zlib-1.2.8
  148         mkdir build
  149         cd build
  150         "c:\Program Files\CMake\bin\cmake.exe" -D CMAKE_BUILD_TYPE=Release ..
  151         nmake
  152 
  153 17) Download scidavis 1.D8
  154         cd %WORKDIR%\download
  155         wget http://sourceforge.net/projects/scidavis/files/SciDAVis/1.D8/scidavis.1.D8.tar.gz/download
  156 
  157         cd %WORKDIR%
  158         gzip -dc %WORKDIR%\download\scidavis.1.D8.tar.gz | tar x
  159 
  160     Prepare 3rdparty libraries to compile scidavis
  161         cd %WORKDIR%\scidavis.1.D8\3rdparty
  162         mkdir zlib
  163         copy %WORKDIR%\3rdparty\zlib-1.2.8\build\zlibstatic.lib zlib
  164         copy %WORKDIR%\3rdparty\zlib-1.2.8\build\zconf.h zlib
  165         copy %WORKDIR%\3rdparty\zlib-1.2.8\zlib.h zlib
  166 
  167         cd %WORKDIR%\scidavis.1.D8\3rdparty
  168         mkdir gsl\lib
  169         copy %WORKDIR%\3rdparty\gsl-1.16\build\gsl.lib gsl\lib
  170         copy %WORKDIR%\3rdparty\gsl-1.16\build\gslcblas.lib gsl\lib
  171         mkdir gsl\include\gsl
  172         copy %WORKDIR%\3rdparty\gsl-1.16\build\gsl\*.h gsl\include\gsl
  173 
  174         cd %WORKDIR%\scidavis.1.D8\3rdparty
  175         mkdir qwt\lib
  176         copy %WORKDIR%\3rdparty\qwt-5.2.3\lib\qwt.lib qwt\lib
  177         mkdir qwt\src
  178         copy %WORKDIR%\3rdparty\qwt-5.2.3\src\*.h qwt\src
  179 
  180         cd %WORKDIR%\scidavis.1.D8\3rdparty
  181         mkdir qwtplot3d\lib
  182         copy %WORKDIR%\3rdparty\qwtplot3d\lib\qwtplot3d.lib qwtplot3d\lib
  183         mkdir qwtplot3d\include
  184         copy %WORKDIR%\3rdparty\qwtplot3d\include\*.h qwtplot3d\include
  185 
  186         cd %WORKDIR%\scidavis.1.D8\3rdparty
  187         mkdir muparser\lib
  188         copy %WORKDIR%\3rdparty\muparser_v2_2_4\lib\muparser.lib muparser\lib
  189         mkdir muparser\include
  190         copy %WORKDIR%\3rdparty\muparser_v2_2_4\include\*.h muparser\include
  191 
  192     Patch the scidavis/liborigin sources. Again, for this patch.exe needs administrative rights.
  193         cd %WORKDIR%\scidavis.1.D8
  194         patch --binary -p1 < %WORKDIR%\download\scidavis.1.D8-static-msvc-build.patch
  195 
  196     Start to compile. First liborigin
  197         cd %WORKDIR%\scidavis.1.D8\3rdparty\liborigin
  198         mkdir build
  199         cd build
  200         "c:\Program Files\CMake\bin\cmake.exe" -DCMAKE_BUILD_TYPE:STRING=Release -DBOOST_ROOT:STRING=%WORKDIR%\3rdparty\boost_1_58_0 .. 
  201         nmake
  202 
  203     Now scidavis.
  204         cd %WORKDIR%\scidavis.1.D8
  205         c:\Qt\4.8.6\bin\qmake.exe "CONFIG+=release" "BOOST_ROOT=$(WORKDIR)/3rdparty/boost_1_58_0"
  206         nmake release
  207     Copy some files to output directory
  208         nmake install
  209 
  210     Gather required files in output directory
  211         cd %WORKDIR%\scidavis.1.D8\output
  212         python -m py_compile scidavisrc.py
  213         python -m py_compile scidavisUtil.py
  214         copy c:\Qt\4.8.6\bin\Qt3Support4.dll .
  215         copy c:\Qt\4.8.6\bin\QtCore4.dll     .
  216         copy c:\Qt\4.8.6\bin\QtGui4.dll      .
  217         copy c:\Qt\4.8.6\bin\QtNetwork4.dll  .
  218         copy c:\Qt\4.8.6\bin\QtOpenGL4.dll   .
  219         copy c:\Qt\4.8.6\bin\QtSql4.dll      .
  220         copy c:\Qt\4.8.6\bin\QtSvg4.dll      .
  221         copy c:\Qt\4.8.6\bin\QtXml4.dll      .
  222         copy c:\Qt\4.8.6\bin\assistant.exe   .
  223         copy c:\Windows\system32\python27.dll .
  224         copy c:\Python27\Lib\site-packages\sip.pyd .
  225         mkdir PyQt4
  226         copy c:\Python27\Lib\site-packages\PyQt4\Qt.pyd            PyQt4
  227         copy c:\Python27\Lib\site-packages\PyQt4\QtCore.pyd        PyQt4
  228         copy c:\Python27\Lib\site-packages\PyQt4\QtDesigner.pyd    PyQt4
  229         copy c:\Python27\Lib\site-packages\PyQt4\QtGui.pyd         PyQt4
  230         copy c:\Python27\Lib\site-packages\PyQt4\QtHelp.pyd        PyQt4
  231         copy c:\Python27\Lib\site-packages\PyQt4\QtNetwork.pyd     PyQt4
  232         copy c:\Python27\Lib\site-packages\PyQt4\QtOpenGL.pyd      PyQt4
  233         copy c:\Python27\Lib\site-packages\PyQt4\QtScript.pyd      PyQt4
  234         copy c:\Python27\Lib\site-packages\PyQt4\QtSql.pyd         PyQt4
  235         copy c:\Python27\Lib\site-packages\PyQt4\QtSvg.pyd         PyQt4
  236         copy c:\Python27\Lib\site-packages\PyQt4\QtTest.pyd        PyQt4
  237         copy c:\Python27\Lib\site-packages\PyQt4\QtWebKit.pyd      PyQt4
  238         copy c:\Python27\Lib\site-packages\PyQt4\QtXml.pyd         PyQt4
  239         copy c:\Python27\Lib\site-packages\PyQt4\QtXmlPatterns.pyd PyQt4
  240         copy c:\Python27\Lib\site-packages\PyQt4\__init__.py       PyQt4
  241         copy c:\Python27\Lib\site-packages\PyQt4\__init__.pyc      PyQt4
  242         move README  README.txt
  243         move CHANGES CHANGES.txt
  244         python c:\Python27\Tools\Scripts\lfcr.py README.txt
  245         python c:\Python27\Tools\Scripts\lfcr.py CHANGES.txt
  246         mkdir translations
  247         copy %WORKDIR%\scidavis.1.D8\scidavis\translations\*.qm translations
  248 
  249     Build the win32 installer
  250         "c:\Program Files\NSIS\makensis.exe"  scidavisScriptInstall.nsi
  251     The built NSIS installer is
  252         %WORKDIR%\scidavis.1.D8\output\scidavis-1.D8-win32-setup.exe