tomato/other/docker/windows/get_packages.sh
Green Sky fd4c16d090 Squashed 'external/toxcore/c-toxcore/' changes from da438763d5b..671b1f92332
671b1f92332 fix: toxav rtp temp buffer allocation size was too large and cast from 32bit to 16bit, causing a overflow and making the allocated size too small
258148bd4e1 chore(ci): new minimum for all android versions is 21
d369c93c489 chore: Fix Emscripten build failing with no host specified
51b24d1c239 chore: Run CompCert on the stable branch of libsodium
cab1f7d522b chore: Update WineHQ's apt key hash
102a1fa9b82 chore: Fix -Werror=maybe-uninitialized in a test
cc9515da9c7 chore: Fix cpplint failing to install
3485b5feef3 chore: Disable -Wswitch-default and -Wunsafe-buffer-usage
719041e04b6 chore: Fix Circle CI failing on a missing clang lib
5344d7f84d0 fix: Memory leak in the bootstrap daemon
fa201681e18 cleanup: Remove useless if clause
7572888a218 chore: Fix GitHub actions deprecation warnings

git-subtree-dir: external/toxcore/c-toxcore
git-subtree-split: 671b1f92332a8314dccf76d5df93c0b6c1230636
2024-09-19 13:45:12 +02:00

72 lines
1.8 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e -x
#=== Install Packages ===
apt-get update
apt-get upgrade -y
# Arch-independent packages required for building toxcore's dependencies and toxcore itself
apt-get install -y \
autoconf \
automake \
ca-certificates \
cmake \
curl \
libc-dev \
libtool \
make \
mingw-w64-tools \
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
# Packages needed for running toxcore tests
if [ "$SUPPORT_TEST" = "true" ]; then
apt-get install -y \
texinfo
CURL_OPTIONS=(-L --connect-timeout 10)
# While we would prefer to use Debian's Wine packages, use WineHQ's packages
# instead as Debian Bookworm's Wine crashes when creating a 64-bit prefix.
# see https://github.com/TokTok/c-toxcore/pull/2713#issuecomment-1967319113
# for the crash details
curl "${CURL_OPTIONS[@]}" -o /etc/apt/keyrings/winehq-archive.key \
https://dl.winehq.org/wine-builds/winehq.key
curl "${CURL_OPTIONS[@]}" -O --output-dir /etc/apt/sources.list.d/ \
https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
. ./check_sha256.sh
check_sha256 "d965d646defe94b3dfba6d5b4406900ac6c81065428bf9d9303ad7a72ee8d1b8" \
"/etc/apt/keyrings/winehq-archive.key"
check_sha256 "8dd8ef66c749d56e798646674c1c185a99b3ed6727ca0fbb5e493951e66c0f9e" \
"/etc/apt/sources.list.d/winehq-bookworm.sources"
dpkg --add-architecture i386
apt-get update
apt-get install -y \
winehq-stable
fi
# Clean up to reduce image size
apt-get clean
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*