:

. $EMPRESSPATH/config/options

USAGE="*** Usage *** $0 { file.exe | file.dll }"

test "$MSSYS_PLATFORM" != SYS_OS_WIN32 && exit 0


X=`cl /help 2>&1 | grep "Compiler Version"`

case "$X" in
  *"Version 14"*)	;;
  *)	exit 0 ;;
esac

test "$1" = "" && echo "$USAGE" && exit 1

OFILE=$1

case $OFILE in
 *.[eE][xX][eE])	TYPE=1 ;;
 *.[dD][lL][lL])	TYPE=2 ;;
 *)			echo "$USAGE"
			exit 1
			;;
esac

test ! -f $OFILE && echo "*** Error *** File '$OFILE' not found" && exit 1
test -f $OFILE.manifest || exit 0

mt.exe -nologo -manifest $OFILE.manifest "-outputresource:$OFILE;$TYPE"
rm $OFILE.manifest
