~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to install-dependencies.sh

  • Committer: The Widelands Bunnybot
  • Date: 2024-01-05 15:31:04 UTC
  • Revision ID: bunnybot@widelands.org-20240105153104-xf1uro9tsk1iadrf
mingw dependency system (CB #4653 / GH #6290)

(by bunnybot)
301d6725e2d5477eb1d0dde4d8a580fbdafc4374

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
echo "* openbsd   OpenBSD"
38
38
echo " "
39
39
echo "Windows:"
40
 
echo "* msys32    MSys 32bit"
 
40
echo "* msys32    MSys 32bit (deprecated)"
41
41
echo "* msys64    MSys 64bit"
42
42
echo "* vcpkg     MSVC"
43
43
echo " "
96
96
   shift 1
97
97
fi
98
98
 
 
99
WL_DIR="$(dirname $0)"
 
100
 
99
101
asio_not_packaged() {
100
 
   WL_DIR="$(dirname $0)"
101
102
   if [ -f /usr/include/asio.hpp -o -f "${WL_DIR}"/auto_dependencies/asio/asio.hpp ]; then
102
103
      return 0
103
104
   elif "${WL_DIR}"/utils/download_asio.sh "$1" ; then
120
121
   fi
121
122
}
122
123
 
123
 
install_msys_pkgs() {
124
 
   ARCH=$1
125
 
   shift 1
126
 
   pacman -S $@ mingw-w64-$ARCH-toolchain git mingw-w64-$ARCH-cmake \
127
 
    mingw-w64-$ARCH-ninja mingw-w64-$ARCH-asio mingw-w64-$ARCH-SDL2_ttf \
128
 
    mingw-w64-$ARCH-SDL2_mixer mingw-w64-$ARCH-SDL2_image \
129
 
    mingw-w64-$ARCH-glew mingw-w64-$ARCH-icu
130
 
}
131
 
 
132
124
# Install the dependencies
133
125
if [ "$DISTRO" = "arch" ]; then
134
126
   echo "Installing dependencies for Arch..."
176
168
   asio_not_packaged "OpenBSD" "doas" || exit 1
177
169
 
178
170
elif [ "$DISTRO" = "msys32" ]; then
 
171
   echo "WARNING: Some msys packages are no longer updated for 32-bit, consider switching to 64-bit!"
179
172
   echo "Installing dependencies for 32-bit Windows..."
180
 
   install_msys_pkgs i686 $@
181
 
   # No more updates for 32bit version...
182
 
   pacman.exe --noconfirm -U https://repo.msys2.org/mingw/i686/mingw-w64-i686-glbinding-3.1.0-3-any.pkg.tar.zst
 
173
   "${WL_DIR}"/utils/windows/install_deps_mingw.sh i686 $@
183
174
 
184
175
elif [ "$DISTRO" = "msys64" ]; then
185
176
   echo "Installing dependencies for 64-bit Windows..."
186
 
   install_msys_pkgs x86_64 $@ mingw-w64-x86_64-glbinding
 
177
   "${WL_DIR}"/utils/windows/install_deps_mingw.sh x86_64 $@
187
178
 
188
179
elif [ "$DISTRO" = "homebrew" ]; then
189
180
   echo "Installing dependencies for Mac Homebrew..."