Build instructions update: Cesare Guardino

This commit is contained in:
Hrvoje Jasak 2015-09-08 15:27:00 +01:00
parent 3a6cc671fa
commit 5f6a39a46e
5 changed files with 87 additions and 62 deletions

View file

@ -23,10 +23,11 @@
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# build.sh
# clean.sh
#
# Description
# Removes previous thirdy-party dependencies build directories (does not remove installed packages directory)
# Removes previous thirdy-party dependencies build directories
# (does not remove installed packages directory)
#
# Author:
# Cesare Guardino, Alstom Power Ltd., (2015)

View file

@ -23,7 +23,7 @@
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# createReleasePackage.mingw
# createWindowsBinaryPackage
#
# Description
# Creates stand-alone .zip packages for MinGW-based builds on Windows.
@ -36,13 +36,19 @@
cd ${0%/*} || exit 1 # run from this directory
create_package() {
RELEASE_DIR=$1
PACKAGE_DIR=$1
TYPE=$2
PACKAGE_FILE=$RELEASE_DIR.$TYPE
echo ""
PACKAGE_FILE=$PACKAGE_DIR.$TYPE
if [ -f $PACKAGE_FILE ] ; then
echo "Removing previous $PACKAGE_FILE ..."
rm -f $PACKAGE_FILE
fi
echo "Creating $PACKAGE_FILE ..."
7z -t$TYPE a $PACKAGE_FILE $RELEASE_DIR
7z -t$TYPE a $PACKAGE_FILE $PACKAGE_DIR
if [ -f $PACKAGE_FILE ] ; then
echo "Successfully created $PACKAGE_FILE"
@ -52,7 +58,7 @@ create_package() {
}
echo
echo "=========== FOAM-EXTEND WINDOWS STAND-ALONE PACKAGE CREATION SCRIPT ==========="
echo "=========== FOAM-EXTEND STAND-ALONE PACKAGE CREATION SCRIPT FOR WINDOWS ==========="
if [ "$PWD" != "$WM_PROJECT_DIR/bin" ]
then
@ -62,36 +68,43 @@ then
exit 1
fi
RELEASE_DIR=$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64
MPI_VERSION=`basename $FOAM_MPI_LIBBIN`
if [ -d $RELEASE_DIR ] ; then
echo "Removing previous $RELEASE_DIR"
rm -rf $RELEASE_DIR
RELEASE_DIR=$WM_PROJECT_DIR/releasePackages
if [ ! -d $RELEASE_DIR ] ; then
echo "Creating $RELEASE_DIR ..."
mkdir $RELEASE_DIR
fi
mkdir $RELEASE_DIR
PACKAGE_DIR=$RELEASE_DIR/$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64
if [ -d $PACKAGE_DIR ] ; then
echo "Removing previous $PACKAGE_DIR ..."
rm -rf $PACKAGE_DIR
fi
echo "Creating $PACKAGE_DIR ..."
mkdir $PACKAGE_DIR
echo "Copying bin directory ..."
cp -rp $FOAM_APPBIN $RELEASE_DIR/bin
cp -rp $FOAM_APPBIN $PACKAGE_DIR/bin
echo "Copying DLLs from lib directory ..."
mkdir $RELEASE_DIR/lib
cp -p $FOAM_LIBBIN/*.dll $RELEASE_DIR/lib
mkdir $RELEASE_DIR/lib/$MPI_VERSION
cp -p $FOAM_MPI_LIBBIN/*.dll $RELEASE_DIR/lib/$MPI_VERSION
mkdir $PACKAGE_DIR/lib
cp -p $FOAM_LIBBIN/*.dll $PACKAGE_DIR/lib
echo "Copying extra files from bin directory ..."
cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $PACKAGE_DIR/
cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $PACKAGE_DIR/
cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $PACKAGE_DIR/bin
echo "Copying extra files from etc directory ..."
mkdir $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/etc/controlDict-EXAMPLE $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/etc/cellModels $RELEASE_DIR/etc
cp -rp $WM_PROJECT_DIR/etc/thermoData $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $RELEASE_DIR/bin
cp -p $WM_PROJECT_DIR/COPYING $RELEASE_DIR/LICENSE.txt
unix2dos $RELEASE_DIR/LICENSE.txt
mkdir $PACKAGE_DIR/etc
cp -p $WM_PROJECT_DIR/etc/cellModels $PACKAGE_DIR/etc
cp -rp $WM_PROJECT_DIR/etc/thermoData $PACKAGE_DIR/etc
create_package $RELEASE_DIR zip
#create_package $RELEASE_DIR 7z
echo "Copying doc and license files ..."
cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $PACKAGE_DIR/
cp -p $WM_PROJECT_DIR/COPYING $PACKAGE_DIR/LICENSE.txt
unix2dos $PACKAGE_DIR/LICENSE.txt
rm -rf $RELEASE_DIR
create_package $PACKAGE_DIR zip
create_package $PACKAGE_DIR 7z
rm -rf $PACKAGE_DIR

View file

@ -37,7 +37,7 @@
It is strongly recommended to install all required systems tools and utilities
in a directory with no embedded white spaces. You can skip some steps if you
already have some of these system tools.
already have the correct tools installed on your system.
2. INSTRUCTIONS FOR BUILDING ON WINDOWS
@ -46,22 +46,32 @@ already have some of these system tools.
1) Download and install 7-Zip (see reference list below). This is necessary to
be able to unzip the rest of the required packages mentioned in later steps.
2) Download and install wget, CMake, Git, MinGW-w64, ParaView, PExports, Java, Subversion, Python (see
reference list below). Note that some components (example PExports and GMake)
may already be available in other packages (such as Strawberry Perl), although
you need to be careful of the version numbers.
2) Download and install wget, CMake, Git, MinGW-w64, ParaView, PExports, Java,
Subversion, Python (see reference list below). Note that some components
(for example PExports and GMake) may already be available in other packages
(such as Strawberry Perl), although you need to be careful of the
version numbers.
3) Download and install MSYS (see reference list below). If this is your first
use of MSYS, create a file fstab in cMinGW/1.0/etc with single-line contents:
use of MSYS, create a file fstab in c/MinGW/msys/1.0/etc with single-line
contents:
c/mingw /mingw
c:/mingw /mingw
to mount your home directory. From Windows, you will find your home directory
under c:/MinGW/msys/1.0/home/<user name>
to mount your home directory (this assumes you have installed MSYS to the default
c:/MinGW directory).
From Windows, you will find your home directory under
c:/MinGW/msys/1.0/home/<user name>
4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/
4) Download the foam-extend source code from
5) Open a new MSYS shell and chdir to your foam-extend-3.1 source directory.
http://sourceforge.net/projects/openfoam-extend/
using the command:
git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1 foam-extend-3.2
5) Open a new MSYS shell and chdir to your foam-extend-3.2 source directory.
6) Edit the user-modifiable entries in etc/bashrc.mingw to point to the
locations where you have installed the required system tools in the first two
@ -92,9 +102,9 @@ already have some of these system tools.
approach for developers.
(b). From a standard Windows CMD.exe command prompt using the created
foam-extend-3.1-win-x64.zip stand-alone package. This can be used on any
Windows machine without access to MSYS shells or compilers. See the README.txt
contained within the package for further details.
foam-extend-3.2-win-x64.zip stand-alone package. This can be used on any
Windows machine without access to MSYS shells or compilers. See the
READMEBinaryPackage.txt contained within the package for further details.
3. EXTERNAL PACKAGE REFERENCE
@ -175,22 +185,22 @@ For : Automatically downloading files from internet (eg. for use in automated
git clone --branch nextRelease git://git.code.sf.net/p/openfoam-extend/foam-extend-3.1
4. EXAMPLE OUTPUT FROM SOUCING etc/bashrc.mingw
===============================================
4. EXAMPLE OUTPUT FROM SOURCING etc/bashrc.mingw
================================================
$ . etc/bashrc.mingw
Setting environment variables for user-defined installed system tools and utilities ...
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/bashrc
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/prefs.sh.mingw
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh
MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/mesquite-2.1.2
METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/metis-5.1.0
PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/parmetis-4.0.3
PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/ParMGridGen-1.0
Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/bashrc
Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/prefs.sh.mingw
Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/settings.sh
MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/mesquite-2.1.2
METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/metis-5.1.0
PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/parmetis-4.0.3
PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/ParMGridGen-1.0
LIBCCMIO_DIR is initialized to:
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/scotch_6.0.0
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/packages/scotch_6.0.0
CMAKE_DIR is initialized to:
M4_DIR is initialized to:
BISON_DIR is initialized to:
@ -198,13 +208,13 @@ Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh
ZOLTAN_DIR is initialized to:
PYTHON_DIR is initialized to:
PYFOAM_DIR is initialized to:
PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/PyFoamSiteScripts
PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.2/ThirdParty/PyFoamSiteScripts
HWLOC_DIR is initialized to:
QT_DIR is initialized to:
PARAVIEW_DIR is initialized to:
LLVM_DIR is initialized to:
MESA_DIR is initialized to:
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/aliases.sh
Sourcing: /c/Users/UserName/Git/foam-extend-3.2/etc/aliases.sh
Adding user-defined installed system tools to PATH ...
Setting OpenMPI environment settings ...
@ -233,6 +243,6 @@ Wget: /c/Programs/wget-1.11.4-1/bin/wget.exe [GNU Wget 1.11.4 Copyright (
FOAM_INST_DIR=/c/Users/UserName/Git
WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.1
WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.2
WM_OSTYPE=MSWindows
ENVIRONMENT SETUP COMPLETE.

View file

@ -22,7 +22,7 @@
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# File
# README_Windows.txt
# READMEBinaryPackage.txt
#
# Description
# Installation and usage instructions for stand-alone Windows builds.

View file

@ -22,10 +22,11 @@
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/prefs.sh
# etc/prefs.sh.mingw
#
# Description
# Preset variables for the FOAM configuration - POSIX shell syntax.
# Preset variables for the FOAM configuration - POSIX shell syntax
# for MS Windows
#
# The prefs.sh file will be sourced by the FOAM etc/bashrc when it is
# found