Index: /issm/trunk/externalpackages/gmsh/install-win64-precompiled.sh
===================================================================
--- /issm/trunk/externalpackages/gmsh/install-win64-precompiled.sh	(revision 23384)
+++ /issm/trunk/externalpackages/gmsh/install-win64-precompiled.sh	(revision 23385)
@@ -3,21 +3,22 @@
 
 # Set gmsh version
-GMSH_VER="3.0.5"
+VER="3.0.5"
 
 # Set tarball name
-GMSH_TARBALL_NAME="gmsh-${GMSH_VER}-win64-precompiled"
+TARBALL_NAME="gmsh-${VER}-win64-precompiled"
+TARBALL=${TARBALL_NAME}.tar.gz
 
 # Clean up from previous installation
-rm -f $GMSH_TARBALL_NAME.tar.gz
-rm -rf install src
+rm -rf install
 
 # Download Windows 64-bit precompiled gmsh from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${GMSH_TARBALL_NAME}.tar.gz" "${GMSH_TARBALL_NAME}.tar.gz"
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${TARBALL}" "${TARBALL}"
 
 # Untar gmsh
-tar -xvzf $GMSH_TARBALL_NAME.tar.gz
+tar -xvzf $TARBALL
 
-# Copy gmsh to path expected by packager
-mkdir install
-cp gmsh.exe install
-rm gmsh.exe
+# Rename untarred dir
+mv $TARBALL_NAME install
+
+# Clean up
+rm -f $TARBALL
Index: /issm/trunk/externalpackages/gmt/install-win64-precompiled.sh
===================================================================
--- /issm/trunk/externalpackages/gmt/install-win64-precompiled.sh	(revision 23385)
+++ /issm/trunk/externalpackages/gmt/install-win64-precompiled.sh	(revision 23385)
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+
+# Set gmt version
+VER="5.4.4"
+
+# Set tarball name
+TARBALL_NAME="gmt-${VER}-win64-precompiled"
+TARBALL=${TARBALL_NAME}.tar.gz
+
+# Clean up from previous installation
+rm -rf install
+
+# Download Windows 64-bit precompiled gmsh from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${TARBALL}" "${TARBALL}"
+
+# Untar gmt
+tar -xvzf $TARBALL
+
+# Rename untarred dir
+mv $TARBALL_NAME install
+
+# Clean up
+rm -f $TARBALL
Index: /issm/trunk/jenkins/windows_static
===================================================================
--- /issm/trunk/jenkins/windows_static	(revision 23384)
+++ /issm/trunk/jenkins/windows_static	(revision 23385)
@@ -9,23 +9,23 @@
 #ISSM CONFIGURATION
 ISSM_CONFIG='--prefix=$ISSM_DIR \
-	--with-vendor=MSVC-Win64  \
-	--with-cxxoptflags='-fp:strict' \
 	--disable-static \
+	--enable-standalone-executables \
 	--enable-standalone-libraries \
-	--with-fortran=no  \
+	--with-matlab-dir=$MATLAB_PATH \
+	--with-vendor=MSVC-Win64 \
+	--with-fortran=no \
 	--without-GiaIvins \
 	--without-Love \
 	--without-kriging \
 	--without-kml \
-	--with-matlab-dir=$MATLAB_PATH \
-	--with-triangle-dir="$ISSM_DIR/externalpackages/triangle/install" \
-	--with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \
+	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib  \
+	--with-mpi-libdir=$ISSM_DIR/externalpackages/petsc/install/lib \
+	--with-mpi-libflags="-Wl,libpetsc.lib" \
 	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
-	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib/  \
-	--with-mpi-libdir="$ISSM_DIR/externalpackages/petsc/install/lib" \
-	--with-mpi-libflags="-Wl,libpetsc.lib" \
+	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+	--with-math77-dir=$ISSM_DIR/externalpackages/math77/install \
 	--with-mpi-include="$ISSM_DIR/externalpackages/petsc/install/include/petsc/mpiuni" \
-	--enable-development \
-	--enable-debugging '
+	--with-cxxoptflags="-fp:strict"'
 
 #PYTHON and MATLAB testing
@@ -39,9 +39,12 @@
 #List of external pakages to be installed and their installation scripts
 EXTERNALPACKAGES="autotools   install-win.sh
