summaryrefslogtreecommitdiff
path: root/other/docker/windows/get_packages.sh
blob: 45c91854d259fc8362ebbcede0280a0885784ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env sh

set -e -x

#=== Install Packages ===

apt-get update

# Arch-independent packages required for building toxcore's dependencies and toxcore itself
apt-get install -y \
    autoconf \
    automake \
    ca-certificates \
    cmake \
    git \
    libtool \
    libc-dev \
    make \
    pkg-config \
    tree \
    yasm

# Arch-dependent packages required for building toxcore's dependencies and toxcore itself
if [ "${SUPPORT_ARCH_i686}" = "true" ]; then
    apt-get install -y \
        g++-mingw-w64-i686 \
        gcc-mingw-w64-i686
fi

if [ "${SUPPORT_ARCH_x86_64}" = "true" ]; then
    apt-get install -y \
        g++-mingw-w64-x86-64 \
        gcc-mingw-w64-x86-64
fi

# Pacakges needed for running toxcore tests
if [ "${SUPPORT_TEST}" = "true" ]; then
    apt-get install -y \
        apt-transport-https \
        curl \
        gnupg \
        texinfo

    # Add Wine package repository to use the latest Wine
    echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list
    curl -o Release.key https://dl.winehq.org/wine-builds/Release.key
    apt-key add Release.key

    dpkg --add-architecture i386
    apt-get update
    apt-get install -y \
        wine-devel \
        wine-devel-amd64 \
        wine-devel-dbg \
        winehq-devel
fi

# Clean up to reduce image size
apt-get clean
rm -rf \
    /var/lib/apt/lists/* \
    /tmp/* \
    /var/tmp/*