ahk_tests/compile.sh
Sylvain Petreolle 48b60012ff Add a script to build AHK tests with Wine.
The tests are available into AHK-Tests/ and next to their main zz*.ahk script.

svn path=/trunk/ahk_tests/; revision=1890
2012-11-14 13:32:39 +00:00

16 lines
702 B
Bash
Executable File

#!/bin/bash
#detect wine and AHK compiler
if [ x"$WINE"x == "xx" ] ; then WINE=$(which wine) ; fi
if [ ! -x "$WINE" ] ; then echo Wine was not found in path, please install or set WINE variable. ; exit 1; fi
if [ ! -f Compiler/Ahk2Exe.exe ] ; then echo Please add AHK compiler here ; exit 1 ; fi
read
#get all the tests
TESTSLIST=$( find . -name zz\*.ahk -exec $WINE winepath -w {} \; )
#avoids being bothered by spaces in file names
IFS=$(echo -en "\n\b")
#build all the tests and copy them to AHK-Tests/ directory
for TEST in $TESTSLIST ; do
"$WINE" Compiler/Ahk2Exe.exe /in "$TEST" /out "${TEST%.ahk}.exe"
done
find . -wholename ./AHK-Tests -prune -o -name zz_*test.exe -exec cp {} AHK-Tests/ \;