-						petsc       install-3.6-win10.sh
-						metis       install-4.0-win10.sh
-						triangle    install-win10.sh
-						gmsh 		install-win64-precompiled.sh
-						shell2junit install.sh"
+					cmake		install.sh
+					petsc       install-3.6-win10.sh
+					metis       install-4.0-win10.sh
+					triangle    install-win10.sh
+					math77		install.sh
+					gmt			install-win64-precompiled.sh
+					gmsh 		install-win64-precompiled.sh
+					shell2junit install.sh"
 
 #-----------------#
Index: /issm/trunk/packagers/win10/package64.sh
===================================================================
--- /issm/trunk/packagers/win10/package64.sh	(revision 23384)
+++ /issm/trunk/packagers/win10/package64.sh	(revision 23385)
@@ -1,4 +1,6 @@
 #!/bin/bash
 
+TARBALL_NAME='ISSM-Win10-64'
+TARBALL=$TARBALL_NAME.tar.gz
 MATLAB_PATH="/cygdrive/c/Programs/MATLAB/R2015a"
 
@@ -6,14 +8,19 @@
 source $ISSM_DIR/externalpackages/windows/windows_environment.sh
 
+# Clean up from previous packaging
+echo "Cleaning up existing assets"
+cd $ISSM_DIR
+rm -rf trunk
+mkdir trunk
+
+# Add/modify required binaries
+cd $ISSM_DIR/bin
+
 echo "Making generic_static.m work like generic.m"
-cd $ISSM_DIR/bin
 cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
 
 echo "Copying scripts from /src to /bin"
-echo "----------------------------------"
 rm $ISSM_DIR/bin/*.m
 find $ISSM_DIR/src/m -name '*.m' | xargs cp -t $ISSM_DIR/bin
-ls $ISSM_DIR/bin
-echo "----------------------------------"
 
 echo "Copying gmsh to bin"
@@ -24,8 +31,18 @@
 fi
 
+# Copy gmt to trunk
+# NOTE: The following assumes the precompiled version of gmt
+echo "Moving gmt to externalpackages"
+if [ -f $ISSM_DIR/externalpackages/gmt/install/bin/gmt ]; then
+	mkdir $ISSM_DIR/trunk/externalpackages
+	mkdir $ISSM_DIR/trunk/externalpackages/gmt
+	cp -a $ISSM_DIR/externalpackages/gmt/install/. $ISSM_DIR/trunk/externalpackages/gmt
+else
+	echo "gmt not found"
+fi
+
 # Check that test 101 runs
 cd $ISSM_DIR/test/NightlyRun
 rm matlab.log
-
 $MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "try, addpath $ISSM_DIR_WIN/bin $ISSM_DIR_WIN/lib; runme('id',101); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
 
@@ -47,15 +64,19 @@
 
 # Create tarball
-TARBALL_NAME=ISSM-Win10-64.tar.gz
+echo "Creating tarball: ${TARBALL_NAME}"
+cd $ISSM_DIR
+rm -f $TARBALL
+cp -rf bin lib test examples scripts trunk/
+
+# Create link to gmt from bin
+# NOTE: It is important that we are in the destination dir when sym linking so that the path is relative
+if [ -f $ISSM_DIR/trunk/externalpackages/gmt/bin/gmt ]; then
+	cd $ISSM_DIR/trunk/bin
+	ln -s ../externalpackages/gmt/bin/gmt.exe ./gmt
+fi
 
 cd $ISSM_DIR
-rm $TARBALL_NAME
-rm -rf trunk
-mkdir trunk
-
-echo "Creating tarball: ${TARBALL_NAME}"
-cp -rf bin lib test examples scripts trunk/
-tar -czf $TARBALL_NAME trunk
-ls -lah $TARBALL_NAME
+tar -czf $TARBALL trunk
+ls -lah $TARBALL
 
 # Ship binaries to website
@@ -77,5 +98,5 @@
 ssh-add ~/.ssh/win_bins-geidi_prime_to_ross
 
-scp $TARBALL_NAME jenkins@ross.ics.uci.edu:/var/www/html/$TARBALL_NAME
+scp $TARBALL jenkins@ross.ics.uci.edu:/var/www/html/$TARBALL
 
 if [ $? -ne 0 ]; then
