mingw.sh 1.15 KB
Newer Older
Vivien Kraus's avatar
Vivien Kraus committed
1
2
#!/bin/sh

Vivien Kraus's avatar
Vivien Kraus committed
3
dnf update -y || exit 1
Vivien Kraus's avatar
Vivien Kraus committed
4

Vivien Kraus's avatar
Vivien Kraus committed
5
6
7
8
9
10
11
12
cat > /etc/rpm/macros.image-language-conf <<EOF
%_install_langs all
EOF

dnf reinstall -y glibc-common || exit 1

dnf install -y \
    \
Vivien Kraus's avatar
Vivien Kraus committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    mingw64-gcc \
    mingw64-readline \
    mingw64-nettle \
    mingw64-libxml2 \
    mingw64-glib2 \
    mingw64-cairo \
    mingw64-gtk3 \
    mingw64-hicolor-icon-theme \
    \
    make \
    wget \
    ImageMagick \
    \
    mingw32-nsis.x86_64 \
    || exit 1

mkdir -p public || exit 1

echo "Build tarot"
VERSION=$(cat dist/version)

cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
cd tarot-$VERSION
mingw64-configure \
    --prefix="/" \
    --exec-prefix="/" \
    --bindir="/bin" \
    --sysconfdir="/etc" \
    --libdir="/lib" \
    --includedir="/include" \
    --datarootdir="/share" \
    --datadir="/share" \
    --infodir="/share/info" \
    --mandir="/share/man" \
    --enable-runtime-prefix='TAROT_PREFIX' \
49
    USER_DATA_DIR_VARIABLE='LOCALAPPDATA' \
Vivien Kraus's avatar
Vivien Kraus committed
50
51
52
53
54
55
56
    --with-static-program-name=yes \
    HOST_SYSROOT="/usr/x86_64-w64-mingw32/sys-root/mingw" \
    || exit 1
make -j 8 nsi || exit 1
cp tarot-setup.exe ../public/
make -j distclean || exit 1
cd ..