zbar-windows/travis/windows.pc.script
Mauro Carvalho Chehab 2ee97d2b9b travis: fix native Windows build
With msys2, there's no need to use and target on configure.
Also, the ones used there are now wrong.

The prefix is also wrong: it causes autoconf to crash.

As we don't really matter where it will be installed, let's
just use, instead, the msys2 prefix.

We also need to re-enable the CONFIG_SHELL, as this is
called by make. By default, it would try to use a shell
under "Program Files", with doesn't work, due to the
white spaces.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-04-08 10:16:19 +02:00

31 lines
598 B
Bash
Executable File

#!/bin/bash
set -e
export CONFIG_SHELL=/C/tools/msys64/usr/bin/bash.exe
export CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1;
export AR=gcc-ar;
export RANLIB=gcc-ranlib;
$shell autoreconf -vfi
prefix=/C/tools/msys64/mingw64/
$shell ./configure \
--prefix=$prefix \
${DIRECT_SHOW} \
--without-gtk \
--without-python \
--without-qt --without-java \
--without-imagemagick \
--enable-pthread --disable-dependency-tracking
echo "Building"
$shell $MAKE
echo "Installing"
# Ignore errors here, as it won't be able to create some dirs
$shell $MAKE install || true
echo "Success!"