2 #----------------------------------*-sh-*--------------------------------------
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration | Version: 4.0
6 # \\ / A nd | Web: http://www.foam-extend.org
7 # \\/ M anipulation | For copyright notice see file Copyright
8 #------------------------------------------------------------------------------
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/>.
29 # Top-level build script for use with MSYS shell for MinGW-based builds on Windows.
32 # Cesare Guardino, Alstom Power Ltd., (2015)
34 #------------------------------------------------------------------------------
36 cd ${0%/*} ||
exit 1 # run from this directory
39 echo "=============== FOAM-EXTEND MINGW WINDOWS TOP-LEVEL BUILD SCRIPT ==============="
41 if [ "$PWD" != "$WM_PROJECT_DIR" ]
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."
49 cd $WM_PROJECT_DIR/ThirdParty
/mingwBuild
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."
58 echo "Building third-party dependencies ... (see `pwd`/build.log)"
59 .
/build.sh
> build.log
2>&1
60 echo "Installing third-party dependencies ..."
62 mv x64
/install $PACKAGES_DIR
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
/libgomp-1.dll
$FOAM_APPBIN
73 cp -p $MINGW_HOME/bin
/libstdc
++-6.dll
$FOAM_APPBIN
74 cp -p $MINGW_HOME/bin
/libwinpthread-1.dll
$FOAM_APPBIN
75 cp -p $WM_THIRD_PARTY_DIR/packages
/pthreads-w32-2-9-1-release
/Pre-built
.2/dll
/x64
/pthreadGC2.dll
$FOAM_APPBIN
76 echo "Creating release package ... (see `pwd`/createWindowsBinaryPackage.log)"
77 .
/bin
/createWindowsBinaryPackage
> createWindowsBinaryPackage.log
2>&1