From fddbc789e54d2e846e0cb75afaac02852066ef80 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 7 Jun 2016 16:31:52 +0100 Subject: [PATCH] Windows update. Cesare Guardino --- bin/createWindowsBinaryPackage | 18 +++++++++--------- bin/foamWindowsShell.bat | 25 +++++++++++++------------ bin/setWindowsEnvironment.bat | 16 ---------------- 3 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 bin/setWindowsEnvironment.bat diff --git a/bin/createWindowsBinaryPackage b/bin/createWindowsBinaryPackage index 6d42733af..444c49699 100755 --- a/bin/createWindowsBinaryPackage +++ b/bin/createWindowsBinaryPackage @@ -85,28 +85,28 @@ mkdir $PACKAGE_DIR echo "Copying bin directory ..." cp -rp $FOAM_APPBIN $PACKAGE_DIR/bin -echo "Copying DLLs from lib directory ..." +echo "Copying DLLs to lib directory ..." 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/ +echo "Copying extra files to bin directory ..." cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $PACKAGE_DIR/bin -unix2dos $PACKAGE_DIR/setWindowsEnvironment.bat -unix2dos $PACKAGE_DIR/foamWindowsShell.bat unix2dos $PACKAGE_DIR/bin/paraFoam.bat -echo "Copying extra files from etc directory ..." +echo "Copying extra files to etc directory ..." mkdir $PACKAGE_DIR/etc cp -p $WM_PROJECT_DIR/etc/cellModels $PACKAGE_DIR/etc cp -rp $WM_PROJECT_DIR/etc/thermoData $PACKAGE_DIR/etc +cp -p $WM_PROJECT_DIR/bin/foamWindowsEnvironment.bat $PACKAGE_DIR/etc +cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $PACKAGE_DIR/etc +unix2dos $PACKAGE_DIR/etc/foamWindowsEnvironment.bat +unix2dos $PACKAGE_DIR/etc/foamWindowsShell.bat echo "Copying doc and license files ..." -cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $PACKAGE_DIR/ +cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $PACKAGE_DIR/README.txt cp -p $WM_PROJECT_DIR/COPYING $PACKAGE_DIR/LICENSE.txt unix2dos $PACKAGE_DIR/LICENSE.txt -unix2dos $PACKAGE_DIR/READMEBinaryPackage.txt +unix2dos $PACKAGE_DIR/README.txt echo "Creating archives ..." create_package $PACKAGE_DIR zip diff --git a/bin/foamWindowsShell.bat b/bin/foamWindowsShell.bat index 153fdc717..c418d585d 100644 --- a/bin/foamWindowsShell.bat +++ b/bin/foamWindowsShell.bat @@ -1,12 +1,13 @@ -@echo off - -set FOAM_HOME=%~dp0 -set FOAM_HOME=%FOAM_HOME:~0,-1% -call %FOAM_HOME%\setWindowsEnvironment.bat -mode 160,40 -color 81 -echo --------------------------------- -echo Command shell for foam-extend-4.0 -echo --------------------------------- -echo/ -cmd.exe +@echo off + +set FOAM_ETC_DIR=%~dp0 +if #%FOAM_ETC_DIR:~-1%# == #\# set FOAM_ETC_DIR=%FOAM_ETC_DIR:~0,-1% +call "%FOAM_ETC_DIR%\foamWindowsEnvironment.bat" +set FOAM_ETC_DIR= +mode 160,40 +color 81 +echo --------------------------------- +echo Command shell for foam-extend-4.0 +echo --------------------------------- +echo/ +cmd.exe diff --git a/bin/setWindowsEnvironment.bat b/bin/setWindowsEnvironment.bat deleted file mode 100644 index 039dc6803..000000000 --- a/bin/setWindowsEnvironment.bat +++ /dev/null @@ -1,16 +0,0 @@ -@echo off - -rem =========== USER EDITABLE SETTINGS =========== -rem set MPI_ROOTDIR=C:\Programs\OpenMPI_v1.6.1-x64 -rem set PARAVIEW_HOME=C:\Programs\ParaView-4.3.1 -rem ============================================== - -set FOAM_HOME=%~dp0 -set FOAM_HOME=%FOAM_HOME:~0,-1% -set WM_PROJECT_DIR=%FOAM_HOME% - -set MPI_BUFFER_SIZE=20000000 - -if defined PARAVIEW_HOME set PATH=%PARAVIEW_HOME%\bin;%PATH% -if defined MPI_ROOTDIR set PATH=%MPI_ROOTDIR%\bin;%PATH% -set PATH=%FOAM_HOME%\lib;%FOAM_HOME%\bin;%PATH%