Added overlapGgi to ggiCheck
[foam-extend-3.2.git] / Allwmake.mingw
blob767b4008e77dcf0a1d7658fa86ba6c5cdc2bc798
1 #!/bin/sh
2 #----------------------------------*-sh-*--------------------------------------
3 # ========= |
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration | Version: 3.2
6 # \\ / A nd | Web: http://www.foam-extend.org
7 # \\/ M anipulation | For copyright notice see file Copyright
8 #------------------------------------------------------------------------------
9 # License
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 # Script
26 # Allwmake.mingw
28 # Description
29 # Top-level build script for use with MSYS shell for MinGW-based builds on Windows.
31 # Author:
32 # Cesare Guardino, Alstom Power Ltd., (2015)
34 #------------------------------------------------------------------------------
36 cd ${0%/*} || exit 1 # run from this directory
38 echo
39 echo "=============== FOAM-EXTEND MINGW WINDOWS TOP-LEVEL BUILD SCRIPT ==============="
41 if [ "$PWD" != "$WM_PROJECT_DIR" ]
42 then
43 echo "Error: Current directory is not \$WM_PROJECT_DIR"
44 echo " The environment variable are not consistent with the installation."
45 echo " Check the OpenFOAM entries in your dot-files and source them."
46 exit 1
49 cd $WM_PROJECT_DIR/ThirdParty/mingwBuild
50 echo
51 echo "In directory `pwd`"
52 echo "Configuring your OpenMPI installation ..."
53 ./configure_OpenMPI.sh
54 PACKAGES_DIR=$WM_PROJECT_DIR/ThirdParty/packages
55 if [ -d $PACKAGES_DIR ] ; then
56 echo "Third-party dependencies packages $PACKAGES_DIR already exists."
57 else
58 echo "Building third-party dependencies ... (see `pwd`/build.log)"
59 ./build.sh > build.log 2>&1
60 echo "Installing third-party dependencies ..."
61 rm -rf $PACKAGES_DIR
62 mv x64/install $PACKAGES_DIR
65 cd $WM_PROJECT_DIR
66 echo
67 echo "In directory `pwd`"
68 echo "Build foam-extend ... (see `pwd`/Allwmake.log)"
69 ./Allwmake > Allwmake.log 2>&1
70 echo "Copying MinGW dependencies to $FOAM_APPBIN ..."
71 cp -p $MINGW_HOME/bin/libgcc_s_seh-1.dll $FOAM_APPBIN
72 cp -p $MINGW_HOME/bin/libstdc++-6.dll $FOAM_APPBIN
73 cp -p $MINGW_HOME/bin/libwinpthread-1.dll $FOAM_APPBIN
74 echo "Creating release package ... (see `pwd`/createWindowsBinaryPackage.log)"
75 ./bin/createWindowsBinaryPackage > createWindowsBinaryPackage.log 2>&1
77 echo
78 echo "All done!"