diff --git a/bin/createWindowsBinaryPackage b/bin/createWindowsBinaryPackage index 99142851f..93caa684b 100755 --- a/bin/createWindowsBinaryPackage +++ b/bin/createWindowsBinaryPackage @@ -35,6 +35,22 @@ cd ${0%/*} || exit 1 # run from this directory +create_package() { + RELEASE_DIR=$1 + TYPE=$2 + + PACKAGE_FILE=$RELEASE_DIR.$TYPE + echo "" + echo "Creating $PACKAGE_FILE ..." + 7z -t$TYPE a $PACKAGE_FILE $RELEASE_DIR + + if [ -f $PACKAGE_FILE ] ; then + echo "Successfully created $PACKAGE_FILE" + else + echo "Failed to create $PACKAGE_FILE" + fi +} + echo echo "=========== FOAM-EXTEND WINDOWS STAND-ALONE PACKAGE CREATION SCRIPT ===========" @@ -60,7 +76,6 @@ cp -rp $FOAM_APPBIN $RELEASE_DIR/bin echo "Copying DLLs from lib directory ..." mkdir $RELEASE_DIR/lib cp -p $FOAM_LIBBIN/*.dll $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 @@ -76,13 +91,7 @@ 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 -echo "Zipping up $RELEASE_DIR ..." -PACKAGE_FILE=$RELEASE_DIR.zip -7z a $PACKAGE_FILE $RELEASE_DIR -rm -rf $RELEASE_DIR +create_package $RELEASE_DIR zip +#create_package $RELEASE_DIR 7z -if [ -f $PACKAGE_FILE ] ; then - echo "Successfully created $PACKAGE_FILE" -else - echo "Failed to create $PACKAGE_FILE" -fi +rm -rf $RELEASE_DIR diff --git a/bin/foamWindowsShell.bat b/bin/foamWindowsShell.bat index 3c106fd0a..c85dbb6a4 100644 --- a/bin/foamWindowsShell.bat +++ b/bin/foamWindowsShell.bat @@ -1,6 +1,7 @@ @echo off set FOAM_HOME=%~dp0 +set FOAM_HOME=%FOAM_HOME:~0,-1% call %FOAM_HOME%\setWindowsEnvironment.bat mode 160,40 color 81 diff --git a/bin/setWindowsEnvironment.bat b/bin/setWindowsEnvironment.bat index aefe0fcb6..506f2ec8b 100644 --- a/bin/setWindowsEnvironment.bat +++ b/bin/setWindowsEnvironment.bat @@ -6,6 +6,7 @@ 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 diff --git a/doc/buildInstructions/Windows/READMEBinaryPackage.txt b/doc/buildInstructions/Windows/READMEBinaryPackage.txt index 9b405246d..e2f303b57 100644 --- a/doc/buildInstructions/Windows/READMEBinaryPackage.txt +++ b/doc/buildInstructions/Windows/READMEBinaryPackage.txt @@ -42,7 +42,7 @@ INSTRUCTIONS ON HOW TO INSTALL AND RUN THE WINDOWS VERSION OF FOAM-EXTEND ------------------------------------------------------------------------- -1) Unzip the package .zip to any suitable location on your computer. +1) Unzip the package file to any suitable directory (with no whitespaces) on your computer. 2) Install OpenMPI if you do not already have it. You can download this from: http://www.open-mpi.org/software/ompi/v1.6/downloads/OpenMPI_v1.6.1-1_win64.exe diff --git a/etc/bashrc.mingw b/etc/bashrc.mingw index 143e3286c..fd08e6571 100644 --- a/etc/bashrc.mingw +++ b/etc/bashrc.mingw @@ -44,6 +44,7 @@ set_system_paths() { export GIT_HOME=$PROGRAMS_HOME/Git export MINGW_HOME=$PROGRAMS_HOME/mingw64 export MPI_ROOTDIR=$PROGRAMS_HOME/OpenMPI_v1.6.1-x64 + export PARAVIEW_HOME=$PROGRAMS_HOME/ParaView-4.3.1 #export PERL_HOME=$PROGRAMS_HOME/strawberry-perl-5.20.2.1-64bit/perl export PEXPORTS_HOME=$PROGRAMS_HOME/pexports export PYTHON_HOME=$PROGRAMS_HOME/Python27 @@ -75,6 +76,7 @@ setup_foam_env() { FOAM_ETC_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) export FOAM_INST_DIR=$(readlink -f $FOAM_ETC_DIR/../..) export FOAM_VERBOSE=1 + export MPI_VERSION_MINGW=openmpi-1.6.1 export WM_OSTYPE=MSWindows echo "Sourcing: $FOAM_ETC_DIR/bashrc" . $FOAM_ETC_DIR/bashrc