3 # This is an example script to build Deark using Mingw-w64.
4 # Run this script from your main deark directory, to create mingwobj/deark.exe.
6 # I know that a shell script is not very Windows-y. It's expected to be run
7 # via Cygwin. Otherwise, you may have to translate it to suit your needs.
10 export DEARK_OBJDIR
="mingwobj"
11 # For 32-built builds, change "x86_64" to "i686".
12 TOOLSPREFIX
="x86_64-w64-mingw32-"
13 export CC
=${TOOLSPREFIX}gcc.exe
14 export AR
=${TOOLSPREFIX}ar.exe
15 export DEARK_RC
=src
/_deark_a.rc
16 export DEARK_WINDRES
=${TOOLSPREFIX}windres.exe
17 export LDFLAGS
="-Wall -municode"
23 mkdir
-p $DEARK_OBJDIR/src
24 mkdir
-p $DEARK_OBJDIR/modules
25 # (I don't know how to get windres to accept UTF-16 input.)
26 iconv -f utf16
-t cp1252
< src
/deark.rc
> ${DEARK_RC}
27 touch --reference=src
/deark.rc
${DEARK_RC}