Skip to content

Commit

Permalink
fix Wine fallback in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Oct 15, 2016
1 parent 1403310 commit 8066c6a
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
# Set path
PATH=/usr/bin:/usr/local/bin:/opt/local/bin:/bin:$PATH

# Check for arguments
if [[ $@ == '' ]]
then
echo "Error: No arguments passed"
exit 1
fi

# Native makensis
if makensis -VERSION >/dev/null
then

# Check for arguments
if [[ $@ == '' ]]
then
echo "Error: No arguments passed"
exit 1
fi

makensis "$@"

if [ $? -eq 0 ]
Expand Down Expand Up @@ -55,5 +56,15 @@ else
# Get makensis path
MAKENSIS=$(printf %q "${PROGRAMS_UNIX%?}/NSIS/makensis.exe")

eval wine $MAKENSIS -- $@
# Set arguments
if [[ $1 != '-WX' ]]
then
ARGUMENTS="--"
SCRIPT=$@
else
ARGUMENTS="$1 --"
SCRIPT=$2
fi

eval wine $MAKENSIS $ARGUMENTS "$SCRIPT"
fi

0 comments on commit 8066c6a

Please sign in to comment.