mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-04 04:50:22 +00:00
Update GitHub workflow to install FreeType dependencies for Linux and macOS
This commit is contained in:
parent
56b7ac61d3
commit
ee4d07991d
8
.github/workflows/build-process.yml
vendored
8
.github/workflows/build-process.yml
vendored
|
@ -44,9 +44,13 @@ jobs:
|
|||
with:
|
||||
ssh-private-key: ${{ secrets.ACTION_DEPLOY_KEY }}
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install dependencies on Linux
|
||||
if: ${{ matrix.prefix == 'lnx' }}
|
||||
run: sudo apt update && sudo apt install build-essential x11-utils mesa-common-dev libglu1-mesa-dev libasound2-dev zlib1g-dev pulseaudio dbus-x11 libportaudio2 libcurl4-openssl-dev
|
||||
run: sudo apt update && sudo apt install build-essential pkg-config x11-utils mesa-common-dev libglu1-mesa-dev libasound2-dev zlib1g-dev pulseaudio dbus-x11 libportaudio2 libcurl4-openssl-dev libfreetype-dev libpng-dev
|
||||
|
||||
- name: Install dependencies on macOS
|
||||
if: ${{ matrix.prefix == 'osx' }}
|
||||
run: brew update && brew install pkg-config freetype libpng
|
||||
|
||||
# Pulseaudio puts a dummy ALSA device in place, which allows us to do
|
||||
# audio testing on Linux
|
||||
|
|
|
@ -13,9 +13,11 @@ $(PATH_INTERNAL_C)/parts/video/font/%.o: $(PATH_INTERNAL_C)/parts/video/font/%.c
|
|||
$(CXX) -O2 $(CXXFLAGS) -DDEPENDENCY_CONSOLE_ONLY -Wall $< -c -o $@
|
||||
|
||||
ifeq ($(OS),win)
|
||||
# The interanal FreeType library is only used for Windows, Linux and macOS use the library provided by their system.
|
||||
# When updating the Freetype library for Windows, simply download the latest source release, delete
|
||||
# the old contents of the freetype2 directory and move the entire Freetype source tree into it.
|
||||
# The internal FreeType library is only used for Windows. Linux and macOS uses
|
||||
# the one installed by their respective package manager. When updating the
|
||||
# FreeType library for Windows, simply download the latest source release,
|
||||
# delete the old contents of the freetype directory and move the entire
|
||||
# FreeType source tree into it.
|
||||
|
||||
FREETYPE_MAKE_FLAGS := OS=Windows_NT
|
||||
FREETYPE_MAKE_FLAGS += CC=../../../../c_compiler/bin/gcc.exe
|
||||
|
@ -29,12 +31,19 @@ $(PATH_INTERNAL_C)/parts/video/font/freetype/config.mk:
|
|||
$(FREETYPE_LIB): $(PATH_INTERNAL_C)/parts/video/font/freetype/config.mk
|
||||
$(MAKE) -C $(PATH_INTERNAL_C)/parts/video/font/freetype -f ./Makefile $(FREETYPE_MAKE_FLAGS)
|
||||
|
||||
# These files are autogenerated by FreeType and sometimes are not deleted
|
||||
# correctly. So, we'll just remove these ourselves.
|
||||
FREETYPE_EXTRA_CLEAN_LIST := \
|
||||
$(PATH_INTERNAL_C)/parts/video/font/freetype/config.mk \
|
||||
$(PATH_INTERNAL_C)/parts/video/font/freetype/objs/freetype.def \
|
||||
$(PATH_INTERNAL_C)/parts/video/font/freetype/objs/ftmodule.h
|
||||
|
||||
.PHONY: clean-freetype-lib
|
||||
clean-freetype-lib:
|
||||
$(MAKE) -C $(PATH_INTERNAL_C)/parts/video/font/freetype -f ./Makefile $(FREETYPE_MAKE_FLAGS) distclean
|
||||
|
||||
CLEAN_DEP_LIST += clean-freetype-lib
|
||||
CLEAN_LIST += $(FREETYPE_LIB) $(FONT_OBJS) $(FONT_STUB_OBJS)
|
||||
CLEAN_LIST += $(FREETYPE_LIB) $(FONT_OBJS) $(FONT_STUB_OBJS) $(FREETYPE_EXTRA_CLEAN_LIST)
|
||||
|
||||
FREETYPE_EXE_LIBS := $(FREETYPE_LIB)
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ if [ "$DISTRO" == "arch" ]; then
|
|||
pkg_install
|
||||
elif [ "$DISTRO" == "linuxmint" ] || [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "zorin" ]; then
|
||||
echo "Debian based distro detected."
|
||||
pkg_list="build-essential x11-utils mesa-common-dev libglu1-mesa-dev libasound2-dev zlib1g-dev libcurl4-openssl-dev $GET_WGET"
|
||||
pkg_list="build-essential pkg-config x11-utils mesa-common-dev libglu1-mesa-dev libasound2-dev zlib1g-dev libcurl4-openssl-dev libfreetype-dev libpng-dev $GET_WGET"
|
||||
installed_packages=`dpkg -l`
|
||||
installer_command="sudo apt-get -y install "
|
||||
pkg_install
|
||||
|
|
|
@ -24,6 +24,17 @@ if [ -z "$(which clang++)" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$(which brew)" ]; then
|
||||
echo "Homebrew Package Manager not found."
|
||||
echo "Attempting to install the Homebrew Package Manager..."
|
||||
echo "After installation is finished, run this setup script again."
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 1
|
||||
else
|
||||
brew install pkg-config freetype libpng
|
||||
fi
|
||||
|
||||
echo "Building 'QB64-PE'"
|
||||
make OS=osx clean
|
||||
make OS=osx BUILD_QB64=y -j3
|
||||
|
|
Loading…
Reference in a new issue