|
| 1 | +# This uses manylinux build scripts to build dependencies on windows. |
| 2 | + |
| 3 | +set -e -x |
| 4 | + |
| 5 | +# The below three lines convert something like D:\path\goes\here to /d/path/goes/here |
| 6 | +export BASE_DIR=$(echo "$GITHUB_WORKSPACE" | tr '[:upper:]' '[:lower:]') |
| 7 | +export BASE_DIR="${BASE_DIR//\\//}" # //\\// replaces all \ with / in the variable |
| 8 | +export BASE_DIR="/${BASE_DIR//:/}" # remove colon from drive part, add leading / |
| 9 | + |
| 10 | +export PG_DEP_PREFIX="$BASE_DIR/pygame_win_deps_$WIN_ARCH" |
| 11 | + |
| 12 | +export PKG_CONFIG_PATH="$PG_DEP_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 13 | + |
| 14 | +mkdir $PG_DEP_PREFIX |
| 15 | + |
| 16 | +# for great speed. |
| 17 | +export MAKEFLAGS="-j 2" |
| 18 | + |
| 19 | +# for scripts using ./configure |
| 20 | +export CC="gcc" |
| 21 | +export CXX="g++" |
| 22 | + |
| 23 | +# With this we |
| 24 | +# 1) Force install prefix to $PG_DEP_PREFIX |
| 25 | +# 2) use lib directory within $PG_DEP_PREFIX (and not lib64) |
| 26 | +# 3) make release binaries |
| 27 | +# 4) build shared libraries |
| 28 | +# 5) make cmake use gcc/g++/make |
| 29 | +export PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PG_DEP_PREFIX \ |
| 30 | + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ |
| 31 | + -DCMAKE_BUILD_TYPE=Release \ |
| 32 | + -DBUILD_SHARED_LIBS=true \ |
| 33 | + -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_MAKE_PROGRAM=make" |
| 34 | + |
| 35 | +export CMAKE_GENERATOR="MSYS Makefiles" |
| 36 | + |
| 37 | +export PG_BASE_CONFIGURE_FLAGS="--prefix=$PG_DEP_PREFIX" |
| 38 | + |
| 39 | +export PG_BASE_MESON_FLAGS="--prefix=$PG_DEP_PREFIX \ |
| 40 | + -Dlibdir=lib \ |
| 41 | + -Dbuildtype=release \ |
| 42 | + -Ddefault_library=shared" |
| 43 | + |
| 44 | +cd ../manylinux-build/docker_base |
| 45 | + |
| 46 | +# Now start installing dependencies |
| 47 | +# --------------------------------- |
| 48 | + |
| 49 | +# install some buildtools |
| 50 | +bash buildtools/install.sh |
| 51 | + |
| 52 | +# sdl_image deps |
| 53 | +bash zlib-ng/build-zlib-ng.sh |
| 54 | +bash libpng/build-png.sh # depends on zlib |
| 55 | +bash libjpegturbo/build-jpeg-turbo.sh |
| 56 | +bash libtiff/build-tiff.sh |
| 57 | +bash libwebp/build-webp.sh |
| 58 | + |
| 59 | +# freetype (also sdl_ttf dep) |
| 60 | +bash brotli/build-brotli.sh |
| 61 | +bash bzip2/build-bzip2.sh |
| 62 | +bash freetype/build-freetype.sh |
| 63 | + |
| 64 | +# sdl_mixer deps |
| 65 | +bash libmodplug/build-libmodplug.sh |
| 66 | +bash ogg/build-ogg.sh |
| 67 | +bash flac/build-flac.sh |
| 68 | +bash mpg123/build-mpg123.sh |
| 69 | +bash opus/build-opus.sh # needs libogg (which is a container format) |
| 70 | + |
| 71 | +# fluidsynth (for sdl_mixer) |
| 72 | +# bash gettext/build-gettext.sh |
| 73 | +bash glib/build-glib.sh |
| 74 | +bash sndfile/build-sndfile.sh |
| 75 | +bash fluidsynth/build-fluidsynth.sh |
| 76 | + |
| 77 | +bash sdl_libs/build-sdl2-libs.sh |
| 78 | + |
| 79 | +# for pygame.midi |
| 80 | +bash portmidi/build-portmidi.sh |
0 commit comments