From eaefc6583b8a1f379aee7b76bbf336518bcfdbdb Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Wed, 5 Aug 2015 13:49:55 +0100 Subject: [PATCH] Updated windows scripts --- bin/createWindowsBinaryPackage | 4 ++-- bin/foamWindowsShell.bat | 4 ++-- doc/buildInstructions/Windows/README.txt | 4 ++-- doc/buildInstructions/Windows/READMEBinaryPackage.txt | 6 ++++-- etc/bashrc.mingw | 11 +++++++---- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/bin/createWindowsBinaryPackage b/bin/createWindowsBinaryPackage index 3675d62d2..ab4681516 100755 --- a/bin/createWindowsBinaryPackage +++ b/bin/createWindowsBinaryPackage @@ -66,8 +66,8 @@ cp -p $FOAM_MPI_LIBBIN/*.dll $RELEASE_DIR/lib/$MPI_VERSION echo "Copying extra files from etc directory ..." mkdir $RELEASE_DIR/etc -cp -p $WM_PROJECT_DIR/setWindowsEnvironment.bat $RELEASE_DIR/ -cp -p $WM_PROJECT_DIR/foamWindowsShell.bat $RELEASE_DIR/ +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 diff --git a/bin/foamWindowsShell.bat b/bin/foamWindowsShell.bat index 8b311860e..3c106fd0a 100644 --- a/bin/foamWindowsShell.bat +++ b/bin/foamWindowsShell.bat @@ -1,7 +1,7 @@ @echo off -set FOAM_ETC=%~dp0 -call %FOAM_ETC%\env.bat +set FOAM_HOME=%~dp0 +call %FOAM_HOME%\setWindowsEnvironment.bat mode 160,40 color 81 echo --------------------------------- diff --git a/doc/buildInstructions/Windows/README.txt b/doc/buildInstructions/Windows/README.txt index ff2945a44..74d286801 100644 --- a/doc/buildInstructions/Windows/README.txt +++ b/doc/buildInstructions/Windows/README.txt @@ -53,9 +53,9 @@ already have some of these system tools. 3) Download and install MSYS (see reference list below). -4) Download the foam-extend source code from as described on http://wikki.gridcore.se +4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/ -5) Open a new MSYS shell and chdir to your foam-extend-3.1 source directory +5) Open a new MSYS shell and chdir to your foam-extend-3.1 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 diff --git a/doc/buildInstructions/Windows/READMEBinaryPackage.txt b/doc/buildInstructions/Windows/READMEBinaryPackage.txt index 6ed026f77..9b405246d 100644 --- a/doc/buildInstructions/Windows/READMEBinaryPackage.txt +++ b/doc/buildInstructions/Windows/READMEBinaryPackage.txt @@ -58,11 +58,11 @@ INSTRUCTIONS ON HOW TO INSTALL AND RUN THE WINDOWS VERSION OF FOAM-EXTEND installation directory where you install ParaView. 4) Start a new CMD (DOS) prompt, and run the following command: - call \bin\setWindowsEnvironment.bat + call \setWindowsEnvironment.bat where is the full path of the directory where you unzipped the package. The foam environment is now configured correctly for use within this CMD prompt only. - Alternatively, create a desktop shortcut to \bin\foamWindowsShell.bat + Alternatively, create a desktop shortcut to \foamWindowsShell.bat When you double-click this shortcut, a new CMD prompt is open with the foam environment automatically set. 5) From the CMD prompts opened in the previous step, you can now run the usual foam applications, for example: @@ -88,3 +88,5 @@ NOTES explicitly load the required DLL using the "libs" function in system/controlDict, for example: libs ("liblduSolvers.dll"); +2) foam-extend is licensed under GPL v3. The source code is available from http://sourceforge.net/projects/openfoam-extend/ + diff --git a/etc/bashrc.mingw b/etc/bashrc.mingw index a5f1134fe..143e3286c 100644 --- a/etc/bashrc.mingw +++ b/etc/bashrc.mingw @@ -39,7 +39,7 @@ export PROGRAMS_HOME=/c/Programs # {{{ DEFINE USER EDITABLE FUNCTIONS set_system_paths() { - echo "Setting installations directories of required tools ..." + echo "Setting environment variables for user-defined installed system tools and utilities ..." export CMAKE_HOME=$PROGRAMS_HOME/cmake-3.2.3-win32-x86 export GIT_HOME=$PROGRAMS_HOME/Git export MINGW_HOME=$PROGRAMS_HOME/mingw64 @@ -53,7 +53,8 @@ set_system_paths() { } add_to_path() { - echo "Adding required tools to PATH ..." + echo + echo "Adding user-defined installed system tools to PATH ..." export PATH=$ZIP_HOME:$PATH export PATH=$WGET_HOME/bin:$PATH export PATH=$PYTHON_HOME:$PATH @@ -69,12 +70,14 @@ add_to_path() { # {{{ DEFINE PROCESS FUNCTIONS setup_foam_env() { - : ${WM_OSTYPE:=MSWindows}; export WM_OSTYPE + echo export export FLEX_DIR=$(echo $WD\.. | sed 's/\\/\//g' | sed 's/\(.*\):/\/\1/') FOAM_ETC_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) export FOAM_INST_DIR=$(readlink -f $FOAM_ETC_DIR/../..) + export FOAM_VERBOSE=1 + export WM_OSTYPE=MSWindows + echo "Sourcing: $FOAM_ETC_DIR/bashrc" . $FOAM_ETC_DIR/bashrc - . $FOAM_ETC_DIR/prefs.sh.mingw } set_OMPI_env() {