Browse Source

chore(CI): Allow cross compile scripts to be called with relative paths

Like was done in e405868037
pull/6438/head
Anthony Bilinski 4 years ago
parent
commit
58f674864e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 6
      buildscripts/build_ffmpeg_windows.sh
  2. 6
      buildscripts/build_libexif_windows.sh
  3. 10
      buildscripts/build_msgpack_c_windows.sh
  4. 7
      buildscripts/build_openal_windows.sh
  5. 4
      buildscripts/build_openssl_windows.sh
  6. 4
      buildscripts/build_opus_windows.sh
  7. 4
      buildscripts/build_qrencode_windows.sh
  8. 4
      buildscripts/build_qt_windows.sh
  9. 4
      buildscripts/build_sodium_windows.sh
  10. 4
      buildscripts/build_sqlcipher_windows.sh
  11. 8
      buildscripts/build_toxcore_windows.sh
  12. 4
      buildscripts/build_vpx_windows.sh

6
buildscripts/build_ffmpeg_windows.sh

@ -4,6 +4,10 @@ @@ -4,6 +4,10 @@
# Copyright (c) 2017-2021 Maxim Biro <nurupo.contributions@gmail.com>
# Copyright (c) 2021 by The qTox Project Contributors
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build ffmpeg for the windows cross compiling environment"
@ -26,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -26,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_ffmpeg.sh
"${SCRIPT_DIR}/download/download_ffmpeg.sh"
if [ "${ARCH}" == "x86_64" ]; then
FFMPEG_ARCH="x86_64"

6
buildscripts/build_libexif_windows.sh

@ -4,6 +4,10 @@ @@ -4,6 +4,10 @@
# Copyright (c) 2017-2021 Maxim Biro <nurupo.contributions@gmail.com>
# Copyright (c) 2021 by The qTox Project Contributors
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build libexif for the windows cross compiling environment"
@ -29,7 +33,7 @@ fi @@ -29,7 +33,7 @@ fi
set -euo pipefail
"$(dirname $0)"/download/download_libexif.sh
"${SCRIPT_DIR}/download/download_libexif.sh"
CFLAGS="-O2 -g0" ./configure --host="${ARCH}-w64-mingw32" \
--prefix=/windows/ \

10
buildscripts/build_msgpack_c_windows.sh

@ -5,7 +5,15 @@ @@ -5,7 +5,15 @@
set -euo pipefail
"$(dirname "$0")"/download/download_msgpack_c.sh
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build msgpack-c for the windows cross compiling environment"
echo "Usage: $0 --arch {x86_64|i686}"
}
"${SCRIPT_DIR}/download/download_msgpack_c.sh"
cmake -DCMAKE_INSTALL_PREFIX=/windows/ \
-DCMAKE_BUILD_TYPE=Release \

7
buildscripts/build_openal_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build openal for the windows cross compiling environment"
@ -28,9 +30,10 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,9 +30,10 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_openal.sh
"${SCRIPT_DIR}/download/download_openal.sh"
patch -p1 < "${SCRIPT_DIR}/patches/openal-cmake-3-11.patch"
patch -p1 < "$(dirname "$0")"/patches/openal-cmake-3-11.patch
export CFLAGS="-fPIC"
cmake -DCMAKE_INSTALL_PREFIX=/windows/ \

4
buildscripts/build_openssl_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build openssl for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_openssl.sh
"${SCRIPT_DIR}/download/download_openssl.sh"
if [[ "$ARCH" == "x86_64" ]]; then
OPENSSL_ARCH="mingw64"

4
buildscripts/build_opus_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build opus for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_opus.sh
"${SCRIPT_DIR}/download/download_opus.sh"
LDFLAGS="-fstack-protector" CFLAGS="-O2 -g0" \
./configure --host="${ARCH}-w64-mingw32" \

4
buildscripts/build_qrencode_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build qrencode for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_qrencode.sh
"${SCRIPT_DIR}/download/download_qrencode.sh"
CFLAGS="-O2 -g0" ./configure --host="${ARCH}-w64-mingw32" \
--prefix=/windows \

4
buildscripts/build_qt_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build qt for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_qt.sh
"${SCRIPT_DIR}/download/download_qt.sh"
OPENSSL_LIBS=$(pkg-config --libs openssl)
export OPENSSL_LIBS

4
buildscripts/build_sodium_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build sodium for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_sodium.sh
"${SCRIPT_DIR}/download/download_sodium.sh"
LDFLAGS="-fstack-protector" \
./configure --host="${ARCH}-w64-mingw32" \

4
buildscripts/build_sqlcipher_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build sqlcipher for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_sqlcipher.sh
"${SCRIPT_DIR}/download/download_sqlcipher.sh"
sed -i s/'if test "$TARGET_EXEEXT" = ".exe"'/'if test ".exe" = ".exe"'/g configure
sed -i 's|exec $PWD/mksourceid manifest|exec $PWD/mksourceid.exe manifest|g' tool/mksqlite3h.tcl

8
buildscripts/build_toxcore_windows.sh

@ -6,13 +6,15 @@ @@ -6,13 +6,15 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
build_toxcore() {
TOXCORE_SRC="$(realpath toxcore)"
mkdir -p "$TOXCORE_SRC"
pushd $TOXCORE_SRC >/dev/null || exit 1
"$(dirname "$0")"/download/download_toxcore.sh
"${SCRIPT_DIR}/download/download_toxcore.sh"
cmake -DCMAKE_INSTALL_PREFIX=/windows/ \
-DBOOTSTRAP_DAEMON=OFF \
@ -34,7 +36,7 @@ build_toxext() { @@ -34,7 +36,7 @@ build_toxext() {
mkdir -p "$TOXEXT_SRC"
pushd $TOXEXT_SRC >/dev/null || exit 1
"$(dirname "$0")"/download/download_toxext.sh
"${SCRIPT_DIR}/download/download_toxext.sh"
cmake -DCMAKE_INSTALL_PREFIX=/windows/ \
-DCMAKE_BUILD_TYPE=Release \
@ -53,7 +55,7 @@ build_toxext_messages() { @@ -53,7 +55,7 @@ build_toxext_messages() {
mkdir -p "$TOXEXT_MESSAGES_SRC"
pushd $TOXEXT_MESSAGES_SRC > /dev/null || exit 1
"$(dirname "$0")"/download/download_toxext_messages.sh
"${SCRIPT_DIR}/download/download_toxext_messages.sh"
cmake -DCMAKE_INSTALL_PREFIX=/windows/ \
-DCMAKE_BUILD_TYPE=Release \

4
buildscripts/build_vpx_windows.sh

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
set -euo pipefail
SCRIPT_DIR=$(dirname $(realpath "$0"))
usage()
{
echo "Download and build vpx for the windows cross compiling environment"
@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then @@ -28,7 +30,7 @@ if [ "$ARCH" != "i686" ] && [ "$ARCH" != "x86_64" ]; then
exit 1
fi
"$(dirname "$0")"/download/download_vpx.sh
"${SCRIPT_DIR}/download/download_vpx.sh"
# There is a bug in gcc that breaks avx512 on 64-bit Windows https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
# VPX fails to build due to it.

Loading…
Cancel
Save